4 Digit 7 Segment Serial LED Module - TM74HC595

Grumpy_Mike: Absolute and utter bilge. You ought to be made to hand in your soldering iron, that is if they allow hot objects like that where you are. So on for an hour and off for 48 hours then? - Grow up. How do you define continuous anyway?

There are thermal considerations but that is not the only effect. Depletion of charge carriers in the semiconductor material will also happen which will degrade the semiconductors and lead to a shorter life.

The only reason why people "get away" with this sort of thing is that they don't know how to test for the damage that this sort of thing actually does.

Do you take this attitude to driving? Have you driven hundreds of times over the speed limit and not got caught? So that's alright then. So either grow up or go somewhere else to peddle your clap trap.

M, I think all the objects are hot where you are headed. :) But seriously, there is a difference between the continuous current and peak current specification for a LED. It's not how I define continuous, it's how the manufacturer defines it. So ask them, not me. For example, this IR LED boasts a continuous maximum current of 50mA, but the peak maximum is 1.0A at 100us, 1% duty cycle:

http://roithner-laser.com/datasheets/led_div/IR333C.pdf

Normally I don't comment on posts reported to the moderators, but Grumpy Mike's post above was reported, describing Mike with a very unflattering term. In this case, I'm going to defend Mike. People who post stuff like "the average current is the same, so in the end it's all cool" don't have to deal with the posts from noobs who have broken their AVRs because someone wrote they didn't need buffering.

So ask them, not me.

They are not the ones giving rubbish advice.

For example, this IR LED boasts a continuous maximum current of 50mA, but the peak maximum is 1.0A at 100us, 1% duty cycle:

Grate so you can use that LED in that way. You can not extrapolate that data to any other LED and it says nothing of over driving the Arduino Pin.

Grumpy_Mike:
They are not the ones giving rubbish advice.
Grate so you can use that LED in that way. You can not extrapolate that data to any other LED and it says nothing of over driving the Arduino Pin.

You are taking my advice out of context. There are no Arduino pins connected to the LEDs of this display. Nor am I making any recommendations on any new design. We are discussing a particular display module. Download the schematic and see for yourself. In general, I would never recommend operating any electronic device beyond its specified limits.

However, in some cases the specified limits are not available, and it is reasonable to use the limits of similar devices where there is are precedent generalities (or industry practices, if you like). We don’t look up the specs of every 1/4W resistor we pick up to use. Especially if there is no particular reason to believe that lives are at stake.

I can indeed extrapolate that data to other LEDs. At least, to the extent that they exhibit the same phenomenon. I don’t believe that peak current limits would necessarily be specified for LEDs that are not intended to be used for pulsed applications. Hence the pulse limits may not be known. But for many LEDS, they are. Hence, I seriously doubt that there can be such a qualitative difference between such devices that are all based on the same basic technology (excluding different formulations and so on), that they do not all exhibit it in some degree. Have a look at this:

http://www.avagotech.com/docs/5966-3087E

In this document, an extended warranty is granted for currents about twice the continous maximum, provided duty cycle conditions are met. Tomorrow, I will look at some display modules specs, because they are intended for pulse applications. It will be interesting to see.

@aisc, do you have the ability to measure the module supply current with one segment turned on? With a DMM? Actually, you can do it without modifying the code by loading 16,16,16,16 into the array. Then one segment is always on even though the digits are switching - the “-” symbol.

AWOL:
Normally I don’t comment on posts reported to the moderators, but Grumpy Mike’s post above was reported, describing Mike with a very unflattering term.
In this case, I’m going to defend Mike.
People who post stuff like “the average current is the same, so in the end it’s all cool” don’t have to deal with the posts from noobs who have broken their AVRs because someone wrote they didn’t need buffering.

I don’t disagree with what GM says but I do disagree with the the way it is said and the insults levelled in his post.
There is absolutely no need for the below comments

You ought to be made to hand in your soldering iron, that is if they allow hot objects like that where you are.

So on for an hour and off for 48 hours then? - Grow up.

So either grow up or go somewhere else to peddle your clap trap.

