(First post here, hope I've posted this in the right place)
I own an old campervan with a 12V battery system, The battery powers lighting and a (fairly power-hungry) compression fridge - along with a 12V TV, phone chargers, etc. It is recharged by solar panels on the roof (when it's sunny!), the alternator (when the engine is running) or a mains charger (when we're connected to mains, at campsites).
I'd like to use a Pi to monitor the state of the battery - measuring voltage across its terminals and current flow. Ideally the data would be uploaded to the cloud so I can monitor it remotely - useful since the van is kept in storage some miles from home when we're not using it. I may later want to add security cameras, motion detectors, GPS, etc - so I think a Pi is the way to go, rather than something like an Arduino.
Focusing on the input side: the system needs to be able to measure current and voltage with reasonable accuracy. The voltages will be in the range of about 10V to 14V - a nominal 12V lead-acid battery system. There is also the option of measuring the raw voltage coming from the solar panels at some point in the future, which may be higher.
The current flowing will vary widely, from zero to perhaps 30A. It will be bidirectional, depending on whether the battery is charging or discharging. The maximum current flow will probably be when the mains charger is in use.
The power consumption of the system needs to be kept fairly low, since it will be running from the 12V battery itself.
So far, I'm thinking that a Pi Zero is a good choice. I'll probably use a Zero W to allow for a wifi connection to the Internet. Some sort of ADC will be needed, and I'm considering a RaspIO Analog Zero
Once I've got an ADC setup working, measuring the voltage across the battery terminals is pretty simple. I guess a couple of 1% resistors could be needed to divide the voltage to the input range of the ADC?
But I'm not sure about how to measure the current. I've seen mention of Hall effect devices but I don't know anything about them. Is it crazy to think of using a shunt resistor and just measuring the voltage across it with the ADC? One problem with that seems to be that the voltages involved are very small - typically a maximum of 75mV with shunts like this Is there a simple way to boost that? I found another thread discussing something similar where it was suggested that an op-amp circuit could amplify the signal to give a value suitable as input to an ADC. I know little or nothing about op-amps - does anyone have a schematic (or better yet, a ready-built board) that can do that?
Finally, I'll need to find a way to power all of this from the 12V supply. That's likely to be quite noisy when the alternator or mains charger are supplying it. I've googled a bit and found references to "buck" converters - would this be suitable?
Okay, that's probably enough questions for now! As you can probably tell, I'm new to this electronics stuff, so I'll be grateful for any answers at all.