Error; low cost dc voltmeter +-20V

Thread Starter

Vindhyachal Takniki

Joined Nov 3, 2014
594
1. I have to make a low cost dc voltmeter with range +-20V
2. I am using the circuit as attached.
3. problem is if I applu any voltage across j1 two terminals, I get correct voltage J2 terminal.
If I apply 10V at j1, then voltage divider across 90K & 10K forms 1V across 10K.
& net voltage at J2 is 2.5V+1V = 3.5V.

4. But as soon as i connect microcontroller the voltage starts varying randomly, no particular value.
I have configured pin properly as adc.
5. If I apply direct voltage at pin say 1V, I am able to measure it properly.

6. What could be error.
 

Attachments

JohnInTX

Joined Jun 26, 2012
4,787
You didn't say which uC you were using but a few general thoughts:

For many PICs, you have to keep the input impedence <2.5K (depends on the chip) to satisfy ADC acquisition requirements. The PIC databooks have info on this.
Consider averaging or a low-pass digital filter on the ADC output. Most uC ADCs use successive approximation which is fast enough to convert noise on the inputs.
You also have to have a stable voltage reference. For PICs, the reference can be derived from Vdd or a separate reference. For a voltmeter, I would use a separate, precision reference.
Don't forget the obvious stuff such as keeping the input voltage in range with a common ground to Vref-.

Have fun.
 

ErnieM

Joined Apr 24, 2011
8,377
This scheme is dependent on the +/-20 input being completely isolated from the 5V supply. I suspect this is not the case because you see a "correct" value without the MCU.

I see one way to connect the dividers, toss out R5, connect R4 to ground and read across R4. I can't draw this up right now, perhaps later tonight if I have time.

The equivalent resistance of your divider is 9.5K, which may be on the high end for an A2D.

Edit: Make that 10.5K if you insist on using R5.
 
Last edited:

ErnieM

Joined Apr 24, 2011
8,377
Perhaps use a simpler input network?
View attachment 76485
BINGO. As long as a 10K resistance on the unknown is acceptable that works great. It has a low resistance to the A2D, 900 ohms I believe.

I'd still bump the resistors up by a power of ten or two, then add a unity gain buffer (rail to rail single supply op amp) to drive the input, just to lessen the loading of the "voltmeter." That may be beyond the scope of this exercize.
 
Top