Pages: [1]   Go Down
Author Topic: Big 7-seg LED using 74HC595 and ULN2003A  (Read 1653 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello smiley

I'm trying to build countdown timer for sport events. It should be made of 3 digits (0-9) that are at least 20x7 cm and since I'm on very limited budget, I decided to use led stripes I already have (they are in 5cm segments, every segment with 3LED and resistor, 12V, 20mA).

According to http://www.arduino.cc/en/Tutorial/ShiftOut I've create small model with 21 2mA LED and dip switch for choosing starting point for countdown (240, 120, 90 and 40 seconds). I wrote simple countdown code and it works just fine.

Since I'm planing to use 4 led stripes (2x2) for every segment of 7-seg display, I tried using schematic from http://chaokhun.kmitl.ac.th/~kswichit/Led/Led.html (74HC595 is connected to Arduino Mega).
I'm still testing with 2mA LED and powering them with 9V battery. I've connected everything like on schematic but nothing happened, then I downloaded ULN2003A data sheet and saw that pin 8 is GND, so I connected pin 8 to GND rail on protoboard and only two LEDs powered up, turned off, and that's it.

What should I do, to make this work? smiley

If you need any additional information, please ask.
Logged

Offline Offline
Faraday Member
**
Karma: 66
Posts: 2578
Now, More Than Ever
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So, the arduino ground is connected to the 2003's pin_9 (not its pin_8 as you posted) and the 12V supply ground?
Logged

"Hello, I must be going..."
"You gotta fight -- for your right -- to party!"
Don't react - Read.
"Who is like unto the beast? who is able to make war with him?"

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 548
Posts: 27372
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

You could check with goodman1887,
I'm sure he'll sell you one of these, will do just what you want.
Or have him leave off the SD card and RS232 driver/connector to be a little less expensive.

'328 with 4 TPIC6B595 to drive the segment digits.
(altho the one pictured seems to be missing a TPIC6B595)
Here's  a short clip turning a segment off in the 4 digits.

Or I could do a modifed design of this stripped down a little for you.
Or you could try making the same with a protoboard shield that stacks on top of an Uno.
Or ...


* card_and_4digits.jpg (481.75 KB, 728x789 - viewed 68 times.)
* led_strip_test.MOV (666.96 KB - downloaded 19 times.)
« Last Edit: March 09, 2012, 09:06:31 pm by CrossRoads » 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.

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

runaway_pancake, 12V supply ground is connected to protoboard GND line, with Arduino GND, 74HC595 GND and ULN2003s GND (PIN smiley-cool.
If I connect ULN2003s PIN 9 to the same line, LEDs will be powered up all the time. Any idea how to GND 12V?

CrossRoads, I'm from Serbia so the delivery would be very expensive smiley-sad
TPIC6B595 is good idea, but my local shop doesn't sell TI. I'll visit some other shops on monday or order it online. Of course, only in case I don't find solution with components I already have smiley
Logged

Offline Offline
Faraday Member
**
Karma: 66
Posts: 2578
Now, More Than Ever
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

M,
Sorry, the chaokhun schematic doesn't actually indicate the Ground pin (yes, pin_8!) at all.  (Pin_9 "COM" is the internal flyback diodes).   smiley-red

Anyway, with 5V to an input, its associated output should go on.
You can check those connections by disconnecting the wiring back to the 595 and then "ring it out" with 5V to each input.




* 2003check.JPG (21.75 KB, 468x439 - viewed 45 times.)
Logged

"Hello, I must be going..."
"You gotta fight -- for your right -- to party!"
Don't react - Read.
"Who is like unto the beast? who is able to make war with him?"

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 548
Posts: 27372
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

USPS has ship small package to just about any country for something like $14, goodman1887 can send you  a card & LED strips for that much.

TI makes the ULN2003 also
http://www.ti.com/product/uln2003a

You need a ULN2003 or the high voltage shift register for 12V, the '595 can't switch that.
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.

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Argh!
smiley-grin
Problem solved smiley

Arduino was counting from 120 to 0 all the time, but I've disconnected 2 74HC595 to free some space on protoboard.
In my first post I said that 2 LEDs power up, and after some time turns off. It was number 1 powered up for 4 seconds. Why 4s? For testing purpose I've shorten delay from 1000 to 200ms so Arduino needed 4 seconds to countdown from 120 to 99 and turn of first digit.

When I disable two lines of code for missing 74HC595s, everything works just like I planed smiley
Thank you and best regards smiley
Logged

Offline Offline
Faraday Member
**
Karma: 66
Posts: 2578
Now, More Than Ever
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Someone lead me to understand that the only change was the addition of the "LED stripes" circuit, but it was otherwise the "small model".
Logged

"Hello, I must be going..."
"You gotta fight -- for your right -- to party!"
Don't react - Read.
"Who is like unto the beast? who is able to make war with him?"

Offline Offline
Newbie
*
Karma: 0
Posts: 23
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, im also trying to build a Countdown Timer. Im trying to use the 74hc595, But its Not Reals working. You sead you allerart Build a small Model which Works. Can you help me Out with the schematic which you used and the Sketch. You World really help me Out. Tanks.
Logged

Pages: [1]   Go Up
Jump to: