Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Is there a relation between LED current and speed?

Status
Not open for further replies.

bigal_scorpio

Active Member
Hi to all,

I have just built my second LED clock. The first was made from 5 x red LEds per segment and worked quite well.

I then decided to upscale the display and did exactly the same thing but using more gap between the LEDs and white superbright ones instead of red. Though I was still using the same voltage for 3 x white LEDs that I was using for 5 x red LEDs I adjusted the current to suit.

Now I find that the display is very flickery, really noticable! Also I have some odd segments partially lighting and I can only think it must be some sort of lag.

Does an LED turn on and off slower when given more or less current?

BTW the clock is driven by a PIC and runs at 1/4 display duty and there is no apparent flicker on the red clock or the strange "leakage" between segments.

Thanks, Al
 
LEDs operate much more rapidly then the eye can detect and it's only slightly (if at all) affected by the current level. So you have some other problem in your circuit.

Run the white LEDs at the same current as the red LEDs and see if that makes a difference.
 
There could also be a physiologic explanation.

From Wikipedia:

The flicker fusion threshold is proportional to the amount of modulation; if brightness is constant, a brief flicker will manifest a much lower threshold frequency than a long flicker. The threshold also varies with brightness (it is higher for a brighter light source) and with location on the retina where the perceived image falls: the rod cells of the human eye have a faster response time than the cone cells, so flicker can be sensed in peripheral vision at higher frequencies than in foveal vision. <snip> From a practical point of view, if a stimulus is flickering, such as computer monitor, decreasing the intensity level will eliminate the flicker.[2] The flicker fusion threshold also is lower for a fatigued observer. Decrease in the critical fusion frequency has often been used as an index of central fatigue.[3]

So, you have brighter, whiter (less color) and further apart lights. I am not surprised. If you were tired or had a few beers, that would also contribute. Of course, the brighter LED's may draw enough current to suck down the power supply or change the frequency. What are you driving them with?

John
 
There could also be a physiologic explanation.

From Wikipedia:



So, you have brighter, whiter (less color) and further apart lights. I am not surprised. If you were tired or had a few beers, that would also contribute. Of course, the brighter LED's may draw enough current to suck down the power supply or change the frequency. What are you driving them with?

John

Hi John,

I just tried the display on red leds of the same current and the problem persists.

I am running the circuit direct from my 7Ah SLA battery while in testing so there should be no problem with frequency flicker.

I would post a video of the clock but as you probably know they don't seem to be very photogenic, well the duty cycle seems to fool the camera anyway. Unless someone knows a better filming method?

Al
 
By changing your shutter down (if you can), you can effectively use the camera as a strobe. See how many appear lit with different exposures compared to the one that doesn't flicker.

John
 
...
... Also I have some odd segments partially lighting and I can only think it must be some sort of lag.
...

That's a common fault with LED 7seg displays, called "ghosting". It's easy to fix, you need to put a dead time between digits, so instead of sequencing digits 1-2-3-4 with 25% duty, you do this;
1-off-2-off-3-off-4-off
where the on duty is about 23% and there is a small 2% off period between digits.

Flicker can be a lot more visible on larger displays. You only have 4 digits, can't you just increase the multiplexing frequency?
 
By changing your shutter down (if you can), you can effectively use the camera as a strobe. See how many appear lit with different exposures compared to the one that doesn't flicker.

John

Hi John,

I have tried all sorts with the camera but alas I am no david bailey. I will ask my mate to try with his better camera.

Al
 
That's a common fault with LED 7seg displays, called "ghosting". It's easy to fix, you need to put a dead time between digits, so instead of sequencing digits 1-2-3-4 with 25% duty, you do this;
1-off-2-off-3-off-4-off
where the on duty is about 23% and there is a small 2% off period between digits.

Flicker can be a lot more visible on larger displays. You only have 4 digits, can't you just increase the multiplexing frequency?

Hi Roman,

I could change the crystal from a 4Mh to say an 8 or 12 and that may be better for flicker but then my clock speed would be wrong and I have no idea how to change the code, which is not my own but from Jose Pino and is not in the PicBasicPro format that is the only thing I am anything like capable with. The same goes for changing the duty, I'm afraid that level of knowledge is well beyond my scope.

I have the ASM and HEX files which were created by Jose Pino and later edited to suit my display ( by removing the test sequence) courtesy of Eric Gibbs and Nigel Goodwin, but as I said these are beyond me and I couldn't even begin to understand them.

Thanks Al
 

Attachments

  • JosePinoClock6282-4m(2).hex
    3.5 KB · Views: 93
  • JosePinoClock6282-4m.asm
    20.3 KB · Views: 96
Hi Eric,

Yes mate I did see the reply. I don't know if I did right in starting this thread, but the O/T was getting a bit long and the later parts bore no resemblence to the original title so I decided to start a new one.

If this was wrong please feel free to move it if you like, it just seemed to have gone so far off the original title.

Regards Al
 
Just had a thought, what if I swapped the xtal for a 20Mh one?

Wondered if that would prove if the flickering was speed related and could be made better?

I realise that the clock would run 5x too fast but for a test it seems quick and easy to start with.

Worth doing or not?

Al
 
Hi,

Another quick test you could do is connect a 10k resistor from the output of each segment drive line (a,b,c,d,e,f,g,dp) to ground and see if that makes a difference in any segment ghosting. Try each line one at a time and see if it helps at all. If it does help, it could mean you could possibly solve the problem with a 10k resistor to ground on each segment drive line. OR,you could check to see that the code forces the unused segment lines to go to ground rather than open circuit when 'off'.

White LEDs are very different than others in that they contain a phosphor that could keep the LED lit for a little bit longer time then we really would want. That could create problems.
 
Last edited:
Hi guys,

Mr Al, I tried the resistors to gnd but got the same result. I don't understand the code enough to tell if it forces the pins low as you wondered so I can't try that. BTW I have changed from white to red leds now but still the same problem.

Roman, I did try changing the xtal to 20Mh and that does cure the flicker but I think it also makes the ghosting worse if anything, so I am now thinking that you are right about having the off time in the duty cycle. Sadly I can't make head or tail of the ASM file to even see how it works or change the frequency.

I am now wondering if I should just start afresh and build a clock with a bigger controller and not have the duty cycle problem. Do clocks exist that have separate pins for each digit so they don't need to share the on time? Also would this cure the ghosting problem too?

Searching the net for such a design now but I don't know what it would be called so its hard to look for.

Al
 
first blush

For me, "ghosting" or segments being partially on is poor multiplexing management. Make certain the code crisply sends one digit, shuts it off, then crisply the next. Start by adding a pause between digits and a dwell on each, you'll soon see the relationship of timings. Good Hunting, it's a concept worth learning well... <<<)))

PS: That you're running assembler, you "should" have the means to trace/step it. If not, you're trying to fly a tech that's a bit ahead of you. You certainly can build a clock with a direct (non-multiplexed) display, they're just easier... but not by much.
 
Last edited:
...
Roman, I did try changing the xtal to 20Mh and that does cure the flicker but I think it also makes the ghosting worse if anything, so I am now thinking that you are right about having the off time in the duty cycle. Sadly I can't make head or tail of the ASM file to even see how it works or change the frequency.

I am now wondering if I should just start afresh and build a clock with a bigger controller and not have the duty cycle problem. Do clocks exist that have separate pins for each digit so they don't need to share the on time? Also would this cure the ghosting problem too?
...

The ghosting is caused by slow turnoff of the row or column drivers. Which is usually fixed in software (with a dead-zone between digits). Do you have a schematic? maybe you can change the drivers to a faster FET etc to speed up the turnoff.

Also if you have a common PIC and a schematic, someone can whip up a clock code pretty quickly to suit your hardware. If you don't want any fancy features I can do a clock in C pretty quick and provide you with the HEX file. :)
 
He is outputting one pixel at a time, that's why it is such a poor design.
Plus he has no current limiting.
I would ditch the design.
It's the worst design I have seen.
Lots of his circuits have faults and he is not prepared to fix them.
This is just an example of someone suffering from a website containing faulty designs.
 
Last edited:
Hi Guys,

I am trying to take in all that has been said, and what with the comment from Colin that only one pixel at a time is switched it seems maybe the code is not so good.

What I have been thinking of is that if I made a circuit that with a 40 pin PIC drove each segment separately, would I need to drive the digits at all or could I just leave the digit commons (anode or cathodes depending on which I use) permanantly connected and just switch the actual segments as required?

Is that how it is done on the non multiplexed designs?

I am quite prepared to start from scratch just so long as the result is better. Romans offer of a simple hex for a clock seems good, as all I would need is the absolute basics - time and time set - job done! I don't want any bells or whistles.

So if someone could confirm my above thoughts about not needing to switch the commons then I will get started designing. I have 3 16F874A PICs that I bought and never found a use for so I would be happy to use that PIC.


Edit. I also have a DS1307 RTC clock IC that is I2C
Thanks, Al
 
Last edited:
integrated solutions

Lots of folks (ST, Toshiba are 2) make serial input, constant current LED drivers; they're what I use just to simplify a design. Toshiba Used to make a TB62709 that was a serial fed, 4 digit version. I'd be depressed if Nobody made that flavor anymore. I use the ST "STP04CM05" and "STP16CP05" in several projects. Way cool stuff... <<<)))
 
Hi Guys,

I am trying to take in all that has been said, and what with the comment from Colin that only one pixel at a time is switched it seems maybe the code is not so good.
...

Do you have a schematic for the clock you have already built?

And a photo would be nice too, just to get an idea of the digit size and 7-seg type etc. You don't have to try to photograph the ghosting or any problems just to give an idea of the design.
 
Hi Roman,

Here is a picture of the clock and the original diagram that I used to make it.

The diagram was kindly alterered by my friend Eric Gibbs to its present form to enable me to make it from the parts I had available.

As you can see it is pretty big. The segments are 3 x 80mA 5050 LEDs and look pretty good when lit even in daylight.

As I said earlier I am more than happy to completely change the circuit, my preference would be to do a display where the segments were driven each by a separate PIC pin so there would be no flicker or ghosting, I think?

Any help is much appreciated.

Al
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top