This shows you the differences between two versions of the page.
|
installations:leddimmer [2009/10/08 21:16] edwin |
— (current) | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== LED dimmer ====== | ||
| - | This page describes a 40-channel LED strip dimmer project. | ||
| - | |||
| - | {{:installations:eccoluce.jpg?200|}} | ||
| - | |||
| - | ===== Electronics ===== | ||
| - | ==== Board layout ==== | ||
| - | |||
| - | Modular driver boards consisting of an ATmega88 running at 16 MHz. | ||
| - | The boards use 8 IRF44 power MOSFET's driven by 4423 MOSFET driver chips. Room has been left for adding RS485 driver control, DIP switches for address selection and status LED's. These are for future additions. | ||
| - | ==== I2C bus ==== | ||
| - | |||
| - | Every 8-channel board is I2C bus controlled. | ||
| - | For the timebeing a 10-pin wire has been used. This is far from ideal, since it can lead to errors. | ||
| - | |||
| - | AT the moment the bus master, the [[boards:ottantotto]] is connected tot the 10 wire cable using four colored wires: Green and blue for SCL and SDA. Red voor VCC and black for GND. **by the way, the black wire is in the way of a third sensor. It needs to be resoldered one pin to the right!** On a 10-pin ribbon cable the first pin (wire 1) is always denoted by a small triangle on the 'notched' long side of the connector. In the current setup, pin 4 of the I2C connector (the GND) is wired to ** wire ONE ** (the marked one) on the flatcable. | ||
| - | |||
| - | Note that at every driver board only pin 2 (sda) ,3(scl) and 4(gnd) have to be connected. From only one of the driver boards also pin 1 (VCC) is connected to the bus cable, so the master bus controller (an [[boards:ottantotto]]) can obtain its power. | ||
| - | |||
| - | Every board has the following I2C pinout. The master uses four colored wires soldered to the appropriate pins | ||
| - | |||
| - | |1 | VCC | RED | | ||
| - | |2 | SDA | BLUE ?| | ||
| - | |3 | SCL | GREEN ?| | ||
| - | |4 | GND | BLACK | | ||
| - | |||
| - | ==== RC5 remote ==== | ||
| - | An arduino IR remote library from [[http://arcfn.com/files/IRremote.zip | here]] has been used. An universal remote by Philips has been used which generates RC5 messages 'out of the box' | ||
| - | |||
| - | ==== PIR sensors ==== | ||
| - | Panasonic AMN31112J [[http://www.farnell.com/datasheets/73642.pdf|datasheet]] Passive motion detectors have been used. They are connected directly to the [[boards:ottantotto]]'s analog input port. | ||
| - | |||
| - | {{:installations:connectionsensor2.jpg?200|}} {{:installations:threesensors.jpg?300|}} | ||
| - | |||
| - | The black wires (Ground, GND) go to one of the pin's on the outer edge of the pcb. It does not really matter where they are connected, since all pins on the outer rim are connected to the Ground. The same holds for the red (VCC, +5V) wires. all center pins are connected to the VCC, so here it also does not matter where you connect the wires. The blue ones need to go on the pins closest to the chip. Here it DOES matter where you connect them, since every single pin is connected to a single chip-input. | ||
| - | |||
| - | |||
| - | ===== Firmware ===== | ||
| - | ==== Dimmer board ==== | ||
| - | |||
| - | At present two sources are being used. One is the source for 5 8-channel dimmer boards. This source is compiled using the [[http://arduino.cc | arduino ]] software version 1.16. {{:installations:dimmer.zip|}} | ||
| - | |||
| - | The dimmer firmware needs to be compiled for every single board since, at present, the I2C slave address is hard-coded into the firmware. This address can be changed in the top section of the firmware: | ||
| - | |||
| - | <code> | ||
| - | // 2-wire controlled 8 channel dimmer | ||
| - | // based on wire.h arduino example | ||
| - | // by e13 | ||
| - | #define ADDRESS 'E' | ||
| - | #include <Wire.h> | ||
| - | </code> | ||
| - | |||
| - | In the current setup the addresses range from 'A' to 'E'. | ||
| - | |||
| - | === Bugs === | ||
| - | * No checksum in I2C messages (has been added during testing, but has not been included in all software) | ||
| - | * Flickering. At present only idea's on the 'why' exist. Possibly it has to do something with the software-PWM generation in combination with data transmission in roughly the same frequency range. I.E. the boards generate a 100 Hz PWM signal, but also receive their desired PWM value with a frequency of 100 Hz. | ||
| - | ==== Master light controller ==== | ||
| - | This [[boards:ottantotto]] board controls the animation sequence, determines fade-in and fade-out, interfaces RC5 remote control and PIR sensors. | ||
| - | |||
| - | current source: Processing Sketch compiled with [[http://processing.org]]{{:installations:lightcontrol.zip|}} | ||
| - | |||
| - | === Bugs === | ||
| - | * Checksum has been removed again (it did not do anything, apparently no transmission errors were found yet | ||
| - | * Flicker error (possibly needs to be solved in dimmer firmware) | ||
| - | * Only one PIR sensor trigger works at present | ||
| - | |||
| - | |||
| - | |||
| - | |||