aarg: @aisc, do you have the ability to measure the module supply current with one segment turned on? With a DMM? Actually, you can do it without modifying the code by loading 16,16,16,16 into the array. Then one segment is always on even though the digits are switching - the "-" symbol.

I loaded 16,16,16,16 into the array and the display shows "- - - -".

Measuring setup.

Uno powered from 12V wallwart. LED Module powered from 3.3V & GND from Uno. DMM connected in series with LED module : Uno 3.3V --> DMM+; DMM- --> LED VCC; LED GND --> Uno GND. DMM setting = 2000 uA (with 1 uA resolution). DMM reading = - 001 (I imagine that is 1uA).

Not sure why I get the negative sign, but the reading is largely steady on 1 and occasionally jumps to 2 for just a brief moment.

1uA is definitely wrong. Was the display module illuminated? Some multimeters require that you plug the probe into a different jack for current readings.

I did some test measurements this morning, and did some more research. I am fully able to justify my belief that this module is operating within safe parameters based on specifications and sound engineering principles, but I’m not willing to get dragged into a debate about it at this time. However I would like some confirmation of the peak current to be 100% sure. The design is not a good one, not mainly because it pushes the hardware to near its limits, but for the alternate reason of the segment dimming phenomenon that is due to lack of digit drivers. From a design point of view, adding those drivers would decrease the driving resistance and thus segment resistors would become more important. The real cost of four SMT transistors and 12 resistors is miniscule, a few pennies. So it’s kind of stupid that they didn’t use them.

It does seem a lot of trouble to use, considering that the cost of modules based on chips like the TM1638 and others, is little more than the 74HCxxx drive ones such as yours. Although they also use a clocked serial interface, they have the strong advantage of managing all the scanning and LED drive on chip. Thus the Arduino doesn’t have to continually update the display if it’s not changing. As a bonus, the TM1638 can read switches (mine has 8 pushbuttons). It even has commands to change the brightness. Since the chip has proper scanning and drivers, the brightness is excellent.

Bottom line is, to make your module’s display really look good you have to change the software. I am willing to help with that if you like, but I doubt that it’s worth it. The idea would be to illuminate one segment at a time as I outlined in a previous post.

aarg:
1uA is definitely wrong. Was the display module illuminated? Some multimeters require that you plug the probe into a different jack for current readings.

Yes the modules was illuminted - See pics.
Here is a link to my UNI-T 30C multimeter.
Red lead was plugged into middle socket and connected to Uno 3.3V.
Black lead was plugged into COM and connected to the LED Module VCC.
Setting used was 2000 uA and reading was “- 001”.

The 1uA would be for 4 segments.
Why do u think the reading is wrong?
What do believe the reading should be?
I would hate to think it is my meter - I only bought it 2 weeks ago.

Edited:

As an afterthought, I also measured 2 segments lit i.e. “1 1 1 1” and 7 segments lit “8 8 8 8”.
In both cases I still get a reading of “- 001”.
Wondering if that means my meter is not granular enough.

I did some test measurements this morning, and did some more research. I am fully able to justify my belief that this module is operating within safe parameters based on specifications and sound engineering principles, but I’m not willing to get dragged into a debate about it at this time. However I would like some confirmation of the peak current to be 100% sure. The design is not a good one, not mainly because it pushes the hardware to near its limits, but for the alternate reason of the segment dimming phenomenon that is due to lack of digit drivers. From a design point of view, adding those drivers would decrease the driving resistance and thus segment resistors would become more important. The real cost of four SMT transistors and 12 resistors is miniscule, a few pennies. So it’s kind of stupid that they didn’t use them.

Well it would seem according to my meter that the peak current would be 2 uA for four segments.
Although the reading mainly sits on one, it regularly flashes up to 2 briefly.

It does seem a lot of trouble to use, considering that the cost of modules based on chips like the TM1638 and others, is little more than the 74HCxxx drive ones such as yours. Although they also use a clocked serial interface, they have the strong advantage of managing all the scanning and LED drive on chip. Thus the Arduino doesn’t have to continually update the display if it’s not changing. As a bonus, the TM1638 can read switches (mine has 8 pushbuttons). It even has commands to change the brightness. Since the chip has proper scanning and drivers, the brightness is excellent.

