Powering a Raspberry Pi from a Battery Pack (AA batteries)

(Time Travel Alert – this happened a week ago. If you played Real Life Pac Person at the preview on the 18th, then you’ve seen this and more. If you’re playing in Burlington, NC on the 25th at Mini Maker Faire, then know that I may not have the blog caught up until Sunday)

If you’re using a Raspberry Pi for a wearable, then you have an acute power problem. The RasPi needs 5 volts at about half an amp, peak, when a USB wireless adapter is connected. Steady-state draw with a very light workload will be about 350 mA. Based on the performance curves from a reputable manufacturer of batteries (OK, “cells”), this is going to give you about 3 hours of battery life on a quiescent device and a little less if it’s busy. Add in as much as 110 mA for all the blue LEDs, and Houston, we’ve got a problem.

So, Nickle Metal Hydride (NiMH) is your friend. 2500 mA/hr off the shelf, no waiting.

But you didn’t think it was going to be that easy, did you? Of course not. Four of those cells will give you 4.8V. Technically, that’s not enough voltage. In practice, yes, it will work, especially if all of your USB devices have nice, broad safety margins. I don’t want to chance it. Also, the wire lights vendor lied: the blue strands are actually 12V devices (they claimed 5 volts, and I should have known better…) and need a good 11.0V to be bright enough. Given that, I’m stuck using ten NiMH AA cells or eight alkalines and a shorting jumper.

12 volts is enough to fire a Raspberry Pi into the asteroid belt, so it has to be stepped down. In Ye Olden Days, that would be with something like a 7805 regulator – an analog device that basically turns excess voltage into heat, and lots of it. Welcome to the twenty-first freaking century.  We now have the 78SR-5/2-C. This is a 5V switching regulator a little bit bigger than a postage stamp and having a sweet, sweet 2 amp current rating (twice the original 7805). Claimed efficiency is around 90%… what it draws in, it puts out. Not much heat at all. Bonus side effect – the wattage in is just about the same as the wattage out, so if you produce 5 volts at 1 amp, then it will load down a 10 volt battery stack at half an amp, give or take. Nice.

Here it is cobbled up on the breadboard for a fast checkout:

OLYMPUS DIGITAL CAMERA

Please ignore the cheeseball AM transmitter on the upper strip. That’s for a future revision of the game. :-)

I ain’t afraid o’ no ghost

With the Pac Person costume complete, it’s time to crank out some ghosts. Construction is pretty much just like the Pac Person, except there are two strands of lights instead of one. Every ghost gets a blue strand (for when it’s vulnerable) and a body color strand (red or green) for those times when it has an insatiable hunger for bloodPac Person.

Knowing that making Pac Person required about five hours to sew one strand of lights on, I decided I needed a faster approach. I set up the fancy quilting hoop – it’s an embroidery hoop on a stand. I can see the point behind it.  For quilting, where you would have a lot of stitches in one place before you have to move the fabric, it ought to be pretty good.  But for sewing lights on a piece of fabric?  I spent more time taking the fabric in and out of the hoop than I did sewing.

OLYMPUS DIGITAL CAMERA

I needed a solution. Over dinner I mentioned to Susie that what I needed was a quilting frame about five feet in diameter. About the size of the kitchen table. And that’s when she realized that the kitchen table could be a quilting frame.  We pulled the two sides apart, neglected to insert the leaves, and there you have it.  Not quite as good as having a five foot diameter frame, but close enough.  Also – if you try this at home, it’s a really good idea to sew both strands at the same time.

OLYMPUS DIGITAL CAMERA

Waka Waka…

In previous posts, I’ve gotten a sewing machine and I’ve bought wire lights.  I’ve also made allusion to ghosts.  By now it should be obvious…

Real Life Pac Person.

(The console games attempted to promulgate a false gender binary on susceptible young players.)

