This project uses the open-source i2c RGB LED controller firmware “cyz_rgb” to create a modular high-power lighting network. The network is controlled by an Arduino, which scans the network for nodes controls them autonomously with onboard scripts, manually via serial console control, or over the serial computer-control interface for interaction with programs on a host machine.
Node: BlinkM Clone
Each node consists of only a few inexpensive components. The total cost of each node, not including shipping or bulk discounts, is around $5.50. If you order more than 3 of the 3W LEDs, the price drops drastically ($2.74 per LED and lower.
- ATTINY85 – $1.82 – Cheap, small footprint, plenty of memory.
- 3W RGB LED from DealExtreme – $3.35
- NPN Darlington transistors (only $.04 from Mouser!)
- 10uF decoupling capacitor
- Current-limiting resistors for each LED (must be 2W+ rated!)
- Optional: Pin header, screw terminal, reset switch
The initial prototype node boards are shown below. These nodes include non-standard programming headers, screw-terminal power connectors, and incredibly under-rated resistors (1/4 watt for the red LED resistor!). 2W+ rated resistors are necessary if you are using a 3W+ LED. I would also recommend adding terminals for the clock and data lines, unless you want to run ribbon cable between the ICSP headers of each board which, conveniently enough, breaks out the needed power and data lines.
The controller for the network of i2c-connected nodes is an Arduino running MNLC. This sketch provides a simple serial terminal for manually communicating with the network of nodes, and also provides a non-interactive serial mode for host computer control. Included for testing is some code from jarv.org which reads an analog audio signal and cycles the network of LEDs through various patterns based on the amplitude of the incoming signal.
Build your own:
- Assemble node(s) as shown in schematic above
- Connect programmer to each node and flash ATTINY85 chips with cyz_rgb_slave firmware
- Unset the divide clock by 8 (DIV8) fuse on each node
- Assemble audio input circuit (if needed) and flash Arduino with MNLC
- One at a time, connect each node to the Arduino
- Once the node is connected, enter the interactive serial interface and use the “i” command to set a unique address for each node.
- Daisy-chain clock and data lines of all nodes to the Arduino, add pull-up resistors on both the data and clock line, and run MNLC sketch
Additional information on the construction of the final design and some notes about scaling this project up to a 12-node network with considerable distance between nodes will be added in the near future.