Some time ago a co-worker passed me an article about "Extreme Feedback" devices that could be attached to your autobuild system with the express intent of making it very visible that the build is broken, and potentially being irritating enough to help motivate people towards fixing the broken build. Since reading this article I have been somewhat consumed with the concept of creating one of these devices for my team. Keeping builds clean is hard, and without a constant reminder, it can be very easy for people to let the build stay broken for long periods of time. This essentially defeats the purpose of doing autobuilds, and potentially even unit testing.I Looked into the Ambient Orb, but I have to admit, I wasn't particularly thrilled with the fact that it has a monthly subscription, and you can't talk directly to it with your computer. So I started to teach myself electronics in the hope that I would be able to build one of these devices on my own. After a month or so, I ran into the Arduino platform, which struck me as the perfect platform for building an orb from scratch. This is the end result of my project is this, The Arduino Orb Build Warden.
Step 2: Parts
The design of the Build Warden was heavily influenced by Tod E. Kurt's Arduino Ambient Orb from his Spooky Arduino class. I started with that as a base, and went from there. So first off, what parts do we need?Parts ListRadio Shack:
Step 3: Get computer talking to the Arduino, Install software
I'm not going to take you through how to get Arduino working with your computer, and how to upload sketches to it. A full set of guides are available for getting the Arduino environment working with Linux, Windows or Mac OS X.Once you have this environment set up and working, download the software I've written for the build warden. Follow the instructions from the above guides for installing the sketch on the Arduino.
Step 4: Circuit Diagram
This project is really a very simple circuit. What we are going to be doing is running three wires from pins 9, 10 and 11. Each wire will branch to 3 220 ohm resistors, and then go on to 3 LEDs of the same color (9: Red, 10: Green, 11: Blue). These will all attach back to 1 wire that will go to ground.
Strictly speaking, each color should actually use different resistors, but the end result is in my opinion Good Enough. If you want to try and get the colors perfectly balanced, you have two options. Either correct it in the software, which is easy enough, or use different resistors for each color. In talking to Tod E. Kurt about this, his suggestion was this:
"For the color balancing you mentioned, the main thing you need to worry about is that because of the physics of LEDs, each color has a different voltage drop (Red is ~2.0V, Green is ~2.6V, Blue is ~3.3V), so really one should have different value resistors for each color. (i.e. if Red's resistor is 220 ohm, Blue's should be scaled down to about 130 ohm). I left this out of the notes because it can be confusing. You can deal with it in software by scaling the PWM values a corresponding amount. "
You may want to put together a prototype board that has only 1 LED of each color. I did this to make working with the software easier. I included a photo of the prototype board here.
Step 5: Solder together your board
Show All 7 Items
These instructions assume you are using the suggested radio shack Multipurpose PC Board. The first image shows a completed board that can be used for reference.
Step 6: Build the base
Now we are going to build the base. Take the lighting fixture out of the package, and set aside the hardware, as well as the glass globe. We'll need both in a moment. If there is any fiberglass insulation, keep it around as well. Take the base, and remove the light socket from it. Then, set the base on some wood (~ 1/2 inch thick) and draw around the base with a pencil or sharpie. Also mark the location of the two bolt holes used for mounting the light fixture (If you wonder what I mean, look at the note on picture 1). Now, take the base outside, set it on some news paper, and spray paint it with the black (or whatever color you prefer) spray paint. Set this aside, and let it dry.
Go and cut out the wooden circle. Then drill holes where you marked the location of the bolt holes Make sure the bolts that come with the lighting fixture can slide through the holes easily (but not super loosely). On the underside of the wooden disk, you will probably have to use a larger drill bit, because the bolts probably will not be long enough to penetrate the disk. you'll want to drill about half way through the disk with a bit large enough for the bolt, washer and nut to fit in. A half an inch bit is probably good.
Now set your arduino in the middle of the disk, and draw around it, marking the two mounting holes in the arduino on the wood. Drill smaller holes where the two arduino mount points go. these should be large enough for the motherboard standoffs to be screwed in.
Note: If you are wondering what a "motherboard standoff" is, look at the notes on picture 4. They are the little bolts that screw into a computer case, and have threads onside their heads. Screws are then used to attach the motherboard to these. They normally have long enough heads to keep the motherboard for potentially shorting out against the metal case.
Once these are screwed in, mount the arduino on the wooden disk by screwing it to the motherboard mounting bolts.
Now that you have the arduino positioned on the board, go get the lighting fixture base (assuming it's dry). You'll need to cut a hole in the side of the base to allow the USB cable out. Plug the cable in, and then work out how much you need to cut off.
Step 7: Put it all Together
When you took apart the lamp, there was likely some fiber glass insulation inside of it. I took this, and rubber banded it across the back of the circuit board to act as insulation to protect from a short. Take the wires and thread them through the top of the lighting fixture base, and then hook them up the the appropriate pins on the arduino. Next screw the fixture to the wooden base.Now you'll need a light diffuser. The LEDs mostly aim up, so without something to diffuse the light, the result when the glass is on top will be very disappointing. I took some clear plastic bag and crumpled it up, and held it down on the LEDs with the rubber bands I used for the insulation. Next I took some translucent tape and made a small dome over the circuit board. This was sufficient to diffuse the light. Experiment with this part. My solution may not be optimal. One mode of experimentation that I think may be fruitful would be to slip small sections of white straw over each led, and them tape them together.Finally, you can put the glass on the base. And you are done!.For a few more photos, I have a gallery and my Blog posting about it