Go Down

Topic: 2 LED's 1 digital pin (Read 3158 times) previous topic - next topic

CrossRoads

Ok, I'll track down Greg's forum name, I just got a board from him in the mail, it's pretty heft with all the screw terminals.
Says it drives the segments with 9 LEDs on a strip nice & bright from 12V!
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

CrossRoads

Greg is goodman1887
Here's the first board he assembled, and a clip of a test sketch of the LED strips lighting up.


http://www.crossroadsfencing.com/BobuinoRev17/led_strip_test.MOV
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

bperrybap


Nice, for my application i have a atmega328 with only A3-5 left and i need it to communicate with something else that can toggle 14 outputs(28 leds) -- 1 output can toggle 2 leds since they are 14 R/G leds.


Sounds perfect for a i2c i/o expander.
That only needs a4 and a5 and you can easily control 16 i/o pins.
Have a look at a MPC23016 for 16 i/o pins or MPC23008 for 8 i/o pins.

Each i/o pin can be either input or output.

If you really want to have some fun and speed is not a critical issue,
you could actually do it all with one pin using a shift register.
Have a look at this article for how.
It uses a pair of RC networks to drive a 74HC595 shift register.
Pretty cool actually:
http://www.romanblack.com/shift1.htm

--- bill

dc42


If you want to connect 28 LEDs to an Arduino, you'd be much better off multiplexing them. The attached diagram shows 2 x 3 multiplexing, which you could expand to 4 x 7. C1 - C2 and R1 - R3 are Arduino pins (you'll need 11 pins for 28 LEDs). Choose the value of resistor R to get the peak current you want in each LED (20 to 25mA is probably about right).

The diagram on the right shows how I was suggesting to connect 2 LEDs to one pin. However, if they are red LEDs, then a single 1n4148 in series may not be enough.

[sorry, can't post the pics because of "uploader full" messages]


Here is the schematic, shrunken so that the forum accepts it.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy