Maxed Out: My Creative Juices are Flowing!
July 7, 2010 |Estimated reading time: 6 minutes
Good grief - things are moving fast in my neck of the woods. Yesterday I arrived in England, because this coming weekend we're all going to be celebrating my dear old mom's 80th birthday. Unfortunately, I had all sorts of problems with my flights (planes breaking down and that sort of thing) with two results: I was travelling for about 24 hours and my luggage is currently vacationing in parts unknown, though we hope to be reunited soon. But that's not what I wanted to talk to you about ...
Prototype Steampunk Pseudo-Coal-Fired FurnaceAs you may recall, I have an ongoing hobby project on the back-burner - my "Man Versus Woman Display-O-Meter." Ultimately this is going to be presented in a 1929 radio cabinet. I'm going to have a brass front panel adorned with antique knobs, switches, meters and suchlike. Also, I want it to appear to be powered by a small coal-fired furnace.
I've been working on a mockup of this furnace for a while now. The wiring was finished a week or so ago, but I was up to my ears in alligators fighting fires as usual, and I didn't have any time to play. However, just before I left the office last Friday, I had a few minutes to spare, so I finally managed to power everything up. Hurray, it works!
If you look at Figure 1, in the lower left-hand corner you'll see the $5 PC power supply I wrote about. I picked it up at my local technology recycling center a couple of weeks ago (the final unit will employ a much smaller power supply - this is just something for me to be playing with). In the upper part of Figure 1 you can see the backside view of the furnace, which I created out of pieces of plastic dranage pipe I picked up at the Home Depot. The furnace as it appears to the user on the front panel is only 3 inches in diameter, but I immediately use a 3-inch to 4-inch expander so the inside is a bit bigger to provide a sense of depth.
Figure 1. The various bits and pieces forming the furnace.
In the bottom right of Figure 1 you can see the backside of the furnace. Ths is formed from a 4-inch diameter plastic endcap with 168 LEDs - 56 each of red (at the bottom), orange (in the middle), and yellow (at the top). These are connected to a small circuit board containing a PIC microcontroller. This board - which was designed for me by my friend Joe Farr in the UK - generates 24 pulse width modulated (PWM) signals to control the LEDs; each signal drives seven LEDs connected in parallel.
The way this all works is as follows. I create a program in BASIC on my PC using a special editor. This is the high-level program designed to control the LEDs, and it has statements that essentially say things like "turn LEDs XXX on to 60% brightness; wait for 1/10 of a second; turn LEDs YYY on to 80% brightness; wait 1/10 second" .... and so forth. I then download this program into my trusty PICAXE microcontroller as illustrated in Figure 2. Don't worry about all of the breadboards and wires and stuff - this little PICAXE board is all we're interested in here.
Figure 2. My trusty PICAXE microcontroller.
In turn, the PICAXE microcontroller sends binary commands to Joe's PIC-based microcontroller board that actually controls the LEDs. You can see this board in the center of Figure 3 sitting next to the breadboards. The bunches of red and black wires coming out of this board are used to drive the LEDs themselves.
Figure 3. The PIC-based LED controller board.
Figure 4 shows a better view of the LED controller board driving the back of the furnace. As you can imagine, wiring all of this up was a complete pain in the rear end, which is why I decided to not do it myself (grin). Instead, my friend's grandson came into my office when he was out of school and did it for me. It's so much easier when someone else is doing the boring stuff :-).
Figure 4. The backside of the furnace.
Eventually I was poised for action. First, I powered everything up without actually having any of the boards connected and I used my trusty multi-meter to ensure that I was getting the expected voltages. Then I powered down, connected the various boards, powered up again, and ... nothing happened!
I tell you ... every time I do something like this there's some "gotcha." I quickly felt around and nothing was warm and nothing was smoking (always a good sign), so I sat back and pondered the situation for a while, working my way back from the LEDs to the control board ... wait a minute... what about the control program?
The way Joe created the LED control boards is that each has a unique ID programmed into it. I'd swapped out an earlier tri-state LED control board for my new furnace control board - and I'd changed the program - but I hadn't updated the board ID. So I made that quick tweak - downloaded the modified program - and amazingly enough the first block of LEDs lit up. Hurray!
I didn't have a lot of time to play, because all this was taking place in my office late Friday afternoon and I had to head for home. However, I did have enough time to create a slightly more sophisticated program that activated the LEDs group by group starting at the bottom (with the reds) and working up through the oranges and the yellows to the top, then starting all over again as illustrated in Figure 5.
Figure 5. A slightly more sophisticated test program.
If you click here you can see a video of this on YouTube. As you will see, this test program does look a little "clunky," but that's because it turns a block of 7 LEDs hard on, waits for 1/10 of a second, then turns the next block on, and so forth. It will look a lot smoother once I fade the LEDs up gradually and shorten the delay between actions and suchlike.
But having said this, it all looks really cool. Figure 6 shows a view of the front of the mockup. As I mentioned before, the panel and furnace front are just created out of cardboard here, but imagine what they'll look like when created in brass with the furnace looking like a hinged door that can be opened. Also, note the rippled glass behind the furnace door - I had this cut for me by a local stained-glass artist for a couple of dollars. This really is starting to look rather tasty.
Figure 6. View of the front panel of the mockup.
So, while I'm in England, I'm now pondering the various algorithms I might use to control the LEDs in the furnace. For example, when my "Display-O-Meter" is first powered on, I'm thinking of starting with a small red glow that brightens and fades and brightens again, gradually growing brighter, and then adding some orange in on top and then flashes of yellow. And I'm going to want to add sound effects...
This is really rather fun... until next time, have a good one!
Clive (Max) Maxfield is Founder/Consultant at Maxfield High-Tech Consulting. He is the author and co-author of a number of books, including Bebop to the Boolean Boogie (An Unconventional Guide to Electronics) and How Computers Do Math featuring the pedagogical and phantasmagorical virtual DIY Calculator. To contact Max, click here.Follow I-Connect007 on Twitter here.