6. Electronics design¶
group assignment
- This week we used multimeters and oscilloscopes to check the values in our circuits.
individual assignment
- use an EDA tool to design a development board that uses parts from the inventory to interact and communicate with an embedded microcontroller.
- extra credit: try another design workflow
- extra credit: simulate your design
- extra credit: design a case around your design
group assignment¶
In this group task, we explored several basic testing equipment (multimeters and oscilloscopes)used in electronic laboratories for observing and analyzing microcontroller circuit boards.
1. Multimeter¶
1.1 Purpose of multimeter¶
- Measure voltage (for example: does the battery have power? What is the output voltage of the phone charger?)
- Measure current (for example: how much current does the LED consume when working?)
- Measure resistance (for example: a resistor is marked “220Ω”, is this the actual value?)
- Test continuity (for example: is the wire broken? Is the switch making good contact?)
1.2 Features of a Multimeter¶
-
Auto/Manual Range Selection:
- Auto-range (Beginner-friendly): For example, when measuring battery voltage, the multimeter automatically detects the range without manual adjustment.
- Manual range (Precision control): For measuring very small resistances, you can manually select a more precise range.
-
Safety Protection:
- If the measured voltage is too high, it triggers an alarm (e.g., displaying “OL” or beeping) to prevent damage.
1.3 Using Multimeter¶
- measuring resistor
- Connection: Black probe to COM port, red probe to Ω/V port
- Range selection: Turn the knob to resistance mode (Ω), start with the highest range (e.g., 20MΩ)
- Measurement: Touch both ends of the resistor with red and black probes (no polarity concern)
- Read the value and confirm the resistance measurement.
1.4 measure voltage¶
We tested the voltage between 5V/3.3V and GND separately, and this time we used another small multimeter.
-
Connection: Black probe inserts into the multimeter’s COM port, red probe → inserts into the multimeter’s VΩmA port, black probe touches GND pin, red probe touches 5V/3.3V pin
-
Range selection: Turn the knob to DC voltage mode (V⎓), select 20V or higher range
-
Read and confirm the voltage value: Normally should display about 5V (±5%), if negative value (red and black probes are reversed), if “OL” → increase range or check circuit power supply.
-
Using the same method, we tested the voltage of other microcontrollers.
2. Oscilloscope¶
2.1 Purpose¶
- Observe electrical signal waveforms (e.g., sine waves, square waves in AC circuits)
- Measure signal parameters (frequency, amplitude, period, etc.)
- Diagnose circuit issues (e.g., signal distortion, noise interference)
2.2 Key Features¶
- Real-time display: Visually shows how electrical signals change over time
- Multi-channel input: Compare multiple signals simultaneously (e.g., dual-channel oscilloscopes)
- Trigger function: Stabilizes display of periodic or transient signals
- Auto-measurement: Directly displays peak voltage, frequency, and other data
- High precision: Capable of detecting tiny signal changes (millivolt level)
2.3 Measure using an oscilloscope¶
-
Test the LED data of Arduinno D13. The oscilloscope has one interface connected to D13 and another interface connected to GND.
-
Use the sample program BLINK to make the LED on D13 blink at an interval of 50 ms.
-
The horizontal axis represents time, with each interval being 50 ms. The vertical axis represents voltage, with a total range of 50 V, and each grid division corresponding to 5 V. From the graph, we can observe that every 50 ms, the LED’s voltage switches from 5 V to 0 V, and then back to 5 V.
individual assignment¶
Design a Xiao-ESP32 C3 development board¶
1.Designing a circuit at wiki.com¶
-
The controller I chose is XIAO-ESP32-C3, because it is small in size but has powerful functions (it can be used for IoT projects) and can be programmed using Arduino Uno.
-
I want to make a creative expansion board for XIAO-ESP32, so that more sensors and actuators can be connected. In conjunction with my final project, I designed 3 buttons, 3 lights, and a speaker in the circuit.
-
I tested the circuit on wokwi first. I wrote a simple program using Arduino IDE and connected the components from this website.This is my simulation circuit demonstration effect, you can also click the link to view it.
2.schematic design¶
2.1 Creating Project Files¶
-
I have used EasyEDA to design circuit boards .First register an account and create your own project file.
-
After clicking Schematic1, you can design the circuit on the web page. There are some commonly used icons on this page that can help you quickly design circuits, such as finding components and connecting components with wires.
-
The lack of copper on the bottom of the board makes it difficult to solder inline components on the bottom, so we use SMD components to solder on the top. I choose 1206 SMD components in the circuit. Next, install the Fablab component library.
-
Do not import component libraries on the schematic page (this is the reason why I have failed many times). With the help of my mentor, I referred to the official tutorial and solved this problem. Go back to the homepage and click on ‘Import Other’.
-
In File Type, select EAGLE. Next, find the fab. zip file and click “Import” .
-
Continue selecting import and import the fab. zip component library into your project.
2.2 Find Components¶
Next, I will demonstrate how to find the components I need.
- You can search for components by name, I found some XIAO-esp32, but I’m not sure if they are all correct.
-
In this case, you can choose to place multiple components. Then click the icon (Update/Convert Schematic to PCB)
-
Only one component meets the requirements, and the others didn’t have footprint. This method can help you quickly detect some uncommon components and notify you of some error reasons and warning messages.
-
In the LCSC Electronics store Or an imported private FAB library, quickly find 1x7P and 1x3P connectors by category.The same method can also be used to find resistors、led and button.
-
Increases the footprint of the buzzer, making it easier to solder on top.
2.3 Connecting circuit components¶
There are two ways to connect the circuit.
-
Place the components in the appropriate position and directly connect the electronic components with wires. However, this will easily cause the wires to cross (or connect together). And the circuit will look complicated.
-
Very simple, Saves a lot of time,just change the name of the wire connected to the component. (Don’t forget to design an interface for XIAO to connect 5V and GND voltage.)
3. Schematic to PCB¶
-
Check DRC, if there is no problem,Click icon: Update/convert schematic to PCB
-
In the PCB, you will get a basic version with all the components randomly placed. The blue line is not a real connected wire, but a virtual indicator line to remind you that you need to connect the two ends of the blue line.
-
Draw the border ,Use vector software (coreldraw) to design the PCB border according to the actual size, and finally export it in .DXF format.
-
Import the .DXF border and change the lines to an outline. Position the components as you like. Be careful not to get too close to the edges.
-
The diameter of the CNC drill bit is 0.4MM. Click Apply and Confirm.
-
the gap of the wire should be greater than or equal to 0.4MM.Click Apply and Confirm.
-
This software is very smart and can automatically route.But for single-layer boards, automatic routing is not easy. You can also choose to connect wires manually, which takes a lot of time, but you can design patterns and reduce jumpers.
-
You can add some details, such as drawing a circle and changing it to a groove area, so that the circle becomes a hole. Finally add a rectangular outer border.
Summary:¶
-
I am very happy because I designed a very special horse-shaped circuit board, and in this study, I learned more about PCB design (simplified circuit connection diagram), and I am looking forward to making the PCB board next.
-
I think designing PCB is not difficult. The most difficult part is designing the circuit schematic. You need to understand the functions and values of the components. I need to learn more in this regard.
-
A few years ago, I used EasyEDA to design a PCB, and the factory made it for me at a very cheap price. The circuit boards made by the factory were colorful and of good quality. So I was careless and thought that I could design a circuit board this week and use any components. As a result, I made many serious mistakes. In the design, I used some special buttons (computer buttons), WS2812 light ring, and direct-insertion resistors.
FILES:
fab.lbr
PCB_pony_GERBER.zip