Post by vesa on Nov 4, 2018 7:33:40 GMT
Finally some days ago I finished my keyboard mod for the C64 Mini. Here’s some pictures and information just in case anyone might be interested.
But first, here is a video of the keyboard in use, which I shared in C64 Mini Facebook group earlier:
Here’s the part list:
-66* 6x6x10mm tarctile push button
-1* locking 5.8x5.8 mm switch for shift lock
-Arduino micro ATmega32U4
-67 SMD 1N4148 diodes
-wire
-0.4mm silver wire
(-3d printer)
Also, the great QMK Firmware is used, thanks to the creators. github.com/qmk/qmk_firmware/
Fortunately, the C64 Mini case has quite much space inside so it was easy to fit everything there.
First, I downloaded picture of C64 Mini and planned the keyboard matrix. This is the third and almost the one I finally used:
Then I removed and scanned the keyboard to see if the buttons fit. Here’s the keyboard scanned and mirrored, also button rows and columns added.
I didn’t want to think about the space key mechanics so I added two buttons to it.
After planning the matrix I did a smaller keyboard just to see if it works with the C64 Mini.
Then uploaded QMK based firmware to the Arduino and plugged it to the Mini. And it works, great.
At the same time, I was already modelling the keyboard using Tinkercad, here’s some pictures:
First with only seven buttons with the columns.
Then the whole keyboard without the function keys which are a separate print.
Here’s the function key part.
And the second layer with rows and placeholders for the diodes. Also the function keys are in this part.
This is the column part with traces coloured, there are three jump wires because I didn’t want to make the board too crowded.
My current 3d printer only prints 14 cm so I had to cut the boards in two.
Some test parts.
Final first layer, tried to glue two parts together.
First version of second layer, the function keys are still missing. I don’t have an image of final part after printing.
Putting the buttons in place and soldering the columns. Attached the wire to the base by warming the wire a bit so the filament melts and the wire connects to it.
First layers in the case and first half (final version with function keys) of second layer put on top of it. Still one column to do. The jump wire buttons will be soldered on top of the second layer.
Second piece of second layer installed on top of the buttons.
This is what it looks like from the other side at the moment. The orange line is my test of filament welding to see if the pieces stick together better with it. Still need to sand the welding a bit to make it more even with the base.
One more check to see that the keyboard fits to the case on top of the C64 Mini board.
Then the diodes.
Rows and jump wires soldered.
At some point I had cut the keys. Later needed to sand and file them smaller to fit better. I only had sand paper and a file so it took quite much time and was not the most fun part of the project.
Rows and columns with the wires and connectors. Later I removed the connectors and soldered the wires directly to the Arduino to save space.
Plan for connecting rows and columns to the Arduino. Pinout picture from robotdyn website: robotdyn.com/micro-atmega32u4-mu.html
Then some QMK customizing and uploading to Arduino to see if it works.
And it did.
Finally soldered a usb adapter to the C64 Mini board and connected it with micro-usb adapter to the Arduino. And covered places with Kapton style tape. Yes, the another usb port is now unusable.
Finally started to glue the keycaps on top of buttons.
I used small blocks to make them fit together.
The final product. The keys look like they are pointing all over and they are. And they are not completely on even level either but It’s good enough for me for now.
It would probably be better idea to order a real PCB and solder buttons and diodes to it instead of multilayer 3d printed thing like I did but this was also a test if I could create something like this.
Also, my first C64 Mini board either got broken while doing this or it was broken from the beginning. I didn’t test it before starting to install the Arduino on it. The problem is with another usb port which stops working after using it a while. Another port works fine. This took me too long time to figure out, I thought the keyboard was faulty. Fortunately, it was not my only C64 Mini so I just changed the main board and the keyboard worked longer time.
I wanted to include a usb hub inside the case so I would still have two usb ports available but didn’t do that, at least yet. Also, uart mod was in my mind but didn’t do that either. Maybe I will try to make those two mods later.
I hope this was fun post for you. Maybe I forgot something or there is too much information. I wish I had taken more photos while doing this.
But first, here is a video of the keyboard in use, which I shared in C64 Mini Facebook group earlier:
Here’s the part list:
-66* 6x6x10mm tarctile push button
-1* locking 5.8x5.8 mm switch for shift lock
-Arduino micro ATmega32U4
-67 SMD 1N4148 diodes
-wire
-0.4mm silver wire
(-3d printer)
Also, the great QMK Firmware is used, thanks to the creators. github.com/qmk/qmk_firmware/
Fortunately, the C64 Mini case has quite much space inside so it was easy to fit everything there.
First, I downloaded picture of C64 Mini and planned the keyboard matrix. This is the third and almost the one I finally used:
Then I removed and scanned the keyboard to see if the buttons fit. Here’s the keyboard scanned and mirrored, also button rows and columns added.
I didn’t want to think about the space key mechanics so I added two buttons to it.
After planning the matrix I did a smaller keyboard just to see if it works with the C64 Mini.
Then uploaded QMK based firmware to the Arduino and plugged it to the Mini. And it works, great.
At the same time, I was already modelling the keyboard using Tinkercad, here’s some pictures:
First with only seven buttons with the columns.
Then the whole keyboard without the function keys which are a separate print.
Here’s the function key part.
And the second layer with rows and placeholders for the diodes. Also the function keys are in this part.
This is the column part with traces coloured, there are three jump wires because I didn’t want to make the board too crowded.
My current 3d printer only prints 14 cm so I had to cut the boards in two.
Some test parts.
Final first layer, tried to glue two parts together.
First version of second layer, the function keys are still missing. I don’t have an image of final part after printing.
Putting the buttons in place and soldering the columns. Attached the wire to the base by warming the wire a bit so the filament melts and the wire connects to it.
First layers in the case and first half (final version with function keys) of second layer put on top of it. Still one column to do. The jump wire buttons will be soldered on top of the second layer.
Second piece of second layer installed on top of the buttons.
This is what it looks like from the other side at the moment. The orange line is my test of filament welding to see if the pieces stick together better with it. Still need to sand the welding a bit to make it more even with the base.
One more check to see that the keyboard fits to the case on top of the C64 Mini board.
Then the diodes.
Rows and jump wires soldered.
At some point I had cut the keys. Later needed to sand and file them smaller to fit better. I only had sand paper and a file so it took quite much time and was not the most fun part of the project.
Rows and columns with the wires and connectors. Later I removed the connectors and soldered the wires directly to the Arduino to save space.
Plan for connecting rows and columns to the Arduino. Pinout picture from robotdyn website: robotdyn.com/micro-atmega32u4-mu.html
Then some QMK customizing and uploading to Arduino to see if it works.
And it did.
Finally soldered a usb adapter to the C64 Mini board and connected it with micro-usb adapter to the Arduino. And covered places with Kapton style tape. Yes, the another usb port is now unusable.
Finally started to glue the keycaps on top of buttons.
I used small blocks to make them fit together.
The final product. The keys look like they are pointing all over and they are. And they are not completely on even level either but It’s good enough for me for now.
It would probably be better idea to order a real PCB and solder buttons and diodes to it instead of multilayer 3d printed thing like I did but this was also a test if I could create something like this.
Also, my first C64 Mini board either got broken while doing this or it was broken from the beginning. I didn’t test it before starting to install the Arduino on it. The problem is with another usb port which stops working after using it a while. Another port works fine. This took me too long time to figure out, I thought the keyboard was faulty. Fortunately, it was not my only C64 Mini so I just changed the main board and the keyboard worked longer time.
I wanted to include a usb hub inside the case so I would still have two usb ports available but didn’t do that, at least yet. Also, uart mod was in my mind but didn’t do that either. Maybe I will try to make those two mods later.
I hope this was fun post for you. Maybe I forgot something or there is too much information. I wish I had taken more photos while doing this.