Here, you can briefly understand the performance of the keyboard in practical applications.
The keyboard has two modes - step mode and continuous movement mode/ pã
Step 2: collect everything!
You will need to:
-Arduino Pro micro 32u4 or mouse that mimics a USB PC keyboard
-Button switch - I used a very expensive (20 dollars a piece) NKK kp02 switch. I used it from my friends. They are push-button switches with built-in RGB LEDs. But if you don't need fancy led effects, you can use any button switch at will. Alternatively, you can use some switches with regular RGB LED holes to slide in or slide in.
-Tlc5940 IC (only if you need led effect). I used the IC itself, but you can use the splitter board if you don't intend to make your own PCB.
-3D printer (optional)
-PCB making skills (optional)
-Basic electronic knowledge
-For some time
Step 3: schematic diagram
The schematic diagram is very simple.
I use some RC de dithering circuits on the switch (see Figure), so I don't have to worry about the switch bounce in the software. The LED in the switch has a common anode.
For tlc5940 LED driver - I made my own PCB and welded the IC directly to the PCB. The resistance between Iref and GND sets the current that drives the LED.
If you plan to use a breakout board, review the breakout board schematic. Connecting wires should be very simple.
If you use a splitter board as an LED driver, you may not need to use 7 decoupling capacitors.
Step 4: PCB and housing
PCB is not an essential step in this tutorial, because I use a good program that I don't love my friends, and the purchase cost of my switch is very high, so I believe many of you won't make the PCB I make.
I encourage you to use the distribution board and motherboard wiring connection project, or you can design your own PCB to adapt to more economical switches and LEDs.
I designed a fast PCB in Altium designer. I use this program because I have a license because I use it every day. I know this program is far less expensive than hobbies.
If someone wants Altium or PCB Gerber files to say in the comments, I'll send them to you.
The box is drawn in Autodesk Inventor (it's not a good program to love friends, but I also use it at work. I'm used to it). If anyone wants a. STL file for 3D printing, please comment and send it to you.
Step 5: Software
The code is generated in the Arduino environment.
I use the button library to manage all buttons. It has good functions and can read buttons like key. Uniquepress () and key. Ispressed (), making our life easier.
The integrated Arduino keyboard library is used to make the circuit board work like a PC keyboard.
Tlc5940 library, used to control LED dimming and complete all beautiful fade in and fade out.
I attached the final Arduino code. The key is mapped to an additional image similar to a conventional PC keyboard in the code for ease of processing.
Code can be easily modified for various purposes.
Step 6: done!