Arduino Forum

Using Arduino => General Electronics => Topic started by: conors891 on Aug 23, 2015, 06:19 pm

Title: Tachometer for car
Post by: conors891 on Aug 23, 2015, 06:19 pm
I am building an arduino based tachometer for my car. I can get an rpm signal off the crank shaft positioning sensor or the trigger wire to the ignition coil. Either way , I will need to convert a 12v signal to 5v so it can be read by the arduino. I know there are a number of different ways to do this using resisters , diodes and zener diodes. I'm just not sure what is the best way to do it , for what I'm trying to do. Any help would be appreciated, thanks.
Title: Re: Tachometer for car
Post by: DVDdoug on Aug 23, 2015, 07:10 pm
I'd use a voltage divider (two resistors) and a pair of diodes.    The "12V" in a car can be somewhat unpredictable and it's best to play it safe.


A pair of resistors will knock-down the voltage by a known percentage/ratio but it won't protect the Arduino from an unexpected high voltage.     

A diode requires one resistor anyway (to protect the diode from excess current.

A 2nd diode can protect the Arduino from negative spikes.     
Title: Re: Tachometer for car
Post by: conors891 on Aug 23, 2015, 09:06 pm
Thanks for your reply. I think I understand what your telling me to do. Is this correct(see link)? Thanks
https://drive.google.com/file/d/0B-7DDOBC2ZbPTGNmeGNxNHppeUE/view?usp=sharing
Title: Re: Tachometer for car
Post by: noisymime on Aug 24, 2015, 02:02 pm
If you're grabbing the coil negative, the only safe way to go is with an opto-isolator. there are quite a few examples around of using one of these to 'convert' 12v to a 5v signal.

If you're going from the CAS, you need to know what kind of sensor it is. A hall or optical sensor is relatively simple to get to 5v, usually with just a pullup resistor. If it's a VR sensor though, you're going to need a VR conditioner, don't try to fudge it or you'll fry your input.
Title: Re: Tachometer for car
Post by: conors891 on Aug 24, 2015, 11:20 pm
The opto-isolator off the coil negative trigger method seems to be the best solution. Thanks for your suggestion. I don't have any opto-isolators to hand at the moment so it will be a week or so before I can test it.
Title: Re: Tachometer for car
Post by: doughboy on Aug 25, 2015, 01:30 am
can't you get this data and more from the obdII port?
Title: Re: Tachometer for car
Post by: noisymime on Aug 25, 2015, 02:06 am
Take a look at the circuit posted here if you want a nice reliable setup: http://speeduino.com/forum/viewtopic.php?f=4&t=105&sid=63be6d2650e39b6cadde0a087d4bdac1&start=20#p1419 (http://speeduino.com/forum/viewtopic.php?f=4&t=105&sid=63be6d2650e39b6cadde0a087d4bdac1&start=20#p1419)

This has been designed to work with (amongst other things) a coil negative feed which is in a fairly noisy environment.

The part labelled IC1 down the bottom is just a connector, if you wired in the following way, it should work:
Pin 1 - Coil Negative
Pin 2 - +12v
Pin 3 - N/A
Pin 4 - N/A
Pin 5 - 5v at arduino
Pin 6 - Ground at arduino
Pin 7 - N/A
Pin 8 - Arduino input

Note that R2 should be a fairly strong resistor, 2W if possible.
Title: Re: Tachometer for car
Post by: conors891 on Aug 25, 2015, 12:34 pm
doughboy - I bought an obd2 adpater for arduino but i couldn't get it to work

noisymime - Thanks that is perfect , I'll order all the parts today. It dosent say what kind of capacitor c1,c2,c3,c4 should be? Does it not matter? Also is there a name for this particular type of circuit as I would like to learn exactly how it works, Thanks
Title: Re: Tachometer for car
Post by: Tobbera on Aug 25, 2015, 12:35 pm
I have made a board specifically for grabbing tach signal from coil negative. Works really well. Its about 20x20mm size and a few cheap components. let me know if you want one of these. I can supply you with a compatible code snippet as well.
Title: Re: Tachometer for car
Post by: conors891 on Aug 25, 2015, 01:21 pm
Tobbera - Thanks for the offer. I'll try to make one myself first and if I fail I'll let you know.
Title: Re: Tachometer for car
Post by: Tobbera on Aug 26, 2015, 01:56 pm
(http://s10.postimg.org/jujlb8p1l/20141108_140708_jpg.png) (http://postimage.org/)
upload images (http://postimage.org/)
Title: Re: Tachometer for car
Post by: noisymime on Aug 26, 2015, 02:14 pm
noisymime - Thanks that is perfect , I'll order all the parts today. It dosent say what kind of capacitor c1,c2,c3,c4 should be? Does it not matter? Also is there a name for this particular type of circuit as I would like to learn exactly how it works, Thanks
C1 and C3 are quite small, 0.001uF or so
C2 and C4 are standard 0.22uF ones.

Standard ceramic capacitors will be fine.

This is still just a basic opto-isolator circuit with some added protection (resistor and diode) and decoupling (The caps). There's not really a name for it at all.
Title: Re: Tachometer for car
Post by: conors891 on Aug 26, 2015, 10:22 pm
Thanks, I have ordered all the parts and I shall get building/testing when they arrive.
Title: Re: Tachometer for car
Post by: conors891 on Sep 02, 2015, 06:14 pm
I have built the circuit on a breadboard. I just need to type up a quick testing sketch. Do the capacitors need to be polarized? I am using non polarized capacitors. Thanks
Title: Re: Tachometer for car
Post by: conors891 on Sep 27, 2015, 05:23 pm
I have tested this on my car and it seems to be working. I thought you would have to multiply the frequency by 60 to get the resulting rpm but it seems to be 24. Not sure why this is but once it's a constant for all values it dosent matter. Thanks for all you help
Title: Re: Tachometer for car
Post by: RenderArduino on Jun 11, 2018, 01:34 am
Tobbera, How much you asking for that board?
Title: Re: Tachometer for car
Post by: Tobbera on Jul 16, 2018, 04:16 am
Hi. You can have it shipped for USD $40.

Regards
Tobias