Introduction: Stroboscope

About: Hello Instrutables community! It is always a pleasure be on Instrutables, be it reading an instrutable or writing an instrutable. I am a mechanical engineer who is currently working for a large engineering com…

A stroboscope is a device which creates flashes with precise frequency. This is used in measuring the seed of rotation of a fast rotating disc or wheel. A traditional stroboscope is made with a proper flash and flashing circuitry. But to keep things simple and affordable, I have used 25 5mm white leds. Also, as the brains of the system, AtmelAtmega328 was used in an Arduino nano. For a little bit advanced and fancy project, I used a .94 inch OLED display to display the frequency.

Click here for wiki page for stroboscopic effect.

Video 1

Video 2

Step 1: Easy Peasy LED Matrix

Solder 25 Leds in a 5x5 arrangement to gave a nice square shape. Make sure you have all your anodes and cathodes aligned properly so that it would be easy to establish electrical connections. Also the expected current draw is large. Hence a proper soldering job is important.

Take a look at photos. (The capacitor part is explained further below.) Yellow wires represent cathodes i.e. the negative or the ground and the red wire represent the supply voltage which is in this case 5V DC.

Also, there are no current limiting resistors with the LEDs. This is because the current in tobe supplied for a very short period approximately 500 microseconds in this case. LEDs can handle this kind of current for such small amount of time. I estimate a current draw of 100mA per led which translates to 2.5 amps!! That's a lot of current and a good solder job is vital.

Step 2: Power Supply

I chose to keep it simple and hence I powered the device with a simple power bank. Thus I used the mini USB of arduino nano as the power input. But there is no way the power bank can adjust to rapid current draw of 2.5 A. This is where we call our best friend, the capacitors. My circuit has 13 100microFarad capacitors, which translates to 1.3mF which is a lot. Even with such a big capacitance, the Input voltage does collapse but the arduino doesn't reset itself which is important.

As a fast switch I chose a N-channel mosfet (IRLZ44N to be precise). Using a mosfet is important as BJT will not be able to take care of such large current without huge voltage drops. A 0.7 V drop of BJT will significantly reduce the current draw. A 0.14 V drop of mosfet is much more affordable.

Also make sure you use wires with sufficient thickness. 0.5mm would be sufficient.

5V-anode

Ground- Source of mosfet

Cathode- Drain of mosfet

Gate- Digital pin

Step 3: User Interface- Input

As an input, I used two potentiometers, one as fine adjustment and the other as coarse adjustment. The two of them are labeled F and C.

The final input is a combined input of both of the pots in the form of

Input=27x(Input of coarse)+(Input of fine)

One thing that needs to be taken care of is the fact that no ADC is prefect and hence the 10bit ADC of arduino will give a value which fluctuates with 3-4 values. Generally this is not a problem but the multiplication of 27 will make input go crazy and may fluctuate for 70-100 values. Adding the fact that input adjusts the duty cycle and not directly the frequency worsens things a lot.

So I capped he value to 1013. So if the coarse pot reads above 1013, the reading will be adjusted to 1013 no matter if it fluctuates form 1014 to 1024.

This truly helps stabilise the system.

Step 4: The Output (OPTIONAL)

As an optional part, I added a OLED led display to my stroboscope. This can totally be substituted with the serial monitor of the arduino IDE. I have attached the code for both, the display and the Serial Monitor. The oled display does help as it helps the project to be truly portable. Thinking of a laptop attached to such a small project is a bit of anchoring the project but if you are just starting with the arduino, I recommend you skip the display or come back later. Also take care that you don't break the glass of the display. It kills it :(

Step 5: The Code

The brains on the system will not work without a proper education. Here is a short summery of the code. The loop sets up the timer. The turning on and off the flash is controlled with timer interrupt and not with the loop. This ensures proper timing of the events and this is vital for such instrument.

One part in both the codes is the adjust function. The problem that I encountered is that the expected frequency is not the same as I expected. So I decided to be lazy and probed my stroboscope with a digital oscilloscope and plotted the real frequency against the frequency and plotted the points in my favourite mathematical app, Geogebra. On plotting the graph immediately reminded me of charging capacitor. So I added the parameters and tried to fit the cure on the points.

Have a look at the graph and HAPPY STROBOSCOPE !!!!!!