Fluorescent Flashlight Repair

Pretty soon, I’m going to have to change the name of this place to “Secret Underground Flashlight Repair Center”, but whatever.

Symptom – approximately 20 year old combination fluorescent and incandescent flashlight suddenly loses the fluorescent side. Incandescent is fine. Try the obvious stuff – new batteries, fiddle with the switch a few times, remove and replace the fluorescent bulb a few times. No joy.

Disassemble, completely.

OLYMPUS DIGITAL CAMERA

Visual inspection: broken wire on the transformer. This shot is actually after desoldering two of the surviving connections…

OLYMPUS DIGITAL CAMERA

I hauled out the desoldering braid to completely and cleanly remove the transformer, then I soldered some bare copper wires (probably 28ga – salvaged out of an old PBX installation) to the leads. Reassembly is the reverse of takedown, but much, much more fiddly.  Once its finally back together, switch it on and it works.

OLYMPUS DIGITAL CAMERA

I really need to go back in there one more time and squirt a bunch of silicone to stabilize the wires and hold the transformer in place. It’s a miracle the transformer didn’t break loose before now. Roughly twenty years of rough handling finally caught up with it.

Real Life Pac Person

Real Life Pac Person debuted yesterday at the Burlington Mini Maker Faire. It must have been a big hit. :-)  Rough numbers look like about 900 people played 350 games. A pure guess has them at 97% kids. Not too surprising – as adults we’re at high risk of forgetting how to play.

DSC_0032

The game construction has been covered a little bit already. Three-quarter circle capes were sewn from canvas. LEDs were sewn onto the capes: yellow LEDs on a yellow cape for the Pac Person, and blue LEDs plus either red or green LEDs onto the black capes worn by the ghosts. Ghosts then were equipped with a Raspberry Pi (complete with WiFi stick) for smarts, and a smaller accessory protoboard was made with the aforementioned voltage regulator and a pair of MOSFETs. These MOSFETs were used to turn individual strands of LEDs off and on.

Construction was intentionally crude – I have a covert social science agenda around how people learn about technology artifacts on first exposure and how they manipulate it to their ends. Making it intentionally crude and exposed leads to lots of good questions, and sets up an environment where it’s safe to make suggestions.

OLYMPUS DIGITAL CAMERA

Surprisingly, the rats nest of wiring holds up fine. Leaving the connectors on means there are places to disconnect things and plug in power supplies (to light the lights) or to probe the other side with a voltmeter (to show what the computer and the MOSFETs are doing).

Once you have the technology, you need masking tape. In this case, 180 yards of masking tape. Plus you’ll need a big space – setup was about 24 feet by 40 feet with an extension out to the side. This makes the play area sort of L-shaped. Not exactly faithful to the original game, but I think it makes it more fun. Being able to spread out and run is a good thing. Naturally, using blue painter’s tape makes the play area look a bit more faithful to the original.

Power Pills have been an issue since I started. I wanted to use some tall, skinny cabinets to hold a big battery, a junker laptop, and an easy button. The big problem has been a safety question – for one thing, I don’t someone running full-power into a hard structure in the middle of the game. Secondly, I need a lot of power to run the laptops for a whole day. I’m talking about car battery amounts of power. If that thing gets tipped over, I have a problem.

Solution: pink squares on the floor represent power pills, and when I see someone run over one then I press return on my laptop. The laptop is running a program that sends the network request to the ghosts each time I press return.

“Network request”, you say? Yes. Network protocol is HTTP over TCP/IP. Ghosts run the Apache web server, each network request is a GET request for a cgi program. The cgi program sends a unix signal (signal.h style) to a setuid executable that triggers the Pi’s GPIO pins. Software is a state machine that transitions between ghost states – body color, then blue, then flashing blue, then back to body color. At any point, a new cgi request can send a new signal that sends it back to the “I just turned blue” state and it keeps on chugging. Light timing is read from a configuration file (once per startup to save power-hungry flash accesses). Now that you mention it, yes I did tune game timings on-the-fly.

Some spectators were amused by being able to ssh into a ghost and tweak stuff on the fly. Or for that matter, ssh into a ghost and play Minecraft on there, while the game is running.

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.