USB Power Meter – 5.12 v

USB Power measurement

USB Power Meter – 5.12 v

It is really strange that a data-connector would manage to become a standard power plug, but USB achieved just that: most devices which can work or charge using 5 volts nowadays come with a USB connector. I think this is generally a good thing, one standards means less redundant incompatible hardware, and people don’t need to have N power adapters around. Of course there are compatibility issues, and we already have reached the point where determining the power draw of a device connected over USB is black magic: this can be determined by software nobody implements (original spec), or by putting some magic resistors between pins, with each manufacturer using his own secret sequences.

This leads to the second interesting question: how much power do these various devices use? I just bought a small device that is pretty useful to answer that question: a short USB plug that measures both the voltage and the power consumption on a USB connector. This device only gives you half of the story, how much power goes into the device, not how much was consumed by the power supply (which might be a computer, a printer, or a TV), it still gives some insights into the electrical power consumption of various gizmos – as a good charger typically has 75% efficiency.

For instance, a Qi wireless charger uses 0.04 Amperes when empty, that is 0.2 Watts for doing basically nothing. Charging my Fitbit Charge draws 0.03 Amperes out of my laptop (0.15 Watts). When docked and charged, my iPhone 5 consumes 0.3- 0.4 Amperes (1.5 – 2 Watts).

I’ll need to try more devices around the house. I also would like to measure how efficient the various chargers in the house are.

Flattr this!

Foldable array of solar cell, portable auxiliary battery with solar cell and iPhone 5 charging

Of energy estimations…

Foldable array of solar cell, portable auxiliary battery with solar cell and iPhone 5 charging

I have a vision for solving world hunger: each person just needs to have a small pot in their appartement and grow salad in them. So they will have food. Problem fixed, hand-over the Nobel price please. Thank you very much!

Of course, this is a silly idea – the numbers just don’t add up. It takes many days to grow a single salad, and you need more than a salad every other week to feed a human, not to mention this winter thing. People realise this, because they somehow understand what quantity of food they eat, how fast salads grow. This does not mean that having every person grow her own salad is bad idea, just that it won’t solve world hunger.

When the topic turns to energy, all the common sense flies out of the window: people don’t understand the quantities, so everything seems possible. A typical example is this solar powered window socket. Looks neat no? Just stick the thing to a window, it uses solar energy to recharge itself and acts as a power plug. Cool, no?

This device would contain a 1000mA/h battery that is charged in 10 hours. First problem the voltage is not specified, but if the battery charges in 10 hours, we need a 100mA solar panel. With the current technology, a panel a tad larger that the one in that device would output 100mA at 5V, so let take that as a baseline.

So we have 1A/h at 5V, which gives us 5 W/h (18 KJ) So what can you do with this amount of energy?

  • Run a 1000W hair-drier for 18 seconds.
  • Run a 100W LCD television set for 3 minutes.
  • Run a 40W incandescence light-bulb for 4½ minutes.
  • Run a 10W LCD light-bulb for half an hour.
  • Charge an iPhone 4 (5.254 W/h) to 95%.
  • Charge an iPhone 5s (5.966 W/h) to 84%.
  • Charge a Nexus 7 (16 W/h) to 31%
  • Boil 7 ml of water.

All this is assuming no conversion loss, which would be hard, as the battery would be 5V DC but the plug is 230V AC.

Now I have a solar charger, but it is much larger, and by experience, it produces just enough power to charge an auxiliary battery with an USB plug, which in turn can charge my phone (see picture). All this is done using USB cabling at 5V. This is convenient when travelling, but again, not a solution for energy problems and certainly does not look as stylish as the clean vision of the small plug stuck onto the window.

If you want to have solar power, you need a large surface, for the same reason that if you want to feed people, you need a field… You also might want to do that outside of the house’s windows, which tend to reflect ultra-violet lights.

Flattr this!

Technology Cycle

Technology Cycle for Devices

When people talk about technological progress, they often seem to have the vision of a unstoppable army going forward, knowing where it goes. For me it looks a lot like a large river, unstoppable, but meandering around in unpredictable ways. One by one, objects around me are crossing the barrier that separates analog from digital. This evolution seems to follow some recurring path, where usability first degrades to improve afterwards. Here are the steps I observed.

  1. Analog device. The object has one purpose and just works for that purpose.
  2. Digital device with a clock. The first thing that you notice when a device becomes digital is that it gets a clock. The objet has a limited amount of buttons, and the clock is difficult to program, so often the device stays at the blinking 12:00 state.
    My kitchen and bathroom scales are at this level.
  3. Digital device with battery. A battery has been added to the device, so it can keep it state in case of power-cut, lots of feature have been added, but the device is way to complicated to configure properly, so the majority of its feature are unused. It displays winter or summer daylight saving time all year around.
    My old stereo is at this level.
  4. Digital device with serial port. A serial port (or a hacked usb-port) has been added to the device. Hackers can now use the device for many purposes, for the available population there is no noticeable changes. The device has now more unused features.
    My Casio electronic dictionary is at this level (no serial port, but proprietary USB).
  5. Digital device with USB port. The device has an USB port with some working protocol. It can now be used with computers relatively easily. The digital device is now much more useful than the analog equivalent. Digital cameras and MP3 players are typically at this level.
  6. Digital device with network connection. The device now has a network connection (Wifi or wired ethernet). The device can now be used in conjunction with other devices. Hardware is not the limiting factor, but software.
    My phone, my TV, my amplifier and my gaming console have reached that level.

