Go Down

### Topic: Voltage divider problem (Read 18860 times)previous topic - next topic

#### dhenry

#45
##### Jan 10, 2013, 12:17 am
Quote
Is there a risk when adding a cap when it's not really neccessary?

Yes.

#### lemming

#46
##### Jan 10, 2013, 01:39 amLast Edit: Jan 10, 2013, 01:49 am by lemming Reason: 1
Quote
Of course I'd like it to be even better so I guess I should now start investigating this VREF that I guess is how the arduino close the arduino 5V supply is to 5V. Is that correct? Is there a prefered method of doing this?

I would use a 4.7 volt zener/resistor combination to provide a 4.7v reference into Aref. (This could be fed off the power either pre or post regulator, but may be better pre regulator) Decouple Aref with a capacitor (<1uF) to ground. Measure exact voltage from the zener for more precision  for your calculations. Or you could use a precision voltage reference chip.

For the resistor divider into A0 I would use a 10k  trimmer (e.g. 25 turn type for finer adjustment) across the battery terminals; any more and your may get noise, any lower and you will be burning up too much power from your batteries. Decouple the input to A0 with .1uF or greater to ground. Tune to give 4.7 volts output for the maximum expected voltage from the LiPos.

#### Boopidoo

#47
##### Jan 10, 2013, 08:38 am

Quote
Is there a risk when adding a cap when it's not really neccessary?

Yes.

This is my current breadboard. I drew it so it shows the connectors I plan to use. The caps I'm talking about are the ones that are placed for each analog input.

#### dhenry

#48
##### Jan 10, 2013, 01:21 pm
Quote

I was talking about the same caps too.

#### Boopidoo

#49
##### Jan 10, 2013, 02:20 pm
Ok, so I should be able to remove these without having signal problems? If they don't do anything good then it will simplify my wiring and PCB-shield a lot.

#### tack

#50
##### Jan 10, 2013, 05:42 pmLast Edit: Jan 10, 2013, 05:46 pm by tack Reason: 1
Also, don't forget that the act of taking a measurement actually affects the circuit.

A DC Ammeter should have a low resistance, close to zero, but crucially NOT zero. Same, but opposite, for a DC Voltmeter; it should have high resistance, theoretically infinite, but it will just be very high.

This means that you never read the true value. Adding an ammeter will put a little more resistance in series, meaning a little less current flowing. Adding a voltmeter will add a very large resistance in parallel, meaning a little more current flowing, so more voltdrop in the series part of the circuit, than without it.

The effect will be dependant on the existing conditions of the circuit, in relation to the connection point, and value of resistance , of your test instrument. You can't take a measurement without affecting what you are measuring.

Biggest errors will be measuring current when you already have a low resistance circuit, or measuring voltage when you have a very high resistance circuit.

Using a resistor divider network and then measuring voltage at a midpoint will put the voltmeter in parallel with one of the resistors and mean the combined resistance value is now lower; 1/(1/R1+1/Rmeter). This will change your divider ratio and the voltage at that point to a lower volt drop than would be present without the meter connected. Therefore, the value with and without your meter connected WILL be different anyway, dependent on the values in the circuit and that of your meter.

Add on the errors mentioned previously and you will NEVER measure exactly the same with and without the meter connected, unless you actually had an infinite impedance voltmeters.

You could well be chasing ghosts here, by trying to get a value that is the same (or as close as you seem to want it), with all the factors that are affecting the measurement of that value via different methods.

#### tack

#51
##### Jan 10, 2013, 05:54 pmLast Edit: Jan 10, 2013, 06:01 pm by tack Reason: 1
As an example, imagine:-

Your voltmeter has a resistance of 10 Megohm

You have a 12V supply with 2 x 10 Megohm resistors across it (R1 and R2), making a 1:1 divider. Calculations tell you that there will be a 6v volt drop across each one, so you'll measure 6v at the mid point with reference to Gnd, or -6v with reference to +12v.

Now, you take your voltmeter and connect it across R2 and Gnd to measure the output voltage of your divider. This puts a 10Megohm resistance in parallel with R2, meaning you now have an effective series resistance in your circuit of 10 Megohm (R1) and 5 Megohm (R2 + Rmeter paralleled), totalling 15 Megohm. This is now a 2:1 divider.

So, you expect to measure 6v at the midpoint, but you actually measure 4v, an 'error' of -33% ;-)

This is without considering the resolution and accuracy of the instrument itself, which will mean that measured 4v could be up or down by a few percent too.

When testing and measuring it is important to understand the effect your instruments can have on what you are measuring. I regularly test for both extremely low and extremely high resistances in high voltage circuits. This is why I have specific instruments for each application. A micro-ohmeter for injecting 100A to measure micro-ohms and 40kV+ test sets for measuring Gigohms and Terraohms and leakage currents in micro-amps at, say, 25kV.

#### Boopidoo

#52
##### Jan 10, 2013, 06:47 pmLast Edit: Jan 10, 2013, 06:49 pm by Boopidoo Reason: 1
Well maybe I'm just lucky but I'm actually very happy with the measurements which are within 0.01V from what my volt-meter measures. This has now been tested between 4-12V and between -5 to +25 degrees C. If this is consistent I don't need the results to be any better in this project.

The measured voltage on my Arduino doesn't seem to change noticably when I add a volt-meter to the circuit and vice versa.

Now my problem is making the PCB which was harder then I imagined... a real puzzle.

#### retrolefty

#53
##### Jan 10, 2013, 07:32 pm

Well maybe I'm just lucky but I'm actually very happy with the measurements which are within 0.01V from what my volt-meter measures. This has now been tested between 4-12V and between -5 to +25 degrees C. If this is consistent I don't need the results to be any better in this project.

The measured voltage on my Arduino doesn't seem to change noticably when I add a volt-meter to the circuit and vice versa.

It's all about the output impedance of whatever you are wiring to the analog input if the 10/11 megohm input impedance of your DMM will effect the reading or not. As the analogRead() command is optimized (and recommended) for reading a voltage source with an output impedance of 10K ohms or less, a DMM reading at the same time will have no effect noticeable.

Lefty

Now my problem is making the PCB which was harder then I imagined... a real puzzle.

#### Boopidoo

#54
##### Jan 11, 2013, 10:58 amLast Edit: Jan 11, 2013, 11:00 am by Boopidoo Reason: 1
What if I removed the caps on RX1 & RX2-inputs and placed resistors in series with the ground (to eliminate ground loops) or eliminated the ground for RX1&2 inputs altogether.

The ground on the RX1&2 is from two devices that is powered from the 12V-source which I am monitoring so that ground is already connected.

#### dhenry

#55
##### Jan 11, 2013, 01:22 pm
Quote
2 x 10 Megohm resistors across it (R1 and R2), making a 1:1 divider

That type of dividers are basically unusable for an avr's adc.

#### tack

#56
##### Jan 11, 2013, 03:03 pm

Quote
2 x 10 Megohm resistors across it (R1 and R2), making a 1:1 divider

That type of dividers are basically unusable for an avr's adc.

It was a hypothetical example to show the effect of a test instrument on the circuit being tested, in as simple terms as possible. The values were simply comparable to typical resistance of a voltmeter and values where any calculations were either simple enough to do in your head, or just intuitive to anyone with a little experience.

#### dhenry

#57
##### Jan 11, 2013, 03:09 pm
Even in those cases (of extreme resistance), you can still make it work if you are prepared for some compromises.

Go Up