OnOff SHIM Not Rebooting - Raspberry Pi 3 B+

First post here! Hoping someone can shed some light on this…

I am in the process of building a Raspberry Pi for a Kiosk-type touchscreen setup. Because of this, I purchased the OnOff SHIM to easily power it on and off when needed without having to open our case for the Pi and Touchscreen.

Here is what I am currently running:

  • Raspberry Pi 3 B+ (Production Date: 2017 on board)
  • Fresh install of Raspbian Stretch (11/13/2018 Build)
    ( I have also tried it with the GUI and light versions of Stretch and Jessie)
  • Using the OnOff SHIM solder to the risers that came with the kit, pictured below:

I have run the: “curl https://get.pimoroni.com/onoffshim | bash” on each of the fresh installs with no errors popping up. If I manually run “sudo /lib/systems/system-shutdown/gpiopoweroff poweroff” Then it will cleanly shut down the board with the verbose messages showing the correct pins 17 & 4”. However, a button press on the SHIM or with an attached button to the button pads results in nothing happening.

I have scoured this forum as well as a few YouTube videos for a fix, but have come up with nothing.

If anyone can assist with this I would greatly appreciate it. It is the only thing only holding back my project at the current time. Thanks again!

Also: I do not have 1-Wire enabled and all other values are set to the standard image from the Raspbian website.

You have to hold the button down for at least one second to do a shut down.
Just to clarify, it turns on OK, just won’t shut down with a button press?

Yes. It does power on just fine, just does not shut down.

I have tried it by holding the onboard button for 1 second and a secondary momentary button as well. I have also edited the .conf file to change the delay to 0.

Ok, just wanted to be sure what was and wasn’t working. Do you have a volt meter? If yes check the voltage on the GPIO pin 7 / BCM 4 to see if it goes low when you press the button. Other than that I don’t know what else to look at? I don’t have one to do my own tests.
If you think its defective go to the Shop page. Then click the contact us link at the bottom. I’d put a link to this thread in the contact e-mail. Then see what they say.

1 Like

Gotcha. I will check that as soon as I get home tonight and report back what I’m seeing.

It is a really weird issue, and this is my first interaction with this board as well. It seems pretty straight forward for the hardware and software install.

Thanks again!

Sorry for the late reply!

Testing with a volt meter shows it constant at 3.3Volts. At this point I am stummped. I am going to send them a message for a replacement one. Thanks again.

If anyone else has any other ideas I am willing to try anything at this point to get this project moving along.

Sounds like a hardware fault to me. That has to go low for the software to work.
I think its a good move to send them a direct message via the “contact us” option.

1 Like

Update on this:

Contacted them and they are sending a replacement, still waiting on the replacement.

Here is something that might be of help:

  1. Soldered a regular toggle switch onto the BTN slots.
  2. Installed a fresh version of Raspbian Stretch Lite.
  3. Ran “sudo apt-get update && sudo apt-get upgrade”
  4. Ran “curl https://get.pimoroni.com/onoffshim | bash”

I am then able to boot the Pi with the toggle switch to the ON position. Light stays solid on the OnOff board. Running “sudo raspi-gpio get 17” I see the current status is: “level=1 fsel=0 func=INPUT”. Putting the toggle switch into the OFF and checking GPIO status shows the same “level=1 fsel=0 func=INPUT” status. With the toggle switch in the OFF position, I can simulate the pulldown by running “sudo raspi-gpio set 17 pd”, then the Pi will shut down power will be cut to the Pi as expected. If you leave the toggle switch in the ON state the Pi will still shut down by simulating the pull down function, but the power will stay on for the Pi instead of going out after the shutdown.

Trying this with the momentary switch on the board as well as another momentary switch connected to the BTN ports returns the same status “level=1 fsel=0 func=INPUT”, but can be simulated via the “sudo raspi-gpio set 17 pd” command.

Just wanted to add that extra info if this issue makes sense to anyone else. Until then, I’ll update when I receive the new board.

Thanks again!

Momentary contact ( only on while being pressed) is what you want. Its how the actual button on the shim works. I’m thinking using a toggle switch that latches on may cause your Pi to turn off, on, off, on.
On a fully working on off shim anyway.

Sorry made a typo in the last response. I tried the momentary button as well, but same symptoms.

I am starting to suspect the issue is with my GPIO pins on the Pi. Testing them now. I just bought this Pi too.

image

I FIGURED IT OUT!!! In testing the pins with some python code, I was able to get the board to shut the pi down. Once I was able to duplicate it, I created a test python file and added it to my rc.local file:

import RPi.GPIO
import time

GPIO.setmode(GPIO.BCM)
print('Set BCM Mode')
print('')
time.sleep(0.5)


GPIO.setup(17, GPIO.IN)
print('Setup GPIO 17 as INPUT')
print('')
time.sleep(2)

exit

Now once the Pi boots and all work as normal. Able to use the momentary push button on the board as well as a solder push button to the BTN pads. Thanks again!

did you try powering the Pi and not the onOff shim and see if the shim button works …just a though, i use one with out issue ,but i dont power the pi through it …

That suggests to me its a software issue? Something isn’t right with the Pimoroni installer or something?
Are you running any other code and or hardware on that Pi?

No. Nothing at all.

Fresh install of the current raspbian and then the one step installer for the onoff shim.

Ok, just wanted to rule out another software install messing something up.
Color me confused?

1 Like

You and me both. I have a work around for a momentary button, and with a little more tweaking, I can get the analog switch to work as well. The project I am working on is for an analog panel to run a generator in a standby configuration. So, the panel needs to match (just my OCD preference). If it doesn’t work with the analog switch, I was able to find a momnetary single pole switch that will match.

Just a FYI post. Any model 3 Pi B, B+, A+ can be turned on off with a push button and one line of code added to the config.txt. Momentarily grounding GPIO 3 Pin 5 will boot them up. And with a config.txt edit, momentarily grounding it again will do a proper shutdown. It won’t kill the power in though. Thats actually needed to do the boot up.
I have an A+ that I do the shutdown via GPIO. The shutdown code is added to the python file it runs on bootup. That Pi runs headless with no keyboard mouse of monitor.

Gotcha. I may go that avenue if this board gives me anymore trouble. Thanks for the info!