This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Door lock BLE / Zigbee

Hi. 

I am looking for advice on which board may fit my purpose. My intended route as of right now is described at the bottom of this post. 
I have a door lock that has an option for bluetooth module. It has 4 pin (V, GND, LOCK, UNLOCK). Pull pins high for 650 ms to lock / unlock. The door lock is powered by 3 x AA batteries. 

The bluetooth module is quite useless, it relies on an app and everything is so slow that you may as well manually unlock the door. 

While I already have several nRF51822, I understand they are a bit outdated, an a nRF52840 board may be the way to go. The Arduino Nano BLE 33 is interesting as well. 

I can't seem to find any boards that can be supplied by 5v in an power efficient way, and I may have to add another 3.3v supply. 

What I have in mind

ESP32 - Communicates to smart home systems through MQTT. MQTT message "lock"/"unlock" triggers BLE tx "lock"/"unlock". Saves the last BLE tx to send regular door lock status messages through MQTT. 

BLE board - Connected to door lock. Pulls the according pin high for 650 ms as per instructed by ESP32 BLE tx. 

I'm still reading up on this, and also trying to decicde the best way to make sure BLE board actually received and processed the transmission. Indicate/Notification. 

  • I suggest you check out the nRF52 dongle (PCA10059), it accepts 5V supply, I/O's are configurable from 1.7-3.6V. 

  • Thanks, I ordered one yesterday. 

    Are there any examples available which might relate to setting pins as output high based on recieved transmissions? I haven't found any so far. 

    As for controlling pins output, this is the way to go, correct? 

    include "nrf_gpio.h"

    // set pin X as output
    nrf_gpio_cfg_output(X);
    // set pin X as high
    nrf_gpio_pin_set(X);
    // set pin X as low
    nrf_gpio_pin_clear(X);

    I'm also currently experimenting with some yj-14001-nrf51822 modules I have laying around. 

  • uwvid said:
    Are there any examples available which might relate to setting pins as output high based on recieved transmissions?

    The ble_app_blinky and ble_app_uart are good examples to start with. 
    The ble_app_blinky example uses the Boar Support Package to control buttons and LEDs, but you can swap that out with your gpio controls. 

    uwvid said:
    As for controlling pins output, this is the way to go, correct? 

     Yes!

    uwvid said:
    I'm also currently experimenting with some yj-14001-nrf51822 modules I have laying around. 

     I recommend that you stick with the nRF52 series as the nRF51 series has a lot less support/features both in terms of HW and SW. 

Related