Tuesday, February 5, 2019

Backyard Datalogger


AMOS is now quietly sitting in the backyard, next to a discarded Christmas tree and a few frozen dog turds. To save battery life, when the sun is not shining, it has been programmed to collect a sample of data (currently just internal and external temperature, a phony pH reading, plus GPS position) and then shut down its main processor (the Raspberry Pi). The small wireless unit (RFU220) continues to run and keeps track of how much time to wait before sending a signal to re-power the Pi. The RFU220 also maintains a PWM signal for the air propeller, so that it does not make an annoying beeping noise when the Pi gets powered down (normally one of the PWM outputs from the Pi is used to control it). If necessary, it is possible to connect (using a 2nd RFU220 at my PC) to wake up AMOS early, make software changes, collect data, etc.

Last week I noticed that the op-amp that I was using for estimating the current draw on the +12 V power line was busted. I'm not sure when this actually occurred, possibly it was some time ago. Rather than attempt to re-build another one of my own design, it seemed like a better approach might be to buy a "ready-made" current module. This one from Amazon looked pretty good:

https://www.amazon.ca/dp/B07JW5R4J8/ref=pe_3034960_236394800_TE_dp_1

It is based on the ACS712 module which uses a Hall-effect sensor to accurately measure current levels up to +/- 20 A. Furthermore, I can place it directly in line with the positive 12 V battery terminal, which should give a good indication of how much current is coming out (or going in when the sun is really shining) of the battery. Adding some monitoring software (on the RFU220) could allow AMOS to get a decent estimate of its charge state in terms of some percentage of full-charge.

The I2C issues dealt with last week are mostly solved, although occasional I2C bus errors still sometimes occur. The errors seem more frequent when the propeller is going at high speed, so possibly some electrical fine tuning of things could help there. I think for now though, the errors are at a low enough frequency (~ 1% or less) that I can just live with it.


No comments:

Post a Comment