Pages: 1 2 3 [4]   Go Down
Author Topic: Voltage divider problem  (Read 4396 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Yes.

Logged

Australia
Offline Offline
Sr. Member
****
Karma: 10
Posts: 397
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: January 09, 2013, 07:49:23 pm by lemming » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 36
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.



* BGS-shield_bb.png (159.83 KB, 2379x2886 - viewed 35 times.)
Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
The caps I'm talking about are the ones that are placed for each analog input.

I was talking about the same caps too.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 36
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

UK
Offline Offline
God Member
*****
Karma: 17
Posts: 568
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: January 10, 2013, 11:46:25 am by tack » Logged

UK
Offline Offline
God Member
*****
Karma: 17
Posts: 568
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: January 10, 2013, 12:01:50 pm by tack » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 36
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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. smiley
« Last Edit: January 10, 2013, 12:49:38 pm by Boopidoo » Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 331
Posts: 16523
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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. smiley
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 36
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.


* BGS-shield_130111.png (134.25 KB, 2379x1893 - viewed 19 times.)
« Last Edit: January 11, 2013, 05:00:32 am by Boopidoo » Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

UK
Offline Offline
God Member
*****
Karma: 17
Posts: 568
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Even in those cases (of extreme resistance), you can still make it work if you are prepared for some compromises.
Logged

Pages: 1 2 3 [4]   Go Up
Jump to: