Skip to content

6. Electronics design & production

1. Components

The basic electronic components and wiring will remain the same as in the Week 10 assignment, but with an increased number of motors and drivers. The PCB includes a Raspberry Pi Pico, four A4988 drivers, and connectors for motors, a servo, and limit switches. Updated BOM is documented on 7. BOM | Electronic components.


2. Schematics

I designed a PCB using a Raspberry Pi Pico. It includes stepper motor drivers, a servo motor, and limit switches. All modules connected via pin headers and sockets for easy replacement.

  • 1× Raspberry Pi Pico
  • 4× A4988 stepper motor drivers
  • Capacitors for power stability
  • Pin headers for motors and peripherals
  • Pins for 1 servo motor and 3 limit switches

In addition to Fab Library, I used the following Fusion Electronics (Eagle) libraries:

schematics

Mounting types: THT vs. SMT

I wasn’t fully aware of the differences or proper use cases between THT and SMT, but I had to make appropriate choices when placing components in the schematic.

  1. Through-Hole Mounting (THT)
    Components have long leads that go through holes in the PCB and are soldered on the opposite side.

    • Pros: Strong mechanical bond; good for connectors, large components, or prototypes.
    • Cons: Requires drilling; takes more space; less suitable for automated assembly.

    Examples: Resistors, capacitors, headers, large ICs, connectors

  2. Surface Mount Technology (SMT)
    Components are soldered directly onto the surface of the PCB without needing holes.

    • Pros: Compact; supports high-density layouts; ideal for automated production.
    • Cons: Requires precise equipment for soldering; harder to solder manually.

    Examples: SMD resistors, capacitors, ICs, LEDs, transistors.


3. Electronics design

a. PCB Layout

Single-sided routing was challenging due to many connections. I arranged the A4988s around the Pico in a circular layout.

  • Each A4988 needs 8 traces from Pico: STEP, DIR, 3 microstepping pins, ENABLE, 5V, GND
  • Circular layout reduced interference and crossing
  • Traces for left hand side A4988s are routed counterclockwise, and traces for right hand side A4988s are routed clockwise from the Pico and 12V supply

traces

b. Trace Width

While 16 mil width was validated during electronics production week, I calculated the trace width for 12V power supply using the DigiKey's PCB Trace Width Calculator.

Practical current flow

Although 12V 10A is supplied, this system is unlikely to draw 10A continuously under normal operation. Each of the 4 stepper motors draws about 1.5A from the 12V supply through A4988 drivers, so the total max current is estimated as:
I total = 4 × 1.5A = 6A

Parameter Value Note
Supply Voltage 12V
Max Current Estimate 6A
Copper Thickness 35 µm (1 oz/ft²) Standard PCB copper
Allowed Temp Rise 30°C Practical design value
Trace Layer External Top or bottom layer with air flow
Recommended Width ≥ 78.6 mil (2.0 mm)

I chose an 80 mil trace width for the 12V supply lines, and to make it clear, the A4988 GND traces were matched to the same width.


4. Electronics production

a. PCB Milling

genmitsu

PCB milling started smoothly. Midway, the V-bit end mill chipped slightly and burrs formed along many traces. I continued since I already spent over 30 min. and time was limited.

  • One microstepping trace was completely removed
  • Burrs remained even after sanding, especially in tight areas

The tip of the left V-bit endmill is slightly damaged, which caused significant burring during milling.

vbist

Later, I quickly tested a new V-bit for logo, it worked perfectly (because of limited time, I only isolated the outline).

bug

After milling, I tested all the traces for continuity using a multimeter. All traces worked except for the one removed. I also verified the layout by comparing the printed PCB design and the schematic on paper side by side.

paper


b. Soldering

Component placement was little too tight for my soldering skill. Burrs also made soldering harder, ended up in a solder bridge formed between GND and ENABLE.

  • Removed part of the trace to isolate the short
  • Used 2 jumper wires to bypass removed and bridged sections

soldering

workaround

I really want to mill it again but time is limited so I should probably stick with using this board.

I soldered wires and a pin socket to the limit switch, then wrapped it with heat shrink tubing. The switch supports both normally closed and normally open modes depending on the soldered pin. I chosed normally open.

limit_switch


c. Design errors

  1. SMT to THT capacitor
    When I tried to solder an SMT capacitor, I found the pad size didn't match. Thanks to some advice, I worked around it by drilling small through holes for a THT capacitor and soldering it from the top.

    capacitor

  2. Locker switch
    Originally, I planned to solder the locker switch directly to the PCB. But after milling, I changed my mind, since the switch needs to be mounted on the enclosure. I instead inserted a 1x3 pin header from the back and soldered it from the top (the middle pin is not used). I soldered pin socket to the locker switch wires similar to the limit switches.

    locker_switch


5. Bridge, continuity and component faiure

A. Bridge and continuity failures

I installed the Raspberry Pi Pico and A4988 motor driver, then tested the PCB, but some parts didn’t work. Following Instructor Tamiya-san’s advice, I checked for continuity and shorts and found both:

PCB_test

  • A bridge caused by a small piece of copper (left)
  • Continuity failures due to soldering issues (right)

    solder_issues

    Note

    To ensure continuity, I reheated all suspicious solder joints with a soldering iron. This often resolved the issue.

B. Component failures

After further testing, one motor still didn’t work. We measured the signals going into the motor drivers with oscilloscope, and swapped motors and drivers in different combinations. We found that one of the motor drivers was faulty.

oscilloscope

The step pulse continuously switches between high and low every 5 microseconds, as programmed in the Arduino code.

One A4988 driver wasn’t sending signals to the stepper motor, despite proper pulse input. I suspected a malfunction and replaced it with a red one borrowed from Tamiya-san.

Finally, I could test all the moror worked perfectly.

6. Files

*This PCB design contains errors that were worked around in post processing.

  1. Traces: FP_final_traces_3.png
  2. Logo: P_final_logo_2.png
  3. Mill holes: FP_final_holes.png
  4. Outline: FP_final_milloutline.png