Jump to content

RaspberryPi 5 and BrickHAT.set_sleep_mode(power_off_delay, power_off_duration, raspberry_pi_off, bricklets_off, enable_sleep_indicator)


Recommended Posts

Geschrieben

Hi List

Last summer I was asking about the set_sleep_mode of the RaspberryPi using the BrickHAT. You will find the original post here. And the solution proposed by matzeTF was perfect.

The background was, to control the shutdown of the RPi in a controlled way in combination with an Industrial-Dual-Relay Bricklets and a second power-supply of HAT and RPi using the 5V USB-connection. This combination allows a controlled shutdown of the entire system and a final cut of any power-supply of the system.

This works perfectly so far with RPi-4.

In the meantime, I switched to RPi-5 for a new edition of the entire setup. And with this switch, I am confronted with the new following effect:

  • After calling the
    set_sleep_mode()
    -function, the system starts to shutdown as defined.
  • But, at the end, the Industrial-Dual-Relay is not set back to default (no connection between A and SW).

As a result, the system gets blocked in the following state:

  • The system of the RPi is down.
  • The Industrial-Dual-Relay still provides connection between A and SW.
  • The HAT and RPi gets still power.

The only solution to solve the problem is, to manually disconnecting the USB-power-supply from the HAT. After the disconnecting, everything goes and stays as it should (no connection at relay between and SW.

Unfortunately, this behavior is not observed systematically. It occurs sometimes.

While writing this post, I started the reflection, if the power_off_delay with 5.0 seconds is to optimistic and if the problem could be solved using a longer time-period for the power_off_delay.

Do you have any ideas or suggestions?

Looking forward to any hints.

Cheers. Yvo

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Gast
Reply to this topic...

×   Du hast formatierten Text eingefügt.   Formatierung jetzt entfernen

  Only 75 emoji are allowed.

×   Dein Link wurde automatisch eingebettet.   Einbetten rückgängig machen und als Link darstellen

×   Dein vorheriger Inhalt wurde wiederhergestellt.   Clear editor

×   Du kannst Bilder nicht direkt einfügen. Lade Bilder hoch oder lade sie von einer URL.

×
×
  • Neu erstellen...