Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug : power on/off doesn't work #157

Open
JuliAn50M opened this issue Apr 16, 2020 · 5 comments
Open

Bug : power on/off doesn't work #157

JuliAn50M opened this issue Apr 16, 2020 · 5 comments

Comments

@JuliAn50M
Copy link

My photo frame has switch on GPIO 26.
Settings are :

  • GPIO 26
  • Power saving measures should : Use schedule.

switch off : works only with setting "Power saving measures should : Not be used"
switch on doesn't work at all.
Is it normal ?
Thanks

@mrworf
Copy link
Owner

mrworf commented Apr 16, 2020

It should be a momentary switch, ie, you press to make contact and then it releases. It should work regardless of power saving though. Can you try with that kind of switch and let me know how it works? Also, if you could attach a log if it still doesn't work that would be great :-) Thanks

@MrMonkeysFriend
Copy link

Also not working for me. Power off works fine, but Power on seems to dont do anything. Used momentary switch.
Is there a solution available?
Thanks in advance

@n7njo
Copy link

n7njo commented Sep 28, 2020

Great job @mrworf, you've produced something very cool and practical !
I've already made two photoframes from old laptop screens and Pi Zero Ws with handmade frames out of maple, both have been very well received... especially the blur function. I'm planning to make at least two more before the end of the year!
However, just like @MrMonkeysFriend I've not been able to get "power on" to work with GPIO 26 whether using a momentary or permanent switch, with or without a pull up resistor. While photoframe is running, grounding GPIO 26 works perfectly to gracefully shutdown the Pi, but once powered off 0v or 3.3v to GPIO26 won't wake the Pi, you have to remove and reconnect the power supply to boot the Pi. I'd attach logs if I felt they would be of use, but since the issue is when powering on I can only imagine it to be my configuration.
I'm thinking about connecting another momentary switch to the "run" pins to perform a reset, but then it's moving away from simple to use.

@mrworf
Copy link
Owner

mrworf commented Sep 28, 2020

I think this is old info on my part.

If you change the setting in the photoframe to 3 from 26, and then connect your power button to pin 5 (gpio 3) and pin 6 (gnd), it should work to power on/off. This is based on info from https://howchoo.com/g/mwnlytk3zmm/how-to-add-a-power-button-to-your-raspberry-pi

Drawback with GPIO 3 is that it's also the I2C bus, which means you won't be able to use any I2C peripheral devices. Also, don't leave GPIO 3 continuously GNDed, since that will trigger safe mode (config.txt is ignored). If this happens a lot, you could disable safe mode by adding

avoid_safe_mode=1

to your config.txt, but I'd be weary of doing that.

@n7njo
Copy link

n7njo commented Sep 28, 2020

Thanks for a quick response!
I'll test if that works but as you called out that would mean I couldn't use the TCS34725 over I2C to handle colour balance and auto shutoff in the dark.
I guess I could use the rocker switch to break the power connection to the Pi, and add a momentary switch to trigger the graceful shut via GPIO 26.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants