1
\$\begingroup\$

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?

\$\endgroup\$
  • \$\begingroup\$ As I remember, a lot of frequency meters measure how much periods there were in some amount of time and later recalculate it to frequency \$\endgroup\$ – Artūras Jonkus Jul 16 '16 at 7:14
  • \$\begingroup\$ Please state (in your question) make and model and link to the document you are quoting. \$\endgroup\$ – Transistor Jul 16 '16 at 7:18
  • \$\begingroup\$ atmel.com/images/doc8365.pdf This could be ready-made solution in a form of application note \$\endgroup\$ – Artūras Jonkus Jul 16 '16 at 7:21
  • 1
    \$\begingroup\$ The other solution is to connect to the OBDII port. \$\endgroup\$ – pjc50 Jul 16 '16 at 12:37
1
\$\begingroup\$

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.

\$\endgroup\$
  • \$\begingroup\$ @Arturas Jonkus - I am not sure of one thing. RPM signal will be a sine wave(as far as I know). Is it possible to read a sine wave with digital pin using timer or I need to convert into square wave?? \$\endgroup\$ – Oshi Jul 16 '16 at 7:43
  • \$\begingroup\$ You might use Schmitt trigger for conversion to square? I haven't got through the application note but they presented solution for several waveforms. Have a look \$\endgroup\$ – Artūras Jonkus Jul 16 '16 at 7:49
1
\$\begingroup\$

Do you want to read data from sensors directly?This need a lot of wiring to each sensor + physical limitations to accessing them.Better approach is connecting to your Vehicle's ECU and reader parameters from ECU.Many modern ECUs support CAN protocol as a standard communication peripheral,and there are a lot of micro controller with internal CAN peripheral.You can easily connect to ECU via CAN (or any other communication protocol it support) and read this information.

\$\endgroup\$
  • \$\begingroup\$ @MFD - Yes, I have the requirement of directly connecting to sensors & I have figured out the wiring. The product not only takes the ususal parameters but also diagnostic information for which I am planning to put additional sensors which even ECU doesn't support. \$\endgroup\$ – Oshi Jul 16 '16 at 17:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.