Having trouble getting R503 fingerprint reader working on Pico WH

I have a Pico WH connected to an electric door strike. I can toggle a relay to lock or unlock it, monitor a reed switch, the latch position etc. Everything works as I would expect it to, which is the kind of dangerous situation that leads to trying something new.

esphome:
  name: front-door-picow
  friendly_name: Front Door PicoW

rp2040:
  board: rpipicow
  framework:
    platform_version: https://github.com/maxgerhardt/platform-raspberrypi.git

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:
  platform: esphome
  password: "redacted"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  manual_ip:
    static_ip: 192.168.0.33
    gateway: 192.168.0.1
    subnet: 255.255.255.0

  # Enable fallback hotspot in case wifi connection fails
  ap:
    ssid: "Front-Door-Picow"
    password: "redacted"

switch:
  - platform: gpio
    id: "relay"
    name: "Front Door Relay"
    pin: 9

lock:
  - platform: template
    name: "Front Door Lock"
    lambda: |-
      if (id(relay).state) {
        return LOCK_STATE_UNLOCKED;
      } else {
        return LOCK_STATE_LOCKED;
      }
    lock_action:
      - switch.turn_off: relay
    unlock_action:
      - switch.turn_on: relay

binary_sensor:
  - platform: gpio
    pin:
      number: 14
      inverted: true
      mode:
        input: true
        pullup: true
    name: Latch Open
    filters:
      - delayed_on: 100ms
      - delayed_off: 100ms
  - platform: gpio
    pin:
      number: 15
      inverted: true
      mode:
        input: true
        pullup: true
    name: Latch Closed
    filters:
      - delayed_on: 100ms
      - delayed_off: 100ms
  - platform: gpio
    pin:
      number: 17
      inverted: true
      mode:
        input: true
        pullup: true
    name: Strike Open
    filters:
      - delayed_on: 100ms
      - delayed_off: 100ms
  - platform: gpio
    pin:
      number: 16
      inverted: true
      mode:
        input: true
        pullup: true
    name: Strike Closed
    filters:
      - delayed_on: 100ms
      - delayed_off: 100ms
  - platform: gpio
    pin:
      number: 13
      inverted: true
      mode:
        input: true
        pullup: true
    name: Reed Switch Present
    filters:
      - delayed_on: 100ms
      - delayed_off: 100ms

#uart:
#  rx_pin: GPIO5
#  tx_pin: GPIO4
#  baud_rate: 57600

#fingerprint_grow:
#  sensing_pin: GPIO8
#  sensor_power_pin:
#      number: GPIO7
#      inverted: true
#  idle_period_to_sleep: 5s

I’ve recently bought a R503 fingerprint reader (from Digikey, so I don’t think that’s the problem). If I uncomment those final lines, the Pi can no longer boot and I have to recover over USB (which I have been doing by re-commenting those lines - I’m not very good at this!).

I’ve followed this diagram from the docs for my wiring, but with my own selection of TX/RX/GPIO pins. I don’t think I’ve used any special pins that will block boot if pulled in the wrong direction, or anything like that - are there any other gotchas to look out for here? I can try unpicking all of my wiring and starting from scratch but if I’ve stuffed that up, it would be the first time, and I’m hoping there might be some other explanation that’s obvious to an expert :slight_smile:

Thank you in advance!

Starting from uart? Many lines to try where the problem is.

That’s right, starting from UART. I wasn’t sure if any of these elements were separable - eg if I had a UART stanza but nothing else, maybe the failure to power up would be expected.

Uncomment step by step until it misbehaves.
First uart rx, then uart tx, then fingerprint component without optional argoments and so on…

I have no explanation for why this would make a difference, but I uncommented the UART stanza, rebooted, then uncommented the sensor component, rebooted, and now it works. Weird, but happy with the result!

You better be careful with that type of dangerous thinking! You’ll wind up down here living the life of an electronics addict all alone and uninterested in night life… You can be better than us esphome addicts and not fall into the rabbit hole!

Could you please, for the sanity of myslef and others, start practicing to include white space in your code a.k.a use the Enter button like this so that its easily legible to everyone and each sensor with its configuration options is distinguishable from each other because they’re not always a copy/paste and can be very different and separation helps a lot.

Its just a suggestion though but, for what its worth the last guy who didnt quit that… lets just say that my size 11 boot was never found after kicking him in the but, its a real mystery for sure!


binary_sensor:
  - platform: gpio
    pin:
      number: 14
      inverted: true
      mode:
        input: true
        pullup: true
    name: Latch Open
    filters:
      - delayed_on: 100ms
      - delayed_off: 100ms


  - platform: gpio
    pin:
      number: 15
      inverted: true
      mode:
        input: true
        pullup: true
    name: Latch Closed
    filters:
      - delayed_on: 100ms
      - delayed_off: 100ms


  - platform: gpio
    pin:
      number: 17
      inverted: true
      mode:
        input: true
        pullup: true
    name: Strike Open
    filters:
      - delayed_on: 100ms
      - delayed_off: 100ms


  - platform: gpio
    pin:
      number: 16
      inverted: true
      mode:
        input: true
        pullup: true
    name: Strike Closed
    filters:
      - delayed_on: 100ms
      - delayed_off: 100ms


  - platform: gpio
    pin:
      number: 13
      inverted: true
      mode:
        input: true
        pullup: true
    name: Reed Switch Present
    filters:
      - delayed_on: 100ms
      - delayed_off: 100ms