This shows you the differences between two versions of the page.
pm:prj2024:ccontasel:matei.ionescu0703 [2024/05/15 18:37] matei.ionescu0703 [Plate Design] typo |
pm:prj2024:ccontasel:matei.ionescu0703 [2024/05/27 15:21] (current) matei.ionescu0703 add journal |
||
---|---|---|---|
Line 190: | Line 190: | ||
And putting it all together: | And putting it all together: | ||
{{ :pm:prj2024:ccontasel:matei.ionescu0703:build-left.png?400 |}} | {{ :pm:prj2024:ccontasel:matei.ionescu0703:build-left.png?400 |}} | ||
+ | |||
+ | |||
+ | ==== Building The Keyboard ==== | ||
+ | |||
+ | I finally got all the components. | ||
+ | |||
+ | {{ :pm:prj2024:ccontasel:matei.ionescu0703:physical-pcbs.jpeg?400 |}} | ||
+ | {{ :pm:prj2024:ccontasel:matei.ionescu0703:physical-case_3d_printed.jpeg?400 |}} \\ | ||
+ | |||
+ | |||
+ | It was time to build the keyboard. I soldered all the 44 diodes, 44 switch sockets and 44 LEDs. For socketing the microcontrollers I used resistor legs as pins in order to fit the case as mentioned above. | ||
+ | |||
+ | {{ :pm:prj2024:ccontasel:matei.ionescu0703:solder-setup.jpeg?400 |}} | ||
+ | {{ :pm:prj2024:ccontasel:matei.ionescu0703:solder-pcb.jpeg?400 |}} \\ | ||
+ | |||
+ | After I bulit the first half, I wrote some quick scripts to test that everything works fine. | ||
+ | |||
+ | {{ :pm:prj2024:ccontasel:matei.ionescu0703:half-build.jpeg?400 |}} \\ | ||
+ | |||
+ | And after another day of soldering I had two working keyboard halfs. | ||
+ | |||
+ | {{ :pm:prj2024:ccontasel:matei.ionescu0703:final-result.jpeg?400 |}} \\ | ||
+ | |||
+ | |||
+ | ===== Software ===== | ||
+ | The original plan was to use the LUFA library, but due to lack of time I ended us using the Arduino Framework. | ||
+ | |||
+ | ==== Matrix Scanning ==== | ||
+ | Scanning the matrix is the task that runs most of the time on the microcotroller. To store the state of the matrix I am using bit operations. Each half of the matrix is represented as a uint64_t number. Each half of the keyboard reads the state of the matrix representing the keys that are pressed. Then the right half of the matrix sends using UART its matrix state uint64_t number to the left half. The state of all keys on the keyboard is then obtained by using the bitwise OR operation. | ||
+ | |||
+ | |||
+ | ==== Sending Keys to PC ==== | ||
+ | The layers of the keyboard are represented in the keys.h file. According to which keys are pressed in the matrix state, the according key will be sent to the PC. When a layer changes all keys from that layer will be released. | ||
+ | |||
+ | The layouts of the keyboard look like this: | ||
+ | {{ :pm:prj2024:ccontasel:matei.ionescu0703:keyboard-layout.png?400 |}} \\ | ||
+ | |||
+ | |||
+ | |||
+ | ==== RGB & OLED ==== | ||
+ | I have also implemented brightness and color control of the RGB lights on the keyboard. When the the brightness is modified the change can be seen on the display, and after a short period of time it goes back to displaying the logo. When changes happen, the Left half will send the new color to the right half over UART. | ||
+ | |||
+ | |||
+ | |||
+ | ===== Conclusion ===== | ||
+ | This was a challenging project, that took me a couple of months to design, build and program, but the result is awesome and I am happy I'm writing this part of the article on the keyboard I built from scratch. | ||
+ | |||
+ | ===== GitHub ===== | ||
+ | All the files for this project are available at [[https://github.com/Matei77/RootKB]], including the case design, PCB and software. | ||
+ | |||
+ | ===== Journal ===== | ||
+ | {{ :pm:prj2024:ccontasel:matei.ionescu0703:gantt.png?400 |}} \\ | ||
+ | |||