Tuesday, December 4, 2012

Power to the Pi!


Most of my posts here will be technical or at least practical.  This first one, however, is of a more personal nature.
After waiting for many months I received my Raspberry Pi on 30 August.   I did not order a power supply with it, believing I have a USB cable with the right connector.  This turned out not to be the case, so I rushed to a shop and bought a small cell phone charger with different adaptors for the cable.  Although I read that it requires 0.7 A, this one was only 0.5 A, but it worked.  So on the first day, I had the Pi running Rasbian and RaspBMC.   I proudly took photos and posted it on Facebook and one of my blogs.
On the 3rd of September I had a huge setback - I fell down a staircase of just 3 steps, so bad that I had to be taken to hospital to checked I was still in one piece -which I was, but I took to bed for two days and after that still went to work in pain for many days.   I believe this (and pressure at work) was the cause of me not switching on my Pi again for a few weeks.
On the 8th of November, my life took a different turn.  The evening I received an e-mail from a local newsreader on E-Nuus, her name is  Genée Heyl, she Googled and found my blog, and wanted to interview somebody who is a Raspberry Pi user.  Although I knew I wasn't really ready for this, it sounded exciting and did not want to say no.  The next morning we made and appointment for 3 the afternoon.
At about 1:30 I dashed home.  Having removed the living room couches and bought a new set the previous day, it was due to be delivered just after 2.   I called the shop, which is only a few blocks away, and asked them to deliver immediately.  Then I started digging out the Pi and everything I needed.  The SD card with RasbBMC was in the slot, but I could not find the Raspbian card.   I removed the card from my camera, backed up the photos and wrote the image again.  The furniture arrived at about 2:30.  While they had the truck in the front yard, my daughter arrived in her car from university for the weekend.  When I tried to show her where to park, with the delivery truck in the yard, she drove over my left foot!  Luckily I was not injured.
The interview was fun and took almost an hour.   Nothing much came of it, except seeing Genée talking to the camera in our living room!  I do not blame the editor - I am not very photogenic.
The good thing that came out of this was that I have started with the Raspberry Pi again.  Now I am doing it a bit back to front.  I should have blog as I was doing it. I will try to catch up!   A few exciting things I did was:
·         Use my laptop keyboard and mouse via Synergy.
·         Ran it on a PP9 battery.
·         Got a webcam working
·         Used the webcam with the program called "motion", to take for example lightning pictures.
·         Tested a LG TV remote control (via a USB-to-serial cable.)
Needless to say, the 0.5 A power supply did not last for long.  Fortunately it survived the TV interview!    So I had to make another plan.  I did not feel like shelling out more money on an overpriced cell phone charger.  My solution was to use a mostly unused external IDE drive enclosure.  I salvaged a drive power plug and usb socket from old PC parts.  The cable on the USB socket was cut of and soldered to the loose drive power plug, on ground and +5V.   I used the cable from the now dead cell phone charger, first testing without the adapter on the round connector on the cable that I had +5V on the center and ground on the outer.  I used a cable tie to secure the Pi to the base.  The plastic case being too fat, I can't put the shell of the drive enclosure on.  My Pi is working! 
 
I have a rechargeable PP9 battery, with a cable clip soldered to a round power connecter, the same as on the 12V supply of the drive enclosure.  I figured that there might be a simple 5V regulator on the board of the drive enclosure, so it might be just as able to convert 9V down to 5V.   I gave the battery a good overnight charge and then tried it.   The Pi booted and I ran it for close to 10 minutes!   The picture above shows my Pi on the base of the drive enclosure, next to it the 12V PSU and the PP9 battery.  Stay tuned!