Week 6 : Electronics design - REVIEW¶
Week 6 assignment could be categorized as follows:
-
Group assignment
- Lab testing equipment & analysis
- Multimeter
- DC power supply
- Oscilloscope (REVIEW)
- Logic analyzer (REVIEW)
- Lab testing equipment & analysis
-
Individual assignment
- Embedded microcontroller system
- System simulation
- PCB design
- Embedded microcontroller system
Basics of electrical components
-
Capacitor
- Stores electric charge
- Blocks DC signal
- Allows AC signal to pass
-
Voltage-current relationship: a capacitor smooths voltage by supplying or absorbing current when the voltage changes -- REVIEW
-
The capacitive reactance \(X_C\) is calculated as:
\[ X_C = \frac{1}{2 \pi f C} \]Where:
- \(X_C\) = capacitive reactance (ohms, Ω)
- \(f\) = signal frequency (Hz)
- \(C\) = capacitance (farads, F)For DC (\(f = 0\)):
\[ \lim_{f \to 0} X_C = \infty \]This shows that a capacitor blocks DC but allows AC to pass.
- Use case: filter noise, smooth voltage, store energy temporarily
-
Diode : REVIEW
-
- Stores energy in magnetic field
- Allows DC signal to pass
- Blocks AC signal (resists current changes)
- Voltage-current relationship: an inductor smooths current by developing voltage when the current changes - REVIEW
Inductor
- The inductive reactance \(X_L\) is calculated a s:
\[ X_L = 2 \pi f L \]Where:
- \(X_L\) = inductive reactance (ohms, Ω)
- \(f\) = signal frequency (Hz)
- ( ) = inductance (henries, H)For DC (\(f = 0\)):
\[ \lim_{f \to 0} X_L = 0 \]This shows that an inductor allows DC but blocks AC.
- Use case: filter noise, smooth current changes, can create voltage spikes
-
Resistor
- Resists current flow, causing a voltage drop and dissipating energy as heat
-
Wires
- Thicker diameter, higher current capacity
-
Other notes
- More than 10 A could kill a person
- 120 V doesn't kill you, but can create cardiac arrest, etc
- VCC = VDD = voltage
Source: ChatGPT by OpenAI, March 2026
Lab testing equipment & analysis¶
The following sections present the results of the lab equipment testing and its analysis.
Basics of electrical testing equipments
-
Multimeter
- Purpose: Measure voltage (V), current (A), resistance (Ω), and test continuity (whether components for example are electrically connected to each other).
- How to Use:
- Plug the black probe (ground/common) to the COM jack on the multimeter and the red probe (positive) to the appropriate jack based on the parameter that will be measured. For example for voltage, mA range current, and resistance, use the V/Ω or mA jack. For higher current, use the 10 A jack.
- Set the multimeter to the desired measurement mode (Voltage, Current, Resistance, or Continuity).
- Connect the probes to the circuit/component (red = positive, black = ground/common).
- Read the measurement on the display.
- For continuity, listen for a beep indicating a closed circuit.
- Tips:
- Ensure proper range is selected to avoid damage. Start from highest range is recommended and work down from it.
- Always connect in parallel for voltage and series for current measurement.
-
DC Power Supply
- Purpose: Provide controlled DC voltage and current to power circuits safely.
- How to Use:
- Connect the positive and negative terminals of the power supply to the circuit (red = positive, black = ground).
- Set the voltage to the required level.
- Set the current limit to protect the circuit from overcurrent.
- Turn on the supply and verify output using a multimeter.
- Tips:
- Start with lower voltage/current and gradually increase.
- Always ensure the circuit and supply grounds are connected.
- Over current protection (OCP) is a safety feature that limits or shuts off current to prevent damage, while constant current (CC) is a normal operating mode where the power supply maintains a set current for the load.
-
Oscilloscope - REVIEW
- Purpose: Visualize time-varying signals, waveform shape, frequency, amplitude, and noise.
<!-- - How to Use:
- Connect the probe tip to the signal point and the ground clip to the circuit ground.
- Adjust the time/div and volts/div knobs to fit the waveform on the screen.
- Observe the waveform and use measurements like frequency, peak-to-peak voltage, and rise time.
- Tips:
- Use proper probe attenuation (1X, 10X) to avoid loading the circuit.
- Be careful with high voltages; use isolation if needed. -->
- Purpose: Visualize time-varying signals, waveform shape, frequency, amplitude, and noise.
<!-- - How to Use:
-
Logic Analyzer - REVIEW
- Purpose: Monitor multiple digital signals simultaneously and analyze timing relationships.
<!-- - How to Use:
- Connect the analyzer channels to the digital signals you want to observe, and connect the ground lead to the circuit ground.
- Launch the logic analyzer software on your computer.
- Set the sampling rate according to the signal speed.
- Start capturing the signals and analyze timing, edges, or protocol data.
- Tips:
- Label each channel to avoid confusion.
- Capture enough time frames to see the full behavior of communication protocols. -->
- Purpose: Monitor multiple digital signals simultaneously and analyze timing relationships.
<!-- - How to Use:
Source: ChatGPT by OpenAI, March 2026
Multimeter¶
The digital (provides numerical readings directly on a digital screen) multimeter DT‑660B is used for the test. Available features include :
- Voltage measurement (AC/DC)
- Current measurement (AC/DC)
- Resistance measurement
- Continuity test
- Diode test : Applies small voltage from multimeter and measures the forward voltage drop across the diode. Typical value 0.5-0.7V for silicon diodes.
- Battery test : Applies small internal load to the battery while measuring voltage (i.e. different with the aforementioned voltage measurement that is based on no-load voltage)

The tests conducted include voltage, current, resistance, and continuity measurements. This type of multimeter does not have an auto-ranging feature, so the user must manually select the appropriate range for the parameter being measured (such as voltage or current).
Voltage of a solar panel (refer to the final project for context) was measured. According to the product specifications, the expected output voltage under standard conditions is approximately 9 V.

The measured open-circuit voltage (voltage with no load) was around 5.7–6.0 V under room lighting. No further comparison with outdoor values was conducted to do a sense check on these values as it was a rainy day at the time of measurement and since the primary aim was to simply practice using the the equipment.

A random resistor was then measured first to determine its resistance value, so that it could be used later to evaluate current.

It was found out from the reading that it's a 5.2 kΩ resistor. With that, a current of approximately 1.18 mA is expected as an output from the solar panel.

The multimeter, however, showed a current of 0.24 mA instead of the theoretical 1.18 mA. Several factors could account for this discrepancy, including the limited accuracy of the multimeter. Nevertheless, given the small magnitude of the current, the values were not evaluated further, and it is assumed that the demonstration of the measurement procedure is sufficient.
Since the human body has a much higher resistance compared to the components being measured - and electricity naturally prefers the path of lower resistance - it is generally safe to touch the multimeter probes or the device under test while doing measurement
DC power supply¶
While the original circuit (see simulation section) was powered using a 9 V and 1 A power adapter, and a breadboard power supply module that converts the voltage to 5 V, this test aims to analyze the result of utilizing a DC power supply.

The DC Power Supply DP605C is used for the test. Available features include:
- Adjustable voltage output : Set precise voltages up to the rated maximum.
- Adjustable current limit : Protects circuits by limiting the maximum current supplied.
- Overload voltage (OVP) and current protection (OCP) : automatically shuts off or limits output to prevent damage.
The next videos demonstrates the experimental setup and the results of it. The DC power supply was configured to provide a constant voltage of 5 V and a constant current limit of 1 A.
It is observed that the measured current fluctuates, although it remains below 1 A. This behavior is expected due to the nature of the components in the circuit, particularly the two servo motors, which draw varying current during operation. Methods to smooth these current spikes will be explored in the coming weeks. This will become especially important when a (variable) solar panel is introduced as the main power supply.
Oscilloscope - REVIEW¶
Logic analyzer - REVIEW¶
Embedded microcontroller system¶
The circuit introduced in Week 4 has been further developed by adding an additional servo motor and two photoresistor sensors to support the dual-axis tracking of a solar panel. A simulation is first performed to verify whether the system can operate correctly with the XIAO ESP32-C3 as its core. Based on the simulation results, a corresponding printed circuit board (PCB) is then designed to implement the updated system.
System simulation¶
The initial simulation was based on the XIAO ESP32C3 microcontroller.
Interestingly it was observed that the D3 pin seemingly appear to not function correctly as an analog input (i.e. stays 0) - this trend persists even when the connection were rearranged to different pins. The behavior suggested that the board could only reliably accept three analog inputs.

This limitation was also tested physically by connecting sensors to different pins on the board, but the issue persisted. The serial monitor also seems to give a hint on the limitation of the XIAO ESP32C3.

Fortunately, during Week 4 the Seeed Studio XIAO RP2040 was also evaluated and since it provides four analog input pins, the final testing and implementation were conducted using that microcontroller instead.
And voila.
PCB design¶
Basics of PCB
Printed Circuit Board (PCB) is a board used to mechanically support and electrically connect electronic components using conductive tracks, pads, and other features etched from copper sheets laminated onto a non-conductive substrate. In comparison to for example breadboard and wires, it makes a better organization of connections and makes mass production easier.

Reference : ultralibrarian, DigiKey
- Top Layer: Upper copper layer where most components and traces are placed.
- Bottom Layer: Lower copper layer for additional traces and through-hole soldering.
- Traces: Copper paths that connect components electrically.
- Via: Small plated hole connecting traces between layers.
- Through Hole: Hole for component leads to pass through and be soldered.
- Silkscreen: Printed markings showing component locations and labels.
- Solder Mask: Protective layer over copper to prevent solder bridges (i.e. avoid wrong solder which leads to "jumping" to another trace leading to unwanted short circuit) and corrosion.
- Substrate: Base material (usually FR4, indicating that the material is fire resistant up to NEMA 4) providing insulation and mechanical support.
Terminologies : - Airwires : Visual guides that show the electrical connections from the schematic that still need to be routed on the PCB. - Footprint: The physical layout of a component on the PCB, including pads, holes, and dimensions for soldering. - Schematic: A diagram showing the electrical connections and relationships between components in a circuit. - Schematic Symbol: A graphical representation of an electronic component used in a schematic. - Pick-and-place: A type of automated assembly equipment used to grab and place components on a bare board before soldering.
Source: ChatGPT by OpenAI, March 2026
The following steps outline the PCB design process using Electronic Design Automation (EDA) tools - KiCAD in particular - from creating the schematic to developing the board layout in the PCB editor. This section focuses on the design stage only and does not cover production processes or the generation of the Bill of Materials (BOM).
Tutorials on how to use KiCad are readily available online. The workflow in KiCad though can generally be divided into two main stages: schematic editing and PCB editing.

The schematic editor is where the electrical design begins. Components are added and organized into a functional circuit without a "real connection". The schematic serves as the blueprint for the PCB. When the schematic is transferred to the PCB editor, airwires will be generated. Visual illustrations could be seen in the next few screenshots below.
The PCB editor is used to translate the schematic into a physical board. It handles the placement of components, routing of traces, defining board edges, and preparing the design for fabrication. Essentially, it transforms the logical schematic (i.e. schematic) into a manufacturable printed circuit board.
A library of components that maps to the official inventory list of the Fab Academy is available as a plugin called FabLib . This means users do not need to create custom symbols or footprints unless they are using components not available in the Fab labs (see the screenshot again for reference). Users usually do not need to create custom symbols or footprints because the library already maps available components in the fab lab, though custom parts can be made if using components outside of Fab Academy. The repository mentions two installation methods; however, installation via the Plugin Content Manager did not work, so the plugin had to be installed manually using the downloaded file. The latest version of the FabLib plugin at the time of writing is kicad-fablib_0.0.3.zip.

To use the library in KiCad, user needs to go to the schematic editor : - Go to Preferences → Manage Symbol Libraries. - Select the Project Specific Libraries tab, which means this libray is only available to the current project rather than being available globally to all KiCad projects. - Click Add Existing Library. - Navigate to the location of the FabLib zip file and select it.
If everything works, the library should appear.

This could also be seen when selecting symbols in the schematic editor under the "Fab" tab.

Below is the schematic design for the planned circuit based on the previously mentioned simulation. All components are designed as SMD components. The XIAO RP2040 will be mounted directly onto the PCB. SMD pin sockets are included for the photoresistors, allowing their pins to be inserted through the pads. Additionally, vertical pin headers are provided for connecting the motor that probably will be placed at higher heights than the board.
Through-Hole vs SMD Components
Through-Hole (THT) - Requires drilled holes in the PCB for component leads. - Mostly used today for structural mounting or components requiring strong mechanical support for example USB or power jacks.
Surface-Mount Devices (SMD) - Does not require drilled holes; components are mounted directly on the PCB surface. - No need to bend component leads. - Components are much smaller. - Easier and faster for automated machine assembly.
Vertical vs Horizontal Pin Headers
Vertical Pin Headers
Pros - Save horizontal PCB space - Easier access for wiring from the top
Cons - Increase the overall height of the PCB assembly - Wires can apply sideways stress on the pins
Horizontal (Right-Angle) Pin Headers
Pros - Lower vertical profile - Wires exit parallel to the PCB, which can reduce stress - Suitable for compact enclosures (e.g. when the board is mounted vertically against a wall)
Cons - Require more horizontal PCB space - Slightly harder to access from above
Source: ChatGPT by OpenAI, March 2026

The schematic symbol does not have to match the PCB footprint, as it represents the component electrically while the footprint defines its physical layout.
Instead of connecting all components with long wires, labels were used to define the electrical connections in the schematics for a "cleaner look finish". By assigning the same label name to different wires, KiCad automatically treats them as part of the same electrical net. Note : global labels were used to create these connections which means if there are multiple schematic sheets, all components with the same labels will be connected. Since there is only one sheet in this case, it works just fine.
Afterwards, the Electrical Rules Checker (ERC) in KiCad is used to verify that the schematic follows basic electrical design rules. It automatically scans the schematic to detect potential issues such as unconnected pins, incorrect pin types, or missing power sources.

After running the ERC for this schematic, several errors were reported. These errors do not necessarily mean that the circuit will not work, but they indicate situations that KiCad considers potentially problematic and that should be reviewed. When clicking on an error in the ERC results list, KiCad automatically moves the schematic view to the location of the issue. The problematic component or connection is marked with a pink flag.
One of the reported errors is item not annotated. In this case, the error occurs because the component only has a name such as SocE, without a numerical identifier. KiCad expects each component reference to include a number (e.g. SocE1).
Another reported error is input power pin not driven by any output power pins. This occurs when a power input pin (for example VCC or 3.3V on a component) is connected to - in this case label - that KiCad does not recognize as being supplied by a power output pin. However since the schematic editor "only" represents the logical connections between the planned components - and so disregarding the details on more of the specification level - it does not necessarily continuing with the design and so the schematic could still be transferred to the PCB editor.
The next step is to move to the PCB Editor. The PCB is planned to be manufactured using a CNC milling machine (more details on its specifications in the next weeks) available here at the Chaihuo Makerspace and so the constraints must be adjusted beforehand to match the capability of the machine. The documentation from previous years were referred to determine the appropriate values for the respective parameters.

The preliminary design applies these basic guidelines - additional rules will be considered in future iterations as knowledge develops :
-
Power Traces
- wider traces for power and ground lines to handle higher currents and reduce voltage drop (1mm as a start)
-
Signal Traces
- short, direct, and as uniform as possible to minimize noise, crosstalk, and signal degradation.
- Separate sensitive analog signals from noisy digital traces.
-
Avoid Sharp 90° Corners
- Sharp 90° corners can increase signal reflections creating interference with the original signal.
- Use 45° corners or rounded/fillet corners instead for smoother current flow.
Source: Adapted from KiCad Documentation and IPC PCB Design Guidelines: https://docs.kicad.org/ and IPC-2221 standards.
Source: ChatGPT by OpenAI, March 2026
The process of routing the components of the single-layer PCB is shown in the next video. The first strategy is to group similar components together to simplify routing and reduce clutter (could also be visually seen with the airwires). However in the end the biggest challenge of the actual routing requires adjustments even of the component lables at the schematic editor to achieve more optimal connections that meets the basic design guidelines and constraints. The GND plane is then created using the draw filled zone button to create a filled copper zone. Pressing "B" at the keyboard whenever changes are applied afterwards will always fill the GND plane according to the changes made to the placements of component and traces.
Similar to the electrical rule check at the schematics editor, the design rule check is available at the PCB editor. The errors related to this routing appears to be mainly due to the GND plane.

This issue can be resolved by increasing the copper zone clearance, which increases the minimum distance between the ground plane and other conductive elements.

Adjusting this parameter allows the copper zone to comply with the spacing rules defined in the design constraints
Some traces were routed underneath the supposedly location of the XIAO RP2040 SMD. It will be interesting to see during the actual soldering process whether these underneath traces are affected or remain reliable.