Does Analog Read voltage have to be DC and less than 5V?

Hey all-

I have two varying voltages from hall effect sensors I am trying to compare and then have the arduino respond accordingly. The voltages are AC and range from .65 to 8.5 v. Do these voltages have to be converted to DC and less than 5 Volts to function with the arduino?

Thanks!

(deleted)

Yes. The Arduino can be damaged by more than +5V or by negative voltages.

You can "knock-down" the voltage with a [u]voltage divider[/u] (2 resistors) and you can [u]bias the Arduino's input[/u] at +2.5V so it can read (relatively) negative. You can subtract-out the bias in software.

Depending on the resistor values, the bias circuit will "load" the voltage divider and further reduce the voltage. (Both things can be done together with 3 resistors and a capacitor.)

And in case you don't know this, the peak-to-peak voltage of a sine wave is about 2.8 times RMS, so 8.5VAC RMS will have a "swing" of about -12V to +12V and you'll have to bring that down to a 5V range.

You can’t measure voltages lower than 0v or higher than 5v with the Arduino, and applying such voltages to a pin will damage the chip (unless the current is limited, in which case the protection diodes will keep it between the supply rails - I think it needs to be under 1mA for the protection diodes to stay happy).

If it’s actually AC (ie, going from -8.5 to +8.5), yeah, you need to do something about that - what you need to measure out of it is going to determine how you do this.

If it’s a DC sine wave (going from +0.65 to +8.5) then a simple voltage divider will do the trick.

Hmm. I am not sure what to tell you. I am reading it with my digital multimeter set to AC voltage?

Could I use some sort of a rectifier and voltage divider circuit to convert it to 015 volts D.C.?

DrAzzy:
If it's a DC sine wave (going from +0.65 to +8.5) then a simple voltage divider will do the trick.

What is a DC sine wave? That's a new one on me.

The voltmeter reads RMS. If you attach an oscilloscope probe you will see the actual waveform, and the peaks will be higher than the reading on the voltmeter.

You can read an AC voltage with an ADC...but...you have to understand what the result is. The reading will be the average during the sample conversion period. IIRC, the sample period which is between 13 and 260 microseconds (as I read the datasheet). And you will never know where during the waveform you are reading, unless build hardware to synchronize the reading to the waveform (been there, done that).

Hi,
Welcome to the forum.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png? Showing how you have your hall effect devices powered and where you are measuring the AC.

What are your devices measuring.

Most DMMs will read a fast varying DC voltage as an AC voltage even though the voltage never goes negative.

Thanks… Tom… :slight_smile:

adwsystems:
What is a DC sine wave?

From the context it's obviously a varying DC voltage, ie by definition one that never changes polarity, but with the shape of a sine wave just biased up into the +ve realm. As soon as there's no crossover it's DC: it's not the shape of the wave that defines AC, but the reversal of polarity.

This would be an ac sine wave (y=sin x)

And this is dc but still a sine wave (y= sin x + 2)

adwsystems:
The reading will be the average during the sample period. IIRC, the sample period which is between 13 and 260 microseconds (as I read the datasheet).

That's the conversion time not the sample time.

The sample time is not given but is presumably less than or equal to one ADC clock tick.

My bad. Conversion time.

Ok after reading your comments, I did more research and I apologize- I am not reading a hall effect sensor at all but a two wire permanent magnetic inductive sensor which outputs sine wave AC that I have tapped both wires with my digital meter. There isn't a schematic as the sensor creates its own output from its internal coil and interaction of the permanent magnet and a toothed metallic tone ring through induction?

hpfiend:
Ok, after reading your comments, I did more research and I apologize- I am not reading a hall effect sensor at all but a two wire permanent magnetic inductive sensor which outputs sine wave AC that I have tapped both wires with my digital meter. There isn't a schematic as the sensor creates its own output from its internal coil and interaction of the permanent magnet and a toothed metallic tone ring through induction?

Hi,
What do you want to compare between the inductive sensors, (they sound like speed sensors)?

Frequency (speed)?
Amplitude?

Tom… :slight_smile:

From what I understand, I can't feed the input into the arduino to measure frequency or amplitude as the voltage is AC and too high. Let me play with a rectifier and voltage divider or digital frequency to voltage converter and I will get back to you all-

Thanks for the help thus far!