Basic guide to start developing your own products part 2: PCB design

Brian Brocken
10 min readFeb 14, 2021

In the first part of this guide we talked about what mechanical design software to use and how to get started with them. I gave you some insight in what workflows can be used to get from a concept to working prototype, what steps are necessary to do so and what tools you can use to get to the first prototype.

Part 1: mechanical design can be found here

Part 2 of this guide will go more in depth on how you can bring your prototype to life with the help of a custom PCB. I’ll give you some different ways on how to create your PCB, show you what software and websites you can use to create the PCB and I’ll explain the workflow behind going from an idea to a fully functional PCB with the help of a few examples.

PCB design

Designing your own PCB is one of those things that looks to be almost impossible to do but in reality it’s nothing more than a neat way to connect some passive and active components together. Of course things can get pretty complicated relatively fast (like most things). Having a basic understanding of electronic components is a plus, but in reality most of the basic circuits with all the necessary components and values can be easily found online. Most of the time these circuits can just be straight up copied and pasted into your design (an example will be given later under the subtitle “workflow”) of course you should have a basic understanding of how they work. This is what electronic engineers do and this is also what software engineers do (with code). Don’t make it yourself harder than it needs to be 😉

In school they teach you to calculate every component you have in your circuit while in reality most engineers just throw some resistors and capacitors together on a breadboard and see if it blows up or not, mainly because the electronic components to create a test setup are dirt cheap. (I’m
exaggerating a bit, most electronic engineers who have some years of experience in the field roughly know what values they need to use for a specific application eg: a 220 ohm resistor for a led powered by 5V, but you get the point).

The easiest way (in my opinion) to put some intelligence in your prototype (eg: anything more than turning a LED on and off) is to use a microcontroller, for example an Arduino. When you decide to create a PCB with an Arduino you have a few design options.

Option A: use an of the shelf Arduino and create a “shield” PCB that you can snap onto it.
Option B: download an Arduino schematic and implement the Arduino circuit with your own circuit, essentially combining the Arduino and your expansion shield, creating one embedded PCB.

Shield VS Embedded PCB
Shield VS Embedded PCB

In the example above we can see almost 2 identical CNC-machine control boards. The left one is a shield on which a standard Arduino Nano can snap on to. The right one is an embedded PCB where they took the circuit and parts from the Arduino Nano and combined these with the circuit and parts of the expansion shield, creating 1 embedded PCB. The arrows point out the Atmega328p processor on the 2 boards to show the difference between the 2 boards.

Software

The software I’m using to create my PCB’s is EasyEDA. The advantage of this software is that it’s connected to the component catalog of the LCSC website. Which means that whatever components you’re using you can just export to a BOM-file and order them directly from LCSC. EasyEDA is also connected to the JLCBCB website. So when you’re finished designing your PCB you can just click ‘Fabrication’ -> ‘PCB order’ and you can order your PCB directly from the JLCPCB website.

workflow

Ok I feel like I might’ve bombarded you with a lot of information already so now we’ll take a step back and have look at what steps are necessary to create your first custom PCB.

I will try to explain these steps with the help of a little project I did a while back, A Universal Motion Controller (UMC) (video). All it does is basically take the signal from an RC receiver and control the speed and direction of a DC motor according to this signal. I also added a few features like a reverse polarity circuit, a simple Low-pass filter to smooth out the supply voltage and a few indicator LEDs, but more on this later. Like you can see in the picture below the PCB is build up like a shield, which is the simplest way to get started. Also if this is your first PCB, go for the through hole type and not SMD. Through hole is a lot easier to solder than SMD. SMD components can get quite small and often require special solder techniques.

Universal Motion controller PCB
Universal Motion Controller PCB

Step 1: The first step in creating a PCB is to create the schematic for it. Like I said before most of the circuits you need can just be found on the internet so that’s exactly what I did. In the picture below you can find the schematic for the PCB and I’ll try to explain every part of the circuit and how I got to this.

Universal Motion Controller Schematic
Universal Motion Controller Schematic
  • Black dashed line: We’ll start with the Arduino Nano. The Arduino Nano is the intelligence of the circuit and all it does is to take in the signal from the RC receiver, compare it to the shaft position of the servo motor and then control the speed and direction of the DC motor with the help of an external BTS7960B motor driver. The Arduino Nano is the only part that needs to be programmed, more on this in the next chapter “programming”.
  • Red dashed line: Here we can find the reverse polarity circuit of the PCB. The PCB could function just perfectly fine without this little circuit but it’s just a nice feature to have, it protects your PCB against stupid mistakes you or someone else will make in the future. This is a great example of a circuit that can just be taken from the internet and thrown into your design. After some googling I found this design by Vince: 18650 Battery charger reverse polarity protection. I used the circuit under “3.Mosfet” because it said “GREAT :-)” and the others didn’t (just kidding I tested out all the circuits he listed and like he mentioned, the circuit that used the Mosfet had the best results). If you’re wondering why the Mosfet and the transistor have a different type number than the ones found on the original circuit, that’s just because I had these parts lying around and the specs were close enough to the parts used in the original circuit.
