geekhack Projects > Making Stuff Together!

How do I decide what components to use on a custom PCB?

(1/3) > >>

LOTA:
I am working on designing a full-size keyboard with the same layout as a Cherry G80-3000 (104 keys, 3 status LEDs, 1.00u and 0.50u spacing between key groups), full n-key rollover over both USB and wireless connectivity, RGB underglow and per-key RGB LEDs, hot-swappable Cherry MX switches (plus support for as many other switch-types as is practical, but MX is my priority), and whatever onboard hardware is necessary to make it plug-and-play with any computer after the initial setup.

I haven't been able to find an existing PCB that fits all my requirements, so I've been looking into designing a custom PCB. I've found several guides on how to do so, but while they say what categories of components are necessary (microcontroller, diodes, resistors, et cetera), they don't say how to decide what specific types to use, instead including lines like "I'm using X but you can use whatever is best suited to your design" (except for a general consensus to use 1N4148 diodes).

How do I decide what types of microcontroller and other components to use?

TomahawkLabs:
As someone who is also trying to teach themselves hardware design with no background in electronics, engineering, or coding, good luck. In regards to diodes, you are looking to confirm that the diodes can handle the Amps of the circuit. USB (for our context) has 5v @ .500A (500 mV). Any diode you can find are going to work, I have used 1N4148 with no issues.

I think the best solution for your design would be take as many variables out that you can. First one would be the actual MCU hardware design. Don't reinvent the wheel when it comes to microcontrollers (MCU). Find a MCU that has the amount of GPIO you need and design a PCB for the MCU to mount to. RaspberryPi Stamps are probably the best bet for available GPIO. Small, should fit in a bare area near the LEDs or near the arrow cluster.

At this point you are left with designing a PCB to fit the stamp (which takes all the voltage regulation, crystal oscillation, etc out of the equation). Now you're left with:
1. Lock Indicator LEDs (x3) - Power + capacitor + resistor will get this working.
2. Per key LEDs (x104) - What kind of LEDs do you plan on using. They will likely be SMD so unless you have familiarity with soldering SMD or have a reflow oven, this will be very hard to do by hand.
3. Switches (x104) - Easy to find and are cheap
4. Diodes (x104) - Easy to find and are cheap
5. USB ports/Breakouts - Adafruit sells these in a variety of styles/shapes that could work.
6. Wireless capabilities - You would have to find out the specific circuitry design to implement this.
7. Hot swap capabilities (x104) - Not hard since you can buy hot swap sockets that solder to pads on the underside of the PCB.
8. RGB underglow LEDS (x??). These are also going to be SMD most likely, see above.
9. Cherry MX support + others - Don't even worry about that now. Alps SKCM/SKCL or cloness are the only other real switchtype to consider.

If you were to ask me I would pare down your wants to make the most complete, but simple board. All of the wants above need to be coded to actually work. It's not like a premade PCB that the firmware is already written for you need to flash. You would be needing to do a lot of, if not all of the coding by hand as it will be unique in which pins associate with what, etc.

I would scrap the per key LEDs and I would scrap the underglow LED. You just dropped x120+ parts (all surface mount) and remove hundreds of wire traces. Unless you have a real affinity for using Alps switches and plan to use it, ditch the multi switch or layout approach. It's complexity that would be nice, but will likely never be used. Alps keyboards never followed a standard layout. You would need to find a suitable host with all the keycaps, in a profile you like, and fits the curves of the board. I would also skip wireless as well. Unless you have the knowledge to create the circuit and understand the firmware to implement that hardware, you will have some struggles getting it to work properly.

Good luck with your adventures. I personally am trying to learn hardware design in relation to the ATMEGA32A. Through Hole components and a well documented history of use cases to gain inspiration.

zegonix:
have you decided on how to make the firmware? if you want to use tmk, qmk, zmk, kmk,.. be sure to check their compatible microcontrollers. another thing to look at, are the features the chip provides (U(S)ART interfaces, ADCs, DACs, etc.)

TomahawkLabs:

--- Quote from: zegonix on Mon, 26 August 2024, 02:52:51 ---have you decided on how to make the firmware? if you want to use tmk, qmk, zmk, kmk,.. be sure to check their compatible microcontrollers. another thing to look at, are the features the chip provides (U(S)ART interfaces, ADCs, DACs, etc.)

--- End quote ---

My plan is honestly just learning Arduino studio and the translating that to C as best I can to write to an ATMEGA32A.

Findecanor:
(Hmm.. I thought I had replied already... forum reset from backup or did I just not click Post?)

- Most people use the firmware QMK for custom mechanical keyboards. Even if your official firmware would not use it, I would still select an established microcontroller which is supported by QMK, so as to give builders a choice.
- Individual RGB LEDs will need one or more LED controllers. There is support for a few in QMK.
  A LED controller drives the LEDs in a matrix with PWM instead of varying voltage, and this method keeps the current draw within USB's 500 mA limits. It interfaces to the microcontroller over I²C or SPI.
The same for RGB side-glow.

I think supporting Cherry MX-compatible switches is enough. There is no room for two types of hot-swap sockets and LEDs (pick two out of three), and lower-profile switches are best in a lower-profile case altogether.

Both LED controllers, RGB LEDs and hotswap sockets are surface-mounted, but hotswap sockets are easier to solder by hand. I would have RGB LEDs only if I would have the PCBs manufactured complete with mounted components so that the buyer wouldn't have to solder anything.

Navigation

[0] Message Index

[#] Next page

Go to full version