As you can probably guess from the title, this post isn’t going to be full of wins. It’s more about how not to design your first PCB.
In my last post, I alluded to designing a Printed Circuit Board (PCB) for the messy electronics. I was so close to the finish line that I think I got a little ahead of myself and went too deep into it. I could’ve focused on the operation of the slider, but I really wanted the electronics to be finalized and cleaned up.
Building the PCB
I chose to use the program KiCad to build my PCB. After looking at some reviews, I saw that KiCad has a lot of great features that allow me to design PCB files and send them to manufacturers to have them made. There is a bit of a learning curve with KiCad.
This was again one of those areas where AI was incredibly helpful; it helped organize a plan for creating a PCB based on the design I already had, going from schematic to PCB, and then running checks to ensure everything was routed and at least viable from a manufacturing standpoint. However, you’ll see very shortly where I ran into issues and where completely trusting AI can backfire.
I will be touching on the general steps that I took and where I ran into issues. I’m missing steps in the process, but if you want to know more about how to make your own PCBs and how to get started, KiCad’s documentation is a great place to start. It’s got a built-in step-by-step tutorial. My approach was to build the tutorial based on my own design, which has its own issues.
Starting with the schematic
Once you’ve started a KiCad project, the first thing is the schematic. This is basically how all the parts and their pins are connected together. KiCad calls these “Symbols.” There is an extensive library for components and their associated symbols.
The basis for building my schematic is shown below; it was designed in Fritzing. While Fritzing has its own schematic and PCB builder, I find it’s better for nice visualizations of schematics rather than designing the PCBs.
The schematic looks quite a bit different, but it basically lays out every single pin of the circuit. The schematic doesn’t need everything placed in its exact place; however, it does need the pin orientations to be correct. Since I was mounting pre-made PCBs to this board, I only put in headers where the PCBs would mount.
I also didn’t need to connect all the parts together; KiCad makes use of labels to identify where components connect. However, for some of the smaller sections, I just found it easier to use wired connections between parts. This is evident with the optoisolator circuit.
In short, I needed to have symbols for every place where I was going to mount components on the board. So, for each of my smaller control boards, I needed to have a header set placed, and they had to be the right size. The sizing is set after you place all the symbols; then, you need to establish footprints for each component. For me, it was critical to get the header spacing correct; otherwise, my components wouldn’t fit when they were installed!
The PCB Editor
Once the schematic is done and footprints are assigned, then the PCB can be built. When this step is done, it’s a lot of lines and writing all over the place. However, off to the right, you can filter out all the different layers so you can see what you’re actually looking at. Not all of these layers end up showing up on the final PCB, but they can help identify different circuit routing and layers.
This is where all the holes and connectors in the schematic get placed on the board. I needed to do some measuring of my existing ESP32 boards as well as the LM2596 and Easydriver to ensure these could be mounted properly. For example, I needed to measure between the “J1” header and “J2” header on my schematic, as this is where the ESP32 would mount. This was a bit more work for the Easydriver because it had multiple 2-, 3-, and 4-pin headers.

Once everything is done, you can use the built-in 3D viewer to see what it looks like. I put in the labels to show everything.
One of the challenging things after placing all the components in the profile was routing all the circuits. Below is what the routing looks like. While it looks really messy, the red lines are the copper traces that would be on the top layer of the PCB, and the others are on the bottom. In some cases, you need to move circuits from the bottom layer to the top layer to ensure they get to the right place. Going from one layer to another uses what’s called a “via.”
The left picture shows the copper traces, and the right shows the outlines of the components they run to.
The biggest issue I ran into was getting all the grounds connected. KiCad has an option to basically create a ground plane that fills the whole PCB, which means I don’t need to separately connect them all. It was really tricky to make it work and kept failing the design rule checks, so I just connected the grounds together manually. As I learn more, I’ll figure out the other method (I think it’s a “ground flood”).
Once everything’s ready for manufacturing, you create a “Gerber” file, which is what manufacturers such as JLCPCB or PCBWay use to make the boards. I wanted the boards relatively quickly, so they ended up costing me ~$50 for 5 PCBs. Not the cheapest, but it is what it is.
My First PCB!
When they came in, I was very impressed with the quality. They looked super clean, and luckily, all the parts fit in their respective locations. The left is the top side, and the right is the bottom side.
All that was left to do was to solder in the components and test it out! We’re so close; nothing could go wrong at this point, right?
When I got everything soldered, I plugged it in to see if all the components powered up or if we’d see smoke.
All is not well in PCB town…
I learned as I was starting to solder everything together that one of the first mistakes I made was that I swapped the header locations of the LM2596: the positive and negative pins were on the wrong side! That’s why in the picture above you can’t see the LM2596; it’s because I had to solder it to the back side of the PCB.

One general good practice note that I missed was that since I was using a new LM2596, I didn’t adjust the output until after I’d installed the board. Bad practice; if the output was too high, I could’ve smoked my ESP32. I put it all the way to the lowest output and slowly adjusted it until I got a consistent 5V output. For future reference, adjust the LM2596 output prior to installation!
Easydriver Issues
When I installed my Easydriver board, the driver board got so hot when I tried to run it that it melted the solder on the board, and the chip fell off the PCB. I can’t figure out what caused this; I had a feeling that the V_ref for the output current to the motor was set too high, and I have a feeling it overheated the IC.
The other issue I discovered was that when I designed my PCB circuit, the “GND,” “STP,” and “DIR” pins were swapped. I’m embarrassed it took as long as it did to discover this. What it basically did was that when I got everything working, the slider would only go one direction because the direction pin on the driver was shorted to ground. This meant the motor would only go one direction, regardless of the direction signal.
When I looked back at the PCB design, I saw that the 3-pin orientation was swapped. Go me…
Welcome to Swap City
Sadly, those weren’t the only places where pins were swapped. I don’t know if I just had many pins backwards in my head when I was looking at the PCB in KiCad, but below is everything that was swapped.
- Pins 26 and 27 on the ESP32 went to the wrong optoisolators, so the shutter and focus circuits were backwards. Fixed with software pin assignments.
- Motor phase pins were swapped; I had to reverse them in the 4-pin connectors. This one was unclear to me, as I thought I had the phase pairs correct. However, once I swapped the 4-pin harness that ran to the JST connector on the board, the motor worked.
- Pins on the DSLR cable running to the optocouplers were swapped; the emitters and collectors were going to the wrong part of the DSLR wiring. I swapped the harness pins, and it worked fine.
Accepting the Result
As much as I wanted to make this board work, the swaps and the Easydriver swap issue made it so that the board design didn’t work. Yes, I could probably do some funky header swap stuff for the Easydriver logic sections, but with the fact that I already have to mount the LM2596 on the underside, I figured I had to accept defeat with this PCB.
I’m glad I went through the process of designing it; I learned a lot from KiCad. I’m sure I could’ve made the footprint much smaller, but at least I know how to make it work.
Next Steps
I reverted back to the previous iteration of my circuit board soldered on perfboard. It’s not perfect, but at least it works. I plan to update the design of the PCB on KiCad and get the second version re-printed.
I have some more updates to do with the power input, as right now I use an adjustable USB-C input dongle that configures the voltage to a 12V input from the battery pack. This PCB doesn’t have mounting points, so I’d like to put all the components on the PCB so the USB-C has a rigid mounting and plug on the board.
In the meantime, I also have yet to do more time-lapse trials; there are some software updates I need to do to get some of the control logic a little more refined.
In summary, lots more to come. Thanks for reading!























































































































































































































