Introduction: Measuring the Speed of a Fidget Spinner
This is an experiment setup to measure the speed, frequency, period time of a fidget spinner. With the help of a Laser Emitter and a Photoresistor we can do it quite easily.
I used a 4bit LED display to show the data, and a button to change between the data.
What will it exactly show us?
- Tangential speed in m/s or km/h
- Frequency / The number of rotations in a second
- Period time in milliseconds. The time of a full rotation.
How does it work?
- The fidget spinner sometimes blocks the emitted laser beam, and the arduino perceives these changes.
- It waits for a wing to cross and saves the time, it saves again at the next wing.
- So we have the one third of the period time. (if you're using a fidget spinner with 3 wings)- Then it is just math.
Step 1: Part List
- Arduino Uno
- Laser Sourse // Part of the 37 in 1 sensors kit // you can also use a flashlight, but you might need to change the program a little bit
- Photoresistor module KY-018 // Part of the 37 in 1 sensors kit
- 2 x Resistence 10kΩ
- 4Bit digital cathode tube // not necessary for the experiment, you can show the results on your pc as well.
- 16 x Jumper wires M-M
- 9 x Jumper wires M-F
- Wooden slabs to fix the laser emitter and the photoresistor
- Fidget spinner
- Hot glue
- Duct tape
Step 2: Construction
1. Use hot glue to fix the photoresistor first, and then the laser emitter. The laser beam has to target the photoresistor. You should also fix the breadboard and the Arduino.
2. Wire up the components as shown on the pictures.
- Connect the photoresistor to A0.
- Connect the button to A1
- Connect the LED display pins as
- 1 to Arduino D2
- 2 to Arduino D6
- 3 to Arduino D11
- 4 to Arduino D3
- 5 to Arduino D4
- 6 to Arduino D7
- 7 to Arduino D10
- 8 to Arduino D9
- 9 to Arduino D13
- 10 to Arduino D8
- 11 to Arduino D12
- 12 to Arduino D5
3. Tape the holes on your fidget spinner, because it might influence your data.
Step 3: Programming
Use the given code. I'm kinda new to arduino and programming so the code might not be perfect. It worked for me fine.
I would like to explain the code a little bit:
- It contains a function called "period", it waits for a wing to start (1) and measures the passed time until the next wing (2).
- In the loop function it calculates the stuff, and prints it on the led display.
- The changeSlide function changes the data printed, when you press the button.
- The printNumber function prints the given number on the led display. It can only handle integers. So for example: if you would like to print the number 23.46 you have to multiple it by 100 and then put the comma after the 2nd digit. so like that: printNumber(23.46*100,2);
If you aren't using a led display, you should delete the whole printNumber function. And instead you can use the Serial monitor or any other display,
Step 4: Have Fun
It shows the tangential speed by default
Press the button while the screen is empty:
- If it shows FFFF it prints the frequency.
- If it shows 7777 it prints the period time.
- If it shows SSSS it prints the tangetial speed in m/s, press it again and it'll show the speed in km/h.
If you have any questions about the experiment ask me.