geekhack Projects > Making Stuff Together!
How do I decide what components to use on a custom PCB?
zegonix:
well the current consumption is more or less the same, whether you control your leds via pwm or separate controller (preferably integrated in the led; e.g. 'neopixel'). the power need for creating light is still the same and depends mostly on the efficiency of your circuits..
regarding the firmware, i would advise to go with an existing framework like the mentioned tmk, qmk, zmk or kmk. tmk has been around the longest from what i understand. qmk was forked from tmk at some point (been a while though) and is the most widely spread i think. from what i heard, zmk is very energy efficient. kmk is mostly python if i remember correctly, to me that was a no no, so i didn't look into it any further. i currently use qmk, but will at some point get into zmk, as i have some quarrels with qmk, totally personal preference though, qmk works perfectly fine and the people on the discord are very helpful and patient.
regarding multi switch style support.. i would probably make separate pcbs per switch style, or go for a solder pcb.
i made two pcbs so far and i used the stm32f401rct. it is a bit overkill for a keyboard, but also convinient to work with. but as someone already mentioned, the easiest way is to use a small dev board like the rp pico or the blackpills.
@TomahawkLabs if you want to make your own firmware from scratch, keep in mind that you will need a usb stack. writing that yourself will take a lot, REALLY A LOT, of time and effort.
TomahawkLabs:
--- Quote from: zegonix on Wed, 28 August 2024, 03:02:38 ---
@TomahawkLabs if you want to make your own firmware from scratch, keep in mind that you will need a usb stack. writing that yourself will take a lot, REALLY A LOT, of time and effort.
--- End quote ---
I don't "want" to write the firmware from scratch. What I am currently researching is more of a baby step solution. From what I gather the 32U4 is more or less the same as a ATMEGA32A, but the 32u4 has built in USB support and the ATMEGA32 had additional GPIO, but lack integrated USB support, but that is resolved using V-USB, which shouldn't be too hard to implement. Some Zener Diodes, a few resistors, etc. My current plan of attack is to create a custom 32u4 board with a 3x3 switch matrix, 3 bare neopixel LEDS, a single LED for testing, a single switch wired to a specific GPIO for testing locking switches, and a reset/bootsel button. From there I should be able to use Arduino studio to make a quick and dirty macropad without any consideration for USB hardware/firmware. Once I get the firmware for the board to function (3 neopixels for the 3 status LEDs tied to caps, scroll, and num lock) to work as intended, I should be able to create another similar PCB but using the ATMEGA32A THT chip and the VUSB hardware to go into a prototype of what I want. If that works successfully, I can translate that to a full size PCB by expanding the matrix and import past versions of the firmware. Lots of work ahead, but then I can isolate certain variables to make it easier to add features.
The end goal is a full size PCB using VUSB and the ATMEGA32A for a complete THT project. USB data/power/ground pins vs a connector to use any style connectors. RGB LED status lights that are user changeable, and a locking capslock key. No underglow, no per key LEDs, no wireless, etc. Just a boring full size keyboard with THT parts and RGB LED (to assign color, not for effect) status lights. An ambitious project, but I have the time to learn.
zegonix:
well THT is quite the restriction in terms of microcontrollers.
i can come up with some reasons to go THT but i would like to hear yours.
TomahawkLabs:
--- Quote from: zegonix on Fri, 30 August 2024, 02:17:46 ---well THT is quite the restriction in terms of microcontrollers.
i can come up with some reasons to go THT but i would like to hear yours.
--- End quote ---
It is very restrictive, but from my research the ATMEGA32A is the best choice for my project. It should be supported by QMK/TMK because it's the same family of microcontrollers as the 32u4 (once VUSB is configured). It comes in a DIP40 form factor which allows for more PINs than similar THT microcontrollers and is readily available. The justification for THT was user serviceability and accessibility. Anybody with a cheap soldering iron should be able to buy a bare (unpopulated) PCB and solder all the necessary components to the PCB without the need for reflowing or having the PCB manufacture pre-solder SMD components to complete the project. VUSB Solution B (Level Conversion on D+ and D-) is achievable with two 3.6v Zener diodes, and 3 resistors.
My personal goal is to make a THT drop in replacement PCB for the Apple M3501 (Apple AEK II) keyboard that I can wire to the original ADB connector cable, with a USB end. The experience would be a drop in solution to make AEK II keyboards USB compatible using the original case, connector, and cable. The only visual give away would be the RGB status LEDS (I like the idea of choosing a color other than green) and the fact the cable has a USB port on one end and a Apple ADB (which is really just a 5-pin Mini-DIN connector).
The ATMEGA32A has 32GPIO pins. I will need 1 for "Data In" on the first Bare LED Neopixel, 1 for the Caps Lock (I have never been able to get locking switches to work in a matrix), 6 for the rows, and 21 for the columns for 29 total. 3 extra for expansion/additional features. subtract the LEDs and you have enough for SPI displays, etc.
I want to remove as many barriers as possible to get people into making their own custom keyboards. I want to, ideally, have an open source hardware "platform" where people can take the schematic and make their own PCB to revive old keyboards with a modern PCB. I see a lot of users on this forum who want to make their own modern PCB or custom layout, but due to a lack of engineering experience are stuck dreaming. Having the hardware already resolved, a user would just need to use KiCad to make the puzzle fit without worry about part values, schematics, design, math, etc.
zegonix:
fair enough. lqfp packages are also solderable by hand, but it is a bit harder to do and probably takes a few tries for people new to soldering.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version