Sometimes you have a need to power a few devices while using your Arduino. For me, this situation arose when I was building my 8mm film scanner. I have to power the Arduino, a light source, and the Canon IXUS 95 camera I use to shoot the pictures. In theory I could use the Arduino for this, since the camera operates at 3.3 volts and the light source, an ex-Clas Ohlson LED flashlight at 4.5V, but I decided to do something different, because I would have to provide common ground to all the things I hook into the Arduino and quite frankly I am not sure I understand that.
The current setup, then, is a mess. Arduino has its own lead, which is necessary, because I have two servos connected to it, and as you can see in this blog entry, the USB simply doesn’t provide enough juice to keep it running nice and smooth. What I have for the Arduino now is a 9V power source from an ADSL modem that went to the Big Puff of Blue Smoke in the Sky. (I am in the habit of hoarding all surplus power adapters these days.).
The camera needed its own, because the battery would die after 800 exposures, and a 4 minute film has about 4,000 frames. So I bought a DC couple for it on eBay, at 12 euros plus postage. It works fine, no problem, but it has its own adapter and power cord. And finally the lighting unit, with its 7 LEDs, needed its own, so I got a 3 x AA battery box and soldered it in. There is a switch from the old flashlight too, which was also recycled.
The result is a mess of wires. I got to thinking how to do it all with just one power adapter. I’d need three separate voltages.
There is a nice little gadget for this, with a handy title: “Adjustable Buck Power Converter Step-down Board Voltage Regulator 3.3v 5v 12v 5A“. Essentially it is a little printed circuit board with a few items on it, and it looks like this. It has holes at each end for you to solder wires to (yes, I haven’t done much of that since 5th grade) and then, via the screw, adjust voltage until it is just what you happen to need. This sounded like just what I was needing so I ordered five from eBay at USD2.28 apiece.
So, when they arrived, I promptly went to test them. I cobbled a piece of wire at each pole on each end of the board, hooked the receiving end wires to a 9V battery, then used a voltmeter to see what reading I was getting. I was receiving the whole nine volts, yay. So, I turned the screw clockwise (tighter ) to get it to lower the voltage, and man, did I turn the screw until I was blue in the face. No change, 9V all the time. I began to think the cheap piece of junk might be faulty off the production line and tested another one.
Same result, no change in voltage. Only after thinking about the issue long and hard did it occur to me that the screw may actually work in the other direction – maybe counterclockwise is the way to reduce voltage. And hey presto, after only 20 turns of the screw, I saw a significant drop in voltage. Actually, once the screw starts to bite, the movement is delicate. But I was able to find the 4.5V I wanted to deliver to the LED lamp unit, as well as the 3.3V for the camera. So far so good.
I got an old Nokia 3310 (yeah! Remember them? Awesome!) charger which was obsolete. I clipped off the connector and checked the polarity of the lead, then soldered on a new connector. For clarity’s sake, I use the same 2.1mm, center-positive plug that is found on Arduino, in case I want to power the Arduino directly with that. Actually, it’s a good idea to recycle any old power source for Arduino needs by just adding the right plug to it, as Arduino can use a wide variety of voltages between 5 and 12 V. It gives me 6.8V which is fine.
Using some plastic terminal blocks I put together a device that plugs in at one end, passes the electricity via two buck downs and one direct line as shown in the schematic, and comes out in the required voltage for each. The reason I am using the terminal blocks is that I want to keep the system as flexible as possible: if I need to power another device from this, I can just unscrew the leads and place in another pair of wires, and then adjust the voltage to suit.
One problem arose during the test run of the camera: apparently the camera, when recording, can draw up to 2 A of current. This is no problem for the buck down converters which can easily manage 5A, but my power source needs to be checked for the output current. If it’s not enough, I’ll just upgrade to another – I have an ex-laptop adapter that delivers 17V and 4A. The 17V is not very good, as the Arduino will convert much of it into heat, but I think I can find a suitable one that caters for the family of three devices. The little Nokia charger is fine for just the Arduino, but for the camera, a little more is needed.
Here’s an artist’s representation how the 3D printed box may look when I return from the trip to Switzerland with the students next week, and find the time to print the thing.