Multiple current sensors in parallel using opamps

Thread Starter

hypesnave

Joined Apr 20, 2022
3
Hello,

I'm making a workbench DC power supply monitor, with a current sensor for each voltage source, using LM324 opamps.
The sensors work well alone, however they seem to measure not only the current on their source but also the currents on the others, so I can't measure the current on each individual source.
I tried increasing the shunt resistors' value or adding diodes but it does not help. (and I want the shunt resistor to be very small, to limit voltage loss)
How to do this?
Thanks!

Here is my schema: (GND and the different voltages come from a computer power unit) (I can post the KiCad file if needed)
1650462775852.png
 

wayneh

Joined Sep 9, 2010
17,168
Your amps are all configured as comparators, either full high or full low depending on the shunt voltage versus the resistor divider set voltage. The amps need gain and a negative feedback loop. I don't think you need any of the voltage references.
 

crutschow

Joined Mar 14, 2008
29,800
The circuit, as shown, should measure each current independently, so if it doesn't, then there would see to be an error in your wiring.
 

Thread Starter

hypesnave

Joined Apr 20, 2022
3
Thank you all for your replies!

At what point are the lower ends of the Shunts connected.?
You mean physically? The circuit is actually on a breadboard, and the shunt resistors are just wires. They are all connected to the GND bus strips on the breadboard. I tried placing the GND wire between two shunts but they still interfere. Replacing the shunt wires with 0.22ohm resistors doesn't help.

100nF on the output of a LM324 is just what it needs to make it oscillate.
I don't think this is the problem. For example, with only a LED as the RLOAD for the 5V sensor, U4A's output is 0.17V. When I turn on a 0.24A fan on the 12V, U4A's output is 0.40V, while it should stay 0.17V. It also happens if the capacitors are removed.

I made this schema based on this and this tutorials, I don't really have a theoretical knowledge about opamps.

The circuit, as shown, should measure each current independently, so if it doesn't, then there would see to be an error in your wiring.
Ok, so I will redo it step-by-step to be sure the wiring is correct...
 

Ian0

Joined Aug 7, 2020
5,147
For example, with only a LED as the RLOAD for the 5V sensor, U4A's output is 0.17V. When I turn on a 0.24A fan on the 12V, U4A's output is 0.40V, while it should stay 0.17V. It also happens if the capacitors are removed.
I would suspect that your problem is earthing. Either make sure that all your earths are star-connected; or use differential amplifiers.
 

crutschow

Joined Mar 14, 2008
29,800
As Ian0 noted, a ground problem is also (perhaps more) likely.
For example, the bottom of the 10kΩ gain resistors should be connected directly (as close as feasible) to the bottom of their respective shunt resistors to avoid other ground currents from affecting the reading.
 
Last edited:

michael8

Joined Jan 11, 2015
287
Keep in mind that the schematic isn't the real circuit. Looking at the +12 U4B part of the circuit, the opamp is measuring the difference between the top of R14/shunt and the place in the circuit where the ground end of R12 is connected. Any currents from other parts of the circuit which flow through the path between R14 and R12 will alter what U4B sees.

Also how stable are your A/D values when the input isn't changing?

I've seen a Arduino running of off a PC USB supply show varying low bits of A/D values which became stable with a real +5 power supply.
 

Thread Starter

hypesnave

Joined Apr 20, 2022
3
I've "star-connected" as @crutschow described, and now it works! (each 10kohm+shunt pair together, connected to the common GND via a long wire)
This is impressing.
However it works better when the shunts are higher. (0.11ohm is good, but a simple wire is not enough)

Also how stable are your A/D values when the input isn't changing?
Sometimes it's stable (at least 2 significant digits), sometimes it changes by a factor 2 or more. But it's probably (I hope) because it's on a breadboard, so the wires move a bit each time I touch it. Eventually the circuit will be on a PCB.
 

crutschow

Joined Mar 14, 2008
29,800
However it works better when the shunts are higher. (0.11ohm is good, but a simple wire is not enough)
Depends upon the current measured.
You need the voltage across the resistor to be large enough so the intrinsic op amp input offset (7mV max for the LM324) is negligible compared to the minimum current value you want to measure.

If you want to use a lower value resistor then you will need to use a better op amp with lower input offset.
Auto-zero type op amps have essentially zero input offset but they may be more expensive.
For example here's a dual autozero amp that sells for $3.30 each (2 op amps/package).
 
Last edited:

crutschow

Joined Mar 14, 2008
29,800
To avoid oscillations either connect the capacitor from the output to the (-) op amp input, or add a small series resistor (e.g. 100Ω) from the op amp output to the capacitor.
 
Top