Appearance
Week 6 - Electronics design
Group Assignment
- Use the test equipment in your lab to observe the operation of a microcontroller circuit board
Group working
Hardware
Oscilloscope: we use a RIGOL DS2102A oscilloscope. An oscilloscope is a vital tool used to visualize and analyze electrical signals in real-time. It captures voltage changes over time, displaying the waveform on a screen. This allows for precise measurement of various signal parameters, such as amplitude, frequency, and timing characteristics. Oscilloscopes are essential for troubleshooting and diagnosing issues in electronic circuits, as they can reveal signal distortions, noise, and other anomalies. Advanced models offer features like FFT analysis for frequency domain measurements and protocol decoding for digital communications. Overall, oscilloscopes provide invaluable insights into the behavior of electronic systems, making them indispensable in electronics design, testing, and maintenance.

The specifications include below:

The user manual can be found here.
The key functions:
- Waveform Display: An oscilloscope can display the waveform of electronic signals in real-time. This allows you to visualize how the voltage varies over time.
- Signal Measurement It can measure various parameters of the signal, such as amplitude (voltage), frequency, period, rise time, fall time, and pulse width.
- Troubleshooting: Oscilloscopes are essential for diagnosing and troubleshooting problems in electronic circuits. They help identify issues like signal distortion, noise, and timing errors.
- Signal Analysis: Advanced oscilloscopes have features like FFT (Fast Fourier Transform) analysis, which allows you to analyze the frequency components of the signal.
- Triggering: Oscilloscopes have advanced triggering capabilities to capture specific events in the signal. This is useful for isolating and analyzing complex signals.
- Data Logging: Some oscilloscopes can log data over time, allowing you to monitor long-term trends and behavior in electronic systems.
- Protocol Analysis: Modern oscilloscopes can decode and analyze communication protocols (e.g., I2C, SPI, UART) used in digital systems.
Test using Ardiuno Uno with an ultrasonic sensor input (Oscilloscope)
First we need to connect the ultrasonic sensor to our Ardiuno broad. The ultrasonic sensor's trig pin is connected to Arduino pin 2, the echo pin is connected to Arduino pin 3, and it is powered by connecting the GND and VCC pins to the Arduino's GND and 5V, respectively. Then the code for testing was uploaded as below. This code essentially triggers the ultrasonic sensor to send out an ultrasonic pulse, and the echo pin would later be used to measure the time it takes for the pulse to return, which can be used to calculate the distance to an object.
const int trigPin = 2;
const int echoPin = 3;
void setup() {
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
digitalWrite(trigPin, LOW); // Ensure the trigPin is low at the start
}
void loop() {
digitalWrite(trigPin, HIGH); // Send a HIGH signal to the trigPin
delayMicroseconds(10); // Maintain the HIGH signal for 10 microseconds
digitalWrite(trigPin, LOW); // Set the trigPin back to LOW
delay(100); // Wait for 100 milliseconds before repeating the loop
}
To measure the waveform of the ultrasonic sensor's signal using an oscilloscope, follow these steps:
- Connect the Ground: Connect the oscilloscope's ground (GND) probe to the Arduino's ground (GND).
- Connect the Trigger Signal: Connect the oscilloscope's probe to the trig pin (pin 2 on the Arduino) to observe the trigger signal.
- Connect the Echo Signal: Connect the oscilloscope's second probe (if available) to the echo pin (pin 3 on the Arduino) to observe the echo signal.
The video for measurement shows the result. We can see that the echo signal length change with hand movement.
Reference
The PCB design can be downloaded via link here: https://a360.co/43Ta84H Or you can find the .step file in my repo: https://gitlab.fabcloud.org/academany/fabacademy/2023/labs/ningbo/students/yaorun-zhang/-/tree/main/docs/assignments/week6?ref_type=heads