Assignments
Assignment
Group Assignment
- Probe an input device's analog levels and digital signals.
Individual Assignment
- Measure something: add a sensor to a microcontroller board that you have designed and read it.
Group Assignment – Signal Analysis
During the group assignment, I was able to understand how input devices behave in real conditions by analyzing the signal of an LDR sensor using an oscilloscope. I observed that the analog signal varies continuously depending on light intensity, which helped me clearly differentiate it from digital signals that only switch between discrete values. This experience also showed me that real signals are not perfectly stable, since small fluctuations and noise can affect the waveform. Overall, this assignment helped me better understand how sensors translate real-world conditions into electrical signals and how this information can be interpreted in embedded systems.
🔗 If you want to explore the Group Assignment in more detail, you can visit the official Fab Academy page:
Visit Fab Academy ULima →Analog Signal – LDR Sensor
In this group assignment, I used an oscilloscope to analyze the behavior of an analog input device, specifically a Light Dependent Resistor (LDR). First, the LDR sensor was connected to the circuit and its output was probed using the oscilloscope. This allowed us to visualize how the voltage changes depending on the amount of light detected by the sensor.
As shown in the oscilloscope display, the signal does not remain constant. Instead, it presents a continuous waveform, which indicates that the voltage is varying over time. This confirms that the LDR produces an analog signal.
Experimental setup used to probe the LDR sensor and analyze its signal.
Oscilloscope display showing the analog waveform generated by the LDR sensor.
Voltage Behavior
The oscilloscope allowed us to observe real-time voltage variations from the LDR sensor. Since this is an analog device, the output signal changes continuously instead of switching only between two fixed states.
These variations occur because the resistance of the LDR changes depending on the light intensity. When the sensor is covered or in low light conditions, its resistance increases, which produces a different voltage level in the circuit. On the other hand, when the sensor is exposed to high light or strong brightness, its resistance decreases, causing the voltage to change again.
From the oscilloscope measurements, it was possible to identify values such as:
- Maximum voltage when the sensor is exposed to high light
- Minimum voltage when the sensor is covered or in low light
This behavior demonstrates how the LDR converts changes in light intensity into electrical signals, allowing the microcontroller to interpret variations from the environment.
Individual Assignment
Individual Assignment - Lessons Learned
Sensor Selection – Flex Sensor
For this assignment, I used a flex sensor, which is a resistive sensor that changes its resistance value depending on how much it is bent. In other words, the more the sensor is flexed, the higher its resistance becomes.
To better understand its behavior, I first measured its resistance directly using a multimeter. The results were the following:
- Straight sensor: 8.99 kΩ
- Bent sensor: 9.71 kΩ
These measurements show that the flex sensor responds to physical deformation by producing a variation in resistance. Although the change is not extremely large, it is enough to be detected through an analog system and later converted into a variable voltage using a voltage divider.
Resistance measurement of the flex sensor in its straight position.
Resistance measurement of the flex sensor while bent.
Circuit Design and Fabrication
Initial Circuit Sketch
Before designing the PCB, I created a simple sketch of the circuit to clearly understand the connections and avoid mistakes. This helped me visualize how the flex sensor would be integrated with a fixed resistor to form a voltage divider.
In this configuration, the flex sensor acts as a variable resistor, while a 10kΩ resistor is used as a reference connected to ground. The midpoint between both components is connected to the analog input pin, allowing the microcontroller to read a variable voltage.
Hand-drawn sketch of the voltage divider circuit using a flex sensor and a 10kΩ resistor.
PCB Design in Fusion
After validating the circuit concept, I designed the PCB using Fusion. In this stage, I translated the schematic into a physical layout, defining the traces for power (VCC), ground (GND), and the signal line connected to the analog input.
The design includes the flex sensor connection, the 10kΩ resistor, and the corresponding pin headers. This allowed me to organize the circuit in a compact and clean way before fabrication.
PCB layout designed in Fusion, showing the voltage divider configuration and connections.
Fabrication and Assembly
Once the design was completed, the PCB was manufactured using the Roland milling machine. This process allowed me to obtain the physical board from the digital design.
After milling, the components were soldered onto the board, including the 10kΩ resistor and the connectors required for the flex sensor and microcontroller. Although the images of the milling and soldering process are not shown here, they will be added later.
Finally, I decided to give the board a more aesthetic finish by painting it black, improving its overall appearance and giving it a more professional look.
Testing and Results
For these tests, I used a XIAO nRF52840 board connected to a voltage divider circuit with a flex sensor. The setup includes an additional test board with an LED indicator to confirm proper operation, as well as extra pins for future applications such as connecting a servomotor.
Physical connection of the XIAO nRF52840 and the test board used for the voltage divider setup.
Additional view of the test setup, including the indicator LED and extra pins for future use.
When the flex sensor is bent, its resistance increases, causing a change in the output voltage, which can be observed in the Serial Monitor. When the sensor is straight, the values remain more stable, providing a clear reference between both states.
Sensor readings shown in the Serial Monitor while the flex sensor is bent.
Sensor readings shown in the Serial Monitor while the flex sensor remains straight.
The variation was also observed in the Serial Plotter, where the analog signal changes in real time. The graph shows more variation when the sensor is bent and remains more stable when it is straight. This confirms that the system works correctly, converting changes in resistance into a readable voltage for the microcontroller.
Serial Plotter showing the signal variation when the flex sensor is bent.
Serial Plotter showing a more stable signal when the flex sensor is straight.
Final Project Idea
My final project is based on a wearable glove with flex sensors, where each finger acts as an input. When a finger bends, the sensor changes its resistance, which is converted into a voltage and read by the microcontroller.
Concept of the final project: each finger movement controls a tentacle based on flex sensor readings.
Each finger will control a tentacle of a soft robotic structure, meaning that the movement of the hand will be directly translated into mechanical motion. By mapping the sensor values into ranges, the system will allow smooth and responsive control instead of simple on/off behavior.