Tachometer for car

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.

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.

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

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.

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.

can’t you get this data and more from the obdII port?

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

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.

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

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.

Tobbera - Thanks for the offer. I'll try to make one myself first and if I fail I'll let you know.

upload images

conors891:
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.

Thanks, I have ordered all the parts and I shall get building/testing when they arrive.

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

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

Tobbera, How much you asking for that board?

Hi. You can have it shipped for USD $40.

Regards Tobias