The flashing lights of a stroboscope can give amazing hallucinating effects. But precise repetitive flashes of light also allow to visualize motion that is too fast to be seen by eye or by a regular camera. The great video and instructable by GreatScott inspired me to make a portable battery-operated stroboscope with precise frequency control. It turns out that the Arduino is quite capable of doing so, and more so, implementing settable duration of the flashes was quite straightforward too.
Precise frequency settings means that a stroboscope can actually be used to make precision measurements of the rotation frequency of a motor, or precision measurements of speed using stroboscopic photography. A simple potentiometer dial is not sufficient to reach permille precision in the frequency setting. Instead, here the flashing frequency is related to the 16MHz clock of the Arduino, and the desired frequency can be given in 4 decimals.
Repetitive signals can be generated in many ways with an Arduino. Extremely accurate frequency control can be achieved with a phase increment in a fast loop, as for this waveform generator. However, the Arduino has three built-in timers, and the 16-bit TIMER1 together with its clock prescales turned out to be sufficient to cover the range of frequencies 0.3-999.9 Hz that I was interested in. The use of a timer leaves the CPU free for other tasks so that a compact 4-segment LED display can be used to display the frequency. Moreover, the 4-segment display can be soldered right on an Arduino Nano (as also done for this timer ) giving a very compact and easy-to-buid setup, leaving free pin D10 which is the B-output of TIMER1.
Getting bright flashes with a battery-powered device is a challenge, and the scheme shown here is definitely insufficient for lighting up a dance floor. However, by clever use of capacitors and somewhat overdriving the LEDs, fairly bright flashes can be generated, while being powered with only 2 AA batteries.
Last but not least I should emphasize the feature to set the flash duration: ultra-short flashes result in very static images, but the average light-output is low. Longer flashes give more light but are less able to freeze the image. Thus I put in the ability to change the flash duration between 64 and 960 microseconds, always staying below a duty cycle of 10%. This extra feature greatly enhances the number of applications that this stroboscope can be used for.
The video above illustrates the functionality. Note that it’s been taken with 30fps, so when the the stroboscope is at that frequency, or at a multiple of that, it doesn’t seem to be flashing at all, since each picture being taken receives a flash.”

Link