LM324 - Op-Amp Non-Inverting Amplifier to measure current from solar panel on Arduino

Thread Starter

Nuno Tavares

Joined Mar 18, 2017
7
Hi everyone,
I'm designing a circuit to measure the current from a mini-solar panel (0.5 W) which normally reaches 80-100 mA. My circuit is attached to this post.
I have a Gain of 6 with the resistors R2=5k and R1=1k because G=1+(R2/R1). Normally the input voltage on op-amp (LM324) is 0.2-0.4 V and always the output voltage is under 3.7-3.8 V. I don't understand why this happens. If 0.3 V is the input voltage and with gain of 6, the output voltage would be 1.8 V (0.3*6=1.8).
The power supply of op-amp is the +5V and GND from Arduino.
Can you help me with this ?
 

Attachments

hp1729

Joined Nov 23, 2015
2,304
Hi everyone,
I'm designing a circuit to measure the current from a mini-solar panel (0.5 W) which normally reaches 80-100 mA. My circuit is attached to this post.
I have a Gain of 6 with the resistors R2=5k and R1=1k because G=1+(R2/R1). Normally the input voltage on op-amp (LM324) is 0.2-0.4 V and always the output voltage is under 3.7-3.8 V. I don't understand why this happens. If 0.3 V is the input voltage and with gain of 6, the output voltage would be 1.8 V (0.3*6=1.8).
The power supply of op-amp is the +5V and GND from Arduino.
Can you help me with this ?
0.3 V in across 0.5 Ohms is 0.6 Amps. With 5 V VCC the output is maxed out.
If the current should be < 100 mA the voltage across the 0.5 ohm resistor should be < 50 mV.
Is your 56 ohm resistor 5.6 ohms?
 
Last edited:

ericgibbs

Joined Jan 29, 2010
18,766
hi NT,
Why have you connected Vcc to the wiper of the pot.
If you said one half if the pot is Ra and the other half is Rb, this means Ra and Rb are in parallel, so the gain is R5/Ra||Rb
E
 

dl324

Joined Mar 30, 2015
16,845
I have a Gain of 6 with the resistors R2=5k and R1=1k
The way you have drawn the schematic isn't very useful. It is easier to discern desired function if you draw the schematic as shown below. The part designators in your description don't match the schematic:
upload_2017-3-18_9-8-21.png
What is the panel voltage?
 

Thread Starter

Nuno Tavares

Joined Mar 18, 2017
7
The voltage divider on the panel is going to give you essentially no voltage:
\( \small V_{div} = V_{panel}*\frac{0.5}{56.5}=5*0.009=0.04V\)
The op amp serves to amplify that voltage to be possible read on analog pin the voltage coming from that voltage divider.
 

dl324

Joined Mar 30, 2015
16,845
The op amp serves to amplify that voltage to be possible read on analog pin the voltage coming from that voltage divider.
By choosing such a low voltage, the non-ideal attributes of the opamp can become a significant percentage of of the input signal.
 

Thread Starter

Nuno Tavares

Joined Mar 18, 2017
7
By choosing such a low voltage, the non-ideal attributes of the opamp can become a significant percentage of of the input signal.
So what's the best way to measure the current by Arduino ?
And I can't use a current sensor, need to develop one.
 

crutschow

Joined Mar 14, 2008
34,282
The op amp (+) input voltage is normally 0.2 V - 0.4 V
You've already said that, which doesn't answer my question.
Where is the 0.2V-0.4V "normal" input voltage coming from?

Op amp inputs don't generate voltage (unless they are an open circuit) and there is nothing on your schematic that would generate such a voltage.
 

dl324

Joined Mar 30, 2015
16,845
So what's the best way to measure the current by Arduino ?
And I can't use a current sensor, need to develop one.
The usual method is to use a low value series resistor. A voltage divider across the solar panel tells you nothing about the current being drawn by a load.
 

hp1729

Joined Nov 23, 2015
2,304
Sorry didn't understand what you mean, can you explain it better please ?
You measure about 0.3 V at the input? it should only be 50 mV. It acts like your 56 ohm load resistor is 5.6 ohms. Check the other resistor values also. That 3.8 ish volts out is about all you will get out of an LM324 when it is maxed out so your gain calculations are meaningless. What you describe for symptoms sounds like wrong resistor values. Your schematic looks workable as it is designed.
 
Having been in the solar cell research biz, that's probably a bad way of doing it, but it depends on what you need to do. Our research cells were less than 25 mA. I did design a 4-terminal I-V converter using the feedback ammeter approach that could handle +-100 mA. Although it was optimized for AC measurements, in DC it had about < 1 mV drop and 40 pA of offset.
 

elnona

Joined Nov 16, 2017
2
Hi! I already made my own "USB charge Doctor" to display current draw from usb. Using:
arduino
1802 display,
lm324,
47k resistor,
2k2 resistor as R2 and r1 (gain of 22)
shunt resistor of 0.05 ohms.

using your circuit and it works well.
at 1 amp i read 50mv at the input of the opamp and 1150mv at the output.
 
Top