Author Topic: LED array clock--power questions  (Read 20169 times)

0 Members and 2 Guests are viewing this topic.

Offline xdbxTopic starter

  • Contributor
  • Posts: 13
  • Country: us
LED array clock--power questions
« on: July 16, 2015, 02:25:50 am »
So my project that I want to make is a LED clock, with the month, day, day of the week, and hour/minute/second time represented with 1 led per unit (194 leds total.) This would take 25 74HC595 shift registers. I want to control it with an arduino, and I just need to know how to power it all, and what resistors to put on the leds.

(Sorry if this is newbish, this is the biggest thing I've ever tried. Most of the time, I'm a programmer.)
 

Offline jeroen79

  • Frequent Contributor
  • **
  • Posts: 529
Re: LED array clock--power questions
« Reply #1 on: July 16, 2015, 02:37:08 am »
For power you need a DC powersupply that can deliver the voltage and current needed by the LEDs and controller.
5V can be used.

You determine which resistors to use based on their forward voltage, current draw and the supply voltage.
Or use an online led calculator.

You can reduce the number of shift registers by setting the LEDs up in a matrix rather than giving each a dedicated output on a shiftregister.
 

Offline xdbxTopic starter

  • Contributor
  • Posts: 13
  • Country: us
Re: LED array clock--power questions
« Reply #2 on: July 16, 2015, 02:50:24 am »
Thanks, I used one of the calculators, and it said it would be 3880 mA. Also, I need to be able to control each led individually.
I found a decent 5v 4A supply on amazon, but the arduino requires 7-12v in.
Also, is there some way to do it with a 18.6v 6.5A laptop supply?
 

Online edavid

  • Super Contributor
  • ***
  • Posts: 3785
  • Country: us
Re: LED array clock--power questions
« Reply #3 on: July 16, 2015, 03:02:09 am »
Thanks, I used one of the calculators, and it said it would be 3880 mA. Also, I need to be able to control each led individually.
I found a decent 5v 4A supply on amazon, but the arduino requires 7-12v in.

Thought questions:
1. How many LEDs do you need to turn on at once?
2. What are the current and power ratings of the Arduino's onboard 5V regulator?
3. Can you bypass that Arduino regulator?
 

Offline Whales

  • Super Contributor
  • ***
  • Posts: 2698
  • Country: au
    • Halestrom
Re: LED array clock--power questions
« Reply #4 on: July 16, 2015, 03:07:59 am »
Most Arduinos (eg Uno, Mega) are 5V devices.   You can power them with 5V directly or with above ~7V through their regulators. 
 

Offline xdbxTopic starter

  • Contributor
  • Posts: 13
  • Country: us
Re: LED array clock--power questions
« Reply #5 on: July 16, 2015, 03:13:49 am »
Thought questions:
1. How many LEDs do you need to turn on at once?
2. What are the current and power ratings of the Arduino's onboard 5V regulator?
3. Can you bypass that Arduino regulator?

1. In theory, the maximum would be 193 leds for one second. (Sunday, 31 December, 23:59:59).
2. http://www.amazon.com/gp/product/B00E5WJSHK This is the board, I can't see the part number, but the description implies it is 500mA.
3. What do you mean by bypass?
 

Offline dadler

  • Supporter
  • ****
  • Posts: 851
  • Country: us
Re: LED array clock--power questions
« Reply #6 on: July 16, 2015, 03:29:13 am »
As has been mentioned, you should consider scanning through, say, each digit in sequence. That is, only light a subset of the LEDs at any one time, and scan through them in your code. If scanned fast enough, you can take advantage of persistence of vision to offer the appearance of all LEDs being on at the same time. Further, you drastically reduce the current requirements and will not need that crazy number of shift registers.
 

Offline dadler

  • Supporter
  • ****
  • Posts: 851
  • Country: us
Re: LED array clock--power questions
« Reply #7 on: July 16, 2015, 03:30:46 am »
Check this video out for an implementation of this type of approach:

http://youtu.be/Ov27rac0tP0
 

Online edavid

  • Super Contributor
  • ***
  • Posts: 3785
  • Country: us
Re: LED array clock--power questions
« Reply #8 on: July 16, 2015, 03:39:01 am »
1. In theory, the maximum would be 193 leds for one second. (Sunday, 31 December, 23:59:59).
OK, that wasn't clear, since it would be just as valid to only turn on e.g. the Sunday LED.
Quote
2. http://www.amazon.com/gp/product/B00E5WJSHK This is the board, I can't see the part number, but the description implies it is 500mA.
So obviously you can't power a 4A project that way.
Quote
3. What do you mean by bypass?
Don't use it.  (Although there's no reason why you couldn't use separate power supplies for the Arduino and the LEDs.)
 

