0
\$\begingroup\$

i want to control 5 led bulbs using just 2 wires .depending on some condition i want to turn a led with a specific color from 5 led set and only one led should on at a time.

here is a small explanation .

enter image description here

in my house we use water tank .if water level is max i want to show it by turning on specific color led.if water level is fine ..weak.. i want to show another color led on the motor switch .but distance between motor switch and tank is very big so i can't really use 6 wires for control 5 leds.

so what I'm asking is is it possible to control 5 leds just using 2 wires ? i'm thinking about pulse technique.for example if level is max i send a specific pulse/bit pattern so using small circuit determine which led should turn on. but for that i think i need 3 wires( 3 wire is also ok but led amount can be vary -10 led may be) .what is the cheapest and easiest way to do this ??i'm really new to electronics. if i can do this without using bit pattern it's lot better because detecting bit patterns quite complex to me. thanks

\$\endgroup\$
3
  • \$\begingroup\$ Why can't you use 6 wires? Sprinkler system cable is typically 7 or 9 conductors, can be direct buried, and is dirt cheap. Without going the easy way, you will probably still need more than two wires, a microcontroller will need power, common and the signal lead at least. \$\endgroup\$
    – R Drast
    Commented Aug 26, 2015 at 13:04
  • \$\begingroup\$ Doing this with 3 wires, either using (ground, power, analog level or digital data) or by charlieplexing (assuming you are talking about 5 single LEDs, not multi-color) is easy. Reduce it to 2 wires and you need data-over-power, which is doable but you should seriously considered if it worth the trouble. \$\endgroup\$ Commented Aug 26, 2015 at 13:12
  • \$\begingroup\$ @RDrast yes 6 wires is easiest way but if i want to detect 20 levels then i need 21 wires so that's the problem \$\endgroup\$
    – Fast Snail
    Commented Aug 26, 2015 at 13:19

5 Answers 5

3
\$\begingroup\$

You could send an analogue signal over the two wires to power and signal an LM3914 Dot/Bar Display Driver. https://www.sparkfun.com/products/12694

\$\endgroup\$
1
2
\$\begingroup\$

Make use of a serial in parallel out shift register,see the logic of shift register in the fig

schematic

simulate this circuit – Schematic created using CircuitLab

It needs only one wire from your MCU to the led array and rest can be built up near the array itself You can use 74HC595 shift register if no of LEDs are less than 8 ,you can find bigger shift registers if you search

Hope this helps

\$\endgroup\$
2
  • \$\begingroup\$ can i use this without micro controller too ? \$\endgroup\$
    – Fast Snail
    Commented Aug 26, 2015 at 13:21
  • \$\begingroup\$ No, you'll need to shift data using a microcontroller. There is an Arduino tutorial discussing this. Although, it does use 3 wires: clock, data and latch. \$\endgroup\$
    – DFisher
    Commented Aug 26, 2015 at 14:36
1
\$\begingroup\$

This is very well possible with only 2 wires, some electronics are needed on both sides of the wire. I would also carry power (for electronics and LEDs) over the same 2 wires and transfer the data (to select the LED that needs to be on) by superimposing an AC signal on the DC (which carries the power).

It would probably take me a couple of days to come up with something working. But I've been working on electronics for 30 years.

Since you're new to electronics maybe you should aim a little lower ? Using more wires is a much simpler option.

\$\endgroup\$
2
  • \$\begingroup\$ if i transfer data over the 2 wires , what is the best and easiest way plz show me a basic tutorial related to that if you can \$\endgroup\$
    – Fast Snail
    Commented Aug 26, 2015 at 13:27
  • \$\begingroup\$ There IS no basic tutorial for this ! Either you buy a product that does this for you (but I doubt if this exists) or you lower your requirements (use more wires). A 2 wire solution is not something a beginner can build ! \$\endgroup\$ Commented Aug 26, 2015 at 13:34
1
\$\begingroup\$

Use 3 wire to send several audio frequencies using IC 555 , then detect with audio filter.

Or use 3 wire to send several voltage from resistor-divider, then detect with comparators.

Note: 3 wire: signal, positif supply, & ground

\$\endgroup\$
1
\$\begingroup\$

A very simple and standard way would be to send the data using a serial RS-232 connection. If the distance is long, then use proper RS-232 drivers. Only two wires are required (ground and signal) assuming power is available on both ends. Easy to debug using a PC with a serial-to-USB cable.

No real limit on the number of LEDs you can control- with a couple hundred bytes you could individually control more than 1000 LEDs, if it's just a bar graph then 2 bytes is enough.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.