joeDiHare
Posts: 2
Joined: Wed Feb 27, 2019 3:02 am

Use 12 shunt to measure current and voltage via rpi

Wed Jun 03, 2020 4:08 am

This seems like a question that has been asked before, I couldn't find on the forum, or elsewhere, a fitting answer.

I am trying to measure V and A of a 12v battery using a shunt connected via a negative.

I already purchased and fitted a shunt (https://www.amazon.com/gp/product/B013PKYILS), and the schematics of the circuit is:
im2.jpg
im2.jpg (204.96 KiB) Viewed 908 times
im3.jpg
im3.jpg (31.01 KiB) Viewed 908 times
Note the 4 wires from the shunt that feed the monitor. I want to connect them in parallel to the rpi.

Do I need voltage dividers? Optoisolators? I also have 4 of these monitors. Do you think I can connect all 4 (each with 4 individual wires) to the rpi?

W. H. Heydt
Posts: 15420
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Use 12 shunt to measure current and voltage via rpi

Wed Jun 03, 2020 4:57 am

The GPIO pins on a Pi (any Pi) are limited to 3.3v and 16mA. They are also all digital. What you probably need are a couple of AD converters, either with suitable output limits, or running through level shifters (and, probably, optoisolators).

drgeoff
Posts: 12417
Joined: Wed Jan 25, 2012 6:39 pm

Re: Use 12 shunt to measure current and voltage via rpi

Wed Jun 03, 2020 8:00 am

The typical A to D converter used with a RPi has a range of several volts. No problem to use a resistor divider to reduce the battery voltage to match that. However the voltage dropped across the shunt will be much lower and may require special attention.
Quis custodiet ipsos custodes?

Return to “General discussion”