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 on NFC #3

Open
tmh-alex opened this issue Oct 28, 2023 · 4 comments
Open

Power on NFC #3

tmh-alex opened this issue Oct 28, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@tmh-alex
Copy link
Collaborator

What

If the Drempelbox is in standby, placing a tag on the reader wakes it up and starts playing right away.

Why

Improved user experience with the user base "babies" in mind.

Open questions

  • How to poll the reader while in standby?
  • What does standby mean? Raspi in low-energy state? Raspi turned off and power supply reacting on plugin signal?
@tmh-alex tmh-alex added the enhancement New feature or request label Oct 28, 2023
@washed
Copy link
Owner

washed commented Oct 29, 2023

This is super interesting.
Raspis don't really have low power states (like in ACPI compliant systems, for example). Afaik there is the halt state which shuts the OS down but keeps the bootcode in cache. The OS can be booted from this state via GPIO input. That might be one option. It will however be a mostly regular linux boot. Stuff like suspend to RAM does not exist for the Pi afaik.
A few options i could think of:

  • keep the pi running, maybe try to shutdown cores or as much peripherals as possible, also keep the amp off and define this as our standby. NFC and the app (or a part of the app?) could keep running and watch the NFC reader.
  • use a secondary MCU, also connected to the NFC reader, polling it regularly if the Pi is off. When it detects the presence of a token, boot the Pi and relinquish the SPI bus (tristate the pins). This could give us a bit more advanced power management stuff in general. Perhaps it will turn it, we need an extra MCU anyway. I hope not.
  • in addition to the NFC reader, place a reed-relay, a magnetic or capacitive proximity sensor, or similar, where the presence of a figurine would trigger it, this could boot the Pi from aforementioned halt or off state

@washed
Copy link
Owner

washed commented Oct 30, 2023

The simplest way would probably be the reed relay, which comes with the added benefit that it does not require power. It would mean we need a magnet in every figurine instead of in the base. Sure, we could also use an integrated, low force push button on the reader side, but to me this somehow breaks the very "non-mechanical" feel of the nfc interface. What do you think?

@washed
Copy link
Owner

washed commented Oct 31, 2023

Reed relais were on sale at Reichelt and i needed some small bits and pieces anyway. I guess this is something we can start to work on when the MVP is done/close.

@tmh-alex
Copy link
Collaborator Author

tmh-alex commented Nov 1, 2023

Certainly not an MVP thing. I don't like having mechanical components (other than the chassis, obviously) either, so let's focus on your first two bullets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants