esphome / esphome/feature-requests

Support sleep mode for Grow Fingerprint sensor

Open
#1,672 9 comments 0 reactions 0 assignees View on GitHub
component: fingerprint_grow
Dominant language
No language data
Stars
450
Forks
29
PR merge metrics
No merged PRs in 30d

Description

**Describe the problem you have/What new integration you would like**

I want to be able to disable the Grow Fingerprint reader R502 when the ESP32 is put to sleep. This can be easily accomplished by always powering pin 6 (power for the fingerprint detector) and GND, and toggling ping 1 (VCC) with a transistor. This way, you can listen for finger detection and turn on pin 1 to communicate with the module, and turning it off after a timeout, or just before going to sleep.

**Please describe your use case for this integration and alternatives you've tried:**

The use case is for a battery-powered ESP32 fingerprint reader. This reader consumes 2uA of power with only the finger detection circuit enabled, but 30mA if the entire module is powered up.
As a workaround, I've tried to configure an [output](https://esphome.io/components/output/gpio.html) on a pin connected to an NPN transistor, and turn it on as early as possible using `on_boot` with priority 700, and off just before going to sleep. However, this setup does not work because there are only ~10ms between the transistor powered up and the first communication over UART that the sensor integration does. According to [the datasheet](https://cdn-shop.adafruit.com/product-files/4651/4651_R503+fingerprint+module+user+manual.pdf), it takes "<30 ms" to power up, but since the first call fails it cannot set up the component.
I have also tried using an automation delay after turning on the output in `on_boot`, but they work asynchronously and don't delay the components boot.

**Additional context**

I believe this should be integrated as part of the fingerprint module, with an extra `wakeup_pin` option to drive a transistor, and a `startup_delay` with a default value of 50ms or so to control how long to wait for the fingerprint to initialize.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.