I think I also had this once. It was solved by using another pin for the sensing pin. Is GPIO05 not available for you?
Heh, well what do you knowā¦ It works when I use GPIO05 for the sensing pin instead of GPIO25ā¦
I am/was planning to use GPIO05 as Chip Select for the SPI bus which I have active to run a 2.8" ILI9341 display. But now using GPIO25 for SPI Chip Select also works, so I guess this is the solution. Thank you very much for asking this question!
NB: As a follow-up can I ask if you, or another community member, can explain how GPIO05 and GPIO25 differ? I was pretty sure that I had to use GPIO05 for SPI CS as that is what the spec sheets says is its purpose, so if you hadnāt asked, I donāt think I would have tried the swapā¦
Iām a newbie to all of this, donāt have any education/training in electronics and have gotten to where I am by reading a lot and watching videos, so Iām sure there are some fundamentals which elude meā¦
The commonest reference is ESP32 Pinout Reference: Which GPIO pins should you use? | Random Nerd Tutorials but I am not sure it explains what you are seeing. But it does say re spi
The ADC (analog to digital converter) and DAC (digital to analog converter) features are assigned to specific static pins. However, you can decide which pins are UART, I2C, SPI, PWM, etc ā you just need to assign them in the code. This is possible due to the ESP32 chipās multiplexing feature.
Agreed, but in the diagram it specifically says that pin 34, which is GPIO05 is meant for SPI CS (as I understand it).
GPIO25 (on pin 14) seems (to me) like a more generic pin which is why I am confused on how the two differ and why I, quite apparently, cannot use it with the fingerprint sensor
I donāt know why it doesnāt work on the fp sensor, but the esp32 datasheets are easy to find.
I was just trying to point out that spi doesnāt require a particular pin.
Hello,
I have a problem with my R503 (RGB) and maybe someone could help me.
If I connect the fingerprint sensor to a ESP32Cam everything works fine.
But if I connect it to a Lolin D1 Mini v4, I can control Aura, the sensing GPIO works, but the sensor seems to not scanning for a finger (No output in the log about āGetting imageā etc.).
Does anybody have an idea why?
(I already tried to change the UART Pins without any change)
uart:
id: uart_r503
rx_pin: GPIO03
tx_pin: GPIO01
baud_rate: 57600
fingerprint_grow:
sensing_pin: GPIO02
uart_id: uart_r503
on_finger_scan_matched:
- homeassistant.event:
event: esphome.test_node_finger_scan_matched
data:
finger_id: !lambda 'return finger_id;'
confidence: !lambda 'return confidence;'
- fingerprint_grow.aura_led_control:
state: FLASHING
speed: 200
color: GREEN
count: 1
- fingerprint_grow.aura_led_control:
state: BREATHING
speed: 200
color: BLUE
count: 0
- logger.log: "R503 Matched"
on_finger_scan_unmatched:
- homeassistant.event:
event: esphome.test_node_finger_scan_unmatched
- fingerprint_grow.aura_led_control:
state: FLASHING
speed: 25
color: RED
count: 2
- fingerprint_grow.aura_led_control:
state: BREATHING
speed: 200
color: BLUE
count: 0
- logger.log: "R503 Unmatched"
on_enrollment_scan:
- homeassistant.event:
event: esphome.test_node_enrollment_scan
data:
finger_id: !lambda 'return finger_id;'
scan_num: !lambda 'return scan_num;'
- fingerprint_grow.aura_led_control:
state: FLASHING
speed: 25
color: BLUE
count: 2
- fingerprint_grow.aura_led_control:
state: ALWAYS_ON
speed: 0
color: PURPLE
count: 0
- logger.log: "R503 Scan"
on_enrollment_done:
- homeassistant.event:
event: esphome.test_node_enrollment_done
data:
finger_id: !lambda 'return finger_id;'
- fingerprint_grow.aura_led_control:
state: BREATHING
speed: 100
color: BLUE
count: 2
- logger.log: "R503 Done"
on_enrollment_failed:
- homeassistant.event:
event: esphome.test_node_enrollment_failed
data:
finger_id: !lambda 'return finger_id;'
- fingerprint_grow.aura_led_control:
state: FLASHING
speed: 25
color: RED
count: 4
- logger.log: "R503 Failed"
Try the same pins as in my original post. How do you know the sensing pin works? Does something appear in the logs at the moment you put your finger on the sensor?
After changing to GPIO4 and GPIO5 no problemsā¦ I really wonder why, because Iāve used the ānormalā UART pins before!
Thanks for the hint
Before I get the following messages:
[15:42:57][D][binary_sensor:036]: 'haus_espd1mini_bewegungsmelder': Sending state ON
[15:42:57][D][fingerprint_grow:305]: Setting Aura LED
[15:42:57][D][fingerprint_grow:309]: Aura LED set
[15:43:01][D][binary_sensor:036]: 'haus_espd1mini_klingel': Sending state ON
[15:43:02][D][binary_sensor:036]: 'haus_espd1mini_klingel': Sending state OFF
[15:43:03][D][binary_sensor:036]: 'haus_espd1mini_klingel': Sending state ON
[15:43:04][D][binary_sensor:036]: 'haus_espd1mini_klingel': Sending state OFF
But setting Aura was not stable. Sometime I get the failure that there was no response.
Haha youāre not the first one with that problem. I had it as well and these were the only pins that worked for me.
I just received the R503 today. After that, I attempted to upload my code to the ESP32, but itās not functioning. Iām unsure if itās due to the R503 being broken or if my code or connection is incorrect. Does anyone have any methods to check the R503?
In the device page in HASS shows Garage Fingerprint State: Unknown. Actually, I havenāt seen any light from the R503 yet.
The state is unknown until you scan a finger on it.
Are you using the same pins as in the original post?
uart:
tx_pin: GPIO17
rx_pin: GPIO16
baud_rate: 57600
fingerprint_grow:
sensing_pin: GPIO05
.
.
The differences are:
- The R503 does not have a green wire, so I connected to the purple instead.
- I connected the white wire to VIN instead. However, I have already tried connecting it to 3v3 with the same result.
Well the other wire color is strange, where did you buy it? Ask the seller for a datasheet.
I bought from the link you provided in the post (Aliexpress), but I cut off the end and connected it to my jumper wire.
@MosSHR, I notice you used NodeMCU 32S whereas my (and origianl as well) implementation was on ESP8266 D1 mini. I guess you picked GPIO17 for tx_pin and GPIO16 for rx_pin is because it is marked TX and RX on the device pinout. In our implementations we never use TX and RX pins, we use D1 (GPIO5) and D2 (GPIO4) for that. I suggest you switch to adjacent pins (GPIO5 and GPIO4 are just next to GPIO17 and GPIO16) and try again.
I tried changing the pin connection to GPIO18 and GPIO19, but it didnāt work. So, I switched to another ESP32 board that has G16 and G17 instead of TX2 and RX2. However, there is still no response when I test it. So, I suspect that the R503 may be broken.
You can see if you get a response from the sensor by calling the cancel_enroll function and see what the logs say. The led should also flash with my config.
If there is a response, itās probably in the sensing pin.
The status changed to āFailed to enroll fingerprintā instead of āUnknownā
Need the ESPHome logs from the ESP device
When I call the service, the LED flash and log shows:
[17:05:43][D][fingerprint_grow:305]: Setting Aura LED
[17:05:44][E][fingerprint_grow:419]: No response received from reader
[17:05:44][D][text_sensor:067]: 'Garage Fingerprint State': Sending state 'Failed to enroll fingerprint'
[17:05:44][I][fingerprint_grow:087]: Finished enrollment