Login

Your Position: Home > Headlamps > How do I decide what components to use on a custom PCB?

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

Author: Joy

Jul. 21, 2025

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

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 1N 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. (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. 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 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.

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.
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.

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 M (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.

A Complete Guide to PCB Design and Layout - Circuit Basics

Breadboards are great for prototyping circuits, but they aren’t so good for actually using the thing you’re building. At some point you’ll probably want a more permanent solution, and the best way to do that is to put the project on a PCB.

Moonleds supply professional and honest service.

In this tutorial, we will walk through the process of converting a schematic to a PCB layout and getting it produced by a custom PCB manufacturer. The performance of a circuit depends greatly on how it’s laid out on a PCB, so we also provide information on how to optimize your PCB design.

Using the right PCB design software is important, so be sure to check out our article on the The Top Five EDA/eCAD Programs for Circuit Design to find the best program for your needs.

Start With a Schematic

Before you start designing a PCB, it’s essential to have a schematic of the circuit. The schematic will serve as a blueprint for laying out the traces and components on the PCB. Most PCB design programs will import the component footprints and wires from the schematic into the PCB file, which makes the design process much easier and faster.

Component Footprints

Each symbol in the schematic needs to have a PCB footprint associated with it. The PCB footprint will define the component’s physical dimensions and placement of the copper pads or through holes on the PCB. This is a component footprint for the LM audio amplifier IC:

The footprint defines the component’s length, width, number of pins, pin layout, diameter of through holes, and more depending on the particular component. Now is a good time to decide which components you’ll be using.

Footprints for common components are included with most EDA/ECADS. But you might need to create your own footprint for some unusual components. Most EDA/ECADs have modules that can do this easily using dimensions from the device’s datasheet.

You can also find the footprint’s for many components online, so check there first before creating your own.

Once you’ve assigned component footprints to each schematic symbol, it’s time to start drawing the wires. Rather than explain the details of that here, I’ve made a video so you can watch me draw a schematic for an LM386 audio amplifier in EasyEDA as an example:

Organize the Circuit Into Sub-Circuits

The first thing to do is identify what each part of your circuit does, and divide it up into sub-circuits according to function. Keep the components in each sub-circuit grouped together on the PCB. This keeps the track length between components short. Here’s an example of different sub-circuits grouped together on a PCB:

Arrange components like resistors, capacitors, and transistors in a way that minimizes the length of the conducting traces. Long traces can pick up electromagnetic radiation from other sources which can cause interference and noise.

Aligning similar components in the same direction is also a good practice. This will give the PCB a more efficient and logical design.

Sub-circuits that dissipate heat or generate electromagnetic fields (EMF) should be positioned away from sensitive components. For example, in an audio amplifier the noisy power supply is always placed far away from the sensitive audio input circuit.

Daisy Chain vs Star Topologies

When deciding how to connect the different sub-circuits on your PCB, there are two common methodologies to consider – the daisy chain topology and the star topology:

These topologies are used to describe how sub-circuits (C2-C5) are connected to a power supply sub-circuit (C1).

In a star topology, multiple sub-circuits are directly connected to a central power supply. The advantage of the star topology is that if one sub-circuit fails, other sub-circuits will remain functional. It also ensures that each sub-circuit gets an equal supply voltage.

A daisy chain topology is when one sub-circuit is connected to another in a chain. A daisy chain topology reduces the length of traces and saves space on the PCB. But if one component fails, components further down the chain might also fail. It can also create a voltage drop and result in lower voltages at sections further from the supply.

In general, especially in audio circuits, the star configuration is preferred since the voltage drops caused by the daisy chain topology can create noise in the return path and reduce the available current supplied to parts of the circuit.

How to Route Traces to Minimize EMF Noise/Interference

A moving charge produces a magnetic field, and a magnetic field can produce an electric field. On a PCB, electric currents are flowing in different directions and magnitudes through the conducting traces. If a PBC is poorly designed, parts of the circuit can act as an antenna that generates or picks up electromagnetic fields (EMF). EMF can generate unwanted electric currents in circuits, leading to noise or unpredictable effects in sensitive integrated circuits. Electromagnetic interference should be minimized in circuits when possible.

Here are some ways to minimize EMF interference in a PCB design:

  • Keep all traces as short as possible
  • Avoid creating loops with traces
  • Avoid 90° angles in trace bends (use 45° angles instead)
  • Keep high speed signals separate from low speed signals
  • Keep return paths short
  • Route single supply (Vcc) traces close to ground paths
  • Route differential (+/-) traces as close to each other as possible

PCB Shape and Size

Most PCBs are designed to be square, but round, triangular, and other interesting shapes can be made as well. The shape of a PCB can be defined by setting dimensions for the PCB outline in the PCB design software.

If the PCB will be mounted inside of a box or housing, the dimensions of the PCB cannot exceed the inner dimensions of the housing. It’s important to know the dimensions of any enclosures that will be used before laying out the PCB. For a better fit and easier installation, allow a few millimeters of space between each side of the PCB and the inner wall of the housing.

The components will also have an effect on the size of the finished PCB. For instance, surface mounted components are small and have a low profile, so the PCB can be smaller. Through hole components are larger, but they’re often easier to solder.

User Interfaces

Carefully consider the location of user interfaces like buttons, switches, potentiometers, LEDs, and power inputs, as these can limit the ways a PCB can be laid out. Need an LED placed next to a power switch to indicate that the device is powered on? Or need a volume potentiometer to be placed next to a gain potentiometer?

For ease of access, it is usually a good practice to place any power supply connections or other input/output connections near the edge of the PCB.

For the best user experience you might have to make some compromises and design the rest of your PCB around these components.

Heat Management

Some components generate heat when an electric current flows through them. Potential heat sources may include voltage regulators, op-amps, transistors, and even copper traces and vias. You might need to employ heatsinking to remove excess heat from these devices.

If your PCB is already assembled, you can use a thermal imager to measure the heat signature of the PCB while it is operating. This can help you to identify components or sections that are emitting excessive heat.

If heat is an issue, consider replacing linear voltage regulators with switching voltage regulators. You can also use heat sinks or cooling fans. However, this could make the overall package larger and heavier.

Heat can also be dissipated from a component by using thicker copper traces. For dissipating heat away from SMD components, thermal via arrays are commonly used.

Single-Layer PCBs

One of the first choices to make in PCB design is the number of layers to use. There are a lot of factors that might influence this decision. For example, the complexity of your circuit, manufacturing costs, pin density, signal layers, operating frequency, and PCB turnaround time, among others.

For most hobby projects, single or double layer PCBs are the easiest to design. Shown below is a cross section through a single layer PCB:

A single layer PCB has just one copper layer on the top of the PCB. This copper layer will be etched with your PCB layout files, leaving only the copper traces on the PCB. Single-layer PCBs are cost-effective, easy to understand, and convenient for manufacturing.

Double and Triple Layer PCBs

Larger circuits can be difficult to design on a single layer PCB. As design complexity increases, it gets harder to route the traces without intersecting one another. Luckily there are double, triple, and multi-layer PCBs that allow traces and planes to be routed on electrically isolated layers.

Double-layer PCBs have two copper layers, one on top and one on the bottom:

Are you interested in learning more about Custom Led Pcb? Contact us today to secure an expert consultation!

Three-layer PCBs have a copper layer sandwiched between the top and bottom layers:

Multi-layer PCBs pack even more copper layers inside the PCB. Very complex PCBs have up to 100 layers!

Connecting the Layers

When designing a multi-layer PCB, you may need to create links between the various layers of your PCB. You can use a via or a component through hole to achieve that.

In Latin, via means a path or way. In the context of PCBs, vias create an electrical connection between layers in the PCB. Basically, a via is a conductive hole that has copper pads on each layer.

The three main types of vias are through-hole, blind, and buried:

You can also connect layers with a component’s through hole. This image shows the difference between a through hole and a via connecting top and bottom layer traces in a PCB design program:

Ground Layers and Power Planes

A ground layer is a layer of copper covering large parts or the entire bottom of a PCB that is connected to the circuit’s ground terminal:

Ground layers are a great way to supply ground to circuits for several reasons:

  • Many traces can be shortened or even eliminated
  • The large copper area shields against electromagnetic fields
  • The copper area dissipates heat
  • Reduces the loop area of traces, reducing EMF interference

Using copper planes for the Vcc, V+, or V- power supply traces is also beneficial. Routing wide power supply traces over a ground plane minimizes the loop area of the circuit and reduces EMF interference in the power supply. Power planes are usually added to the top of a single layer PCB or to the middle of a two layer PCB.

Layer Thickness

Most PCB manufacturers will let you order different layer thicknesses. Copper weight is the term manufacturers use to describe the layer thickness, and it’s measured in ounces.

The thickness of a layer will affect how much current can flow through the circuit without damaging the traces. Trace width is another factor that affects how much current can safely flow through the circuit (discussed below).  

To determine safe values for width and thickness, you need to know the amperage that will flow through the trace in question. Use an online trace width calculator to determine the ideal trace thickness and width for a given amperage.

PCB Traces

If you look at a professionally designed PCB, you’ll probably notice that most of the copper traces bend at 45° angles. One reason for this is that 45° angles shorten the electrical path between components compared to 90° angles. Another reason is that high speed logic signals can get reflected off the back of the angle, causing interference:

If your project uses digital logic or high speed communication protocols above 200 MHz, you should probably avoid 90° angles and vias in your traces. For slower speed circuits, 90° traces won’t have much of an effect on the performance of your circuit.

Trace Width

Like layer thickness, the width of your traces will affect how much current can flow through your circuit without damaging it. Use the trace width calculator above to determine a safe width.

How close traces are to components and other traces will also determine how wide your traces can be. If you’re designing a small PCB with lots of traces and components, you might need to make the traces narrow for everything to fit.

The Silkscreen Layer

The silkscreen layer is used for printing text and other graphics on the PCB. This is where you will put component outlines, pin numbers, part numbers, component references, and any other information or logos you want to be printed on the PCB.

Each component footprint can be labelled with a name (LM386, VOLUME, etc.), a prefix (R1, R2, C1, C2, etc.), and value (10 μF, 100 Ω, etc.). Decide which information is important to have on your PCB and add it accordingly.

Creating the PCB Layout

Now that we’ve discussed some off the ways you can optimize your PCB design, let’s see how to layout a PCB in EasyEDA.

Open your schematic in the schematic editor, and click on the “Convert Project To PCB” button:

The footprints associated with each schematic symbol will be automatically transferred to the PCB editor:

Notice the thin blue lines connecting the components. These are called ratsnest lines. Ratsnest lines are virtual wires that represent the connections between components. They show you where you need to route the traces according to the wiring connections you created in your schematic:

Now you can start arranging the components, keeping in mind the design tips mentioned above. You might want to do some research to find out if there are any special design requirements for your circuit. Some circuits perform better with certain components in specific locations. For example, in an LM386 amplifier circuit the power supply decoupling capacitors need to be placed close to the chip to reduce noise.

After you’ve arranged all of the components, it’s time to start drawing the traces. Use the ratsnest wires as a rough guide for routing each trace. However, they won’t always show you the best way to route the traces, so it’s a good idea to refer back to your schematic to verify the correct connections.

Traces can also be routed automatically using the software’s auto-router. For complicated circuits, it’s generally better to route traces manually, but try the auto-router on simpler designs and see what it comes up with. You can always adjust individual traces later.

This video will show you how to draw traces in EasyEDA’s PCB editor:

Now it’s time to define the size and shape of the PCB outline. Click on the board outline and drag each side until all of the components are inside:

Design Rule Check

Consider running a design rule check if you want to verify whether your PCB meets user defined parameters for a set of geometric constraints. Design rule checking ensures that things like trace width and the spacing between components falls within pre-defined parameters. This can help prevent manufacturing errors and problems with placing components on the PCB. Most EDA/ECAD programs have the ability to run design rule checks on your PCB layout.

At this point it’s also a good idea to double check your PCB layout against your schematic to make sure that everything is connected properly. If you’re satisfied with the result, the next step is to order the PCB.

Ordering a PCB

Start by clicking the “Fabrication Output” button in the top menu of the PCB editor:

This will take you to another screen where you can choose the options for your PCB order:

You can select the number of PCBs you want to order, the number of copper layers, the PCB thickness, copper weight, and even the PCB color. After you’ve made your selections, click “Save to Cart” and you’ll be taken to a page where you can enter your shipping address and billing information.

You can also download your PCB’s Gerber files if you want to send them to a different manufacturer:

Gerber Files

Gerber files are a set of image files that contain the patterns used to manufacture your PCB. All of the files are compressed into a single .zip file. There is a separate file for the copper traces, silk screen, and locations of drill holes and vias:

Making your own custom PCB is a lot of fun, and the results can be very rewarding. Hopefully this article will help you get your prototype circuit onto a PCB. Let us know in the comments if you have any questions, and let us know what PCB design projects you have planned. If you liked this tutorial and want to get more like it, be sure to subscribe!

The company is the world’s best Cob Led 600w supplier. We are your one-stop shop for all needs. Our staff are highly-specialized and will help you find the product you need.

55 0

Comments

Previous: None

Join Us