Leds and Arduino board

3

Good evening,

I'm programming an arduino one using C. I'm using an RGB led on three PWM outputs. However, now the need to connect more leds, one hundred leds at the same time, but besides not having the necessary ports, I need a solution to be able to control the LEDs individually.

Any ideas?

    
asked by anonymous 28.07.2015 / 03:25

2 answers

2

Partial Solution :

This question is really two: how to connect and how to program. (Of course it is relevant to know how many ports you have ...)

I'll just talk about the link.

The LEDs only come on if the chain goes in the right direction. Therefore it is possible to place 2 leds between each pair of doors (with opposite senses).

If between each pair of doors (n*(n-1))/2 you put 2 leds obtens a " Charlieplexer "

If you have 11 ports (and lots of wire ...), you can directly use the Arduino in "CarliePlexing" controlling 11 * 10 leds.

(The Arduino ports may be in the "+" "-" "off" state).

Unfortunately we can not have the two leds (p1 = +, p2 = -) and (p2 = -, p1 = +) connected at the same time. But with the controller we switch between the two with speed, we will see the two connected.

link

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

Update: Using external hardware (-> render arduino + multiplexer in google uncle ...)

Multiplexers allow you to "reduce" outputs / inputs. For example a multiplexer / demultiplexer of 16 will need 4 pins to select the desired output and one more for the signal.

link

Multiplexers can be set up ...

For example: link you'll find an arduino with 3-channel 8-channel multiplexer.

    
28.07.2015 / 12:22
-1

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

You can try something like this:

Connect one side (cathode or anode) of the LEDs to the digital inputs. Connect all other sides (cathode if you chose anode before) of the led in the same PWM output. So you could just close the circuit of the led you want to light up with a certain RGB composition based on the PWM port values at the time you close the circuit. If you do it too quickly you may get the feeling that all LEDs are on.

You would need a clock to synchronize ...

    
28.07.2015 / 05:58