Implementation of the Reverse Voltage Circuit found online into the PCB
Implementation of the Reverse Voltage Circuit found online into the PCB
  • Blue dashed line: This is just a simple voltage divider that can be used to measure the supply voltage. It reduces the supply voltage from 12 Volts to around 4 volts (instead of 5V to have some margin on the input voltage 12V-16V) which the Arduino then can read out on analogue input “A1”. When the voltage is lower or higher than a specified range it can disable the motor driver and light up a red indicator led. A voltage divider can be a great tool to measure the supply voltage of your projects and you can easily design one yourself with the calculators you can find online. One example of such a calculator can be found here.
  • Yellow dashed line: This is a Power indicator LED (male header pins that go to a LED), in series with a resistor to limit the current. Calculators that can be used to calculate the value of the series resistor can once again be found online. An example can be found here.
  • Green dashed line: This capacitor is being used as a simple Low-pass filter to smooth out the supply voltage. I usually just start of with random value, throw it into the test circuit and see if it’s sufficient, if not I grab one with a higher value. In this case which value to use can also be found in the Arduino forum.
  • Orange dashed line: The RGB-LED can be used to indicate different states of the UMC. The LED is being controlled by the outputs of the Arduino Nano. The same calculator as with the Power indicator LED can be used to calculate the resistor values for the LEDs.
  • All the other stuff you can see on the schematic are just header pins. These connect to external components like the RC receiver, potentiometer, BTS7960B motor driver etc.

Step 2: Test out the circuits you just blindly copy and pasted from the internet. Before you put your efforts in turning your schematic into a PCB, it’s a good idea to test out certain parts of your circuit, especially if it’s your first time using them.

The circuit I had never used before was the reverse polarity circuit, everything else I had already done before, but it’s never a bad idea to test out every single element of your design.

Prototyping your circuit can be done through a breadboard or with the help of some prototype PCB board (needs soldering). I decided to go with the later one. My test setup can be seen below. (video)

Reverse polarity circuit test setup
Reverse polarity circuit test setup

Step 3: Turning your schematic into a PCB. When your schematic is finished you can easily transform it into a PCB by clicking the “Convert to PCB” button. All the components with the right dimensions and right amount of pins etc will now be brought into a new environment. In this environment you can drag the parts around to your own liking. The contour of the PCB can be dragged around to get the desired shape and to fit all the components.

When you’re happy with the layout you can let the auto router do it’s thing. The auto router connects all the components together with a copper trace. The components are being connected together by the auto tracer according to the connections made in your schematic. If you need to make changes to the schematic you can update the PCB layout according to the new schematic. It’s possible you need to run the auto router again or place some traces manual.

PCB layout
PCB layout

Keep in mind that the width of the traces need to be adjusted to the current that’s flowing through them. Just like everything else, calculators for this particular application can be found online. An example can be found here.

If for some reason you need drive a higher current through a trace and the trace itself is getting to wide, you can always chose for traces with a higher copper weight. The standard copper weight is 1 oz , but you can chose up to 2 oz copper weight to reduce the width of your traces.

In case some details about turning your schematic aren’t that clear yet (which is understandable), you can find a great tutorial by GreatScott here.

Step 4: Order all your parts online. Once your PCB design is finished you can export your components to a BOM file (Bill Of Materials) and your PCB to a Gerber file under the fabrication tab. You could also press the ‘part’ and ‘PCB’ order and everything will be export and redirected to the right website for you.

Ordered PCB and components
Ordered PCB and components

Step 5: Soldering. When trying to solder your PCB together, here are some tips and tricks that might be handy for you.

  • If possible use a solder station where you can set the solder temperature. Soldering with an unregulated soldering iron can cause the damage to the components when they get to hot.
  • Use helping hands. These will make your life a lot easier.
  • Use Solder paste with a flux core.
  • Start out with soldering the smallest component and work your way up to the larger components from there.
  • When you’re finished soldering, make sure there’s no flux left on the board, this might cause contacts to corrode when current is applied. You can clean the residual flux of with some cleaning alcohol.

Part 2: PCB design conclusion

I hope part 2 of this guide gave you some insight in how you go about creating a custom PCB from scratch. I know there’s a lot more involved if you truly want to mass produce your PCB’s for finished products (stress tests, EMC tests, CE certificate, other certificates) but I do hope this helped you a bit on your way to create a PCB for your initial prototype. You should now know how you can create a schematic, where you can find most of the circuits (online), how to test the circuits, how to convert the schematic into a PCB and how to manufacture the PCB.

--

--

Brian Brocken

I'm a maker. I design and create my own projects and build them from scratch. My projects involve mechanical, electrical, PCB design and some programming.