Control three LEDs using two wires

I am working on a project where I want to control three LEDs using two wires from the Arduino, the LEDs needs to be controlled individually.

The idea was to use some capacitors and inductors on the LED side to create filters and from code create signals that will turn on the LED's dependant on the frequency. I saw a similar project here, in this case a NAND schmitt trigger IC is used as a signal generator and three switches to control the leds but in this case the idea is to use the Arduino for this.

Anyone has an idea how to do this if it is possible?

Waste of time.

You can load a shift register using two lines and control 8 (or more) LEDs.

Use a WS2801

WS2801.pdf (423 KB)

There are libraries around for it as well if you can't figure out how to shift 3 bytes into it.

Yes a shift register would solve the issue but the problem is that I can only use those two wires and I don't have access to power supply on the LED side so I can only use passive components there. :confused:

bandicot81: I don't have access to power supply on the LED side so I can only use passive components there.

You are likely to be very disappointed then!

Perhaps you need to use a two wire red/green LED - one direction it is red, the other green, alternating is yellow. :grinning:

Actually, your best bet may be to power the shift register with a diode and capacitor, and use time constants to control its reset and data inputs as you clock the data in. A long drop of power causes a reset, a short (LOW) pulse clocks a "1", a longer pulse clocks a "0" and after a longer delay (HIGH) the data is latched.

How about...

On the remote side, the 5V wire keeps a 100uF cap topped up via a diode. This cap powers an attiny85 which controls the 3 leds. The tiny monitors the 5V line on the far side of the diode for short breaks in the 5V signal. These breaks contain a code which tells it which leds to switch on/off. This code could perhaps be serial data, or something simpler involving measuring pulse lengths.


OK, so that is the same. You use either a shift register or a Tiny. Either a semi-analog implementation using resistors and capacitors, or a fully digital one. :grinning:

Yes powering an IC using the data line should work, much better than the original idea. I'll give it a try, thanks a lot guys :D