Easy DIY Stroboscope


Looking for something to do in his downtime, [Mista Sparkle] decided that building a simple stroboscope was in order. He already had a set of six LEDs connected to his Arduino from a previous project, so he added a potentiometer to control the rate at which the LEDs flashed, and dug into the IDE.

During his build he discovered that using the Arduino millis() function at high speeds provides terrible resolution, while using the micros() function exclusively limits his low end measuring capabilities. He desired a better range of measurement, so his program was broken into main functions: One which measures the LED flashing frequency in milliseconds and another that measures the LED flashing frequency in microseconds. This allowed him to gauge rotational frequencies from 577 to 30,000 RPM.

[Mista Sparkle] admits that he is not yet well-versed in driving displays with the Arduino, so he views his readings over a serial connection on his PC. Hopefully we’ll see an updated version with those features in the near future.

12 thoughts on “Easy DIY Stroboscope

  1. I made a very similar application, but my code was completely different and I displayed the strobe rate on an LCD. I ended up using interrupts and made a clever test case that only would update the LCD if my analog input value was significantly different than the last time it was read. Also I found that when trying to stop a fan dead in it’s tracks, an on time of 10% and off time of 90% gave the best results. So my potentiometer adjusted the frequency, but the code calculated the necessary ON and OFF time keeping everything at 10% duty cycle.

  2. Now I know people are going to complain about me hating stuff, but why not just ditch the Arduino library when it gets in your way? Why not learn how controllers actually work and use hardware timer/counters, external interrupts, or input capture hardware?

  3. Is there a version of the code for say.. a picaxe or one of the more basic micro controllers?

    Actually… a 555 can do this right? Would lose the precision and the frequency of which the light blinks but that will allow variable frequencies.

    I’m thinking in terms of something brighter like a cree LED for some simple/cheap strobe fun.

    Time to google.

  4. I built this in the spirit of taking something simple and not terribly useful in terms of just blinking a light.

    Though the code is not perfect by any means (I’m not a programmer and literally have been working with the Arduino for 2 weeks, it goes on the idea that you can take something simple and cool and making it into a practical tool without much work at all.

    I love the idea of using a hardware timer and pwm and varying the duty cycle and was originally looking for a way to use tone() or something with a different duty cycle to make stuff happen. I just ended up writing it that way cause that what I knew how to do.

    So yeah, its a glorified blinking LED, but its a measuring device that works for my purposes.

  5. I agree with Anon and SparkyGFX.

    There are some times when the Arduino libraries/IDEs provide so many limitations that you’ll spend less time starting with one of the avr-libc examples and building up from there.

    This is one of those times.

    The think I dislike the most about the Arduino environment is that it seems to provide active discouragement of learning the hardware architecture, which causes very high barriers once you reach the limitations of the Arduino environment.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.