Hi, I’m working on an arduino christmas light project. I’ve found a couple good references online, but none that use as many inputs as I am. I have 16 channels, and since I am using the wave shield I didn’t have enough outputs to control each one with a single output (Arduino Uno). To minimize the number of pins necessary, I set up the outputs as four rows and 4 columns. To turn on any specific light, the row must be high and the column must be low. I use a timer interrupt to swap through the rows quickly, imperceptible to the human eye. Well it worked perfectly with a LED instead of the relay circuit. But now I soldered the relay circuit and I’ve got a couple of problems. See the attached drawing for an illustration of the circuit. This shows only one of four columns.
If I plug in a string of lights, it is always on, just really dim. I have all LED christmas lights. Incandescent ones are not visibly on if I plug them in, but the LEDs are on. It seems that even when the Relay is switched off, it’s not a completely open circuit. I measured the resistance, it seems like closed is about 10Mohms. Anyone know why the LEDS are still visibly on? (They are definitely brighter when the relay is “on” btw)
The “rows” connect to the base of the transistor and the “columns” connect to the emitter. When the row is high and the column is low, the relay should switch, but it doesn’t. It will only switch if I connect the emitter directly to ground and turn the row high. I don’t understand why because the pinMode is set to output and LOW, so it should be the same as ground, right?
Two things I didn’t think about was the speed of the relay switching and that the AC circuit would not act the same as the dc circuit. Although switching through the 4 columns really fast worked fine with the dc circuit (one led per section of christmas lights), it doesn’t work with the relays. 16 relays switching at 1/1000 of a second sounds nightmarish and definitely doesn’t make the flashing imperceptible. Any ideas for how I can use as few pins as possible but still have the freedom to light each string of lights in any combination? Is there a way to make the 4x4 configuration work?