5
\$\begingroup\$

I want to measure the current and voltage from a set of small solar panels (about 10V and 100mA but not settled yet) using a Raspberry Pi. There will be between 4 and 6 panels.

This project will need to run without a lot of maintenance for a reasonable amount of time. It should be part of an interactive museum display on solar energy.

Part One:

Voltage: Use a voltage divider from positive terminal.

Current: Use a 1 ohm resistor and measure the voltage drop. I want to use a 1 ohm so it does not influence the reading based on head or various other factors.

Plan:

schematic

simulate this circuit – Schematic created using CircuitLab

Part Two:

Since there is not ADC on the PI, I would like to use an MCP3008 partly because I know it supported with the PI, and partly because it is available in an SOIC and DIP version. The final version of this will be a custom PCB. And it has 8 channels so I can hook up 4 panels.

  1. Are there going to be any issues adding a second MCP3008 chip if I need to add more than 4 panels? I have never done GPIO programming on a PI.

  2. Is there a better way to measure the current? I also looked into using a PMIC like the INA212-214-Q1 from Texas Instruments but it seemed a lot more complicated than just using the 1 ohm resistor.

  3. Is there anything I am missing?

\$\endgroup\$
3
  • \$\begingroup\$ Without a load on the solar panel, there will be no current. Your circuit is not complete. \$\endgroup\$
    – Barry
    Commented Aug 20, 2014 at 23:34
  • \$\begingroup\$ True - to measure load current, you have to connect the 1-ohm resistor to V+, then connect your load to the other side, then measure voltage before and after the 1-ohm resistor to find its drop (and therefore the load current). @3120471, can you find a way to demonstrate a practical application for these panels? That'd satisfy the load requirement for current sensing. \$\endgroup\$ Commented Aug 20, 2014 at 23:59
  • \$\begingroup\$ Take a look at MCP3424. It is very slow, but 18-bit, 4-channel ADC. I'm using it for similar purposes. \$\endgroup\$
    – Kamil
    Commented Nov 19, 2014 at 5:13

2 Answers 2

3
\$\begingroup\$

Your R1 is connected to GND and will not measure anything. You probably want something like this:

image

This will work if you do not require one end of the load to be connected to ground. In that case, the sensing resistor has to be moved to high side and needs additional circuitry.

\$\endgroup\$
3
  • \$\begingroup\$ The problem I see with that design is that the total current from the panel will not be running through load. Part of it will go through the Voltage Divider, and part of it through load. If I want to measure the total current produced I don't think that will work. \$\endgroup\$ Commented Aug 22, 2014 at 13:45
  • \$\begingroup\$ You can increase R2 and R3 to about 47k if you do not need short sample time. For even higher resistances, use voltage buffer (op amp with in- shorted to out) after the divider. \$\endgroup\$
    – venny
    Commented Aug 22, 2014 at 14:00
  • \$\begingroup\$ Thanks. I understand. I am planning at the moment of using a small dc fan for the load since the resistance is fairly low (in comparison with 20 or 40k resistors). I understand that they don't have linear impedence since it changes based in voltage applied and rpm, but I think it should work. And be an interesting part of the display since it's easy to see that increasing light increases rpm of the fan. \$\endgroup\$ Commented Aug 22, 2014 at 22:41
3
\$\begingroup\$

Your circuit is wrong, because your current sense resistor goes nowhere.

It should be something like this.

enter image description here

More readable schematic:

enter image description here

"Current sense" output from this will give you total solar panel current (including voltage divider current).

"Voltage sense" output will give you voltage on load, but not including voltage drop on current sense resistor. You can compensate this in software by just adding voltages from "Current sense" to "Voltage sense".

There will be 0.1V drop on 1ohm current sense resistor at 100mA, so I think 1 ohm resistor is OK, but 1k resistors in voltage divider could be higher values, like 5k.

You may also consider using ADC with higher resolution.

I'm using 4-channel MCP3424 in 14-bit mode for similar purposes. It works well with RPi, if you need python library for this - just ask.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.