Hi, this is just another tachometer as you can also find many tutorials out there. There are different approaches on measuring rpm, what I use here is based on analogRead method as written in arduino playground learning page (http: //playground. Arduino. Cc/Learning/Tachometer) but with some modification on calculation method of rotational frequency. The code in arduino playground is very good and understandable but there are some spaces for improvement. Because it reads the number of change in state over specific time frame, it may lose accuracy when we try to make fast reading on slow revolution speed. 7.
How to Install a Tachometer 8 Steps with Pictures wikiHow
Motor Wheel Assy: This is not the main interest in this project, basically any arrangement that provides a wheel with adjustable speed will do. Here I used a styrofoam disk driven by a used walkman motor connected to an AC/DC adaptor through a potentiometer. Clamps, base, etc are just from the backyard. The only important thing is to make window on the wheel such that the IR LED phototransistor can see each other sometimes while the wheel is turning.
6. Put the IR LED and Receiver facing to each other in a position that make them can see each other occasionally through the window on the wheel. Better to make them not to far apart. Create the shield (saying shield is somewhat fancy, actually only a circuit of limiting resistors *lol*), see the diagram. 8.
RoadPro Direct Hook Up Ceramic Heater amp Fan With Swivel
Hook up with your arduino: connect the IR receiver to analog pin A5, see the diagram. Notice that the IR LED BM6886 and IR Phototransistor BPT6886 look alike, with two legs and clear head so make sure you are not mixing them. Connect the longer leg of LED to positive side of circuit (right after 655 resistor), but the longer leg of phototransistor should be connected to negative side of circuit (goes to the GND). 9.
Hook up your motor (to drive the wheel), here i use external power supply to make it simple. Play safe, or use a motor shield. The code is pretty much similar to the one here: in fact i wrote based on that code. Only instead of counting how many times the sensors are saying hi to each other every certain period, I count how long until they can see the other again after the last meeting.
Also, I find that using micros(), that returns microcontroller time in microseconds, gives a significantly more accurate result than if i used millis() on the same place. Below is the code modification for checking the good number for sensorthreshold variable: The program writes the rev per second and rev per minute to the Arduino IDE serial monitor. Of course this project is very rough and simple, but can be a part of further development. I will come again once I have something else.
See you later.