HackRVA RFID Upgrade

Contents

Having RFID at HackRVA has been a great improvement compared to the days when we used to run to the big box store to have a handful of physical keys made every month.

/posts/assets/hack-rfid.png

peak those screw terminals bulging. How are you supposed to know they are aligned properly?

Issues With the setup

We've had a few issues with the original rfid setup. To the end user, these issues (and the lack of feedback from the reader) made it seem like their fob just wasn't working.

The RFID microcontroller would stop responding every once and a while.

We tried to mitigate this by having the device reboot every day.

A few people suggested it could be related to the temperature outside. The RFID reader we were using (the rc522 rfid reader we were using wasn't really rated for outdoor use). However, it seemed to go offline even when temperature shouldn't have been a factor.

Encoding problem

There was a historical problem with encoding the rfid uids. This was an issue that was fixed in newer firmware of esp-rfid. However, we still had fobs stored with the incorrect encoding.

The Upgrade Rabbit Hole

It might be the case that we were a fringe case with the original esp-rfid board. We were using the rc522 rfid reader. I bet most people were using wiegand readers. Since we were managing the device over MQTT, we didn't really need this tiny microcontroller to host a web page.

I tried to nerd wrangle people with more experience in electronics and microcontrollers to help with an upgrade. I did get some help with the physical set up (soldering, mounting, making holes), but ultimately I had to venture down the hardware rabbit hole on my own.

desires

  • wired networking
  • compatible mqtt interface
  • fix encoding problem
  • rfid reader

    • status LED
    • status buzzer
    • outdoor rated
    • self correcting systems
    • verification (we should be able to verify what ACL is on the device)

Hardware

We could have contributed back to esp-rfid. However, it wasn't abundantly clear what the problem was or if it was fixable in software. Somewhere along the line, I decided to try to draw up a new board with the rpi pico 2 w instead of the esp8266. The rpi pico 2 has a bit more horse power than the esp8266 and with new firmware, we could get rid of some of what it was doing and add things like a veirifcation step.

I had some experience doing this. As an experiment, I previously put together a few custom PCB's based on the schematic in the back of the Hardware Design with RP2040. This was a bit different because I wanted to use the actual rpi pico and not the rp2040 chip (easier to get something that already had wifi on it). Even with that minimal experience, I learned a few lessons with this build. e.g. Don't put a ground pour behind the wifi antenna (it explicitly says that in the manual… haha).

The new board is fairly derivative of the esp-rfid. It uses pretty much the same components (other than the processor).

Software / Firmware

The firmware has a compatible MQTT interface with a few additions. It's now possible to verify the ACL that is on the board.

I also did some testing with an RFID reader with a keypad. That code is still there (it might be ifdeffed out).

Conclusion

It was a challenge to work through getting the hardware and software put together, but the new rfid reader seems to be working well.

I did add a contingency that makes it break every 6 months just so I can feel needed.