Electronics Design¶
This week’s goal was to design an embedded microcontroller system using an EDA tool. This includes creating a schematic, selecting components from the lab inventory and checking the design rules for fabrication.
In addition we observed the operation of a microcontroller.
Introduction and workflow¶
For this week, I focused on designing the core control unit for my final project. The system is based on an ESP32-C3 super mini, which will control three VL53L0X sensors via I²C communication.
The ESP32-C3 super mini includes both WiFi and Bluetooth Low Energy (BLE). For my final project, Bluetooth is particularly important, as it allows the control unit to be physically separated from the lamp body without requiring an additional wireless module. This reduces component count and simplifies the overall architecture.
In addition the super mini version provides a small footprint while still exposing sufficient GPIO pins for multiple sensors and control signals.
Since the selected ToF sensors operate at 3.3 V, the ESP32-C3 super mini integrates seamlessly into the system without the need for additional level shifters.
This 32-bit RISC-V based microcontroller offers sufficient computational power for handling multiple I²C devices, Bluetooth communication, and future feature extensions.
The ESP32-C3 super mini supports various low-power modes, including deep sleep. Although detailed power optimization is not yet implemented, the hardware platform allows future improvements in energy efficiency.
Overall, the ESP32-C3 super mini represents a well-balanced compromise between performance, integration, scalability, and system simplicity, making it highly suitable for this stage of the project.
My focus was not only to connect components, but to understand the system architecture. I learned how I²C works as a shared bus system and how multiple devices can communicate over the same two signal lines.
Energy-Aware Manufacturing¶
Energy-aware manufacturing is an important aspect of modern engineering. It includes evaluating power consumption, material efficiency, and system optimization already during the design phase.
Since electronics design is still relatively new for me, a fully optimized and differentiated component selection would not be realistic at this stage. Instead of focusing on extreme optimization, I concentrated on building a stable and functional system architecture first.
However, I still considered some energy-related aspects:
-
Integrated bluetooth functionality, avoiding the need for an additional wireless module and therefore reducing overall component count and energy overhead
-
The system operates at 3.3 V to reduce unnecessary power losses
-
Deep sleep mode and other energy saving features like a mode control and activation button will be added later
During the design process, I regularly discussed decisions with colleagues and especially with my instructor to ensure that the architecture is reasonable and scalable. At this stage, the main engineering goal was robustness and clarity of system structure rather than maximum energy optimization.
In future iterations of the final project, a more detailed analysis of power consumption and sleep modes will be implemented, especially concerning Bluetooth communication and sensor duty cycles.
KiCAD setup¶
First I installed the FabAcademy KICAD plugin.
I opened the plugin and content manager Ctrl + M and selected the downloaded library Install from File....
Once finished, it appeared in the Installed tab.
Afterwards I implemented the design rules for the file. I opened the Board Setup in the PCB editor.
I changed the Solder Mask expansion.
And the Constraints.
PCB Design¶
I started with creating the schematic, similar to the workflow shown in week 4.
I added three PinSockets with six ports for the ToF Sensors and the ESP module. Since the ESP32-C3 super mini is not part of the Fab library ,I searched for the official datasheet and related files to ensure correct pin mapping and electrical specifications.
Later, I changed the footprint to match through-hole (TH) components, since this is compatible with the milling and soldering process in our lab.
After that, I wired all connections based on the best possible pin combinations identified in the datasheets.
datasheet-esp32c3supermini.pdf
datasheet-tof-german.pdf
The I²C bus was implemented using shared SDA and SCL lines. Each VL53L0X sensor was additionally connected to an individual GPIO via the XSHUT pin to allow separate initialization and address assignment.
Before moving to fabrication, I ran the Electrical Rule Checker (ERC) in the schematic editor. This step verifies unconnected pins, conflicting signal types, missing power connections and incorrect net assignments.
All warnings and errors were reviewed carefully. After minor adjustments, the schematic passed the ERC without critical issues. These warnings were related to the power flag configuration and do not affect board functionality.
This was my final schematic:
Next, I opened the PCB editor and updated the layout using F8.
All components were automatically transferred to the PCB workspace.
I then adjusted the footprints of the pin headers (J1, J2, and J3) to match the selected through-hole variants.
The next challenge was routing the connections in a clean and structured way.
I started by routing X the VCC traces to ensure stable power distribution.
I continued with the GND connections. A consistent ground routing strategy was important to avoid unnecessary trace crossings and to maintain a clean layout.
Next, I routed the I²C lines, SDA and SCL. Since these signals are shared between all three sensors and the ESP32-C3, careful planning was required to avoid sharp angles and excessive trace length. Both lines were kept as short and direct as possible.
After completing the I²C routing, I connected the XSHUT pins. Since all VL53L0X sensors share the same default I²C address, XSHUT is required to initialize them one after another and assign unique addresses.
Each sensor received a dedicated trace from a separate GPIO pin on the ESP. These traces were routed individually to allow controlled startup sequencing of the sensors.
Once all signal lines were completed, I created the board outline.
I then performed the Design Rule Check (DRC) just as I set it before.
The DRC confirmed that there were no clearance violations, unconnected nets, or manufacturability issues. This step ensures that the board can be reliably produced using the available fabrication equipment.
Then I plotted the PCB as a Gerber file.
Now I could order my PCB from a fabricator like JLCPCB after uploading the Gerber.ZIP file.
Then I rendered the 3D model.
Simulation of a circuit with Wokwi¶
Wokwi is a browser-based simulator for embedded systems.
I started with choosing an ESP32-C3.
Then I searched for the ToF sensor in the library, but unfortunately I couldn’t find it. The closest available component was an ultrasonic sensor.
While looking for the ultrasonic sensor datasheet I found a perfect simulator example.
I opened it and started the simulation.
Ultrasonic Sensor Example - by Uri Shaked
Within a range of 100cm the LED turns on.
Downloads¶
datasheet-esp32c3supermini.pdf
datasheet-tof-german.pdf
week06_PCB.zip
week06_schematic.svg