1. For the finished product effect display,
specific functions and details can be viewed in the B station video:
[Open Source] 17-key Bluetooth keypad knob + slider + RGB supports hot swap/full key rollover/low power sleep_Bilibili_ bilibili



2. Material preparation
① Core board: Hezhou ESP32C3 simple model (the classic model is theoretically feasible, but not tested)

② Lithium battery: the size is no larger than 90x55x6mm (length x width x height), the capacity can be selected according to the battery life needs, and the connector form 1.25 black and red

③ PCB: Directly exported, DRC check without error
④ Other electronic components: See BOM table, if there are some problems, you can judge by yourself.
The following material list compiled by silent_v at B site can also be used as a reference

⑤ Keyboard components: keyboard shaft body x17, 2U satellite shaft x3, 1 set of small keyboard area keycaps, knob cap x1 (select according to the knob connection form)
⑥ Shell: 3D printing, please see the attachment for the printing file
⑦ Screws: flat head screws (diameter x length) 2x4mm quantity 4 2x14mm Quantity 4
3. Production process

3.1 Component welding
Weld the components as shown below and install the lithium battery


3.2 Burning program
Use Arduino IDE to burn the program and test the keyboard function. The program related content will be introduced in the follow-up
3.3 Install the bottom shell
through 2x4mm screws The PCB is fixed on the bottom case

3.4 Install the top case
and fix the top case and bottom case with 2x14mm screws


3.5 Install the shaft body, keycaps, and knob caps
as shown below. Install the shaft body, keycaps, and knob caps as shown below, and the shell can be modified as needed. Painting, here you need 3 2U satellite axes
4. Program description
4.1 The compilation environment supports
the development of this keyboard based on Arduino IDE, so you need to install the corresponding esp32 development board package. There are many online tutorials, so I won’t go into details here. The configuration of the device is as follows. Because a simple version of the ESP32C3 core board is used, the download method is "Internal USB".


4.2 Instructions for using libraries
In order to realize the keyboard function, the following libraries need to be added to Arduino:
① WS2812FX library to achieve RGB effect

② NimBLE-Arduino library to make BLE implementation more lightweight

③ ESP32-BLE-Keyboard library to realize Bluetooth keyboard function
link : https://github.com/T-vK/ESP32-BLE-Keyboard
Note: You need to add #define USE_NIMBLE at the beginning before or after installation to enable NimBLE.

If there is a problem with compiling this library, you can use the one provided in the attachment. Program files containing the keyboard library (other libraries still need to be installed)
④TaskScheduler library to achieve multi-tasking

4.3 Compile and download
After the compilation is successful, use the USB data cable to connect the development board to download
5.
The detailed operation method and effect of the function introduction can be found in the B station video.

5.1 Key Function
This keyboard is only a single-mode Bluetooth keyboard. It currently does not support changing keys. It is suitable for Windows systems. The key area supports Num Lock mode switching.
5.2 Knob function
The knob is used to adjust the RGB lighting effect of the keyboard. The function is as shown in the table below.
The knob operation
effect
is clicked (when the light is on ) to
switch the lighting mode. Click
(when the light is off) to turn on the light. Long
press
to
turn off the light.
Turn clockwise
to reduce the light. Brightness
Rotate counterclockwise
to increase light brightness
5.3 Touch slider function
Touch slider is used for multimedia control. The function is as shown in the table below.
Touch operation
effect
slides from bottom to top and keeps
the volume up
. Slides from top to bottom and keeps
the volume down
. Swipe up (without long press and hold)
Previous song
Swipe from top to bottom (without long press and hold) Next
song
Click to pause
/ play Slider function * The principle of the slider here is only based on the judgment of the touch switch. It cannot accurately judge the touch position. It is regarded as a pseudo slider. 5.4 Low power consumption mode (1) When the lower switch of the two switches on the back of the keyboard is turned ON, if the keyboard is not operated within 20 minutes, it will automatically enter the low power consumption mode. The entry time can be defined in the program; (2) If you want to operate the switch externally after the installation is completed, you need to open the bottom shell opening before installation; (3) Entering deep sleep (after low power consumption mode) can be done by touching the slider or pressing Knob wake-up, because the keyboard Bluetooth is turned off in low-power mode, so after waking up, you have to wait for Bluetooth connection (3~5s) before the keys can respond. (4) The power consumption in each case is shown in the table below. Taking the power supply voltage of 3.7V as an example, the current size test is about 93mA in the no-light operation mode, the light low-brightness operation mode is about 105mA (related to the display color) and the light high-brightness operation mode. 140~230mA (related to the display color) low power mode about 9.5mA *The power consumption of esp32 series Bluetooth is indeed quite high. I will try to use Qinheng's chip development later.



