Tackling Graceful Shutdowns on the GBZ

Various user-contributed guides for software-related things
User avatar
Camble
Posts: 885
Joined: Thu May 05, 2016 2:31 am
Location: Scotland
Has thanked: 269 times
Been thanked: 488 times

Re: Tackling Graceful Shutdowns on the GBZ

Post by Camble » Sat Jun 11, 2016 7:02 am

Felix wrote:@Camble, I think I found a solution but it actually makes the pololu obselete. The solution is mechanical in the meaning of a small relay switch. I'll attach a picture of the wiring.
Good thinking. I hadn't considered a relay.

User avatar
Popcorn
Trailblazer
Trailblazer
Posts: 354
Joined: Thu May 05, 2016 12:58 am
Location: Berlin
Has thanked: 29 times
Been thanked: 71 times

Re: Tackling Graceful Shutdowns on the GBZ

Post by Popcorn » Sat Jun 11, 2016 8:51 am

Felix wrote:@Camble, I think I found a solution but it actually makes the pololu obselete. The solution is mechanical in the meaning of a small relay switch. I'll attach a picture of the wiring.
Hey, interesting! Can I see a working model?

User avatar
Felix
Posts: 44
Joined: Wed May 11, 2016 7:17 am
Location: Antwerp, Belgium
Has thanked: 3 times
Been thanked: 12 times

Re: Tackling Graceful Shutdowns on the GBZ

Post by Felix » Sat Jun 11, 2016 9:00 am

Camble wrote:
Felix wrote:@Camble, I think I found a solution but it actually makes the pololu obselete. The solution is mechanical in the meaning of a small relay switch. I'll attach a picture of the wiring.
Good thinking. I hadn't considered a relay.
Yeah, but now I'm trying to find if a depletion mosfet can do the same as the relay, because i think the relay takes to much current and also the big magnetic field that the relay creates if it's an interferance to the electronics. Also @Popcorn I don't have the material to do so, I'm only doing this theoritical.

User avatar
Felix
Posts: 44
Joined: Wed May 11, 2016 7:17 am
Location: Antwerp, Belgium
Has thanked: 3 times
Been thanked: 12 times

Re: Tackling Graceful Shutdowns on the GBZ

Post by Felix » Sat Jun 11, 2016 9:19 am

Also @Popcorn the resistance behind the transistor isn't yet calculated.

User avatar
Popcorn
Trailblazer
Trailblazer
Posts: 354
Joined: Thu May 05, 2016 12:58 am
Location: Berlin
Has thanked: 29 times
Been thanked: 71 times

Re: Tackling Graceful Shutdowns on the GBZ

Post by Popcorn » Sat Jun 11, 2016 9:24 am

Keep us posted. Happy to adopt your modal if it works.

User avatar
Felix
Posts: 44
Joined: Wed May 11, 2016 7:17 am
Location: Antwerp, Belgium
Has thanked: 3 times
Been thanked: 12 times

Re: Tackling Graceful Shutdowns on the GBZ

Post by Felix » Sat Jun 11, 2016 9:56 am

Popcorn wrote:Keep us posted. Happy to adopt your modal if it works.
Will do, also can you measure what the voltage is between the EN pin and GND.

User avatar
Popcorn
Trailblazer
Trailblazer
Posts: 354
Joined: Thu May 05, 2016 12:58 am
Location: Berlin
Has thanked: 29 times
Been thanked: 71 times

Re: Tackling Graceful Shutdowns on the GBZ

Post by Popcorn » Sat Jun 11, 2016 12:25 pm

Felix wrote:
Popcorn wrote:Keep us posted. Happy to adopt your modal if it works.
Will do, also can you measure what the voltage is between the EN pin and GND.
Can't until after the weekend. According to the spec, it pulls up to VBAT

manzel
Posts: 11
Joined: Fri May 06, 2016 9:07 am
Been thanked: 2 times

Re: Tackling Graceful Shutdowns on the GBZ

Post by manzel » Mon Jun 13, 2016 7:23 am

I tried to build this last night according to the instructions on Github. It did not work because I never got any voltage out of the Pololu. There were 5 V on VIN, the switch was in OFF position and I connected GND and SW with the GB switch. VOUT was 0 V, however.
I then looked up the documentation and found this part:
If the physical switch is in the “off” position, the switch state can also be controlled by a digital signal (e.g. from a microcontroller) via the “ON” control pin. Driving the “ON” pin low (or leaving it disconnected) will leave the switch off; driving the pin beyond approximately 1 V will turn the switch on.
How is it supposed to work? ON is connected to the GPIO BCM 14 which should not carry any voltage before the Pi is on, right? Then the switch could never be turned on.
Or do I have to install the software part on the Pi at first before the hardware works?

User avatar
Felix
Posts: 44
Joined: Wed May 11, 2016 7:17 am
Location: Antwerp, Belgium
Has thanked: 3 times
Been thanked: 12 times

Re: Tackling Graceful Shutdowns on the GBZ

Post by Felix » Mon Jun 13, 2016 8:32 am

manzel wrote:I tried to build this last night according to the instructions on Github. It did not work because I never got any voltage out of the Pololu. There were 5 V on VIN, the switch was in OFF position and I connected GND and SW with the GB switch. VOUT was 0 V, however.
I then looked up the documentation and found this part:
If the physical switch is in the “off” position, the switch state can also be controlled by a digital signal (e.g. from a microcontroller) via the “ON” control pin. Driving the “ON” pin low (or leaving it disconnected) will leave the switch off; driving the pin beyond approximately 1 V will turn the switch on.
How is it supposed to work? ON is connected to the GPIO BCM 14 which should not carry any voltage before the Pi is on, right? Then the switch could never be turned on.
Or do I have to install the software part on the Pi at first before the hardware works?
So when you turn on the switch let's say to the left for "on" state, the left and middle pins of the switch are closed and carries a connection to the pololu to turn on. When you shut it off you switch the switch to the the right so the middle and right pin are closed and sends a signal to the rp0 to shutdown. The left pin is now open and not sending a signal to the pololu so it can be shut off, but the rp0 sends a signal to the "ON" on the pololu so that if you switch the switch to off that the pololu stays on by the rp0 after the rp0 shuts down it will stop the signal to the pololu and then the pololu shuts down.

manzel
Posts: 11
Joined: Fri May 06, 2016 9:07 am
Been thanked: 2 times

Re: Tackling Graceful Shutdowns on the GBZ

Post by manzel » Mon Jun 13, 2016 9:45 am

I understood that so far. But how does the Pi turn on at first when there is no voltage on the ON pin of the pololu because the Pi is still off?

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest