7. Electronics design¶
Group assignment¶
Use the test equipment in your lab to observe the operation of an embedded microcontroller.
-
Observe signal fluctuation with Oscilloscope¶
We used following oscilloscope in FABLAB Kamakura to observe signal fluctuation.
Firstly, check the output calibration signal (5V @1KHz)
Check the wave form if the calibration wave top and bottom shows flat.
In this case, the wave top and bottom shape is not flat, so that we needed to adjust the input pin condition.
There is a screw hole at the pin cable.
Adjust the wave screw with a electric driver by
Following wave shape are both not good.

Wave length measurement

Wave length value dt=1.000ms 1/dt=1.00KHz
Wave amplitude measurement

Wave amplitude value dV=5.00V
Next, we tested with actual circuit which Neil introduced in the class.
On-Off Switch with XIAO-ESP32C3
Arduino Code for XIAO-ESP32C3
Set trigger with “Slope Falling”.
Trigger worked by switch signal.
Another switch push by human shows different time length.
-
Observe electric condition with Multimeter¶
Firstly, we confirmed the frequency of the Oscillator’s Calibration output signal with Multimeter with AC Mode, and could confirm 1.00kHz.
Next, measured the AC Table Outlet electricity with Multimeter AC Mode, and got 49.94Hz and 103.7V.

Then we used following Power Supply to produce Voltage for Multimeter measurement.
Multimeter indicated 5.034V at 5.0V supplying by Power Supply.
Multimeter indicates 20.50V at 20.6V Supplying by Power Supply.
Green Diode resistance measurement with Diode Mode showing 2.307V, while it’s specification paper shows 2.8-3.6V.

Diode resistance measurement with Diode Mode showing 0.575V


OL(V) is indicated by swapping the pins.
Capacitor measurement

102pF is indicated with Capacitor measurement mode.
-
Logic Analyzer¶
This time, we used following Logic Analyzer: Hailege 24MHz 8CH USB type
Even it could only handle digital signal “0” and “1”, it is very useful with multi channels (more than two) to understand how the input-output devices are communicating.

We used following circuit to analyze by Logic Analyzer.
We used following Arduino code for this trial.
//
// hello.button-blink.C3.ino
//
// Seeed XIAO ESP32C3 button, blink, and echo hello-world
//
// Neil Gershenfeld 10/8/23
//
// This work may be reproduced, modified, distributed,
// performed, and displayed for any purpose, but must
// acknowledge this project. Copyright is retained and
// must be preserved. The work is provided as is; no
// warranty is provided, and users accept all liability.
//
// add XIAO_ESP32C3 board
// https://espressif.github.io/arduino-esp32/package_esp32_index.json
//
#define led_pin 20
#define button_pin 21
void setup() {
pinMode(led_pin,OUTPUT);
pinMode(button_pin,INPUT_PULLUP);
Serial.begin();
Serial.setTimeout(10);
}
bool button_up = true;
void loop() {
if (Serial.available()) {
digitalWrite(led_pin,HIGH);
String s = Serial.readString();
Serial.print("you typed: ");
Serial.println(s);
delay(100);
digitalWrite(led_pin,LOW);
}
if ((digitalRead(button_pin) == LOW) && button_up) {
digitalWrite(led_pin,HIGH);
Serial.println("button down");
button_up = false;
}
else if ((digitalRead(button_pin) == HIGH) && !button_up) {
digitalWrite(led_pin,LOW);
Serial.println("button up");
button_up = true;
}
}
Installed a software into Labo’s PC.
This page could be a good reference for setting up Logic Analyzer.
Connected the Logic Analyzer to PC and the device.
Communication between input and output device was observed by logic Analyzer.