Go Down

### Topic: galvanic isolated voltage measuring (Read 113 times)previous topic - next topic

#### X-Ray-H3

##### Jan 10, 2017, 07:41 pm
Hey guys,

i am building a battery monitoring system for my solarsystem.
I would like to measure the voltage of the solar cell and the battery. Problem is, the charger got common positive. That means, i can't just build an voltage divider, connect minus to gnd and the V1's to the analog inputs without blowing stuff...
Is there a cheap and or easy method to measure voltage galvanic isolated?
Specs: 0-25V with an Error of less then 0,2 V if possible.

My ideas:
Use another arduino and let them communicate via IR. This is my least favored option
Use a linear optocopler. unfortunately the linear optocoplers i found are linear in a range of 0,25 V so i can just see if the voltage is up or below a point, what too less resolution for me.

any other ideas?

greeetings X-Ray

#### Wawa

#1
##### Jan 10, 2017, 09:10 pm
Maybe best to use battery negative as (Arduino) ground.
Then you can measure the battery normally with a voltage divider.
That means that solar cell negative can get negative in respect to battery ground.
That can be measured by a second voltage divider that is connected to the 5volt pin instead of ground.
Leo..

#### chucktodd

#2
##### Jan 11, 2017, 04:33 am
Hey guys,

i am building a battery monitoring system for my solarsystem.
I would like to measure the voltage of the solar cell and the battery. Problem is, the charger got common positive. That means, i can't just build an voltage divider, connect minus to gnd and the V1's to the analog inputs without blowing stuff...
Is there a cheap and or easy method to measure voltage galvanic isolated?
Specs: 0-25V with an Error of less then 0,2 V if possible.

My ideas:
Use another arduino and let them communicate via IR. This is my least favored option
Use a linear optocopler. unfortunately the linear optocoplers i found are linear in a range of 0,25 V so i can just see if the voltage is up or below a point, what too less resolution for me.

any other ideas?

greeetings X-Ray
I don't understand your 'common positive' reference, but if you have multiple batteries that have varying interconnections, you will have to measure each individually and collect the results.  Either design a circuit that can safely connected to all of the batteries at the same time, or switch between them.

If the 'common positive' design means that all of the voltages are referenced as negative, it just means that you will have to build your circuit such that VCC is tied to Vbat and logic ground is Vbat-5v.  Once you have the 5v supply built, you would reference all of your measured voltages from Vbat instead of gnd.

For me the simplest would be to design a measurement circuit that can be connected to one battery.  Connect these individual measurement circuits with dedicated isolators.   Silicon Labs makes some inexpensive (\$3) I2C isolators SI8602AC-B-IS that are good for up to 5000v.

Chuck.

#### X-Ray-H3

#3
##### Jan 11, 2017, 10:12 am

@Wawa, unfortunately i am not sure what you mean... But i think you want to measure between bat and solar minus? The problem is, that this voltage is somwhere between -12 V and +12 V. And i can (i really can't) ground the arduino to -12 V because i am connecting it with a pc that is driven by the battery...

@chucktodd, with common positive i mean the setup as shown in the attached picture (sorry for my unbelievable bad paint skills...)

The arduinos ground is connected to the batteries minus so i can measure the voltage of it.

I am really out of ideas now...

greetings

X-Ray

#### Wawa

#4
##### Jan 11, 2017, 11:11 am
Negative voltages can be measured with the "fixed point" of a voltage divider not connected to ground, but to a positive voltage.
e.g 10k from +5volt to analogue in, and 50k from analogue in to solar negative.
That enables you to measure from +5volt (5volt on the analogue input) to -25volt (0volt on the analogue input).
A bit of maths can change that into a voltage.
Leo..

#### X-Ray-H3

#5
##### Jan 11, 2017, 11:31 am
Ah now i get what you mean. Thank you very much, i think this will work!

Here is the "Schematic" of the final System (With all features) just in Case somebody got a simmilar Problem, this might help. The red is the Voltage Sensoring from Wawa.

#### chucktodd

#6
##### Jan 11, 2017, 09:48 pm
Ah now i get what you mean. Thank you very much, i think this will work!

Here is the "Schematic" of the final System (With all features) just in Case somebody got a simmilar Problem, this might help. The red is the Voltage Sensoring from Wawa.

This is what I came up with.

The Bat+ is also the Arduino's VCC, Logic_Gnd is Ground for the Arduino, Isolate Logic_Gnd.

Since Solar_volts, Battery_volts, sys_volts are all referenced to Bat+ (Arduino Vcc), the actual reading needs to be calculated:

scale_factor = (R6+R5)/R5;

The ratio between R6 and R5 is found by deciding the maximum possible voltage the Solar Panel can output, and selecting the max current through the divider.

If you select 1mA, and 26V you get two equations to solve

26v = 1mA *(R5+R6)
5v = 1mA*(R5);

so, R5  = 5v/0.001A = 5000 ohms

R6 = 26v/0.001A -R5 = 26000 - 5000 = 21k ohms

If these resistor value are use then, scale_factor for the Solar_volt is 26000/5000 or 5.2

With this setup, no galvanic isolation is required between the voltages(bat,solar,system) and the Arduino. BUT the Arduino's GND is not NEG,  It is (BAT+)- 5V.

So, YOU CANNOT connect to the Arduino (USB,Serial) if NEG is connected to Earth Ground.

If you plug in the USB of your Arduino to a PC's USB, and the PC is connected to normal AC power you will destroy the Arduino, and YOUR PC.

Chuck

Go Up

Please enter a valid email to subscribe