Numpad
Hardware- 26 Devlogs
- 54 Total hours
A basic Numpad accessory for keyboards without it!
A basic Numpad accessory for keyboards without it!
Shipping and BOM
Made the BOM and sourced parts. Briefly explored switching from the XIAO rp2040 to the Waveshare rp2040 zero. The deal that made that cheaper ran out, so I am back to the XIAO.
Shipping was annoying. Eventually, I got my pcb from PCBway (chaeaper than JLC with shipping) on Global Direct shipping. Turns out it’s DDP, but it wasn’t clear originally. Case I am getting 3d printed from my local library for $3.50. Soldering equipment and the XIAO RP2040 devboard, I am getting from Amazon and Microcenter. The rest of it (cheap basic components) I am getting from AliExpress.
I am Submitting this Project on Macondo. It better suits what I want in the shop, and It’s more convenient for me because of when my school starts.
Made a toggle key that will activate when pressed.
Technically, it’s not on the keymap, but a chord combo(Plus + Minus).
Main Problem today was that I I ran out of codespace hours today. With some research, I found Firebase Studio (Unlimited hours) by google. However, they are conveniently stopping support and no longer supporting new projects as of 2 days age. Eventually I settled on using github’s built in vs_code IDE, which works even after you run out of codespace hours. Hackatime installed on there, but it wasn’t correctly connecting to the correct hackatime project, but instead linking to a new one. When I tried to fix it, it wouldn’t connect at all.
Eventually I just edited it in the vs_code IDE. Will try to get hackatime working tomorrow. I think it might start working again if I delete .wakatime-project (me trying to make it work) and add the project name on settings.json.
Added more symbols
__
Added support for power, remainder, and floor division symbols
Stopped displaying calculator inputs and Added Dot, Clear, and Backspace functionality
__
Hijacked keyboard.process_key so that nothing would display on the screen. Pointed it to it’s old sequence if not in calc_mode
__
Added decimals by checking weather or not the current number (a or b) already had a decimal in it. Differentiated between them with (or without) the presence of a operator. Made new state[“a/b}] variables for that
__
Defined Clear and Backspace as entries in class RemoverKeys, as part of KMK’s Keys class. Then added them to other_operators_list and custom functions to them.
Added oled support for the local calculator
Directly edited the oled_extention.py file to update every time there is a input regarding the raw_str input.
__
Also added Running total (use the answer of the last calculation as input for the next) and Padding, adding spaces between entries, (ex: “a+b=c “–> “a + b = c”
Made interpreter for local calculator
__
Made an interpreter so that when state[“is_active”] is true, will convert the kmk inputs to a str. It will then separate that into operator, a and b, and calculate the result.
__
However, KMK does not have a way to receive keyboard input updates , meaning it won’t work. To fix this, I am converting it to an exention, which does have that ability.
Made Custom OLED Extension for KMK
__
KMK’s display drivers are trash, after they removed peg support.
Rather than use an older version of kmk, I used ai to help me add OLED support.
__
I used the ai to interface with the low level circuitpy i am unfamiliar with (I use desktop python). I also typed out my own code. Without doing this, I would have to switch everything i had to another firmware on an unknown language.
Made Layer 2 of the macropod
__
Made a shortcuts layer. I Used control directly than using a modifier for convenience. Main time use was figuring out TapDace for the recording.
__
Not having “combos = Combos()” caused an error. Turn’s out there is a python formatting reason.
If anyone understands why, can you explain in a comment?
Other errors in code were basic format errors
__
Only have built in calculator and OLED display left to make
Base KMK and added OLED & Layer support
__
Made the base KMK matrix & keymap (very easy)
Then added OLED configuration (SSD 1306 with i2c protocol)
-P..S. The protocol works in a very interesting way
__
Explored some Layer switching that I want. I use all my keys, so I have a Temporary active when holding down the enter key, and a toggle with the Plus and Minus Keys together. (KC.LT and combos)
__
Still need to complete keymap of 2nd layer and add actual stuff to display on OLED
Set up Github Codespaces (correctly) for KMK
_
Imported kmk as a git submodule on codespace.
Then configured settings.json for correct depth when programming.
_
Everything froze halfway through. Just had to delete & remake settings.json and Developer: Reload Window.
Setting up KMK environment (Unsuccessful)
I am trying to make the kmk code for my macropad, so I’ll only have to debug when i get my parts. I am trying to set up the environment on Github Codespace.
__
However, I desided to try to link it directly, instead of uploading kmk to my repo to use as a library directly. I tried to use PyPI and pip commands to directly link it. After troubleshooting (mostly with ai because I am new and don’t know how anything on github works at all) . Eventually, I found out that kmk has non traditional formating, and when inquiring about it, found out it was not on PyPI at all.
__
Going to try to direcly upload kmk to repo to use as a library
Case Finished
Custom Insert Completed
Custom Case Insert - part 1 (Took Way too long)
I made a custom insert right above the USB-c port. I want to make this interchangeable, so I can swap designs in and out, whenever.
_
There were way too many problems making it:
1 - Made Border sketch on wrong surface. When switching from the bottom to top of a part, the entire sketch rotates, and gets misaligned. Solved by Remaking Sketch using USE. (10 mins spent)
__
2 - Switched to wrong plane for making the insert. It would have been easier to extrude down and then use Boolean. I switched to the front plane, after already making sketches for the top plane. Solved by switching back to a save that had the top plane sketches through version history. (30 mins spent)
__
3 - Forgot that computers make mistakes. When I Used the Boolean tool to make the insert from the extruded hole, I found that the shape wasn’t entirely parallel where it was suppose to be. I spent about an hour (felt like) rechecking all my measurements. When i asked gemini (out of ideas), I realized it was probably a float error. I didn’t think that Onshape would suffer from the same problems as my really unoptimized python code. (30 mins spent)
__
__
Sorry if I am ranting. I hate float errors
Suppressed PCB Calculations
I needed to do this so I could continue making my case withought a lot of waiting. Plus, it is also a good habit to never render anything you don’t need if it signifigantly affects your performance.
When I started deigning, I used the PCB as a reference. However, now the pcb is slowing my computer down a ton, and I want to fix that, so I suppresed the PCB file.
This broke my usb-c connector cutout, and shifted all my other components to one corner (as they were in a chain that used the pcb as a reference).
I fixed this by deleting the relationships between the projected lines and the reference on the pcb. I learned you can use “Show dependencies” on the PCB’s import feature to see all the relationships.
Made USB-C cutout and connected the top plate to the case.
Originaly, there was a 0.4 mm gap that i made for the pcb, but I forgot to fill that for the top plate (would have been really bad).
Ai helped a ton to figure out the size of the USB-C cutout.
Case (part 3)
Made the Case walls/base and fixed OLED cutout (again). Also rechecked Screw measurements.
Main problem was I had a hard time with the Use tool in Onshape
Case (part 2)
Got Top Surface completed and planned for the screwholes/heated inserts.
I am going to make a hole for the screw the whole way, and a slightly bigger one for the heated inserts at the end.
Started Case Design
Imported ai03 and pcb files to help with case design
Used wrong setting for my import which made me have to restart halfway through.
Assign 3d Models for PCB
I used the models listed in https://hackpad-v2-backup.pages.dev.
I assigned 3d models to the schematic. I will use this to help design my case.
Finished wiring PCB!!
Felt like ages. First there was a ton of congestion right below the microcontroller, and I had to run some wires there, so I rewired it.
Then I realized my PCB was exceeding the 100x100mm limit, so had to move the microcontroller down and rewire that area (again).
The project is taking longer than I though. I am making so many stupid mistakes. However, I am proud of how quickly I re-wired at the end. Still wasn’t very fast compared to what someone who knows KiCad could have, but really fast for me.
PCB Design (part 1)
Made Half of PCB
First I tried Geographically Remaping components. It worked for the Switches but diodes went all wack.
Had to manually fix that. Learned to use “m” to move the switches and it’s so much easier than dragging (because the switch don’t keep getting stuck for “optimal” wiring paths)
The area right below the microcontroller was very tight (6 paths in a 4 wide area). I had to rewire that a lot.
Started PCB
I started the PCB and it took a long time, because I didn’t know how to use anything.
A few Problems:
0- Footprints unlinked again (a wrong setting?)
1-Remembered IDK what side the OLED’s screen goes in relation to the pins
2- Forgot that flipped means make traces go to the back
3- Forgot I’m hand soldering = DO NOT run trace next to pin unless they connect
4- Procrastinated Switch Layout until end
Wired OLED
Wired up the OLED and changed some of the matrix wiring connections to do that.
Finished Reconfiguring KiCad
On my previse Lapses, I accidently included private info, so I took them down. I made a mklink/j to my project location so it wouldn’t show my account name in the future. Had to re-install the care package after that, because it unlinked.
(I did mklink /j “C:\KiCad_Projects” “C:\Users--User–\Documents\KiCad” in cmd prompt as administrater)
Schematic For PCB
Made the Schematic for the PCB. I was wonky in my placement so had to restart halfway through. Still need to assign footprints though.
Numpad - Starting the project
I Want to Make a Numpad accesory to laptoms that don’t have one. Currently, I have made the Wiring plan in ASCI and have started on the schematic.
It took me a while to get KiCad started. I made the dumb move to install it in a non-default location, and had to go through a long troubleshooting process before giving up and reinstalling it. I forgot to click record on lapse, so I unfortunately don’t have that recorded.