I've been thinking about monitoring the power draw within my solar-based chicken coop setup to get a better understanding of the true power consumption for estimating battery life.
I have a 12 V deep cycle RV battery taking in solar power (through an appropriate charge controller) and supplying power to some USB cameras and a 12 V RV fan, controlled by a thermostat circuit.
I want to use an Arduino with an INA219 Adafruit breakout to monitor and log the current draw of the various components I have hooked up.
My understanding is that I would split the +12 V wire and use those to feed the breakout's Vin+/Vin- terminal block.
I have a couple of questions to make sure I don't fry the board:
- The Adafruit page has a big disclaimer:
Be careful inserting noisy loads that can cause a sharp current draw, such as DC motors, since they can cause problems on the power lines and may cause the INA219 to reset, etc. When using a DC motor or a similar device, be sure to include a large capacitor to decouple the motor from the power supply and use a snubber diode to protect against inductive spikes.
What do I need to do to protect the circuit, I assume mostly from the fan? I'm not sure how to decouple the other parts of the circuit with a capacitor and snubber diode, so any advice here is highly appreciated. This is the part I'm most worried about since I understand inductive loads can supply a pretty strong back-EMF if not accounted for.
- The Adafruit wiring guide shows connecting the breakout ground, the Arduino ground, and the "high-side" ground all together. Is this normal, and are there any concerns about connecting the 12 V- (ground) and the Arduino ground (powered by a car 12 V to USB hub) together? I guess in theory it's all the same ground reference, but I'm unsure here. Maybe in the picture below they are powering the breakout using the shield's power, so this may be misleading, but I'm still uncertain.
- I also believe I need to swap out the sense resistor for a lower ohm rating. Is there a specific Digi-Key part number to use to get more than 3 A of measurement? Do I need to do something special in the code to adjust the breakout to be able to measure ~5 A?