Easy RPM Counter | Arduino & IR Sensor
by Random Stuff We Make in Circuits > Arduino
203 Views, 2 Favorites, 0 Comments
Easy RPM Counter | Arduino & IR Sensor
![Easiest RPM Counter.png](/proxy/?url=https://content.instructables.com/FL5/AC47/LTK3J48H/FL5AC47LTK3J48H.png&filename=Easiest RPM Counter.png)
![Arduino RPM Counter | IR sensor | Neopixel](/proxy/?url=https://content.instructables.com/FFR/NC5U/LTLIYBNR/FFRNC5ULTLIYBNR.jpg&filename=Arduino RPM Counter | IR sensor | Neopixel)
This project uses an infrared (IR) sensor pair to measure the speed of a rotating object and visually represents this speed through the number of illuminated LEDs on a NeoPixel ring. As the object rotates faster, more LEDs light up.
Supplies
![IR_Infrared_ObstacleAvoidanceSensorModule.jpg](/proxy/?url=https://content.instructables.com/FUE/AH3R/LTLIYBST/FUEAH3RLTLIYBST.jpg&filename=IR_Infrared_ObstacleAvoidanceSensorModule.jpg)
![41d1uft_qfl._sx342.jpg](/proxy/?url=https://content.instructables.com/FCF/X2LJ/LTLIYBSZ/FCFX2LJLTLIYBSZ.jpg&filename=41d1uft_qfl._sx342.jpg)
- Arduino (Uno, Nano, Mega, or any compatible board)
- 16 LED NeoPixel Ring
- IR transmitter and receiver pair (IR sensor pair)
- Breadboard and jumper wires
- 5V Power supply for NeoPixel Ring (if required by your setup)
- Resistors for IR sensor pair if needed (refer to your sensor's datasheet)
- Arduino IDE for programming
Design the Circuit
![Easiest RPM Counter Circuit.png](/proxy/?url=https://content.instructables.com/FDZ/7UXM/LTLIYE7W/FDZ7UXMLTLIYE7W.png&filename=Easiest RPM Counter Circuit.png)
- Connect the NeoPixel Ring's data input pin to a digital pin on the Arduino (e.g., pin 6).
- Connect the NeoPixel Ring's power (+5V) and ground (GND) pins to the Arduino's 5V and GND.
- Connect the IR receiver's output pin to another digital pin on the Arduino (e.g., pin 2) for detecting pulses.
- Ensure the IR transmitter is positioned to shine directly at the receiver, with the rotating object interrupting the beam.
Arduino Code
![Screenshot 2024-03-11 131026.png](/proxy/?url=https://content.instructables.com/FKT/HOZX/LTLIYE86/FKTHOZXLTLIYE86.png&filename=Screenshot 2024-03-11 131026.png)
- Install Libraries: Open the Arduino IDE, go to Sketch > Include Library > Manage Libraries..., and install the Adafruit NeoPixel library.
- Upload the code.