I am making a solar tracker using Arduino which will follow the sun for increasing the efficiency of the solar panel charging. But, Arduino and servo motor takes power and I need to decrease the amount of current drawn from the batteries.
I have already made a Arduino UNO on a prototyping PCB to cut out most of the hardware like linear regulator and all. But, I want to decrease the power consumption as much as I can.
I want the Arduino to go to sleep mode after every 10-20 mins after solar panel gets on right orientation and to go to sleep mode for 6-8 hrs after sunset!
Please tell me how can I do this? I tried LowPower library from rockscream from GitHub but it works for 8 seconds only!
Another way you could reduce power is to always know where the sun is instead of having to track it actively.
This would also improve collection efficiency when you try to track when a cloud is in front of the sun and fail, etc.
On it's own, it can't. It can only sleep for 8 seconds. BUT, you can fake it Just put it to sleep for 8 sec and when it wakes, check if the full 6h have passed, if not, put it to sleep again. No, it's not sleeping al the time but that check can be very very very quick. So even if it wakes every 8 sec, it's sleeping for more then 99,9% of the time.
This Nick Gammon article might have some information pertinent to your question. And a Playground article about sleep mode(s).
I tried LowPower library from rockscream from GitHub but it works for 8 seconds only!
So if you want it to 'sleep' for say 8000 seconds, put the sleep 8 seconds request inside a loop that counts from 0 to 999.
Yes, every 8 seconds it wakes up, processes the loop counter and goes back to sleep, but that time is very short, so little power is consumed.