JordanS
Newbie level 5
I have something that I thought is a trivial problem and I have been trying to resolve for a while now with no success, thus I decided to reach out to you for help.
I’m trying to create a little device that will measure voltage 0-32VDC (preferably -32V to +32VDC so in this way no polarity needs to be observed when connecting to voltage source)
Im truing to accomplish that by providing an offset of about 0.9V from the output of the differential op-amp.
There is an issue with the ADC converter of the uC that I’m using. It has a dead band from 0V to 0.15V therefore will not measure in this range. The full scale of the ADC input (linear) is about 2.4V. So ideally I’m trying to stay in the boundaries of 0.15V to 1.95V on the input of the ADC and have a middle point 1.05V if possible to be able to measure positive and negative voltages. I’m trying to offset the input to the ADC so I can do proper measuring starting from 0V to 1.8V.
I hope that makes sense, but to summarize I need to have:
Single 3.3V power to the op-amp.
Input of the op-amp from -32V to +32V
Output of the op-amp 0.15V when -32V and 1.95V when +32V. I should be able to measure with or without the negative input of channel 1 or channel 2 connected to ground.
I tried to do it the following schematic (resistors are not calculated for the voltages indicated above):
Unfortunately with my offset improvisation on differential amplifier schematic only “kind of” works. The R5 and R13 resistors are there for illustration of what happens if I try to measure shared ground sources. Let's presume the R5 and R13 are not in place first. If I have the input open, I get starting point of the ADC (12bit) about 940 on both channels. If I connect the input to a PS and start increasing the voltage it works as expected and I can get the ADC value rising with the voltage rising until I reach 4095 saturation value. If I connect the PS in reverse, I get the value of the ADC to decrease. Obviously I’m not quite in the middle but that can be rectified easy. So far, so good.
The issues start when I add any R5 or R13 resistors simulating that the power source and the voltage source share the same ground. immediately I get the value of the ADC with nothing connect the op-amp input, increase from 940 to about 1,115. Obviously that can’t be good. I figured that in this case, grounding the negative input of the schematic will bring the potential of the op-amp negative inputs 1IN- and 2IN- to 0V vs. the 0.9V that I’m having there when R5 or R13 are not in place. This is a result of the op-amp trying to compensate for the offset voltage.
So how do I avoid that shift and have an offset on the output of the op-amp to allow me to take proper measurement with the ADC?
Is there a way to do an offset with a single stage op-amp and allow me to ground an inout without the shift?
Do I have to create two stages, where the first stage is simple diff op-amp scenario getting fed 0 to +32V and outputting 0-1.8V and feeding that into second stage buffer op-amp that will shift the output to 0.15V to 1.95V? This I think will work except I can’t connect the input in reverse and measure it.
Is it possible to measure -32V to +32V or should I stick with 0V to 32V on the inputs?
Is there a simple (or not that simple ) way to accomplish what I need with single VCC3.3V power to the op-amp?
I hope that you can help,
Thank you in advance for your time,
I’m trying to create a little device that will measure voltage 0-32VDC (preferably -32V to +32VDC so in this way no polarity needs to be observed when connecting to voltage source)
Im truing to accomplish that by providing an offset of about 0.9V from the output of the differential op-amp.
There is an issue with the ADC converter of the uC that I’m using. It has a dead band from 0V to 0.15V therefore will not measure in this range. The full scale of the ADC input (linear) is about 2.4V. So ideally I’m trying to stay in the boundaries of 0.15V to 1.95V on the input of the ADC and have a middle point 1.05V if possible to be able to measure positive and negative voltages. I’m trying to offset the input to the ADC so I can do proper measuring starting from 0V to 1.8V.
I hope that makes sense, but to summarize I need to have:
Single 3.3V power to the op-amp.
Input of the op-amp from -32V to +32V
Output of the op-amp 0.15V when -32V and 1.95V when +32V. I should be able to measure with or without the negative input of channel 1 or channel 2 connected to ground.
I tried to do it the following schematic (resistors are not calculated for the voltages indicated above):
Unfortunately with my offset improvisation on differential amplifier schematic only “kind of” works. The R5 and R13 resistors are there for illustration of what happens if I try to measure shared ground sources. Let's presume the R5 and R13 are not in place first. If I have the input open, I get starting point of the ADC (12bit) about 940 on both channels. If I connect the input to a PS and start increasing the voltage it works as expected and I can get the ADC value rising with the voltage rising until I reach 4095 saturation value. If I connect the PS in reverse, I get the value of the ADC to decrease. Obviously I’m not quite in the middle but that can be rectified easy. So far, so good.
The issues start when I add any R5 or R13 resistors simulating that the power source and the voltage source share the same ground. immediately I get the value of the ADC with nothing connect the op-amp input, increase from 940 to about 1,115. Obviously that can’t be good. I figured that in this case, grounding the negative input of the schematic will bring the potential of the op-amp negative inputs 1IN- and 2IN- to 0V vs. the 0.9V that I’m having there when R5 or R13 are not in place. This is a result of the op-amp trying to compensate for the offset voltage.
So how do I avoid that shift and have an offset on the output of the op-amp to allow me to take proper measurement with the ADC?
Is there a way to do an offset with a single stage op-amp and allow me to ground an inout without the shift?
Do I have to create two stages, where the first stage is simple diff op-amp scenario getting fed 0 to +32V and outputting 0-1.8V and feeding that into second stage buffer op-amp that will shift the output to 0.15V to 1.95V? This I think will work except I can’t connect the input in reverse and measure it.
Is it possible to measure -32V to +32V or should I stick with 0V to 32V on the inputs?
Is there a simple (or not that simple ) way to accomplish what I need with single VCC3.3V power to the op-amp?
I hope that you can help,
Thank you in advance for your time,