OnOff Shim does not switch my RPi 3+ off

Hi friends,

i am building a musicplayer (jukebox4kids).
Everything works really fine except the shutdown / Switch off.
i have connected the “OnOffShim” to my RPI3+.
PIN07 to GPIO04
PIN11 to GPIO17
The button is connected to the “OnOffShim”
I am pressing the button for longer >2 sec (like written in “cleanshutd.conf”)
The RPI starts to shutdown (network switch off, music switches off)
But it does not 100% switches off
The RPI idles in a state, where the red LED is active an some GPIOs are controlled (i am also using an “oled display” an this stays on).

In this state the pressing the button does not bring any system reaction …i need the voltage reset and the RPi starts again.

I have checked the voltage signals at the PINs from the OnOffShimBoard
PIN11:
Pressing the button = > PIN11 / GPIO17 is 0V
Releasing the button = > PIN11 / GPIO17 is 3,2V

PIN07:
Pressing the button = > PIN07 / GPIO04 is 3,2V
Releasing the button = > PIN07 / GPIO04 is 3,2V
In the moment where the RPI switches also the speakers (USB…because i am using an external USB SoundCard) off (i hear a quitly “clack”) the voltage from the PIN07 / GPIO04 drops to zero and after (about half a second) back to 3,2V
Where is stays…

Can please somebody help me?
What can i do to debugg this problem?
May be OnOffShim does have an error

Thanks a lot for your help
Regards

Are you running Raspbian? And did you run the installer for the shutdown daemon?
curl https://get.pimoroni.com/onoffshim | bash

I am running raspian buster
Yes i did
And i have configured the according file
The switch off works…but not till the end
Seems to me that some script say “halt”, but i think it should be “shutdown”
thanks

The command I use in my python files is as follows.
os.system("sudo shutdown now -P")
Keep in mind I don’t own or use the On Off Shim. This is what I use to properly shutdown Raspbian on my headless setups that don’t have a keyboard or monitor attached.

What file did you configure? I didn’t see any mention of that on the product page?

I use the following one:
/etc/cleanshutd.conf

Look also here:

I need to have the possiblity to switch off the Rpi (with a button) and with the same button to switch it back to on
Like in the yt video

I think the script does not send the correct command (like halt instead of shutdown)
But i do not know where to search for

What GPIO pins does the OLED display use? Maybe you have a GPIO conflict?
The On Off shim pinout is here.


The Pi sends a signal back to the shim VIA GPIO 4 that tells the shim to turn the power off. If that doesn’t happen, the on function won’t work. GPIO 17 is the signal from the button that tells the Pi to shut down the OS. Assuming I’ve read the product page correctly.

Thanks
I have checked it 100times
And the pi is powered down (network and so on is going down)
== > But not complety…seems to me like not the shutdown command is not correct.

The oled display works fine…but does stay active (because the pi is not completly off)
Where do you get you informations from?
Thanks

On the product page it says the following.

It watches the state of BCM pin 17 and, when pulled low (pressed), it initiates a clean shutdown. Last thing, just before your Pi shuts down, BCM pin 4 is pulled low to completely cut power to your Pi.

It sounds like the on off shim is not completely removing power to the Pi. A stock raspberry Pi, when shut down but left powered, will still supply voltage to the +5V GPIO pin. The USB ports will also have power. No data is being sent as the Pi is shut down, but power is till present.

EDIT: When working correctly, the On Off shim will remove power to the Pi. When on it feeds the +5V from the power supply to the Pi VIA the +5V and Ground pins. When off the +5V is removed and the Pi is completely unpowered, like it would be if you unplugged the power supply.

At this point I have to ask the obvious. Do you have the power supply plugged into the On Off shim?

EDIT: 2 How do you have the On Off shim hooked up, soldered on or with jumpers?

Yes power supply i plugged to the usb port of the onoffshim

I have connected them with jumpers

I think the OnOffShim is defect…

Once i press the shutdown button and everything goes off…the pi is in “off state” (only the red led is active).
Same like if i am sending via console “sudo shutdown”.

But the OnOffShim still poweres the RPI with 5V.
And in my opinion this is not ok

Ok, double check that you haven’t missed one of the ground pins on the On Off Shim.
Pins 6 and 9 have to be grounded. As per the pinout I posted earlier.

Yes i did it

OnOffShim does not correctly switches the 5V off
It does it shortly (about 0,5s) but it switches the 5V back to on (i have measured it)

Ok, I don’t have any more ideas? You could always contact Pimoroni Tech support.
https://shop.pimoroni.com/pages/contact-us
I’d put a link to this thread in your support e-mail

One question
Which commant (information) needs the OnOffShim to switch the 5V to off.
I mean, what is the trigger to switch the 5V off

Thanks

I am using the PI3B V1.2 with Buster image

If i am running

sudo /lib/systemd/system-shutdown/gpio-poweroff poweroff

The PIs starts powering down but stays in it idle state…red LED on and display on.

It watches the state of BCM pin 17 and, when its pulled low (button pressed), it initiates a clean shutdown.

Last thing, just before your Pi shuts down, BCM pin 4 is pulled low to completely cut power to your Pi.

It’s not the shut down command your using thats the issue. There is no shutdown command that will turn the power off on a Pi. The Red LED will always be on if the power supply is plugged in.
Thats what the on off shim is for. The issue as I see it is either the on off shim is defective, or its not getting the signal it wants from the Pi on GPIO 4.
At this point if it was me, I’d reimage my SD card with a stock image of Raspbian. And rerun the on off shim installer. Get everything back the way its intended to be. Then see if it works and go from there.

I am totally going crazy here ;-)

  • i have reveiced today a new OnOffShim
  • i have changed to wires tp GPIO4 and 17 with new ones
  • i have deleted my sd card
  • installed raspian buster image again
  • updated it
  • installed a monitor and mouse an keyboard
  • installed XRDP (Remote access)
  • installed the "one line installer “curl https://get.pimoroni.com/onoffshim | bash”
  • changed the “/etc/cleanshutd.conf” to
    daemon_active=1
    trigger_pin=17
    led_pin=25
    poweroff_pin=4
    hold_time=2
    shutdown_delay=0
    polling_rate=1
    == > Nothing is connected to GPIOs except OnOffShim
  • presses the OffButton
    ==> Monitor report me BCM17 is set to zero, system is going to shutdown
    ==> the red Led stays on and pressing again the OffButton the system does not start…

This is hard…
Next step
Doing the above sequence with anotherr PI (i have here a PI 2 Model B V1.1

I am going crazy…puhhh

May be something wrong with the GPIO Ports from RPI
Can i change the GPIO Ports (eg to 20 and 21)?

Thanks