Pages: 1 [2]   Go Down
Author Topic: 2 LED's 1 digital pin  (Read 2210 times)
0 Members and 1 Guest are viewing this topic.
Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 520
Posts: 26387
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 520
Posts: 26387
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Dallas, TX USA
Offline Offline
Faraday Member
**
Karma: 63
Posts: 2641
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 223
Posts: 6593
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.


* Scan 66.JPG (7.95 KB, 207x146 - viewed 24 times.)
Logged

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.

Pages: 1 [2]   Go Up
Jump to: