A simple 12-key programmable keypad using an ESP32-S2 for a CyberDeck project.
This project is my first one, also I'm an absolute beginner in pcb design. The project may have some flaws, bugs, errors... It's still under development and is subject to changes. If you have any suggestions, feel free to share them, it will help me learn !
To build your own Keypad you will need :
- some diodes (one for each key)
- Switches (here CherryMX switches without diodes nor LEDs)
- Rotary encoders
- ESP32-S2 board (here ESP32-S2-DevKitM-1)
- a micro-USB female port
- a PCB or some wires.
If you already have a working development environment :
- Install the Arduino core for ESP32 (arduino-esp32 -> sources) under
<arduino_installation_dir>/hardware/espressif/esp32
- Copy/paste the EspTinyUSB library (EspTinyUSB, ESPAsyncWebServer and AsyncTCP -> sources) under
<arduino_installation_dir>/libraries
- Install libraries needed from the library manager (FastLED, Keypad -> sources)
- Compile and upload the
.ino
file located at./src/<name>.ino
- You will also need to fix 2-3 things on EspTinyUSB and arduino-esp32, I made forks of those projects with fixes applied.
If you don't have a proper development environment, or need more informations go to ./docs/INSTALLATION.md
(-> to be added)
- When pressed at the same time, keys on collumn 1 and 4 on the same row causes key on collumn 1 to loop. It happens only when serial usb isn't connected. This happen apparently because collumn 1 is connected to GPIO0. Connecting this coolumn to another GPIO pin with the correct setup on the firmware seem to fix this.
- Software
- Add initilisation with US, UK or FR layout
- Add function to convert website input to values as
HID_KEY_...
format - Add function to convert keys read from storage to human readable values
- Add multikey macro creation
- Optimize website
- Optimize code
- Add comments
- Hardware
- Make a testing unit using PCB
- Change encoder switch pins from 45/46 to 41/42 (done in files, to be built)
- Add LEDs ?
- Make a testing unit using PCB
- Documentation
- Add step-by-step installation guide
- Add software description
- Add pictures of test and final units
- Add BOM
Scheme with encoder.
Scheme without encoder.
Testing unit.
Other pics coming soon...
Projects and Libraries used :
- EspTinyUSB by Chegewara
- arduino-esp32 by Espressif
- ESPAsyncWebServer by me-no-dev
- AsyncTCP also by me-no-dev
- FastLED by Jason Coon and Mark Kriegsman
- Keypad by Mark Stanley and Alexander Brevig, maintained by Chris--A
- A little sample code to format the SPIFFS
- ESP32Encoder by madhephaestus
Tutos, demos and other projects that inspired the CyberDeck Keypad.