Welcome to EnviroDIY, a community for do-it-yourself environmental science and monitoring. EnviroDIY is part of WikiWatershed, a web toolkit designed to help citizens, conservation practitioners, municipal decision-makers, researchers, educators, and students advance knowledge and stewardship of fresh water. New to EnviroDIY? Start here

Reply To: Testing power consumption

Home Forums Mayfly Data Logger Testing power consumption Reply To: Testing power consumption

Matt Barney

    Thanks to both of you for your responses! I think I had just figured out the cause of my problem right about the time you were posting them, but needed to continue refining and testing my code before replying.

    What’s working now is:

    1. In the sensor’s setup() function, set trigger pin to an output
    2. at powerUp(), set pin HIGH
    3. at wake(), run the wiper (set pin LOW, wait 50ms, set pin HIGH)
    4. at powerDown(), set pin LOW

    The wiper cycles as expected and sleep current is <0.7mA. The only exception seems to be that when the Mayfly wakes up at the first measurement cycle (not at startup), the wiper doesn’t run as expected. At all subsequent measurement cycles that I’ve watched, the wiper cycles properly.

    Sara, which of the following functions would you recommend as a best practice for where to change the pin value described above, at powerUp and powerDown, or at wake and sleep?

    That’s funny on the FTDI cable (well, funny in hindsight) – ouch! 🙂