The goal is to create a wireless Arduino controlled dimmable light relay board. This board while connected to a programmed Arduino UNO listens for commands to
trigger relays brightness from 0 to 255. This design allows AC light fading. The relays are limited to 2 amps each.
This project is based on Keith Woodard's design. It is also uses the Arduino code that he wrote. www.woodardlabs.com
The TLC5940 is an open collector current sink device. This means that when the output is active, it is sinking current (low) but when it is not active, it appears as on open circuit. After the blank pin is toggled, the TLC5940 sets the output active (low) until the PWM cycle count has been reached. At that point, the output is put into a high impedance state (open-circuit). Since this board is designed to connect to a SSRez or compatible solid state relay board, a low output triggers the triac to turn on the light channel. With a triac controller relay, dimming requires a couple of design considerations:
The PWM cycle must be synchronized with the zero cross of the AC signal. To achieve this, a H11AA1 optocoupler was used. The output of the H11AA1 triggers an interrupt on the Arduino which then asserts the blank pin (and latch pin if new data has been clocked into the chips) to begin the next PWM cycle.
For dimming, each PWM cycle (120 Hz in the United States) must begin with the lights off. Based upon the desired dimming level, the triac must be turned on part-way through the PWM cycle. Once a triac is turned on, it will remain on until the next zero cross. This requires the output of the TLC5940 to be inverted. In addition, the output must be pulled high (5V) when the TLC5940's output is off (high impedance).
Get the latest Arduino code from our github repo.