Smart Home Keypad

This project enables a generic keypad capability in our smart home that forms part of its larger 'whole home context'. This is effectively a stand-alone module that can be replicated several times within our smart home, should the need arise. A keypad is one of the many objects modelled by our smart home, so making it aware of them is achieved simply by adding an entry to one of our smart home's configuration files.

Design

In keeping with our modular approach to smart home, we are creating a generic, stand-alone keypad module that can be used for many different applications in our smart home. Our initial focus is in using one for enabling and disabling our smart home integrated alarm system. This module uses an IP interface and secure messaging to communicate with our Home Control System (HCS).

The keypad will collect any entered code but only the authorised user will know how long it should be (to improve security). To also make the codes more secure we are also using a 4×4 keypad with the numbers 0 to 9, the letters A,B,C,D and the '*' and '#' symbols.

The keypad will enforce time code entry limits and after 3 invalid codes are entered it will 'lock out' the user for a several minutes.

There is one 'special code' that will act as a panic button and trigger the extensive alarm system built in to our smart home. This includes remote monitoring and remote features. The 'panic' response from our Home Control System (HCS) to this code will 'lock out' the user for several hours.

NFC

We are assuming an NFC reader will also reside inside our front door, to also enable the alarm to be turned on and off using NFC tags and Smartphones. The physical design and installation of our first keypad will have this consideration in mind. This means some of the visual and audio indicators are likely to be shared.

Inheritance

As part of our wider smart home, these keypad modules inherit the wider set of capabilities of our smart home, including:

  • Activity logging.
  • Errors and warnings, which can result in alerts or notifications, e.g. an incorrect code was entered.
  • Local and whole home voice announcements.
  • Text messaging.
  • Each keypad is essentially a slave device and inherits all of the self-monitoring that this brings.
  • Invalid code entry can trigger networked security cameras.

Context

These keypads also feed into the wider whole home context and provide useful contextual information such as:

Voice Announcements

Our smart home can deliver contextual voice announcements to one or more, or all zones. Both the entrance hall and the drive (front door) are zones that are covered and it is possible to deliver these based on keypad events. For example, we could deliver an announcement such as "An invalid code was entered.", "Access granted." or "Too many invalid codes have been entered. Please wait 5 minutes before trying again.".

Construction

Power

A protected 12V dc power supply is assumed and this feeds into a local dc-dc convertor, which provides the required voltage to the Arduino Uno and Ethernet shield. This ensures that it all keeps working in the event of a mains power failure.

Networking

The Arduino Uno Ethernet shield requires a wired IP network connection and this will be connected directly to our smart home Gigabit Ethernet switch with a protected power supply.

Keypad

Membrane 4x4 keypad
For this project we are initially using a cheap 4×4 membrane keypad. We like this because it can be mounted flush to the wall. Later on we may migrate to higher quality, stainless-steel keypads. This particular keypad doesn't have a back lighting but we are including this capability in our design for the future.

Stainless-steel keypad
We will install high quality, stainless-steel keypads once we have completed the design and development.

Arduino Uno

Arduino and Ethernet shield

We have decided to use an Arduino Uno for this project as they are very cheap and easy to interface via an Ethernet shield. Arduinos are also very much fit and forget, with no regular software updates required. There are also libraries readily available to drive keypads and their associated electronics, with numerous examples and tutorials available.

Pin Connections

  • Pins 2 to 8 are used to connect the membrane keypad.
  • Pin A1 drives the keypad back light (if present).
  • Pin A2 drives a red LED to indicator an error (network, etc.)
  • Pin A3 drives an orange LED indicating invalid code entered.
  • Pin A4 drives green LED indicating valid code entered.
  • Pin A5 drives sounder.

Indicators

The keypad mounting plate has red and green LEDs on it.

5V sounder
This module incorporates a low volume 5V dc sounder and since this is on for very short periods of time and uses just 22mA at 5V, it could be directly connected to the Arduino pin. We actually use a 91Ω resistor in series though, to limit the current to 13mA. Three short beeps indicate a valid code and one long beep indicates an invalid code.

Software

The Arduino software accepts a code but has no knowledge about its validity. This means it can accept more than one, meaning we can use it to track who has gained access. This is useful context that can be used by our smart home to adapt it's behaviour accordingly. For example our in-laws could use this gain access to the house and disable the alarm when we go on holiday.

Another use case might be when guests come to visit. In this case we want to use codes with a limited lifetime and our smart home supports this concept too. We also model 'one time' codes which can be used just once.

The software provides a fixed time window to complete the code entry. It will then send it to our Home Control System (HCS). Our HCS will check the code and provide a response indicating whether the code was valid or invalid. The keypad will then indicate locally whether the code was accepted or not. This will be achieved via the red/green LED that lights green or red for 2 seconds. For valid codes the local sounder will 'beep' once and for invalid codes it will 'beep' three times. If the user has been 'locked out', the LED will flash red.

The valid codes are stored as part of our smart home user model. Removing, adding or changing codes is simply a matter of updating a configuration file.

The Arduino keypad library is described and available here. It covers things like debouncing and multiple key presses.

Summary

We don't plan to use lots of keypads in our home because they don't provide the best user experience. The main use case is in enabling and disabling our smart home alarm system. NFC tags provide a much simpler and nicer way to acheive the same thing but rely on someone being in physical possession of an NFC tag.

The main reason we have implemented a keypad solution is that it is easy for non-technical people to use and we can enable new codes remotely in real-time, for guests, visiting engineers, friends, etc. We can then send them a unique code to them via email, SMS, IM, etc. The use of unique codes for each person means we can also track who is using them and this feeds into the wider context of our smart home.

Like all of the things connected to our smart home, these keypads could be queried and controlled via our smart home AI, to enable personalised text and voice control commands:

  • "Enable a new code for a guest using the code 01234ACDC, valid for 3 days"
  • "Disable all guest codes"
  • "Disable the front door keypad"
Share ...
We are on ...
Facebook Twitter
YouTube Flickr Follow us on Pinterest