How do you tell how fast an LED is blinking?

Discussion in 'General Electronics Chat' started by hp1729, Apr 6, 2016.

  1. hp1729

    Thread Starter Well-Known Member

    Nov 23, 2015
    1,946
    219
    An IR LED was the original posted question, but the question applies to any LED I guess that is blinking faster than the eye can detect. I can see using a photo transistor and a scope, but in this case the original poster did not have a scope.
    I have seen frequency counters that had a pulse width measurement function, but the price of such things is right up there with a scope.
    So do you make your own pulse width counter? We are looking at sub-microseconds for a pulse width. So we need a 4 digit counter that counts in nanoseconds? Not with any parts I have in stock.
    Any other ideas?
     
  2. dl324

    Distinguished Member

    Mar 30, 2015
    3,242
    619
    You could build your own counter that will have it's maximum frequency limited by the technology; e.g. 30MHz-ish for TTL, less with 4xxx CMOS. You can design it to count for a second to give you cycles per second or you can use fractional seconds and do the math in your head.

    Commercial hobby level counters (most frequency meters will also function as counters) aren't prohibitively expensive; especially if you buy used.

    Before I bought commercial counters, I built one using 2 MC145553 counters. At 5V, typical max frequency is 1MHz or so.
     
  3. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    Why sub-microsecond? Unless it is some special kind of LED used for some weird purpose, I don´t see why would anyone flash it at more than a few kHz.
    Also, do you want to know the pulse width, or the frequency, or both?
     
  4. MrSoftware

    Member

    Oct 29, 2013
    497
    122
    Use an arduino. Connect your detector to a input pin that is assigned to an interrupt. Every interrupt increment your counter. Every second or two divide your counter by time elapsed, display the result and reset the counter and timer. Reset these after displaying the result, the display will be slow and could lengthen the time required to service the interrupts and might skew the count until the display is complete. I'm not sure how fast you'll be able to count, that depends on how fast the arduino can service interrupts.

    You could probably do the same with a couple of IC's, but I don't know which k ones to use.
     
  5. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,777
    1,103
    For checking the frequency, perhaps use a photo-diode to set a latch and a known variable frequency pulse generator to reset the latch. Average the latch output with an RC filter. Average should be half the logic supply voltage if f(photo-pulse)=f(gen).
     
  6. hp1729

    Thread Starter Well-Known Member

    Nov 23, 2015
    1,946
    219
    Okay, no sub-microseconds. 1 MHz clocks to a counter. Simple AND gating, one input from an IR sensor, the other from the 1 MHz source. counting one time only. Maybe a 74120 set to single pulse mode??? see attachment
    Counter gives "on" time. Invert the IR sensor input for "off" time.
     
  7. dannyf

    Well-Known Member

    Sep 13, 2015
    1,775
    360
    If you want to know how fast a led is driven, a multimeter with frequency range, a frequency counter, or a lowly scope will do.

    If you want to know how fast a led blinks, a photo sensor is needed.
     
  8. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    I am not sure what you mean. A measley ATmega with a counter, and the counter clock set at or provided at 1MHz will be more than capable of measurimg both the on time and off time of any wave, I´d say up to 200kHz or more.
    That meaning you get 50x oversampling of the period, which gives you resolution of 2% PWM.
     
  9. hp1729

    Thread Starter Well-Known Member

    Nov 23, 2015
    1,946
    219
    Yep. Sounds like a sensor and a counter is the way to go. Two 74LS390s gives me a four digit counter. I have a few 7-segment displays, TIL309, I think they are. BCD decoder and 7-segment driver built in.
     
    Last edited: Apr 6, 2016
  10. SLK001

    Well-Known Member

    Nov 29, 2011
    812
    225
    Can't you infer how fast a LED blinks by how fast it is driven? If this is not 1 to 1, then what kind of LEDs are being used?
     
  11. wayneh

    Expert

    Sep 9, 2010
    12,094
    3,033
    If the frequency is in the audio range, you can use a computer or smartphone oscilloscope to look at the the phototransistor output, as fed into the audio input of the computer. If the frequency is higher than that, you could divide it down first.
     
  12. dannyf

    Well-Known Member

    Sep 13, 2015
    1,775
    360
    "If this is not 1 to 1, then what kind of LEDs are being used?"

    A broken one? An incorrectly designed one? A wrongly installed one? A missing one?.....
     
Loading...