I've got an arduino that is monitoring voltage and current on a solar charge controller. V & I for panel, battery & load.
Background: The charge controller that is being monitored by the arduino has a common positive, so in order to measure multiple terminals at once (more than just the battery, or just the load etc.) I need to set the arduino ground to the common positive voltage, and measure the negatives of each terminal. With the help of some of you guys I've managed to use the +5V from arduino to create a voltage divider that lets me sense this (negative) voltage relatively accurately as a positive voltage coming into the arduino.
Now what I am trying to do is, instead of powering the arduino with an external power supply, power it with the same battery that is being sensed. The problem I see is because I'm using the battery (~+12V common positive terminal) as ground in arduino, if I use a buck to step down voltage to (9V) I am actually putting in -3V. This was confirmed by frying one of my arduinos. Either that's what happened or because the grounds of the arduino are connected, when I put in +9v into the terminals, I connected battery black to Gnd, and when I connected the common positive to GND, I connected battery red to Gnd effectively causing a short. ? Next test would be to step up with a boost to ~+22V and then put that into the arduino giving me a net +10V for arduino. But I imagine this is not a good idea.
Any ideas for how to successfully power this positively grounded arduino with the same battery it is sensing would be greatly appreciated!!