washed / drempelbox

0 stars 0 forks source link

Power management #11

Closed washed closed 9 months ago

washed commented 9 months ago

Amp shutdown

Changed the amp shutdown control to use a non-inverting circuit which is in a normally off state whenever the 12V rail is powered. This fixes a problem with the previous design, where the amp would turn on when the Pi was shutdown and its output would go low or high-z. This would cause unnecessarily high idle current, which in turn means we cannot exploit the power banks auto turn off feature. This part of the circuit has been tested in hardware; resistor values are wild guesses but seem to work well.

Pi latching on/off

Inspired by some common circuits on the internet, put in something that could give a neat power up/down latching circuit. Please see description in the schematic. Not tested in hardware yet (i only have some ridiculously high powered NFETs at hand; appropriate stuff is on the way). What do you think?

tmh-alex commented 9 months ago

I have one idea how to fix this behaviour, but that works only under the assumption that SD at VDD turns the amp on and there are no other side effects (would be great to have the topology behind the SD port):

sd_latch_idea

This would default the SD pin to GND when everything's powered off.

tmh-alex commented 9 months ago

Alternative: normally-closed MOSFET

washed commented 9 months ago

I tried the emitter follower configuration you showed as well. Unfortunately the SD pin seems to be rather low impedance. Even 10k pull down was not enough. We need drive it to ground hard.

washed commented 9 months ago

Great improvement, that will -most- likely fix the standby current issue. Something's bugging me though, and that's a hypothetical race condition:

  1. Pi and Amp in de-facto standby, very low current drawn
  2. Decoy turns off, R2 is floating, and so is SD
  3. Amp maintains VDD for a little while longer because of it's high supply capacitance
  4. Amp sees a floating SD and turns on
  5. Decoy turns on

Does that make sense?

Hm that could be a problem. But I think it's fine. I'll try to get my scope on there and see if there is a blip on SD when the power bank shuts down. I have the feeling that when the power bank decides to shut off, it shuts off.