[Pre-Order] Safe Shutdown Switch (BangGood Edition) - Closed

Sell or trade things with other forum members!
User avatar
Camble
Posts: 885
Joined: Thu May 05, 2016 2:31 am
Location: Scotland
Has thanked: 269 times
Been thanked: 488 times

Re: [Pre-Order] Safe Shutdown Switch (BangGood Edition) - Closed

Post by Camble » Tue Dec 27, 2016 9:35 am

@Tomarse I suspect I've introduced a bug into the script with my recent additions. If you connect your low battery GPIO pin directly to 3.3v for now, that will bypass the issue. I'll see what I can do with the script.

User avatar
rodocop
Posts: 1723
Joined: Mon Aug 22, 2016 3:14 pm
Location: Saskatchewan
Has thanked: 606 times
Been thanked: 608 times

Re: [Pre-Order] Safe Shutdown Switch (BangGood Edition) - Closed

Post by rodocop » Tue Dec 27, 2016 11:58 am

@Camble

So I tested voltage. When running I get 3.27V.

Also note, I followed through git hub instructions to get the latest script. I removed the jumper wire and still get the auto shut down right away.

User avatar
Camble
Posts: 885
Joined: Thu May 05, 2016 2:31 am
Location: Scotland
Has thanked: 269 times
Been thanked: 488 times

Re: [Pre-Order] Safe Shutdown Switch (BangGood Edition) - Closed

Post by Camble » Tue Dec 27, 2016 1:21 pm

@Robocop @Tomarse 3.27v is fine. That should be the voltage at which the low battery alert appears. I will have a look at the script tomorrow and see what I can come up with.

User avatar
rodocop
Posts: 1723
Joined: Mon Aug 22, 2016 3:14 pm
Location: Saskatchewan
Has thanked: 606 times
Been thanked: 608 times

Re: [Pre-Order] Safe Shutdown Switch (BangGood Edition) - Closed

Post by rodocop » Tue Dec 27, 2016 5:51 pm

@Camble
Camble wrote:@Robocop @Tomarse 3.27v is fine. That should be the voltage at which the low battery alert appears. I will have a look at the script tomorrow and see what I can come up with.
Thanks for looking into this, I appreciate it!

I mentioned about the auto shutdown because of this post that you mentioned you removed the automatic shutdown in the latest version, but mine still auto shuts down with the latest version. Either way i still have the jumper wire and everything else works great. I can wait for a fix.
Camble wrote:@Tomarse Measure the voltage at pin 2 of the LM393 chip while the Gameboy is on.

https://github.com/Camble/GBZ-Power-Monitor_BG

Please download the latest version. I've removed the automatic shutdown for now. I'm currently working on a complete replacement which will warn a few times before deciding to shut down, rather than forcing a shutdown so soon. The number of warnings and timeout can then be tweaked by the user.

User avatar
Camble
Posts: 885
Joined: Thu May 05, 2016 2:31 am
Location: Scotland
Has thanked: 269 times
Been thanked: 488 times

Re: [Pre-Order] Safe Shutdown Switch (BangGood Edition) - Closed

Post by Camble » Wed Dec 28, 2016 4:07 am

@robocop I'm dumb. I made the change but never pushed it to github. I'll do that when I get home today.

User avatar
Camble
Posts: 885
Joined: Thu May 05, 2016 2:31 am
Location: Scotland
Has thanked: 269 times
Been thanked: 488 times

Re: [Pre-Order] Safe Shutdown Switch (BangGood Edition) - Closed

Post by Camble » Wed Dec 28, 2016 7:22 am

@robocop @paddy @Tomarse

Please try re-downloading the script again. It should work as intended now. I re-enabled the pull-up on the GPIO pin.

The automatic shutdown is still not implemented, just the warning.

User avatar
rodocop
Posts: 1723
Joined: Mon Aug 22, 2016 3:14 pm
Location: Saskatchewan
Has thanked: 606 times
Been thanked: 608 times

Re: [Pre-Order] Safe Shutdown Switch (BangGood Edition) - Closed

Post by rodocop » Wed Dec 28, 2016 8:17 am

@camble

Updated script, removed jumper wire. No auto shut down at start up now.

Tomarse
Posts: 6
Joined: Mon Dec 26, 2016 3:46 pm
Has thanked: 2 times
Been thanked: 3 times

Re: [Pre-Order] Safe Shutdown Switch (BangGood Edition) - Closed

Post by Tomarse » Fri Dec 30, 2016 10:36 am

@Camble

I have updated the script, but when I run it to test it it doesn't work. Emulation station becomes unresponsive and then the script seems to crash with:

Code: Select all

pi@retropie:~ $ python ~/GBZ-Power-Monitor_BG/gbz_power_monitor.py
Traceback (most recent call last):
  File "/home/pi/GBZ-Power-Monitor_BG/gbz_power_monitor.py", line 90, in <module>
    main()
  File "/home/pi/GBZ-Power-Monitor_BG/gbz_power_monitor.py", line 86, in main
    GPIO.add_event_detect(powerGPIO, GPIO.RISING, callback=powerSwitch, bouncetime=300)
RuntimeError: Failed to add edge detection
sys.excepthook is missing
lost sys.stderr
sys.excepthook is missing
lost sys.stderr
pi@retropie:~ $

User avatar
Camble
Posts: 885
Joined: Thu May 05, 2016 2:31 am
Location: Scotland
Has thanked: 269 times
Been thanked: 488 times

Re: [Pre-Order] Safe Shutdown Switch (BangGood Edition) - Closed

Post by Camble » Sun Jan 01, 2017 6:15 am

@Tomarse I'm unable to replicate that problem. Are you getting it consistently?

Tomarse
Posts: 6
Joined: Mon Dec 26, 2016 3:46 pm
Has thanked: 2 times
Been thanked: 3 times

Re: [Pre-Order] Safe Shutdown Switch (BangGood Edition) - Closed

Post by Tomarse » Sun Jan 01, 2017 7:51 am

Camble wrote:@Tomarse I'm unable to replicate that problem. Are you getting it consistently?
I have just tried it again and it seems to run without error now and I have just added it into cron

I think that at the time when i first tried it my battery was very very low as shortly after that it started cutting out. I have since charged it up fully.

the device still kernel panics when i shutdown now though :(

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest