Week 6: Electronics Design
Assignments
Group Assignments:
- Use the test equipment in your lab to observe the operation of a microcontroller circuit board (as a minimum, you should demonstrate the use of a logic analyzer)
- Document your work to the group work page and reflect on your individual page what you learned
Individual assignments
- Use an EDA tool to design a development board that uses parts from the inventory to interact and communicate with an embedded microcontroller
Group Assignment
During this week’s group assignment, we worked with a multimeter, an oscilloscope, and a logic analyzer to analyze and test electronic signals. I was already familiar with using the multimeter and the oscilloscope for measuring voltage, continuity, and observing signal behavior over time. However, the logic analyzer was new to me.
I found the logic analyzer especially useful for debugging microcontrollers. It allows you to visualize digital communication signals and verify whether a microcontroller is actually running code or transmitting data correctly. This makes it a powerful tool when troubleshooting programming or communication issues.
After using it during this assignment, I realized how valuable it can be for embedded development, and I will definitely use it in the future for testing and debugging my own boards.
Group Assignment – Electronics Design
Individual Assignment
Kicad
For this week assignment, I used Kicad to design a development board for an ESP32 microcontroller. I created a schematic and layout that included all necessary components such as power regulation, connection points for debugging and programming, led and a motor driver.
Here is the link for Kicad page: Kicad Page
Components Used in the PCB
- ESP32-C3-WROOM-02: Main microcontroller module with WiFi capability. It controls inputs (buttons) and outputs (LED and motor) and operates at 3.3V.
- AMS1117-3.3 Voltage Regulator: Converts 5V input into a stable 3.3V supply for the ESP32.
- 10µF Capacitors (x2): Used at the input and output of the voltage regulator to stabilize voltage and reduce noise.
- 0.1µF Capacitor: Decoupling capacitor used for filtering high-frequency noise near the microcontroller.
- Tactile Push Buttons (x2): Provide user input for interaction with the device.
- 10kΩ Resistors: Used as pull-up or pull-down resistors to ensure stable logic levels for the buttons.
- NPN Transistor (e.g., 2N2222 / MMBT2222A): Acts as a switch to control the vibration motor using a GPIO pin.
- 1kΩ Resistor: Limits the current going into the base of the transistor to protect the microcontroller.
- DC Motor Connector (1x02 Header): Provides connection for the vibration motor.
- Flyback Diode: Protects the transistor from voltage spikes generated by the motor.
- LED: Provides visual feedback to guide breathing or indicate system status.
- LED Current-Limiting Resistor: Prevents excessive current from damaging the LED.
- 1x06 Pin Header: Used for programming and serial communication (RX, TX, 3.3V, GND).
- 1x03 Pin Header: Auxiliary connection for power or external signals.
Schematic Design
The schematic was developed step by step, starting from the core of the system and progressively adding the required support circuitry. The ESP32-C3-WROOM-02 was selected as the main microcontroller due to its integrated WiFi capabilities, low power consumption, and sufficient GPIO availability for this wearable application.
I started with the ESP32-C3-WROOM-02 module and the AMS1117-3.3 voltage regulator. The board is powered with a 5V input, which is regulated down to 3.3V to safely power the ESP32.
Two 10µF capacitors were placed at the input and output of the regulator to ensure voltage stability and reduce fluctuations.
Two push buttons were included to allow user interaction. Each button is connected with a 10kΩ pull-up or pull-down resistor to guarantee a stable logic level and prevent floating signals when the button is not pressed.
A 1x06 pin header was included for programming and serial communication (RX, TX, 3.3V, and GND).
A 0.1µF decoupling capacitor was added near the microcontroller to filter high-frequency noise and improve reliability.
Since the vibration motor requires more current than a GPIO pin can provide, an NPN transistor was used as a switching device. The transistor allows the ESP32 to control the motor safely. A 1kΩ resistor was placed at the base of the transistor to limit the current coming from the microcontroller. Additionally, a flyback diode was included in parallel with the motor to protect the circuit from voltage spikes generated when the motor is turned off.
An LED was added to provide visual feedback. This LED can be used to guide breathing patterns or indicate system status. A current-limiting resistor was placed in series with the LED to prevent damage due to excessive current.
Additional headers were added for motor connection and auxiliary power or signal expansion.
Here is the final schematic:
Footprint Assignment
After completing the schematic connections, the next step was assigning footprints to each component. This step is essential because the schematic symbols represent only the logical connections, while the footprints define the physical dimensions and pad layout used in the PCB.
During this stage, special attention was given to verifying that the pin numbering in the schematic symbol matched the pad numbering in the footprint. Since KiCad connects pins based on their number (not their name), ensuring correct mapping between symbol pins and footprint pads was critical to avoid routing errors in the PCB layout.
Once all footprints were assigned and verified, the schematic was updated to the PCB editor to begin the physical layout process.
PCB Layout Design
After assigning the footprints, the schematic was transferred to the PCB editor. The layout process was carried out in multiple stages, carefully considering antenna clearance, power routing, and component organization.
When the PCB was first generated, all components appeared grouped together without organization. At this stage, the board only showed airwires indicating electrical connections between components.
This initial view helped identify which components needed to be placed close together based on their electrical relationships. No routing was done at this stage, as proper placement is critical before creating traces.
In the first placement attempt, components were arranged to reduce airwire crossings and improve routing flow. However, some components were positioned too close to the antenna area of the ESP32-C3-WROOM-02 module.
Since the ESP32 includes an integrated PCB antenna, it is essential to maintain a clear keep-out zone around it. No copper planes, traces, or components should be placed underneath or too close to the antenna, as this can significantly degrade WiFi performance.
After identifying this issue, the layout was revised to move components away from the antenna zone and ensure proper RF clearance.
Design Rule Verification
After completing both the schematic and the PCB layout, it is essential to run the Design Rule Check (DRC) to identify potential errors before manufacturing. The DRC verifies electrical connectivity, trace clearances, minimum spacing, unconnected nets, and other layout constraints defined in the board settings.
This step is critical because even if the board visually appears correct, small spacing violations, incorrect trace widths, or unconnected pads can cause the board to fail after fabrication. Running the DRC ensures that the design meets manufacturing requirements and reduces the risk of electrical or mechanical issues.
Downloadable Files
Connection Between This Week and My Final Project
This PCB design is directly connected to my final project, as it is intended to function as the main control board for my wearable device. The circuit was designed with that goal in mind, integrating the microcontroller, power regulation, programming interface, and output control into a single board that can be used in the final prototype.
However, this version is not necessarily the final iteration. Throughout the Fab Lab process, I will likely refine and improve the design based on testing and performance results. One important aspect that still needs evaluation is compactness. Since the final device is intended to be worn as a bracelet, I need to verify whether the current board dimensions are small enough to fit comfortably. If it turns out to be too large or impractical for wearable use, I will redesign and optimize the layout to make it more compact and easier to integrate into a wearable form.