1

I have my Raspberry Pi 3B+ powered via Solar Panel. And I know that Raspberry Pi especially 3B+ have low power consumption unlike any other Raspberry Pi version.

Though Power Consumption was not that High, I still want my Raspberry Pi to automatically Turn On and Off during a specified Time.

Can someone give me some Idea? Do I need a Specific Hardware, Sensor or Module? Thanks.

I've Heard about Witty Pi. But Unfortunately I don't have enough Money for that and Its not even available in my Country, I'm looking for a Code Solution like in Crontab. Turning Off Pi was Easy but Turning it On wasn't.

  • 1
    you say "turning off was easy" except, all you've down is stopped the CPU - the Pi is still on – Bravo Dec 30 '21 at 03:02

3 Answers3

2

I've used my RPi 3B+ recently in a solar-powered application. This answer is based on my experience.

You must add a Real Time Clock using external hardware

Without external hardware, is not possible to turn any currently available RPi ON or OFF at a designated time. If you want to do this, you will need a Realtime Clock (RTC). My approach to Add a Real-Time Clock to Raspberry Pi is documented on the linked GitHub page.

Reduction of Power Consumption

If you have an RPi 4B, you have three options for reducing power consumption during periods when no processing is being performed. For all other RPi models, you have only two.

Zero Power Consumption

For all currently available RPi models, the only way to get to a zero-power state is to physically disconnect the power source from the RPi. In other words, all RPi will continue to draw power after processing has been terminated. External hardware is required if you want to achieve a zero-power state.

Reduced Power Consumption

For all currently available RPi models, power consumption is reduced following a halt, shutdown or poweroff command. I made some measurements on my RPi 3B+, and found that it drew 80 - 90 mA after processing had ceased. The RPi 4B consumed significantly more than the 3B+, but this varied over time as the EEPROM firmware evolved.

Low Power Consumption (RPi 4B only)

The RPi 4B retains much of its firmware in EEPROM, which has enabled creation of a "Low Power Mode". Using this mode is described in this Q&A, and requires changing two (2) parameters in the EEPROM code: WAKE_ON_GPIO and POWER_OFF_ON_HALT. This was a useful, but IMHO incomplete, addition to the RPi 4B as it remained impossible to re-start the RPi without external hardware.

I built and tested external hardware for my RPi 3B+ solar application. It entered a "Zero Power" state at designated times using an RTC, a latching relay and a few miscellaneous electronic items. It worked quite well for my purposes (houseplant irrigation). I've not gotten around to publishing the schematic, and since you've indicated the cost of the Witty Pi is prohibitive, there seems to be no need to do so here. The cost of a genuine DS3231 RTC module is nearly as much as the Witty Pi.

In your case, with no external hardware, there is little you can do to reduce power consumption. You can use cron to shutdown the RPi 3B+, but automatically re-starting it is not possible because the processor is no longer running. A manual restart is available of course simply by removing and re-inserting the power connector. As a barebones hardware solution, you may wish to consider Matthijs Kooijman's "Single Button ON-OFF Switch" - this solution will get you to the "Reduced Power" mode using a single, inexpensive pushbutton switch.

Hope that helps - let us know if you have further questions.

Seamus
  • 18,728
  • 2
  • 27
  • 57
0

The power consumption of Pi3B+ is actually higher than any model except the Pi4.

It is not possible to turn Pi on or off, except by removing power.

There are hardware devices which do this, but shopping questions are not on topic.

Milliways
  • 54,718
  • 26
  • 92
  • 182
0

I previously demonstrated the use of a DS3132 module with a Raspberry pi and the Red Reactor power supply. The DS3132 has an open drain interrupt output, which was wired into a GPI to trigger an interrupt into a small python script (with gpio library). From here you can shutdown the system. In this example, the ON button of the power supply works by briefly grounding it so by using the second built-in timer it is easy to restart the system, as it pulls the INT line low. The video and more information is at https://www.theredreactor.com/2021/07/13/redreactorwithrtc/ .