I have an off-grid orchard and I use the Automation Hat to let me run a well pump from a solar power system. I want to be able to read the voltage on the battery and the voltage on the panels using the ADC.
I went to a different school, so I am learning some foundational things. I am bench testing my idea using a variable power supply set to 12 volts and connecting the positive to the ADC 1 post. No ground, because I don’t know any better yet. I run this script and get the following results, different each time.
for x in range(0, 10):
value = automationhat.analog.one.read()
print(value)
3.34
9.87
0.28
11.82
11.82
11.82
-0.85
-0.85
10.74
10.74
I’ve set the supply to 12 volts and to 6 volts with similar results. All three lights on the ADC flash.
In the field, the solar panels will generate around 10 amps. This is a 12 volt system with a 100Ah battery I need to keep from dying with the panels connected least the panels pop the controller. Again.
Can you tell me how I might use the ADC properly before I break it?
You need a common ground as a reference for the adc measurements. Connecting only the + won’t work. As long as its one of the 24v tolerant adc it should be fine.
Thank you, alphanumeric. Do I connect the negative from the panel and battery posts on the controller to the GRD posts on the Automation Hat or to something outside of the device. Connecting a 10a circuit through my Pi is counter-intuitive.
Seriously. Lots of school, none in electronics, but I am good at listening. Thanks again.
Connecting the negative from the panel and battery posts on the controller to the GRD posts on the Automation Hat should be fine, and safe.
To measure a voltage you measure across the “+” and “-”. The “-” is in this case also the ground connection. If you check I’m pretty sure you will find that the solar panel -, battery -, and controller - are all connected together. Connecting that point to the - on the hat will let it measure the individual voltages. The Pi +5V power supply will power the Pi and Hat just fine.
Doesn’t hurt to be sure of what your doing, and double check if you have doubts.