4G Keypad Intercom Development
'Have you got a keypad intercom yet?' Well yes we do! It only took 8 years.
We designed the simple 1-button 4G intercom with a keypad expansion in mind. In fact we had a non-working mock up of the keypad unit around the same time we launched the 1-button version.
In practice though it took quite a few changes to the basic design which we will examine here.
Our chosen keypad features a die-cast metal enclosure designed to be mounted with screws through the front panel. Having screws appear on the front panel looks a bit naff so we decided to push the keypad onto the front from behind.
On the acrylic models, we weld a mounting plate fitted with brass threads to the front panel. Originally we used the standard 3mm material for the from panel but this intruded into the base of the intercom a little too far. We could have made the base plastic 20mm instead of 15mm but this would have detracted from the low profile look of the unit. So we decided to use 5mm material for the front panel and machine into it to reduce the depth of the finished assembly. This can be seen really well in the clear plastic prototype we used for testing and development.
As mentioned, the larger keypad assembly protruded into the base unit more than the simple 1-button unit. To mitigate this we used a thicker front panel and machine into it reducing the space required. However, we still needed a couple of more mm clearance to be safe.
The highest points on the main 4G circuit board are the 3 electrolytic capacitors. Ideally we would reduce the height of these capacitors. A long scan of the internet revealed equivalent units made by another manufacturer (probably the best!), Nichicon. Using these capacitors gave us an extra 3mm space giving us plenty of clearance.
The primary design constraint for the PCB was the physical size. We like the size and shape of our 4G intercom and didn't want to change this so the keypad PCB required low-profile surface mount parts and it was important that it didn't impinge on other components on the main board.
These keypads require a specialised decoder chip as the columns and rows of the buttons are multiplexed. This means, when you press a key, it could be a number of other keys on the row of keys it is connected to. This needs decoding to find the key you pressed.
The go to decoder chip is now obsolete and they're generally in large through-hole packages which is not an option for us. So it was better to just do our own chip from a microcontroller. This way we can control the output.
We allowed a 1-wire interface on the original 4G intercom PCB for a second button or a keypad. This meant we had to use an asynchronous protocol to transfer data from the keypad to the main board.
The main controller chip on the 4G board has only one UART so we had to 'bit-bang' the second UART on a general purpose input.
We've done this before and have used a combination of Interrupt-on-Change (IOC) and hardware timers to create a software based UART. To make it as reliable as possible we chose a really low baud of 300bps. This is a slow as we could go using the pre and post scaler on timer 4.
We use the program memory of our microcontrollers to store phone numbers that ring-in or dial-out. This would be ideal for storing our keypad codes and is fully tried and tested. It took half a day of adapting the complicated assembly code to make it suitable for keypad codes but it was a good solution. This allowed us to offer any length codes up to 7 digits and has space for 1000 numbers and codes in the standard chip.