Note that I’m not convinced there is a strict causation between certain feature and usability, more of a correlation.

Flattr this!


Ex-Word Dataplus 2

I had some time to hack around the USB connection of my casio dictionary, and I have reached a “duh” point: the protocol used by the dictionary is OBEX run over USB. This is somehow surprising as OBEX is typically used over IRDA or Bluetooth not USB. What I though were commands are basically object names that are read and set. Now the content of the initial response packet makes perfect sense:

Bytes Meaning
A0 Success
00 07 Packet length: 7 bytes
11 OBEX version: 1.1
00 Flags: None
08 00 Max packet size: 2K

The bad news is that I should scrap most of my code, the good news is that now I could use the OBEX code in Mac OS X, and implement an OBEX Session on top of USB, and use the library calls to handle the put and get operations.

Flattr this!

USB everywhere

USB Logo

I started looking for a wide screen for my living room. One model that stuck me for its feature are the Sony Bravia, which sports an Ethernet connection and an USB connector. It can display various media stored on a mass-storage device. Which made me realize that most of the electronic devices I own have USB connectors to act as controllers my two wireless access points (to share printers), my NAS (to mount mass-storage devices), my printer (again to mount mass-storage devices).

My Airport Express APs cannot mount USB-mass storage devices, but later models can. This standard is becoming really ubiquitous. The funny thing is, if you look at it, the various standards that make this work are really old:

  • USB mass storage was defined in 1998.
  • It uses a restricted SCSI command set. SCSI was defined 1986.
  • Usually, the file-system is FAT which appeared in 1980.
  • The most common data format is probably the JPEG images. JPEG was standardized in 1992.
  • In JPEG files, the meta-data is specified in the EXIF format which originated in the TIFF format.

Flattr this!



I now have used my iPhone for two weeks, which replaced the Sony Ericson Z610i I had been using for two years. Comparing the way both phones have been designed is quite interesting.

Physically, the iPhone is more bulky, and I still prefer the clamshell design, which protects the screen when the phone is not in use. Having a clear, mechanical mean of telling the phone it is not in use is very useful. I already had a few cases of putting the iPhone to my belt without pressing the button that “closes” it. The result was some random app launching, possibly using costly bandwidth. The iPhone’s screen is of course way larger and this makes it possible to have useful applications. It also means that while taking pictures you have an idea what you are taking. The Z610i had five external buttons, the iPhone has basically three, but they actually do something, while on the Sony they were programmed to do stupid things – I suspect Swisscom fiddling with the firmware explains why one of the external buttons would display the phone’s status on the internal screen. Both phones have a proprietary external port, but the iPhone also has a regular audio jack, which is nice. I only realized recently that the earbuds that came with the phone had a three polarity connector and included a microphone, which is even better.

I found the call quality of both phones similar, but having the option to use my earbuds for phoning is really convenient. I had some earbuds for the Sony, but as I could not listen to music with it, I never carried them. This brings us to the whole music player thing. Theoretically, the Sony could play music and decode both AAC and MP3 files. In practice, the Firmware would only accept to play signed audio files. This was not even a serious security feature as I could find a program that would sign arbitrary audio-files, but only for Windows. As audio playing never worked, I had to buy an iPod, which was really silly. The iPhone is an iPod, with all the bells and whistles, so this means I don’t need a mp3 player in my pockets. The camera of both phones have similar resolutions, but I had the feeling the actual quality of the iPhone’s picture was better. The iPhone cannot record movie, whereas the Sony could but I never really managed to shoot anything vaguely useful with the camera in movie mode, so this is no great loss.

The main advantage of the iPhone is the Wifi connection and proper internet programs: web browser, mail, maps. The last one, coupled with the GPS is for me already worth a lot (I have a bad sense of orientation). I also liked the fact that there are plenty of useful applications. Having a specialized interface to facebook is nice, I also recommend Tramdroid if you live in Zürich, having the schedule for all trams stored in your phone is a really nice feature. While the Z610 had a web-browser, I was never usable beside for visualizing rich-text files converted.

I see two weaknesses of the iPhone compared to the Sony phone: bluetooth and tethering. While the iPhone has bluetooth hardware, only one functionality is supported: connecting a headset. Nothing else, no way to send data to another device. This was something useful when I wanted to push a picture to a computer, or send a vcard to another phone. The other part is using the Edge/3G connection of the phone from a computer. The Sony supported two modes, bluetooth internet sharing and the ethernet emulation over the USB connection. The iPhone cannot do either, but this seems more related to operator stupidity than to anything technical. Finally I wish the phone could track ToDos and also a Swiss-French keyboard, because currently, if I want French spell correction, I need to use the awful French keyboard.