I managed, before this weekend was out, to sew a Pac Person cape and attach yellow LED wire lights to it.  I did it not because it was easy, but because it was fun.  Making the cape is the easy part. It’s a two-fold cape with one section removed to yield a 3/4 circle cape.  Neck cutout is about a 12″ collar.  Velcro allows it to be taken down to half that, or a velcro extension tab expands the neck to about 21 inches.  This should fit anyone from eight year olds to All Pro defensive linebackers.

OLYMPUS DIGITAL CAMERA

LED coverage is stronger on the left side than the front, and I’m debating whether to go back in there with another, shorter strand of lights or whether to just go with it.  All the players are going to know this is Pac Person – it’s yellow, it’s hitting Power Pills, and it’s running like its life depends on it when the blinking stops.  Illumination brightness is more than adequate for indoor play.  I expect it will burn through three sets of batteries in a seven hour installation.

Those LEDs took about five hours of hand sewing.  Oh yeah.

Raspberry Pi – First Light

The big upcoming project uses the Raspberry Pi for brains.  Actually, it uses four of them, one per ghost.  Last week I got them powered up and actually started configuring them.  Simple USB-WiFi adapters are plenty good enough for what I’m doing, and I’m pleased to report that they work flawlessly.

In fact, everything works flawlessly.  This is a totally “plug it in and it works” kind of thing.  Plus, the Pi comes with both Minecraft and Mathematica.  This is the first time in two or three years I’ve felt complete, unadulterated joy from a computer.  The purity of the experience is remarkable.

OLYMPUS DIGITAL CAMERA

(brightness, contrast, and effective gamma have been tweaked to compensate for the exposure being completely blown out by the bright monitor behind it).

CPU power feels about like a PII-450 running a modern distro, but the microSD card feels very slow.  No matter – it won’t be heavily taxed in the upcoming application.

Built Like a Battleship

New addition to the Secret Underground Laboratory:

OLYMPUS DIGITAL CAMERA

A Singer Model 99K. Serial number strongly suggests manufacture in 1946. The 99 family was considered a portable sewing machine – at 31 pounds, you could move it anywhere an ox could drag it, and this model is considered “half size”. The machine positively radiates solidity. Accepts standard, modern needles; I’m not sure yet about bobbins. I tried a “New Singer” bobbin and it was too thick to fit in there. I know they stock two different sizes at the fabric store, so I can try the other size and see if I get any luckier. Otherwise, I have the four bobbins that it came with, so I should be OK.

Edit: Bobbin is a Singer Type 66. These are still fairly common, and fit oodles of modern machines. Should have been obvious: a 99 is a smaller 66.

Obligatory action shot:

OLYMPUS DIGITAL CAMERA

Someone check the doorbell…

My house was built in 1929.  The doorbell is presumed to have come later, but maybe not much later.  It had been getting a little unreliable the last few years (!!!) but it all came to a head two weeks ago.

Anyway, the first step to healing is to admit you need to disassemble the thing.

OLYMPUS DIGITAL CAMERA

And a detail of those switch contacts:

OLYMPUS DIGITAL CAMERA

So, those machine screw ends are shorted together when the doorbell button pushes the brass spring down onto the (corroded) ends of the screws.  Repair methodology: file the metal parts until they’re shiny and new looking.  The material that the threads screw into is about 50 laminations of plain old paper.  Amazingly, it has held up through at least sixty years of outdoor use.

Wire Lights

For an upcoming project (hint: the big reveal will be April 25th, but you’ll get a good glimpse of it here before the Big Day) I need a whole bunch of LEDs I can put onto some fabric. The traditional solutions have problems.  Typical “flexible PC board” tricolor LED strips are too stiff and too expensive.  A ton of discrete LEDs is too time consuming and, except at surplus prices, way too expensive.  Enter “Wire Lights” – two parallel strands of copper bell wire with surface-mount LEDs soldered between them.  Wired in series with the entire strand is a series dropping resistor sized to make the whole string light up at 5 volts.  Specified current draw is 1 Amp, but I’m going to need to measure that.  Not really visible in daylight, but they show up well under “normal” indoor illumination and they’ll be great in a slightly dimmed exhibition space.  Hmm…

wirelights_1