Welcome to EnviroDIY, a community for do-it-yourself environmental science and monitoring. EnviroDIY is part of WikiWatershed, an initiative of Stroud Water Research Center designed to help people advance knowledge and stewardship of fresh water.
New to EnviroDIY? Start here

Reply To: Power Issues After Storm

Home Forums Infrastructure and Equipment Power Issues After Storm Reply To: Power Issues After Storm

#17900
Fiona
Participant

    This is from the person that designed the shield, “The shield requires 5V which you can only get via the switched regulator. I wrote a basic little function to turn off the switched regulator but, because of the way they wrote the mayfly code, there is no place to put the function call before the code puts the processor to sleep.

    We can try something else though. In the code for the sensor constructor, each of the sensors has an optional pin you can assign as the power pin for that sensor. When it’s time to collect data, the mayfly code turns on the sensor, takes a reading, and then powers it off. Currently the EZO circuits are set to be left powered on but placed into a low power mode. The switched regulator is still turned on, though, slowly draining the power.

    I updated the code to set all of the sensors’ power pins to the switched regulator enable pin. This should turn off the switched regulator after the readings have been made.”

    If you have any advice on where to put the function call or if this sounds like a good solution is much appreciated. The code has been updated in the GitHub repo. Thank you both.