2v-3v AC to <5v DC conversion for analog input?

Hi, I'm using an Arduino Mega2560 and want to use an AC voltage from my vehicle's tachometer (which is a pulse signal) as an input DC voltage. This will eventually be mapped for changing the color of LEDs.

Ideally I just need this AC voltage to be a DC voltage that is under 5v (for analog input) and extreme accuracy isn't really important for my project. I have a diagram attached.

Any suggestions for how to convert the signal? I'd prefer to buy a component than DIY, but I can if necessary. Thanks!

an AC voltage from my vehicle's tachometer (which is a pulse signal)

A pulsed AC signal? Are you sure? That doesn't sound right. A pulse signal from a tachometer, I get that. AC signals in vehicles isn't something I've heard of before, but I'm not an expert. How do you know its an AC signal? What frequency?

EDIT: I think I get it. It's not AC at all. It's a pulsed 12V DC signal. You are using your multimeter on AC range and getting 2~3V reading. But it's not that at all. Your multimeter is useless in this situaton. If you had a 'scope, you would see it as a 12V DC pulse signal.

You can reduce the 12V down to 5V for the Arduino with a voltage divider. Then read the pulses with the pulseIn() function and calculate the rpm from that.

But vehicle electrical systems are not nice places for Arduino. There can be high voltage induced spikes which could damage it. An opto-isolator would be a good way to protect the Arduino.

Sorry I am not entirely sure to be honest. My EE friend said it could be DC designed to look like AC. My (cheap) multimeter read it as AC.

From manufacturer of the tach:
"All of the above will require the tachometer to be set for 4 cylinder, 2 pulse signal. "

When I read the analog input from serial, it shows either 0 or 1023 sporadically (i.e. 1023 0 1023 0 0 1023 0 etc)

Sorry, I edited my previous post, not realising you had replied.

Disconnect the Arduino immediately. You may be too late and have already damaged it.

Thanks for your help! I will try pulseIn() and maybe a new Arduino :smiley:

No, you are not listening. You will just destroy another Arduino.

An arduino is a 5V device (most are, some more modern designs are 3.3V). If you connect a 12V signal directly to one if it's inputs, it will be damaged. You must reduce the 12V pulses down to 5V. The safe way to do this is with an opto-isolator.

[u]Here[/u] are some opto-isolator example circuits.

Or [u]here[/u] are some over-voltage protection circuits.

. My (cheap) multimeter read it as AC.

It's not because it's "cheap". A pulse does have an "AC component" and multimeters are designed to read constant DC or AC sine waves. Square waves or pulses can give unreliable results. Or, some meters have "true RMS" feature.

rlauderey:
From manufacturer of the tach:
"All of the above will require the tachometer to be set for 4 cylinder, 2 pulse signal. "

So you are adding an aftermarket tach? If so, do you have a reference sheet or wiring diagram for it?

S.

Paul, got it thanks again for your assistance :slight_smile:
Doug, thanks for the links -- my multimeter did output it as a true RMS value.
srturner, I have attached the wiring for the aftermarket tach. I added the +12v and 1kohm resistor per instructions at LT1swap.com to get the tach to work.


This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.