I bought this module not knowing any better. I initially bought some 7 segment displays, but to my horror discovered they needed a lot of pins to drive. I was about to add level shifting to the displays, when I discovered there were some premade ones. So I ordered one to save myself the hassle of making one. But alas, I paid no mind to any technical issues - lesson learned.
Can u please provide a link to the ones u are using.

Bottom line is, to make your module’s display really look good you have to change the software. I am willing to help with that if you like, but I doubt that it’s worth it. The idea would be to illuminate one segment at a time as I outlined in a previous post.

This module was bought for the sole purpose of having the convenience of visualising the distances sensed by a sonar sensor during testing - so I don’t really care about the brightness.

Bottomline:

I try to avoid controversy so would normally not comment, but since I feel a certain level of responsibility for raising the initial questions…

This post started out as a programming question. Aarg helped me resolve a programming issue for which I am grateful and thank him.
I threw in a few other questions and he was kind enough to respond to those as well.
Some may believe he did not give good advice, but the bottom line is I have to take responsibility for buying the unit and if it burns out ce la vie. The data sheet does not show the need for any resistors, so if blame needs to be laid, it should be at the feet of the manufacturer.

I am certainly interested to learn more about the technical aspects/limitations of the unit, but would rather it be discussed objectively and not at the expense of the reputation of someone trying to be helpful - after all we are only talking about a $1 piece of equipment.

That being said, I DO appreciate all the input, including constructive criticism, and thank everyone for their contribution.

Short answer before I go to lunch - the module current should be at least a few mA... LEDs just don't light up on a few uA. But i am hungry. When I get back, I'll look at the photos. It's possible that the display strobing is creating too much AC and it's confusing the meter. Just a guess.

Quick update... Since you mentioned you are expecting in the mA range, I upped the meter range setting but at 3.3V I get a zero reading.

However, on a 200 mA setting and running the module at 5V, I get 31.8 mA for 7 segments lit i.e. "8 8 8 8".

So it seems my meter has issues at 3.3V.

I will reload and measure "- - - -" at 5V.

Update :

With 1 segment lit i.e. "- - - -" and running at 5V, I get 27.7 to 27.8 mA.

Red lead was plugged into middle socket and connected to Uno 3.3V. Black lead was plugged into COM and connected to the LED Module VCC. Setting used was 2000 uA and reading was "- 001".

You may have blown the meter's fuse. It says it is fused for 200 mA. It is possible that trying to measure a whole lot of LEDs, without current limiting, would exceed 200 mA.

Try setting up a test case. For example, get a 1k resistor, and put it in series with the meter, between 5V and ground.

ie.

5V pin ---> 1k resistor ---> meter mA + -----> meter Common ---> Ground

Now you should get 5 mA.

I = V / R
I = 5 / 1000
I = 0.005 A

If it doesn't read 5 mA then there is something wrong with the meter. Open it and see if you can check the fuse. (You might need a meter to check it - the other ranges should be OK, so you could pull the fuse out, and try measuring the fuse with the Ohms part of the meter).

A fairly standard approach, if you don't know the current, is to measure on the 10A range first (use the other socket) and see if that reads more than 200 mA or not.

@Nick Gammon : On the suggested test, I do get 5 mA. Since I was using a breadboard power supply, I switched from 5V to 3.3V (changed jumper) and I get 3.2/3.3 mA.

So I went back to measuring the LED Module ("- - - -") on the 200mA setting. At 5V I get 27.2 mA. At 3.3V (only swapping wire from 5V to 3.3V on Uno) I get 0.00 with a flashing minus sign.

Using a second "Voltcraft" DMM on 200mA setting, I get exactly the same readings i.e. 27.2 mA at 5V and 0.00 with flashing minus at 3.3V.

Hmmm... I am scratching my head here.

Curiosity got the better of the cat.... Using a 10k resistor I tested at 5V and 3.3V on 2000uA, 20mA and 200ma. At 5V I get 500uA/0.50mA/00.5mA At 3.3V I get 325uA/0.33mA/00.3mA

