Introduction: Arduino Orb Build Warden

An Arduino based Ambient Orb designed explicitly for monitoring Source Code Autobuild systems. This orb can easy be repurposed for monitoring really anything that can have alerts from time to time.

Step 1: Purpose

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 List

Radio Shack:
  • Multipurpose PC Board with 417 Holes: (276-150) $1.99
  • Hookup wire, Solid, Red, Black, Green, 22 Gauge, 90 ft, (278-1221) $5.99

Jameco:
  • 3 x Blue LED, (183222) $2.95 ea
  • 3 x Green LED, (334473) $1.45 ea
  • 3 x Red LED, (33481) $0.27 ea
  • 220 ohm, 1/8W resistors (100), (107941) $0.69

Sparkfun:
  • Arduino NG, (Arduino-USB) $31.95

Home Depot:
  • Lighting Fixture (Portfolio #74457 or similar), ~$10.00

Other Items:
  • Red Sharpie (Optional)
  • Blue Sharpie (Optional)
  • Green Sharpie (Optional)
  • Black Spray Paint (Optional)
  • Heat Shrink tube (Optional)
  • Solder
  • Soldering Iron
  • Round cut piece of 1/2 inch wood - cut to the size of the lighting fixture base)
  • 2 x Standoffs Metal Hex (Sparkfun: COM-00126 if you don't have any, which is unlikely)
  • 2 x motherboard mounting screws (that fit the standoffs)

Alternatives:
I added this section, due to the fact that some items appear to no longer be available, here are some alternatives:
  • 3 x Red LED, (Jameco #333526), $0.22 ea
  • 2x 220 ohm, 1/8W resistors (5), (Radio Shack #271-011) $0.99 ea
-or-
  • 500 assorted 1/8W resistors (Radio Shack #271-003) $12,99 (yes, it has 10 220 ohm ones)

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

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 1 (Image 2)
Take the PC Board, and if you have the red, blue and green sharpies, use the second image on this page as a guide to color in some of the white areas on the top of the board. Given that I have staggered the 3 different colors on the board to make color mixing easier, the reference of having in colored pads on the board is useful, but not strictly necessary.

  • Step 2 (Image 3)
Using the colors as a guide, attach the 9 LEDs. The center leads are going to be ground, so be sure to solder the flat side of the LED to the long narrow leads. LEDs can only accept electricity in one direction, so if this part is messed up, you will have a bunch of wasted parts.

  • Step 3 (Image 4)
Connect 4 longer wires (about 5-7 inches long). 3 red ones, and one black one to the base of the board. the black one will attach to one of the 2 long, central leads. Solder on a short black wire to jump across from one of the long central leads to the other, turning both into the ground.

The other 3 wires should be soldered in the central holes of the colored leads at the base of the board. One to red (right side), one to green (left side) and one to blue (right side). Use the picture for reference.

  • Step 4 (Image 5)
This step will be about completing the blue connections. Fist, solder a red wire that connects the 2 blue pads at the base of the board. on the right side, solder a wire from the blue pad to the 1 blue resistor. On the left side, connect 2 red wires fom the blue pad at the base to the 2 blue resistors

  • Step 5 (Image 6)
Same as step 4, but with green, and the sides reversed

  • Step 6 (Image 7)
Same as step 4, but with red

  • Step 7 ((Image 1)
Take the 4 wires hanging from the base of the board. Use the green and blue sharpies to mark the ends of the wire, so that you know which wire goes in which pin on the Arduino. Finally, if you have the shrink tubing, put the wires in the shrink tubing, and hit it with a heat gun, or lighter.

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