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

Put momobox to sleep when not being used #16

Open
blairfrandeen opened this issue Mar 18, 2023 · 1 comment
Open

Put momobox to sleep when not being used #16

blairfrandeen opened this issue Mar 18, 2023 · 1 comment

Comments

@blairfrandeen
Copy link
Owner

The firmware runs continuously when the batteries are connected. Goal is to have the pico go into sleep mode after some amount of idle time, and then awake upon a signal from the hall sensor.

A good starting point with resources is here: https://ghubcoder.github.io/posts/deep-sleeping-the-pico-micropython/

May be better to also read this post about dormant and sleep modes: https://ghubcoder.github.io/posts/awaking-the-pico/

This is micropython based (momobox currently uses circuit python), so may not be fully applicable.

A good thing to start with is to measure the current draw from the batteries during the following operations:

  • idle time
  • RFID request
  • playing a song
  • song paused
@blairfrandeen
Copy link
Owner Author

Some measurements made with a DMM:

Condition Current Draw [mA]
Standby 65.6
Playing 70-110
Paused 68.6
RFID Chip present without magnet 70.6
Magnet present, no RFID 69.5
RFID, no magnet, after magnet had been activated 74
Crashed 45

The 2X batteries I'm using have a capacity of 1500 mAh (3000 total). 3000 mAh / 70 mA = 42 hours
This operating time matches our experience with the momobox so far, although we typically get to about 24-30 hours before it turns off.

It may be promising to reduce power usage by rewriting the firmware in a lower level language that isn't constantly running an interpreter. For comparison, running "blinky" in Rust only takes 22-24 mA

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

1 participant