Basic description of the Macro Screen HID
This is a ESP32 S3 based emulated HID Keyboard that translates input from the Nextion/TJC HMI panel into a fixed series of 32 keypress combinations. All buttons will result in a combination of CTRL+ALT+SHIFT combined with A-Z and 0-6. Solidworks can bind these keypresses to various functions as displayed on the default implemented button array.
If needed the buttons can be changed by creating your own background image for the button array and replacing it within the firmware for the Nextion/TJC HMI panel. No further changes should be needed. This way the project can also easily be adapted to implement 32 possible buttons for integration with for example Fusion 360 or any other software that is able to custom bind key combinations to functions/features of the the application.
Needed components
- The 4 printable pieces from this project, on my Creality K1C as a single bed print with all parts at once, this cost me around 1hr15m. Material cost is around 50grams of filament.
- 6 M3 x 5mm screws (I used what I had laying around) 2 5mm M3 black hex bolts and 4 4mm M3 pc motherboard screws from my spare pile. These are used to screw down the Nextion/TJC panel as well as screw down the clamp used to hold the ESP32 board in place.
- 3 M2 x 6mm screws to attach the stand to the bottom shell of the case.
- Nextion NX4024T032_011 or NX4024K032_011 panel (you can find them on Amazon) or alternatively the much cheaper TJC versions TJC4024T032_011 or TJC4024K032_011 panel.
- ESP32 S3 DevkitC-like developer board, either the YD-ESP32-S3 or IA-ESP32-S3 boards specifically, as these come guaranteed with USB-C OTG port needed for connecting it as a HID device to your pc and they have the correct size for the design of this case.
Assembly
Assembly is fairly straight forward. The screen will only fit in the case in a single way and needs to be screwed down with the 4 screws in the corners of the pcb.
The ESP32 board will come without the headers soldered to it, so you can either opt to solder the wires straight to the board or like I have done solder the headers to the pcb and use the cable that comes with the Nextion/TJC panel to connect the two of them.
Although the Nextion/TJC panels state to require 5V input, they will work fine straight from the 3V3 output pins from the ESP32 board. The TX wire from the screen will go to pin 15 (RXD1) of the ESP32 and the RX wire from the screen will go to pin 16 (TXD1) of the ESP32.
The ESP32 board needs to be inserted on the side of the case first where there is a little edge that will sit on top of the board to keep it in place. When it's pressed down (the metal shield of the ESP will sit flush on the bottom of the case) the PCB can be clamped down with the printable clamp to ensure it will not fall out. Before inserting the ESP32 board don't forget to attach the bottom stand as otherwise you won't be able to reach those screw holes anymore.
Once all components are screwed in place, press the top cover with the screen on the bottom part. It should press-fit together without further need of screws. When needed it can be taken apart easily as well to change the firmware of the the panel or ESP32.
Firmware
Firmware sources (ESP32 and Nextion/TJC firmware) can be found here: https://github.com/DrywFiltiarn/MacroScreenHIDFirmware
标签
模型来源
