plasticus
Posts: 34
Joined: Tue Nov 01, 2016 10:31 pm

power switch not working

Fri Jan 27, 2017 11:12 pm

Hi there, I purchased the power swithc from Pi Supply but for some reason it's not working with my Rasp 3..I checked the circuit for shorts multiple times, but it looks fine, I followed the tutorial and I'm using the interrupt script but it doesn't give any life sign. I also tried the while loop script but same result. I need some help debugging as right now I'm not even sure if the script is called or not (if I run ps aux in the terminal I don't the script but I'm not sure if I should see it there).

line in my /etc/rc.local

Code: Select all

python /home/pi/bin/softshut.py &
the softshut.py is exactly the same found here(interrupt version): https://www.pi-supply.com/pi-supply-swi ... -examples/

Basically after writing the script I just shut down the pi, connect the power-switch and trying to turn it on with its on button but nothing.

Thanks

User avatar
B.Goode
Posts: 10356
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: power switch not working

Fri Jan 27, 2017 11:25 pm

I might be misunderstanding, but it looks to me as though the code you have linked to is used to shut the RPi Operating System down, not to start it up.

plasticus
Posts: 34
Joined: Tue Nov 01, 2016 10:31 pm

Re: power switch not working

Sat Jan 28, 2017 12:16 am

Ok, I changed the code as that one seemed outdated. I followed this https://github.com/PiSupply/Pi-Supply-Switch but still no sign of life..it won't turn on..and the switch is made to be able to turn on and off. In addition (I guess this is due to the script), if now I plug it with the normal power source it will boot up and then immediately shutdown by itself..

klricks
Posts: 7154
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: power switch not working

Sat Jan 28, 2017 12:48 am

plasticus wrote:Ok, I changed the code as that one seemed outdated. I followed this https://github.com/PiSupply/Pi-Supply-Switch but still no sign of life..it won't turn on..and the switch is made to be able to turn on and off. In addition (I guess this is due to the script), if now I plug it with the normal power source it will boot up and then immediately shutdown by itself..
When the RPi is shut down the CPU and of course the OS is halted so the RPi cannot respond to any code in that state.
The switch also totally removes power from the RPi after a short time...... So only a hardware solution can turn it back on.

The only purpose of the code is to gracefully shut down a running RPi..... nothing else.

The very last line in your link tells you how to start the RPi:
Press the Soft button and keep pressed for a reboot.
If that does not work then there is something wrong with the switch board.
Unless specified otherwise my response is based on the latest and fully updated RPiOS Buster w/ Desktop OS.

plasticus
Posts: 34
Joined: Tue Nov 01, 2016 10:31 pm

Re: power switch not working

Sat Jan 28, 2017 1:43 am

The very last line in your link tells you how to start the RPi:
Press the Soft button and keep pressed for a reboot.
well but I don't have to reboot :) ..I just have to turn it on..but pressing the on button doesn't do nothing..as per instruction from the github page
Press the On button to power on the Raspberry Pi.

klricks
Posts: 7154
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: power switch not working

Sat Jan 28, 2017 2:05 am

plasticus wrote:......Press the On button to power on the Raspberry Pi.
If that does not work then there is something wrong with the switch hardware.
Unless specified otherwise my response is based on the latest and fully updated RPiOS Buster w/ Desktop OS.

plasticus
Posts: 34
Joined: Tue Nov 01, 2016 10:31 pm

Re: power switch not working

Sat Jan 28, 2017 5:04 am

klricks wrote: If that does not work then there is something wrong with the switch hardware.
cool, that's a starting point..I was really sure the circuit was fine..will unsolder it and do it again..

plasticus
Posts: 34
Joined: Tue Nov 01, 2016 10:31 pm

Re: power switch not working

Sat Jan 28, 2017 5:24 pm

update: I checked the circuit, particularly the transistors for shorts, but everything looks right to me. :( Any suggestion about where probably the issue with the hardware might be?

thanks

plasticus
Posts: 34
Joined: Tue Nov 01, 2016 10:31 pm

Re: power switch not working

Mon Jan 30, 2017 9:22 am

update 2: I haven't found the issue yet but I found this https://github.com/gilyes/pi-shutdown which works wonderfully..the question now is why should I need the piSupply switch? :lol:

Return to “HATs and other add-ons”