This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Setting GPIO on Shutdown?
#1
Hello,

I'm currently looking at using a UPS with a Tinkerboard S, running the latest version of Tinker OS

(I can't post links but it's a 5V Juice4Halt unit)

GPIO Pin 22 is used for comms between the UPS and tinkerboard this is handled by a script provided by the manufacturers that can be started on boot.

The script is written for a Pi so I've modified it in order to map pin 22 correctly (171 on the Tinkerboard)

My problem is at shutdown, with a Pi when halt is executed it seems to automatically set pin 22 to high, the UPS listens for this change and cuts the power once detected leaving both the pi and the ups powered down.

However this gpio set doesn't occur with the Tinkerboard, so once power is lost the Tinkerboard shutsdown but the UPS is left active as pin 22 is still low and I have to wait for the battery to fully drain.

I can manually set the pin before halt and this works but this will cut the power before the Tinkerboard has had chance to shutdown.

So, is there a way to set pin 22 to high once the Tinkerboard has performed all it's shutdown procedures? 

I've seen something about dtoverlays being used on the pi to specify pin status on poweroff, is there anything equivalent on the Tinkerboard?

Or are there any pins that do turn high on shutdown that I could use instead?

Thanks
Reply
#2
You should add a middle man and use some little electronic component. So the TB will issue a change to the GPIO, but the electronic timer will change after a certain amount of time to let the TB shut down properly.
Light blue words might be a link. Have you try to click on them? Big Grin
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)