Online edavid

  • Super Contributor
  • ***
  • Posts: 3785
  • Country: us
Re: LED array clock--power questions
« Reply #9 on: July 16, 2015, 03:40:35 am »
As has been mentioned, you should consider scanning through, say, each digit in sequence. That is, only light a subset of the LEDs at any one time, and scan through them in your code. If scanned fast enough, you can take advantage of persistence of vision to offer the appearance of all LEDs being on at the same time. Further, you drastically reduce the current requirements and will not need that crazy number of shift registers.
Since LED brightness is proportional to average current, multiplexing does not reduce the current requirements.  In fact, if he really needs 20mA DC to get the brightness he wants, multiplexing won't even work.
 

Offline xdbxTopic starter

  • Contributor
  • Posts: 13
  • Country: us
Re: LED array clock--power questions
« Reply #10 on: July 16, 2015, 03:51:02 am »
-snip-
3. What do you mean by bypass?
Don't use it.  (Although there's no reason why you couldn't use separate power supplies for the Arduino and the LEDs.)
I figured it would have to be separate supplies, and yes, I need decent brightness, so I would need most of the 20 mA.
« Last Edit: July 16, 2015, 05:50:29 am by xdbx »
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 14126
Re: LED array clock--power questions
« Reply #11 on: July 16, 2015, 03:54:37 am »
Modern high efficiency LEDs are usually bright enough for nearly all applications with If in the 4 to 10 mA range.  If you keep If under 9mA, a 5V 2A adapter will power it, and 5V 2A USB chargers are as common as dirt.

Hook up a sample of a couple of the LEDs you intend to use, with a resistor chosen to pass 8mA and see if its bright enough for you.

I suspect that if you run them at 20mA, 193 of them would be bright enough to illuminate a large room!
« Last Edit: July 16, 2015, 03:57:19 am by Ian.M »
 

Offline xdbxTopic starter

  • Contributor
  • Posts: 13
  • Country: us
Re: LED array clock--power questions
« Reply #12 on: July 16, 2015, 04:06:22 am »
Yeah, they are actually quite bright at that level!
« Last Edit: July 16, 2015, 04:08:17 am by xdbx »
 

Offline xdbxTopic starter

  • Contributor
  • Posts: 13
  • Country: us
Re: LED array clock--power questions
« Reply #13 on: July 16, 2015, 04:24:22 am »
And to make sure, I could put separate +5v and ground into the 595s and the arduino, right?
This schematic from the arduino example looks like the only necessary connections to the microcontroller are the data, latch, and clock.
 

Offline P_Doped

  • Contributor
  • Posts: 36
Re: LED array clock--power questions
« Reply #14 on: July 16, 2015, 04:51:24 am »
If you plan on driving 20mA potentially from each output of a 74HC595, I think you'll run into supply current limits.

Looking at an NXP version of the part, even though a single I/O can source/sink 35mA, the whole chip can only handle +/- 70mA.

If you are serious about this drive level, you may want to place some type of intermediate driver (the Darlington type ULN series used to be quite popular; I'm sure there's a better modern version more appropriate if one looks) between the 74HC595 and the LED circuit.
 

Online edavid

  • Super Contributor
  • ***
  • Posts: 3785
  • Country: us
Re: LED array clock--power questions
« Reply #15 on: July 16, 2015, 05:03:14 am »
And to make sure, I could put separate +5v and ground into the 595s and the arduino, right?
No.  You definitely need a common ground.  It's better to use the same supply for the Arduino and the 595s or whatever.

You would normally drive the LED cathodes, since the 595s and most other drivers have more drive in the low state.

 

Offline xdbxTopic starter

  • Contributor
  • Posts: 13
  • Country: us
Re: LED array clock--power questions
« Reply #16 on: July 16, 2015, 05:49:51 am »
No, I'll be using it at 8 mA.
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 14126
Re: LED array clock--power questions
« Reply #17 on: July 16, 2015, 06:04:57 am »
You may do better to look at dedicated multi-channel constant current LED driver chips.  That way you can loose all the LED series resistors except for one per chip on older LED drivers to sert the current, and you get 16 or more individually LEDs per chip so the total part count will be much lower.   Unfortunately, PDIP package LED drivers are getting rather rare so you'll need to find ones on a breakout board or with a package that is hand-solderable.
 

Offline xdbxTopic starter

  • Contributor
  • Posts: 13
  • Country: us
Re: LED array clock--power questions
« Reply #18 on: July 16, 2015, 06:16:33 am »
And to make sure, I could put separate +5v and ground into the 595s and the arduino, right?
No.  You definitely need a common ground.  It's better to use the same supply for the Arduino and the 595s or whatever.

You would normally drive the LED cathodes, since the 595s and most other drivers have more drive in the low state.

Oh, okay. Thanks.
 

Offline Corporate666

  • Supporter
  • ****
  • Posts: 2011
  • Country: us
  • Remember, you are unique, just like everybody else
Re: LED array clock--power questions
« Reply #19 on: July 16, 2015, 07:03:10 am »
Ditch those 74HC595 chips.  Look at STP08DP05.  It's also a shift register, but each line has a constant current (up to 100mA per line, 800mA for the whole chip) LED driver.  You can daisy chain the shift registers by dumping the serial out of one into the serial in of the next, so you use 4 lines for your whole project.  You also don't need resistors.  I think there is a voltage overhead of 0.6V or something thereabout, so you ideally want your power supply to be just about 0.6 volts above your LED forward voltage - that way you aren't dissipating too much heat in the shift registers.

EDIT: If you need a through-hole package, look at TLC5916.  Pretty much the same as the above STP08DP05, except it's in a DIP package and supports 960mA total ground pin current, more than you need.

DIP won't have the same power dissipation as TSSOP though, so again, be sure to run your voltage supply at the lowest level possible for your LED's to minimize dissipation in the chip (it's a linear device after all).
« Last Edit: July 16, 2015, 07:06:16 am by Corporate666 »
It's not always the most popular person who gets the job done.
 

Online MarkF

  • Super Contributor
  • ***
  • Posts: 3281
  • Country: us
Re: LED array clock--power questions
« Reply #20 on: July 16, 2015, 09:11:58 am »
I think you should check out the MAX7219 Serially Interfaced, 8-Digit LED Display Drivers and read this Arduino page.
 

Offline xdbxTopic starter

  • Contributor
  • Posts: 13
  • Country: us
Re: LED array clock--power questions
« Reply #21 on: July 16, 2015, 02:57:17 pm »
Ditch those 74HC595 chips.  Look at STP08DP05.  It's also a shift register, but each line has a constant current (up to 100mA per line, 800mA for the whole chip) LED driver.  You can daisy chain the shift registers by dumping the serial out of one into the serial in of the next, so you use 4 lines for your whole project.  You also don't need resistors.  I think there is a voltage overhead of 0.6V or something thereabout, so you ideally want your power supply to be just about 0.6 volts above your LED forward voltage - that way you aren't dissipating too much heat in the shift registers.

EDIT: If you need a through-hole package, look at TLC5916.  Pretty much the same as the above STP08DP05, except it's in a DIP package and supports 960mA total ground pin current, more than you need.

DIP won't have the same power dissipation as TSSOP though, so again, be sure to run your voltage supply at the lowest level possible for your LED's to minimize dissipation in the chip (it's a linear device after all).
I think you should check out the MAX7219 Serially Interfaced, 8-Digit LED Display Drivers and read this Arduino page.

Is there any real advantage to using these,other than less soldering to do? I don't need that much current, even at 8 mA the leds were quite bright, and the 595s can handle that. The 595s daisy chain as well.
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 14126
Re: LED array clock--power questions
« Reply #22 on: July 16, 2015, 03:37:42 pm »
It depends.  Many of the constant current multiple LED driver chips offer convenient dimming, either for all the channels together or for individual channels, and ambient light level controlled dimming is a very nice feature for a LED clock to have, especially if it is used as an alarm clock.

However it is possible to dim LEDs connected to '595 chips, by PWMing all the /OE pins, and if you already have the '596 chips and resistors, the only thing you wll save for a one off is board area and number of joints to solder.
 

Offline xdbxTopic starter

  • Contributor
  • Posts: 13
  • Country: us
Re: LED array clock--power questions
« Reply #23 on: July 16, 2015, 03:46:44 pm »
Ah, okay. In that case, I'll just use the 595s. I only plan on making 2, and they're likelygoing to be wall clocks anyways, so dimming isn't really a big deal.
 

Offline Rolo

  • Regular Contributor
  • *
  • Posts: 210
  • Country: nl
Re: LED array clock--power questions
« Reply #24 on: July 16, 2015, 04:01:06 pm »
Ah, okay. In that case, I'll just use the 595s. I only plan on making 2, and they're likelygoing to be wall clocks anyways, so dimming isn't really a big deal.
You might take a look at the WS2803.  18 pwm outputs,  no resistors, cheap and can be chained. Two wires needed.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

-->