Home › Forums › Mayfly Data Logger › Testing power consumption › Reply To: Testing power consumption
I would do as Neil suggested and make sure the trigger pin for the Turner is set low before sleep.
We’ve had the same problem with RS485 adapters that pull power through the Tx/Rx lines. Because the stop bit is high those lines will stay high if you don’t force them low at the end. It’s kind-of a PITA with the Tx/Rx bits; you have to actually write it setting those low into your loop because ModularSensors doesn’t know anything about the Tx and Rx pins, only the serial stream.
It could also be that the wiper is causing a whole lot of noise on the line which is keeping the Mayfly awake (acting as a pin-change interrupt). But I think if that were the case you’d see the going to sleep/waking up lines continuously, not just once a minute. The once a minute thing is because the alarm on the DS3231 doesn’t allow for every x minutes, just at one exact time or every second, every minute, every hour, etc. To get it to wake only in 5 minutes (or 15 or whatever your logging interval is) you’d get the current time and then calculate and reset the alarm for 5 minutes in the future each time. Since the board should only wake for a few ms every minute, it seemed safer to use the every minute alarm than to reset it to a new time each time.