I have setup a 5v Adruino Mini Pro powered initially by a 17v solar panel to a set of 3 18650 batteries (that is controlled by a TP4056 charging board) to a buck step down converter giving a constant 5v output. This drives a 5v pump in a Japanese water fountain that I have built using bamboo (well recycled didgeridoos!). This is working fine during the day but there is no need for it to be working at night. So I added a Photocell to the Mini Pro that switchs on a digital pin when the Photocell is reading above 300. I am using the “delay” function to only check the Photocell every 15 minutes. But the Mini Pro is still powered up 24 * 7 when it doesn’t need to be using battery power. So I am thinking about using the LowPower.power down function to put the processor to sleep for 8 seconds at a time (the longest I think I can do). This drops the drain of the processor down from about 15mA to 6uA apparently. So very good. The problem is 8 seconds is not long so how would you suggest I put the processor to sleep for say at least 8 hours? It would be great to use the PhotoCell to restart the processor but it all becomes a bit circular at that stage as putting the processor to sleep will also stop the Photocell. Would appreciate your thoughts !
It’s a bit outside my area of expertise but can’t you use that same photocell (maybe with some additional electronics) to wake the pro Mini up again using an interrupt?
Just put it back to sleep after the 8 seconds. A burst of 15mA every 8 seconds will not drain the battery noticeably.
Put it to sleep, wake up after 8 seconds , increment a counter , go back to sleep
when the counter reaches a set value , stay awake , power the LDR , check light level .
Reset the counter .Then sleep again or put the light on
Would you happen to have any sample code using an Interrupt to wake the Mini pro or my Photocell?
Have a look at https://www.gammon.com.au/power, sketch J.
The trouble is that you then need more analog circuitry to turn the photocell voltage into a digital control signal and that analog circuitry itself would tend to consume current.
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.