Making a smarter door lock with the SimpleLink™ MSP432™ microcontroller

Adding an electronic door lock to your front door can provide many features and benefits. For example:

Opening the door with a keypad could be very convenient if you are inadvertently locked outside.

You can forego bringing your keys when going out for a run.

You can give access to others, either temporarily or with time limits and restrictions.

Your children can open the door when returning from school without having to be responsible for a key.

While electronic door locks should work reliably, they are susceptible to many environmental influences. Moisture, dirt, rain drops and ultraviolet (UV) light from the sun can erode materials over time. In addition, as an Internet of Things (IoT) device, the lock is vulnerable to cyberattacks, making protected wireless communication and a tamper-proof front panel and keypad mandatory features. These are only some of the challenges that a door lock has to resolve. In the block diagram in figure 1, the important components of the physical lock are shown: keypad, wireless connection, display and control.

Figure 1: Door lock block diagram

Low-power host

Extending battery life is a critical objective when designing a door lock, which is predominantly in idle mode. TI’s SimpleLink™ MSP432™ microcontroller (MCU) can help maximize energy savings because it consumes just 660nA in idle mode. When an event arises, the MSP432 MCU can wake up quickly, offering the ideal performance-to-energy-consumption ratio with high computational bandwidth.

The MCU can also handle additional tasks including:

Control radio communications via Bluetooth® low energy or Wi-Fi®.

Control and get data from the keypad with TI’s CapTIvate™ touch technology (on the MSP430FR2633 MCU).

Control the relay or motor of the lock/unlock mechanism.

Add sensing upon lock manipulation with input/outputs (I/Os).

Get integrated into a burglar alarm system.

Remotely open the door through an internet connection to the home network even when far away from home.

The integrated analog-to-digital converter (ADC) on the MSP432 MCU has up to 16 bits of resolution, offering a pathway to add premium features such as:

Motion detection and daylight sensing to control lights at the front door.

A building protection application could become a target for a cyberattack or manipulation. The MSP432 MCU’s implemented security features enable a very high level of security to:

Securely store data like encryption and authentication keys for the keypad or network access.

Enable the user to add or remove keys or restrict access rights by time.

Conduct secure wireless over-the-air firmware updates.

Wireless access

With the TI SimpleLink™ MSP432™ software development kit (SDK), you can add wireless communication features without much effort. The SimpleLink MSP432 SDK plug-ins provide an easy way to add Bluetooth low energy connectivity to a new or existing MSP432 MCU-based application. For example, using a host MCU and adding Bluetooth low energy through a network processor provides extended functionality and unparalleled system design flexibility, which are critical for industrial applications. Figure 2 shows the clear software structure of the SDK and the easy access from the application layer.2

Additionally, many residential door locks can leverage Apple’s HomeKit technology so that consumers can control their door locks through the Home app on an iOS-based device. TI offers a robust Bluetooth low energy HomeKit solution using the MSP432 MCU for designers to create highly differentiated HomeKit accessories.

Figure 2: SDK components and layers

The keypad

It’s possible to design a capacitive touch technology-based keypad so that it’s both stylish and well-isolated against environmental influences. It’s very easy to avoid issues, like mechanical malfunction of buttons on the keypad, and to protect the keypad against dirt and water. A flat panel without any gaps or mechanical moving parts can be encapsulated with much less effort and is only required at the fixed borders of the panel.

Maintaining performance in the presence of water drops or heavy moisture on the panel requires a technology sensitive enough to detect the differences between water and human fingers; otherwise, the panel may misinterpret actual key presses or ignore them completely. Figure 3 illustrates the principle of a capacitive touch button. The CapTIvate touch module implemented in the MSP430FR2xxx device provides a sensing system that can detect such situations and react and filter for them.

Figure 3: Capacitive touch principle

Door lock keypads must be able to tolerate moisture and operate with touch detection in the presence of steam, mist or spray.

To dive deeper into this door lock application and quickly get started, see the additional resources below.

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.