counterorbit.org

Automated Build Controller

The Automated Build Controller is a hardware monitor and trigger for the Jenkins continuous integration server. The yellow light flashes whenever a build is running, the red light comes on if the last build failed, and the green light comes on if it was successful. Pressing the Easy Button starts a Jenkins job.

There is a small Python program (abcd.py) that supports the controller. Its purpose is to use Jenkins's web services to get the current status of the server and to trigger jobs. The program communicates with the Arduino over the serial port. It accepts command-line arguments to indicate the serial port, serial port speed, Jenkins URL, and the job to trigger. For example:

$ python abcd.py /dev/ttyUSB0 19200 http://localhost:8080/jenkins/ deploy-qa

The latest source code for the firmware and daemon are available from the Mercurial repository. Downloads are available on the Files page.

This project is distributed under the GNU General Public License version 3.

The images below show a custom enclosure and circuit board with fancy connectors. It isn't actually necessary for the project; the original ABC was built entirely on a breadboard with jumper wires. I have not supplied the design files for the circuit board because it has serious flaws that had to be corrected with a Dremel tool (it was the first circuit board I had built in about a decade).

Image of ABC and PowerSwitch TailsImage of ABC insideImage of ABC inside, close-up of lidImage of ABC inside, close-up of Boarudino and PST breadboard

Basic Controller

Schematic

Schematic for the basic ABC

Parts List

NameQuantityPartNotes
1USB BoarduinoMost USB Arduino and Arduino-like devices should work.
SW11Easy Button

The Easy Button is turned into a plain switch by cutting its circuit traces, drilling holes into the traces, and then soldering wires to those holes. I can't give exact directions since there are multiple versions of the Easy Button hardware.

Alternatively you can use something like SparkFun's Big Dome Push Button.

SW21toggle switch

Any toggle switch will do. We picked this particular one for pure ridiculousness. It is perhaps the best thing RadioShack sells (at least until I see an Arduino in stock).

Please note that this switch requires a pull-down resistor (R6) instead of a pull-up.

D1-D44LEDLED current ≤ 40mA.
R1-R44330Ω resistor

Current limiting resistors for LEDs.

The exact resistance value depends on the LED. See http://led.linear1.org/1led.wiz.

For example: assuming a typical red LED with a 2V forward voltage, a 330Ω resistor will limit the current to 10mA.

R5110kΩ resistorPull-up resistor for SW1.
R6110kΩ resistorPull-down resistor for SW2.
1breadboard

PowerSwitch Tail Modification

In November 2010 we added two PowerSwitch Tails. One PST is activated whenever the red light is on. The other PST is activated whenever the green light is on.

To prevent the PSTs from switching on and off quickly the firmware has a delay of one second before it will switch between states. See these functions in abc.cpp:

  • handle_constant (enum state, uint8_t, uint8_t)
  • handle_blinking (enum state, uint8_t, uint8_t)

The parts shown below are only needed for the original PowerSwitch Tail. The new PowerSwitch Tail II has an optoisolator and it may be connected directly to PC5 and PC4.

Schematic

Schematic for the PowerSwitch Tail modification

Parts List

NameQuantityPartNotes
2PowerSwitch TailA PowerSwitch Tail II is preferred.
Q1, Q22PN2222 transistorRequired for original PST.
D5, D621N4148 diodeRequired for original PST.
R7, R8210KΩ-22KΩ resistorRequired for original PST.