Home » Misc Projects » 1-Wire Relay / Lighting Controller

Misc Projects : 1-Wire Relay / Lighting Controller

An 8-channel 120V relay controller, this project was originally intended only as a brewing and vinification process controller.

Since its construction was concurrent with a dance party, it was first tested as a dance floor lighting controller. The controller is comprised of a DS2408 8-channel switch, and eight 20A relays.

First, a little motivation

I'm a big fan of automation, whether truly time-saving or not. So, nearly immediately after brewing my first batch of beer, or vinifying my first grapes, I have sought to increase consistency while reducing the amount of labor required. For a while, I've focused upon monitoring temperature and timing during the (beer) mash, boiling, and fermentation. Naturally this leads to me expending more effort than ideal. This project is a step toward automating the mash and boil. Namely, I'd like to control pumps for temperature control and filtering during the mash, as well as water heater elements for the boil.


The electronics for this project are simple. I have used a Maxim DS2408, with eight outputs to drive eight 20 amp relays. To handle the current required by the relay coils, I have based my design upon H. Roelle's Relay Controller. As relatively slow switching speeds are required and I already have a 1-wire network conveniently located throughout much of my home, using the 1-wire network was the simplest solution to a rapid product. All was mounted in a 6x6x4-inch metal junction box, with one relay for each of eight plugs. Final organization of this box is still in flux, and more incoming power than the current 120V, 20A is needed, of course, to drive heater elements during boil.

Schematic, Board Layout, & Software

Note that is one of my first PCBs, and was constrained by components I had on hand. It is far from ideal.

Schematic Board Layout

Dance Lighting

Simple light cycle
As mentioned above, this relay box debuted as the Sir Dance Alot party lighting controller. Eight colored lights on the verticies of an 8-foot octagon was aesthetically pleasing, and functioned excellently. Each light may be independently addressed as a bit of one byte, allowing a wide variety of patterns. As my original goal was not switching speed, I was pleased to achieve just over 5 1-byte updates per second. This proved to be plenty fast. As software development time was extremely limited, and latency somewhat unpredictable, no direct effort was made to synchronize with music--inexact timing would certainly be inferior to none at all. Note that this animation was photographed from the floor, and suggests the lights would be quite dizzying. The limited perspective of standing beneath the lighting negates this effect.

Created: 03 Oct 2007
Last Modified: 17 Nov 2009