Build Monitor Light Siren
I've wanted to do something with a MQTT broker for a while now, and I finally had a project that would be perfect to use a little ESP8266 chip listening into a MQTT broker. I decided to make a build monitor for our source control at my current job at New River Kinematics (NRK). The main goal is to have the siren go off whenever someone checks something in that either breaks the build or fails a unit test. So I picked up some ESP8266 boards from Adafruit, and a LED-based siren light off of eBay.
The setup was pretty simple, just hooked into a free MQTT broker through Adafruits io.adafruit.com, which was a real simple setup. Adafruit always provides great tutorials, and I used their Huzzah ESP8266 chip. The Huzzah board can be flashed as if it's just an Arduino with a built in wifi-chip, which made things convinent.
After setting up connection to the broker, I added a simple relay to get things going quickly since I couldn't find any FETS lying around and it provided some great audible feedback to the siren "clicking " on. Since the siren is just an LED array in a ring shape, it was nice to actually hear something click on when the siren was toggled on, but it was eventually replaced with a TIP120 that just acts a relay to open current flow to the siren light.
Initially I brought a simple protoboard-circuit in for testing in the office. Shortly afterward it was suggested from someone in the office that I could put it in a "cool enclosure or something," which was a good idea but I wanted to make it a bit more compact and get all the modded circuit bits into the siren.
Getting all the control bits into the siren was the most time consuming task of the entire project, because there was not much room inside the siren. The base looked like a fairly large enclosure, but in reality most the space is used by a large magnet (I guess the normal intent of the siren is to be placed on the tops of vehicles). I managed to make some space by desoldering the top bit of the circuit which connected all the vertical LED boards together. The Huzzah chip was placed in the hollow space between all the LEDs, and then wires were rain underneath to all the other components.
This is where things got gross, and frustrating because I was kinda proud of how organized I kept things on the perfboard. I inevitably found myself just making a rats nest of wires and components down under the LED control board, and then I decided that the siren should have some more controls so I added a couple LED indicators and a button that I mounted to the sidewall of the siren. I used some black hot-snot to keep everything in place, and then somehow I managed to get all the wires into good locations so I could screw back down the main LED circuit board to begin to close everything up..
I wrote a simple C# program that monitors our build server, and will publish failures to the io.Adafruit.com broker. The siren's listen to published events from the broker, and will begin flashing if the server publishes "ON".
The sirens got a good reception around the office, and I was asked to make another build monitor. Somehow, it wasn't any easier for the second monitor to shove all the components and wires into the base of the siren, but it does look good and compact. The magnetic base made things convenient for mounting to the wall, since they easily stick to the metal in the drywall corner bead.