Electronic – How to read RPM data from car with micro-controller

frequencymicrocontroller

I am building a Vehicle diagnostic tracker device. I want to read all the data from different sensor interfaces in the car. The problem I am facing is with reading the RPM data. The data I could get regarding the RPM is :-

enter image description here

How can I read it with my micro-controller. I need to step down the voltage level is one thing. What else I need?

Best Answer

Measuring frequency might seem hard thing to do but probably isn't. Period and frequency are inversely proportional so getting one means you are free to calculate another.

Let's talk about examples. I will use AVR205:Frequency Measurement Made Easy with Atmel tinyAVR and Atmel megaAVR Application Note as a starting point. As you can see it is suggested to use timer and some source to start counting. Count how many peaks there during some time and recalculate. Be aware of tradeoffs - short amount of time makes system fast yet not as precise, also, using external clock would make measurements even better when introducing some small additional cost.