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

Power management #11

Merged
merged 3 commits into from
Nov 1, 2023
Merged

Power management #11

merged 3 commits into from
Nov 1, 2023

Conversation

washed
Copy link
Owner

@washed washed commented Oct 31, 2023

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?

@washed washed requested a review from tmh-alex October 31, 2023 20:41
This was referenced Oct 31, 2023
Copy link
Collaborator

@tmh-alex tmh-alex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@tmh-alex
Copy link
Collaborator

tmh-alex commented Nov 1, 2023

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
Copy link
Collaborator

tmh-alex commented Nov 1, 2023

Alternative: normally-closed MOSFET

@washed
Copy link
Owner Author

washed commented Nov 1, 2023

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
Copy link
Owner Author

washed commented Nov 1, 2023

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.

Copy link
Collaborator

@tmh-alex tmh-alex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤞

@washed washed merged commit 770eef6 into main Nov 1, 2023
1 check passed
@washed washed deleted the power-management branch November 1, 2023 20:20
washed added a commit that referenced this pull request Nov 8, 2023
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

Successfully merging this pull request may close these issues.

3 participants