Hai dear forum member,
I'm current design a scale and shifting circuit use for positioning sensing.
My sensor is a 10K linear pot(potentiometer) connect to 5v & Gnd. Ideally this linear pot output will be Vref/2 (mean the position is balance). <Vref/2 mean the pole fall to the left, >Vref/2 mean the pole fall to the right.
The linear pot output is connect to microcontroller A/D (10bits). The microcntroller +Vref & -Vref is 5volt and GND, so I want the controller read the signal such as condition set below.
*Input to microcontroller is swing between 0~5volt
Output from linear pot is 0~5 volt as well, but Vref/2 is equal to 0volt input to the microcontroller.*
I have using a differential op-amp to implement the shifting, an additional offset voltage (Vref/2) is use to compensate the linear pot output (because Vref/2 is mean the pole is balance,so 0 volt will input to the microcontroller represent no error occur). But adding this offset voltage will cause the input to the microcontroller swing between -2.5v ~ +2.5 v. *Note, i need the voltage into microcntroller swing within 0~5 volt (+Vref & -Vref).
Could any one give me some ideal to solve this problem?
I was think about is it possible do it in software instead of alter the hardware.
Thank in Advance!!
I'm current design a scale and shifting circuit use for positioning sensing.
My sensor is a 10K linear pot(potentiometer) connect to 5v & Gnd. Ideally this linear pot output will be Vref/2 (mean the position is balance). <Vref/2 mean the pole fall to the left, >Vref/2 mean the pole fall to the right.
The linear pot output is connect to microcontroller A/D (10bits). The microcntroller +Vref & -Vref is 5volt and GND, so I want the controller read the signal such as condition set below.
*Input to microcontroller is swing between 0~5volt
Output from linear pot is 0~5 volt as well, but Vref/2 is equal to 0volt input to the microcontroller.*
I have using a differential op-amp to implement the shifting, an additional offset voltage (Vref/2) is use to compensate the linear pot output (because Vref/2 is mean the pole is balance,so 0 volt will input to the microcontroller represent no error occur). But adding this offset voltage will cause the input to the microcontroller swing between -2.5v ~ +2.5 v. *Note, i need the voltage into microcntroller swing within 0~5 volt (+Vref & -Vref).
Could any one give me some ideal to solve this problem?
I was think about is it possible do it in software instead of alter the hardware.
Thank in Advance!!