Adding WiFi and RS485 to door lock
To make the experience fit your profile, pick a username and tell us what interests you.
We found and based on your interests.
ESP8266-RS485.zipZip Archive - 10.59 kB - 08/05/2021 at 01:19 |
|
|
doorlock.zipZip Archive - 7.34 kB - 08/05/2021 at 01:19 |
|
|
doorlock sketch.zipZip Archive - 1.06 kB - 08/05/2021 at 01:19 |
|
The first thing i had to do was understand how the keypad communicated with the opener. There are 3 wires that go over to the keypad, 3.3V, Data, GND. I attached a scope expecting to see some sort of standard (SPI, I2c, etc.), but what i found was the keypad just sends a series of 50uS pulses depending on what key is pressed. 0 = 1 pulse, 1 = 2 pulses .... 9 = 10 pulses, and lock = 11 pulses. The signal is open drain, so it makes it very easy to piggy back with the keypad so that both still work.
Here is where it went wrong, I used the 3.3V to power the ESP8266, but soon ran into a batery draining issue. I added in some sleep time so the battery would not drain so quickly, but since i want the door to open when i get home, it has to wake up frequently and the batteries would only last a few days. To fix this, i ran power through the hinges of my door and into a 5V power supply in my attic, This worked for a while, but the large power draw from the ESP8266 was too much for the door lock's internal regulator.
To fix this issue, my latest design includes its own regulator, Since i have to run power through the door anyway, i am also going to run RS485 to connect to my homes RS485 network for better reliability. More to come when i get the time to connect up the latest design.
I have included the arduino sketch for this first attempt if anyone wants to try and improve the power consumption problem. The power issue could likely be fixed with just a big capacitor.
Create an account to leave a comment. Already have an account? Log In.
Become a member to follow this project and never miss any updates
About Us Contact Hackaday.io Give Feedback Terms of Use Privacy Policy Hackaday API Do not sell or share my personal information