Solar panel current measurement using INA219

Thread Starter

zazas321

Joined Nov 29, 2015
936
So if I test it with 33 ohms load I should get 17V and about 0.6A current? But what about when I use the solar panel to powet my system? I will not be able to choose load resistance then
 

ericgibbs

Joined Jan 29, 2010
21,448
I will not be able to choose load resistance then

hi,
This is when you will need a charge controller, to maximise and control the charge rate.
E
 

Thread Starter

zazas321

Joined Nov 29, 2015
936
It is really cloudy and dark outside so I was not able to test my panels outside but I did some further INA219 chip testing. I have connected my Zigbee S2 modules to the arduino that I have implemented before to remotely turn ON and OFF the device. I have uploaded the schematic of the circuit.
What surprised me is that the voltage error now became 0.5V instead of before 0.1V. I was supplying the circuit with 10V supply but I was only able to read about 9.5V on the display.

I have measured voltage across shunt resistor and confirmed that the voltage drop is 16mV which makes sense, cause the circuit only draws 160mA of current. I have also measured Vin+ pin of the INA219 chip and i got 9,9V.

First row of the display shows voltage
Second row of the display shows current
 

Attachments

ericgibbs

Joined Jan 29, 2010
21,448
hi,
I don't use 'C', but as the DVM measurements appear to be giving the corrects results, perhaps there is a programming problem.??
 

Thread Starter

zazas321

Joined Nov 29, 2015
936
It is not that much programming involved as I just use an arduino library for INA219 .

shuntvoltage = ina219.getShuntVoltage_mV();
busvoltage = ina219.getBusVoltage_V();
loadvoltage = busvoltage + (shuntvoltage / 1000);

lcd.print(loadvoltage,3)

These 4 lines of code I use to print a value of the voltage.
 

ericgibbs

Joined Jan 29, 2010
21,448
hi.
I will order a couple of these modules from Amazon, see if I get similar results.
I do have an application where they could be used.

EDIT:
Ordered 3 off.

Update:
Will let you know when they arrive, estimated 2Weeks.
 
Last edited:

Thread Starter

zazas321

Joined Nov 29, 2015
936
Okay, we can run some tests and see if I get the same results as you do to confirm if my chip is functining properly
 

Thread Starter

zazas321

Joined Nov 29, 2015
936
I did another experiment:
I bought 9V alkaline battery and did some testing.
Battery voltage when no load connected - 8.9V
Battery voltage when load connected - 8V
Voltage across Vin- and GND - 7.95V
Displayed value - 7.4-7.6V

According to datasheet, INA219 measures the voltage across Vin- to GND. I took multimeter to measure voltage across Vin- and GND and got 7.95V reading. But the value i got on my display and serial monitor is arround 7.4-7.5V ( See picture). I dont get it :eek: if it is measuring voltage across Vin- and GND why is it displaying different voltage
 

Attachments

ericgibbs

Joined Jan 29, 2010
21,448
hi 321,
I have downloaded your Arduino code.
I have received a confirmation delivery date for the INA, its Dec31st !!!!, they initially said two weeks.

E
 

LesJones

Joined Jan 8, 2017
4,511
When taking the voltage measurments did you have the test probes from your meter DIRECTLY on the GND and Vin - pins on the INA219 breakout board ?

Les.
 

Thread Starter

zazas321

Joined Nov 29, 2015
936
Okay I have got a new battery and I did a little test and now I am even more confused. As LesJones mentioned, I have tried measuring across Vin- and INA219 GND and now I get approximately the same values that my display is displaying, but when i measure across Vin- and my battery GND which is the same ground i get slightly higher voltages! :eek: how is that possible if they are connected to the same ground???? Either way, the measured value is not the same value I get when I measure across my + and - battery terminals. I was measuring 7.5V across the Vin- and INA219 ground and about 0.1-0.2V higher on the supply ground. But when I measure across positive and negative battery terminals I get almost 8V - isnt that what INA219 supposed to measure?
 

ericgibbs

Joined Jan 29, 2010
21,448
hi,
All ground lines should be as short as possible and ideally terminate at the power source.
How long and what wire gauge are the power lines from the battery, INA etc..?
E
A photo of the project would be helpful.
 

ericgibbs

Joined Jan 29, 2010
21,448
Haha.;)
We have all been there.
The photo indicates the possible source of the voltage drops.
Use your DVM on mVolts and check the power wires end to end to measure any voltage drop.
E
 

Thread Starter

zazas321

Joined Nov 29, 2015
936
Do i just measure one end of the battery + wire to the other end and same with the ground wire? Not quite sure
 

ericgibbs

Joined Jan 29, 2010
21,448
hi,
Measure from the -V terminal of the battery, to all the other 0V points on the power rail.
You could repeat that measuring from the battery +v terminal to all +V points
 

ebp

Joined Feb 8, 2018
2,332
I'm not willing to read through this whole thread, but ...

What is the voltage reference for the ADC for the voltage readings?
 
Top