# How to read Positive Voltages

I have an out of two-wire which provided approx 5Volts which is generated based on the shaft direction.

for understanding, I called It to wire A and wire B

In the static condition, it gives zero volts.

If it moves away from its position wire A have -ve voltage and wire B have +ve
if it moves inward from its position wire B have +v voltage and wire B have -ve

is there any way to read always +ve voltage making other wire as groud using Arduino?

A diode bridge.

Thanks for your reply but could you please elaborate it in a bit detail.
Did you mean I should connect two diodes with both wires with resistor (i.e. 1K) to get the positive output ? or use bridge rectifier?

My understanding is that a diode only lets current pass in one direction. So if you use a diode on each lead then it will allow a positive reading but not a negative and if you connect them in a diode bridge rectifier arrangement then the you will have an always positive and an always negative output. You are, in essence, rectifying an alternating current. You will have to correct for voltage drop across the diodes but this should be simple.

To measure positive and negative voltage swings with Arduino, you need to shift the operating point to Vcc/2 (bias the input). This limits the allowable swing to +/- 2.5V on a 5V Arduino.

The circuit below should work. R4 and R5 form a voltage divider to reduce the motor output voltage by a factor of 2 (you stated +/- 5V output, maximum), and R3 protects the ADC from inputs greater than 5V and below 0V.

smah:
I have an out of two-wire which provided approx 5Volts which is generated based on the shaft direction.

for understanding, I called It to wire A and wire B

In the static condition, it gives zero volts.

If it moves away from its position wire A have -ve voltage and wire B have +ve
if it moves inward from its position wire B have +v voltage and wire B have -ve

is there any way to read always +ve voltage making other wire as groud using Arduino?

What are the two wires connected too?
Can you post a picture of the motor and the wires giving you the voltages please?
There may be a another way.
Do you want to detect direction and or speed?
Thanks... Tom..

The RC LPF is BACKWARDS. The input element is the RESISTOR and the CAP is connected at the Analog Input pin.
4.7k ohm/4.3uF works fine.