I'm programming an arduino (feather) and to increase its batterylifetime I would like to program it in such a way that it turns itself of for certain houres a day. How can I do this or is there a better (easier) method to save power?
There are several methods of powering down. If you really want to let sleep the Arduino for hours you need to attach an RTC chip which has an alarm output which can wake up the Arduino at the correct time.
Another way to save energy is to put the Arduino to sleep and let the WDT wake it up after 8 secs. You then have to take care that it sleeps for the correct time period by using a wake up counter or a similar method.
Which method is the best for you depends on your project. Tell us more about what other hardware is connected to the Arduino and what the CPU is doing when woke up.
I'm using an Ultimate GPS featherwing with accelerometer and datalogging featherwing. This is mounted on the Feather M0 RF9x Lora radio. When te CPU is running it collects a GPS fix and accelerometer data every second. This is saved in a txt file on an SD-card. It should send this txt-file to the homestation once a day. My plan is to save power during the day by putting the arduino into a sleepmode.
And how do you plan to put all that additional equipment to sleep? In that setup the power consumption of the MCU is probably not really relevant. What does that setup do?
I want to power all the units down. I think only the radio board has a processor.
The GPS board surely has too, but that's part of the GPS chip probably.
As I already wrote the easiest way is to use an RTC chip and program an alarm to wake the MCU at a specific time. The other way is to put the MCU to sleep and wake it up using the WDT after 8 secs. Then do that again until the requested time has passed. That solution is not accurate and should be used only if you say "sleep for 58 to 62 minutes, I don't care".
What do you mean by what does the setup do?
You write about storing some information every second but then you want the processor to sleep for hours. What's the purpose of that setup/project?
The purpose of this setup is to monitor the location of a bird at night. To extend the lifetime of the system I would like to turn it off during the day.