Leds and Arduino board

Asked

Viewed 116 times

3

Good night,

I am programming an Arduino uno using C. I am using an RGB led on three PWM outputs. However, now appears the need to turn on more leds, hundred leds at the same time, but in addition to not having the necessary ports need a solution to be able to control the leds individually.

Any idea?

2 answers

2

Partial Solution:

This question is actually two: how to call and how to program. (Of course it is relevant to know how many doors...)

I’ll just talk about the call.

The leds only light up if the current passes in the right direction. Therefore it is possible to place 2 leds between each pair of doors (with opposite directions).

If between each pair of doors (n*(n-1))/2 put 2 leds get one "Charlieplexer"

If you have 11 doors (and enough wire...), you can use the Arduino directly in "Carlieplexing" controlling 11*10 leds.

(Arduino ports can be in "+" "-" "off state").

Unfortunately we cannot have both leds (P1=+,P2=-) and (P2=-,P1=+) connected at the same time. However, if with the controller we switch between the two with speed, we will see the two connected.

http://www.instructables.com/id/Controlling-20-Leds-from-5-Arduino-pins-using-Cha/step2/Charlieplexing-The-theory/

If you have "few" ports you may need additional hardware (multiplexers or similar)

Update: Using external hardware (--> propose Arduino+multiplexer at uncle google...)

Multiplexers allow "demultiplicate" exits/inputs. For example a multiplexer/desmultiplexer of 16 will need 4 pins to select the desired output and one more for the signal.

http://tronixstuff.com/2013/08/05/part-review-74hc4067-16-channel-analog-multiplexerdemultiplexer/

Multiplexers can be docked...

For example in: https://miulinglam.wordpress.com/2010/04/19/arduino-multiplexing-example-1/ Find an 8 channel 3 multiplexer chaining Adian.

  • Hello, I see no problem in using additional hardware

  • @Lucastorres, check the update...

-1

It seems impossible to control the 100 leds at the same time without external hardware.

You can try something like:

Connect one side (cathode or anode) of led on digital inputs. Turn on all other sides (cathode if chosen before) of the led in the same output PWM. So you could close the circuit just from the led that wants to light up with a certain RGB composition based on the values of the PWM port at the time you close the circuit. If you do this very quickly you may get the feeling that all LED’s are accessed.

You would need a clock to sync...

  • Marcelo/Gabriel, actually I don’t need to light them all at once, and that’s the problem. Now I need to light the led 1 red, led 2 off, led 3 blue.... Ora led 1 off, led 2 off, led 3 yellow...

Browser other questions tagged

You are not signed in. Login or sign up in order to post.