So seems the meter is fine, must be something about running the module at 3.3V....

So it seems my meter has issues at 3.3V.

This doesn't really make sense because you don't measure current "at 3.3V". You just measure current.

I can't quite picture your setup here.

Since I was using a breadboard power supply, I switched from 5V to 3.3V (changed jumper) and I get 3.2/3.3 mA.

Are you powering your LEDs with 3.3V, but putting the Uno output pins onto the 595 shift register? Can you sketch what you are doing?

@Nick Gammon

I think u are confusing the 2 test setups.

  1. LED Module current measuring :
    For the LED current measuring setup see my earlier post with pictures of the setup and a detailed description of the connections. Posts #25 and 27.

  2. Meter check:
    For the meter check test (per your suggested setup), instead of using the Uno as a source of supply, I used a breadboard power supply. See my previous post (including updates) - the meter checks out fine. Pic attached for your convenience. Ignore other stuff on breadboard. Not on same power rail.

Issue is not with my meter.
From what I can determine, there is an issue measuring the current draw of the LED module when the module is powered with 3.3V. When powered at 5V, I am able to measure the current.

[quote author=Nick

Gammon link=msg=2195164 date=1429511896]
This doesn’t really make sense because you don’t measure current “at 3.3V”. You just measure current.

I can’t quite picture your setup here.

Are you powering your LEDs with 3.3V, but putting the Uno output pins onto the 595 shift register? Can you sketch what you are doing?
[/quote]
Sorry if my shorthand is confusing you - I initially measured the current draw with the LED module powered only at 3.3V. I have since measured the current draw with the LED module powered at 5V.

At 5V I get current reading of 27.2mA at 3.3V I cannot get a reading.
N.B. Voltage refers to the level at which the LED module is powered.

Can you draw a schematic? This module has a couple of 595s, right? They won't draw much power until commanded to do so. I don't know what it proves to measure the current into them, if the Arduino hasn't shifted stuff into them, for there to be something to display.

[quote author=Nick Gammon date=1429514524 link=msg=2195210] Can you draw a schematic? [/quote] Will a verbal schematic do? The module is plugged into a breadboard. The module is powered at 3.3V from an Uno. Uno pins 5, 6, 7 are connected to SCLK, RCLK and DIO on the module. See pic in post #27.

This module has a couple of 595s, right?

Yes, see data sheet in Post #1.

They won't draw much power until commanded to do so. I don't know what it proves to measure the current into them, if the Arduino hasn't shifted stuff into them, for there to be something to display.

They are displaying something - the Uno is coded to display "- - - -" i.e. only light up one segment of each of the 4 digits.

Will a verbal schematic do?

No.

Do I post verbal schematics on my web site? I think not.

The module is powered at 3.3V from an Uno. Uno pins 5, 6, 7 are connected to SCLK, RCLK and DIO on the module.

So you are powering the module with 3.3V but sending it 5V logic signals, did I get that bit right?

[quote author=Nick Gammon link=msg=2195252 date=1429517288] So you are powering the module with 3.3V but sending it 5V logic signals, did I get that bit right? [/quote]

Aha! - yes you are right... and the unit does still light up.

Thinking about it..., I assume the LEDs must be powered from VCC given that I measured 27.2 mA drawn through VCC, when powered at 5V.

So when powered with 3.3V the LEDs should be running at 3.3V - would that be right?

My guess is that the display module is powering itself through the input protection diodes in the 74HC595 since they are connected to the logic lines to the Arduino. It’s a higher voltage so it doesn’t draw anything from the 3.3V. It sounds weird but I have seen this happen before on the job. Someone thought the power supply was bad on a unit, so they removed it to replace it. The unit continued to run, but badly! It turned out to be drawing power from the logic lines of another device. Try removing the 3.3V power and check the display while the power pin on the module is disconnected. It might be lit! :slight_smile:

If it is the case, that in itself would be a good reason to power it on 5V, but also there are also logic level matching issues between the two voltages. So I advise you to leave the 3.3V supply out of it.