Im doing a project and want to measure the rpm of a diesel engine. I am wanting to use a tcrt5000 with an arduino uno rev 3, however i cant find much help online. There is some code for an avr atmega8. I want to use atmega328. any suggestions on how to change it from 8 to 328. Thanks
I believe the analogRead() function, which you will need, takes about 140 useconds. That would limit your capability to read RPM, theoretically, to about 4100 RPM, and in fact (because of execution time of other code, probably a lot less. I'd suggest looking for a sensor with a digital output, which can be read much faster.
Hi, If you use the search application in the top right hand corner of this screen and search for tacho you will find many applications.
Your pick up should be magnetic, not optical due to the environment you are in. Gargle (googe) tacho shaft inductive pickup may help.
Inductive pick ups do not necessarily need a magnet to work, a tooth wheel or a groove in a pulley in some cases is enough.
If you can get a shaft sensor from the motor wreckers they will have the response you need, just some circuitry to tailor the output for arduino.