Open source deadbolt lock

You can but that’s not an NFC compatible chip so not all phones support it.

Alright then I’ll get to work on the trinket. Already got one ordered. While I await it’s arrival I’ll continue learning ardruino ide and start getting the circuitry figured out…unless you think python will be better. I have a bit morel python understanding, but Arduino ide already has a library built for the rc522 13.56MHz module which is only $10 vs the PN532 that is $40

1 Like

The trinket m0 needs some rethinking. I’m new to this so I’m still learning all the products available. We need at least 10 digital pins and the m0 only has 5. 7 for the RFID 1 for servo control, 1 for optional door open/closed sensor of undetermined type yet, and 1 for an optional exit button.

I think this www.adafruit.com/product/5611 will work in increasing I/o but I’m not sure, also everything we add increases power consumption. I doubt we can get things into the microamp range

The RC522 is also likely out of the question due to the fact that I have to use an external power supply to get it functioning

After more research the pn532 in going to be our best option. But I don’t think the trinket is going to be the best option. There’s other microcontrollers like the fire beetle esp32 that’s compatible with it. It’s deep sleep goes down to 10uA and on a forum someone got 10mA with Bluetooth on, not that we’ll need Bluetooth but that’s pretty impressive.

I mean checkout the RFID homeassistant thread NFC reader with Home Assistant - #141 by W-rabbit I could easily mod the PCB to go into a deadbolt and move a motor. I’ve actually done this before at my work. I use this same pn532, a esp32-s2, and a servo to lock and unlock my lab door all controlled via homeassistants tag system running in a docker container.

Esp-home also allows for deep sleep to run on very low power Deep Sleep Component — ESPHome could even use a magnet to trigger wake-up and turn on the reader if you wanted a very obscure and specific deadbolt that is very power efficient because it wouldn’t be scanning all the time.

Maybe use a ir photodiode / proximity sensor to detect an obstruction is near, could be a hand or arm etc. That would take a very low amperage to run, and then you could fire up the NFC circuits.

Could make a knob that you twist and uses a tilt sensor that turns the reader on. It’d last forever! But would add one more step. A touch sensor is probably best, maybe even just a button under the front cover so when you tap you also are pressing in the button.

The back side could be a solar panel…

1 Like

Small solar panels can give around 60mA, the esp 8266 in normal operation is 80mA and deep sleeps to 10mA meaning if you did it right a solar system could get the logic to run basically forever. You’d just need a battery to run the reader and motor. With a low number of daily reads/opens it could live forever. The extra 50mA could go into a battery. But that’s assuming full light.

Disadvantage to deep sleep and only waking it up on scan is you wouldn’t be able to trigger lock and unlock remotely.

Personally I feel like that’s an advantage. I don’t think it’s a good idea to connect stuff like that to the internet.

2 Likes

I run homeassistant fully isolated on an IOT network with no internet access. It’s nice to lock my doors at night automatically based on if my bedroom lights are on or not. But we could make a non networked firmware that would be fully air gapped for the people who don’t want a networked lock. For that matter a firmware with a hard coded implant ID as an option might also be nice so that no one could find an exploit that lets them get the lock into adding a key mode. Options are what’s nice, multiple firmwares are inevitably going to be available on an open platform.

1 Like

Adafruit QT Py ESP32-C3 WiFi Dev Board with STEMMA QT : ID 5405 : $9.95 : Adafruit Industries, Unique & fun DIY electronics and kits This board has a wifi option (can be turned off if you want), i2c and spi for talking to a reader, usb-c is nice, and extra pins for closed door sensors or other stuff if we want later. This chip in deep sleep also takes 0.3mA so it should be able to last a very long time even without a solar panel.

Then once a long battery life version is all worked out a custom board can be made. But it would also be cool to have it work with all off the shelf parts if someone wanted. This board is also open source so it should be pretty easy to make into a lock controller board later on.

Agreed.

What’s the reason range on the PN532? Does it read through a door? My target here is the apartment dwellers who can make little to no permanent modifications to their door. There also can’t be any wires visible anywhere. The only way I can think to do this without a reader that can read through doors with x series implants is with a separate wireless reader. I’d like to make the reader and the door lock communicate through Bluetooth since it can be very low power. Reportedly down to 10mA with the Fire Beetle.

On a different note here’s a servo
ZOSKAY 1X DS3218 Update servo 20KG Full Metal Gear Digital servo Baja servo Waterproof servo for Baja Cars(Control Angle 180) Amazon.com It’s cheap but not too cheap, and has all metal gears. Has an operating voltage of 4.8-6.8v. not sure the current draw but I’ll easily figure that out once it arrives.

I think a prox sensor would be best for activation. You can adjust them where they only enable within an inch or two and require less finesse when carrying awkward things.

Checkout the homeassistant reader thread where we’ve talked about pn532 a lot recently. I have some newer readers on order to test out that should have much better read range or at least very thin wires that are thin enough to work around the corner of a door

But currently the read range is pretty short, meaning you’d need the reader on the outside of the door. I have some ideas for non distractive wiring to the outside of the deadbolt but need the new readers to really test it out.

PS) your link doesn’t work

Link should be good now. Wiring is a no go. Strictly against my lease. Also with poorly fitted doors they will break. Things like Ring doorbells are okay but they don’t want exterior wiring showing.

Got the PN532 today and got it working with I2C on a nano just for sanity. I have a fire beetle on the way as well. If we don’t end up using the fire beetle I have plenty of other projects it will have plenty of use for. I’ll at least get the code written and working on a nano for now. The servo that came with the Arduino kit I have it is a POS so we’ll have to wait for the better one to come in before I can really test with it.

In the meantime…does anyone have 3d modeling experience that’s willing to design the housing? I was thinking of something similar to the switch bot where it just grabs onto the thumb turn on rather than something like Augusts design which requires removing the original thumb turn