Flattr this!

Brother HL 4040

Brother HL 4040 CN

This Friday, my trusty Laserjet 6MP finally died. Whatever printing job I sent, the printer would just blink wildly and crash, disappearing from the network. I bought this printer while I was a student at the University of Geneva, at that time, it was a fantastic device, with expandable memory, a postscript interpreter, and network capacities (Localtalk). It had more and more trouble printing, some of the plastic wheels had turned into a molten mess and had to be removed, and the toner leaved some smudgy traces on the paper, not really ideal for writing official letters. In short, I knew I needed to buy a new printer.

I did not want to buy a inkjet printer, my printing needs are very irregular, and I can be away for months, which means the ink cartridges will dry out. My first though was to buy a new printer from HP, as obviously the quality of the Laserjet was impressive. Still from what I saw from subsequent printers from HP, their golden age is in the past. While at Mediamarkt, I saw they had a special offer for the Brother HL 4040CN. I basically wanted a color laser (I really prefer color when printing maps or schematics), with four separate color toners elements (the black gets used faster than the others), and a network interface. This printer offered all this, for a price of 500 CHF, with half the price payed back by Brother, so this means basically 250 CHF. A few years ago I would have shied away from a non-postscript printer (this one only handles PL6) but these days, CUPS drivers can handle the conversion nicely. A recto-verso system would have been nice too, but I don’t print long stuff that often, and this is another component that tends to fails early in my experience, so I just went away, bought that printer and had it delivered in the same day.

The printer auto-detected the network and set itself up, announcing its presence using bonjour and Mac OS X recognized the printer immediately. So while there was a driver CD-ROM, I did not use it (it tend to avoid drivers from manufacturers, they often seem to be coded by idiots). The only drawback I see to this printer is that is quite bulky, but in my current flat, this is not a serious issue. I like the fact that the printer can read standard USB mass support elements and print their content, the printer also has a reasonable network stack, and thus supports things like SNMP, so I can even pretend to be a system administrator at home…

One advantage of having replaced the printer, is it simplified the structured of my home network. So while getting rid of the LocalTalk segment leaves me with a bit of nostalgia, I get less cabling, one box less, and a slightly lower power consumption: the Laserjet was consuming 10W in standby and the bridge 26W. The new printer consumes 20W, so I actually save 16W. Given the price of Power is Zürich is below 10 centimes per KW/H at peak rate, this means I will save less than 10 CHF per year. Still I don’t like having power go to waste.

Home network plan

Now if somebody has an old SO-DIMM 144 pin memory chip lying around, I could use it to expand the printer’s memory…

Flattr this!

sony ericsson z610i

Nouveau pays, nouveau mobile…

sony ericsson z610i

Une des choses auxquelles je me suis habitué au Japon, ce sont les téléphones mobiles. Alors qu’en Suisse, je ne prenais que rarement mon téléphone mobile, au Japon c’est devenu un réflexe. Je n’avais pas de ligne fixe et toute la vie s’organisait par téléphone (et généralement au dernier moment). J’ai aussi pris l’habitude d’utiliser mon téléphone comme agenda avec les adresses et les rendez-vous synchronisés avec l’ordinateur. De fait, j’utilise même mon mobile comme montre…

Si mon téléphone japonais fonctionnait encore ici, les coûts de roaming sont prohibitifs. J’ai donc cherché un remplaçant à mon Sony Ericsson 802SE. Comme tout le monde, je suis une créature d’habitudes, donc j’ai cherché à avoir un téléphone similaire: un téléphone à clapet avec un écran externe. J’ai fini par prendre un Sony Ericsson Z610i. Évidemment, ils ont changé les connecteurs, et le format de la carte mémoire (qui n’est toujours pas standard, on parle de Sony là), mais les menus et la configuration sont similaires. Le nouveau téléphone est naturellement beaucoup plus petit avec un prime un écran externe très sympa.

Mon but était d’intégrer complètement le téléphone avec mon laptop, voici donc les notes pour le faire fonctionner avec Mac OS X.

  • iSync ne reconnaît pas directement le téléphone, mais le problème peut être réglé avec un plugin de feisar qui coûte £1.5.
  • Pour utiliser le téléphone comme modem avec Swisscom, il suffit de télécharger les scripts Sony/GPRS de l’excellente page de Ross Barkman. Les images suivantes donnent la configuration pour le réseau.
Swisscom GPRS configuration 1

Swisscom GPRS configuration 2

Swisscom GPRS configuration 2

J’ai aussi réalisé que le mobile fonctionne comme point d’accès via le câble USB (qui sert aussi de chargeur), dans ce cas, le mobile prétend être une carte ethernet et tout fonctionne dès que l’on ordonne au mobile d’activer USB internet. C’est beau la technologie quand ça marche!

Flattr this!