Touch keypad housing for DCC-EX model railway system
These are 2 housings for the cheap touch keypad using the TPP229 controller. This controller and the keypad is supported by the DCC-EX project.
Version number 1 is a simple version. Here the PCB is just inserted into the base and screwed with 2 short screws. You could also glue the PCB in.
Version 2 consists of a base and a lid part. In order for the PCB to fit into the housing, the pin header must be unsoldered. This is very simple. You simply pinch off the PINs above the plastic row. Then you pinch the plastic holders of the PINs individually and remove them. Now you have the bare remains of the PINs left and solder them out individually.
If you want to use all 16 keys you have to solder one short bridge like shown in the picture.
Use only following pins:
- GND
- VCC (attach to 3.3V on 3.3V controllers or attach to 5V on 5V controllers)
- SDO = DATA
- SCL = Clock
Configuration in DCC-EX myAutomation.h:
in one of the top rows insert:
"#include "IO_TouchKeypad.h" // Touch keypad with 16 keys"
Then below add the definition for the keypad in the format:
HAL(TouchKeypad, vpin, 16, clockPin, dataPin)
like:
HAL(TouchKeypad, 650, 16, PA12, PA11) //D36 D37 example for a NUCLEO F446RE DCC-EX CS
Alternatively insert this line in myHAL.cpp (NOT recommended):
TouchKeypad::create(firstVpin, 16, clockPin, dataPin);