Assignment Brief:
- Group: Measure an output device’s power consumption using a multimeter
- Individual: Add an output device to your microcontroller board.
- Program it to perform a specific function.
Output Devices
Output devices are hardware components that display, project, or produce the results of a computer’s
processing. These devices take information from the computer and convert it into a human-perceivable
form like visual, audio, or physical output.
Visual Output Devices
- LED Matrix Displays: Grid of LEDs used for animations, text, and patterns.
- E-paper Displays: Low-power, paper-like displays used in e-readers.
- Laser Light Shows: High-intensity lasers used for artistic and entertainment
purposes.
Audio Devices
- Speakers: Convert electrical signals into sound waves for audio output.
- Headphones: Personal audio output devices that provide sound directly to the ears.
- Buzzers: Small devices that produce beeps or alarms for notifications.
Physical Output Devices
- Actuators (Solenoids, Pneumatic Cylinders): Convert electrical energy into mechanical movement.
- Mechanical Switches or Relays: Enable or disable electrical circuits for physical interactions.
Display Devices
- LED Displays: Bright, energy-efficient screens used in signage and indicators.
- LCD Screens: Common in TVs and monitors, use liquid crystals for display.
- OLED Screens: Self-emissive, flexible displays with high contrast and efficiency.
- CRT Monitors: Older bulky monitors using electron beams to display images.
Motion Devices
- Motors: Convert electrical energy into rotational motion.
- Servo Motors: Precisely controlled motors used in robotics and automation.
- Stepper Motors: Move in discrete steps, ideal for precision applications.
Projection Devices
- Projectors (DLP, LCD, LCoS): Devices that project images onto screens.
- Holographic Displays: Use light diffraction to create three-dimensional visuals.
Batteries
Beyond Output devices, I learn about output device controls that is, Batteries.
Batteries don’t just supply power—they also regulate and control the behavior of output devices like
motors, LEDs, displays, and more.
There are mainly two types of batteries: Lithium polymer and lithium Ion. Battery Management System
(BMS)
BMS is a Key Aspects of Battery Control in Output Devices
It prevents overcharging, over-discharging, and overheating and
Balances cells in multi-cell batteries (e.g., Li-ion packs in laptops, EVs).
Feature |
LiPo (Lithium Polymer) |
Li-ion (Lithium-ion) |
Electrolyte Type |
Gel-like |
Liquid |
Weight & Shape |
Lightweight, Flexible |
Heavier, Rigid |
Energy Density |
Lower |
Higher (Longer-lasting) |
Discharge Rate |
Higher (Great for RC, Drones) |
Lower (Steady Power Output) |
Safety |
Prone to swelling if overcharged |
More stable, less risk of swelling |
Common Uses |
RC Cars, Drones, High-power applications |
Phones, Laptops, Electric Vehicles |
Lipo Battery
Lion Battery
Some other types of Batteries are:
NiMH (Nickel-Metal Hydride): Rechargeable, better than NiCd. Found in cameras and toys.
NiCd (Nickel-Cadmium): Older rechargeable type with memory effect issues. Used in power tools.
Lead-Acid: Heavy, high power output. Used in cars and UPS systems.
Alkaline (AA, AAA, 9V): Non-rechargeable, long shelf life. Used in remotes and clocks.
Zinc-Carbon: Cheap, disposable, low power. Common in basic flashlights and toys.
Solid-State: Future technology, safer, and higher capacity. Emerging in battery innovations.
Sodium-Ion: Eco-friendly, cheaper than Li-ion. Potential future alternative energy storage.
Servo Motor
This week I decided to work with Servo motor as it is a part of my Final Project. I thought that testing
the
sevo motor speed will be insightful to learn and implement. I started by learning about servos.
A servo motor is a type of motor that provides precise control of angular or linear position, velocity,
and acceleration. It consists of a DC or AC motor, a gear system, a position sensor (usually a
potentiometer), and a control circuit. Servo has higher ability of Speed position and Power
As I learnt about Servo Motors I was confused between a servo motor, Dc motor and Stepper motor. I asked
my professor
Pranav Gawde assisted me to understand the
difference between Servo and Stepper Motor: Servo has higher ability of Speed position and Power.
Stepper Motor has higher torque
and precision of controlled steps and a DC motor has a constant high efficient rotatary motion.
DC Motor:
- Type: Continuous rotation motor.
- Control: Speed controlled by voltage, direction by polarity.
- Pros: Simple, high speed, low cost.
- Cons: No precise position control.
- Used In: Fans, toys, pumps, robots.
Servo Motor:
- Type: DC motor with position feedback.
- Control: Controlled by PWM signals (angle-based control).
- Pros: High torque, precise position control.
- Cons: Limited rotation (0-180° in hobby servos).
- Used In: Robotics, RC cars, automation.
Stepper Motor:
- Type: Moves in precise steps.
- Control: Controlled by pulses (steps per revolution).
- Pros: High accuracy, no feedback needed, full rotation control.
- Cons: Needs more power.
- Used In: 3D printers, CNC machines, robotic arms.
Servo Motor
The internal components of a servo motor and how it functions. Key Parts & Their Roles:
- Drive Gears – Transfer motion from the motor to the output shaft, allowing controlled movement.
- Potentiometer – Provides position feedback to the control circuit, helping maintain accurate angles.
- Integrated Circuit (IC) – The brain of the servo, processing signals and adjusting the motor
accordingly.
- Motor – The core driving component that rotates to move the servo arm.
- Servo Case – Protects all internal components and provides structural integrity.
SERVO PIN-OUT
In the week of Eelctronics design I designed a PCB Board adhering to my Final project inputs and
outputs.
The documentation of PCB Designing is done in my
Week 06: Electronics Design. Further, I milled the PCB in my Electronics
Production week,
The documentation of the development board and milling is done in my
Week 08: Electronics Production. Below is the PCB that I milled during this
week.
.jpg)
Later, I soldering the XAIO RP2040 and a resistor to my PCB Board, I also attatched a JST pins to the PCB
Board and
and Soldered it.
NOTE: The reason I used a JST Pin resistors was for the requirement of my Final
Project.

Later, I soldered the SERVO MOTOR to the JST Wires.

Once all was done I tested the working of the all the pinouts using an external connector.
Once I confirmed the functioning, I moved to the Coding part.

As mention above, you will find a detailed documentation of the above in week 06 and week 08 of my
documentation.
Coding: Part 1
Used Ai prompt: Generate a simple code to run a servo.
#include // Include the Servo library
Servo myServo; // Create a servo object
void setup() {
myServo.attach(D3); // Attach servo to pin D3
}
void loop() {
myServo.write(0); // Move servo to 0°
delay(1000); // Wait for a second
myServo.write(180); // Move servo to 180°
delay(1000); // Wait for a second
}
Uploaded Code
Servo Motion sensed
Learning: Ai gave a perfect code but it didn't work in the previous attemps. I realized
that the code AI generated did not my requirements of including the library thus I had to promt AI:
to include the SERVO LIBRARY to the code. This gave me a perfect code. However, it was a learning to not
rely on Ai completely.
Coding: Part 2
In my Input Device week, I used a touch sensor to sense the output.
Find the detalied documentation Week 09: Input devices
In a small segment my
Final Project uses basically a
touch sensor to trigger a servo and a LED. Thus, I went forward with combining my learnings of touch sensor
and servo
As per the plan I began Coding, generating a Code using Ai prompt: Generate a code to run a servo motor using
a servo motor using a serial monitor.
Error Code
Final Code
Learnings: Again AI gave an error, I learnt that previously Aurdino Uno allowed pin naming as 1, 2, 3.. for
a Xaio board. However the new update required the pin naming as D1, D2, D3. Thus, the final code genrated
was-
#include
#define TOUCH_SENSOR_PIN D0 // Touch sensor connected to D0
#define SERVO_PIN D3 // Servo connected to D3
Servo myServo;
void setup() {
Serial.begin(115200); // Start Serial Monitor
myServo.attach(SERVO_PIN); // Attach the servo to pin D3
myServo.write(0); // Start at 0°
}
void loop() {
int touchValue = analogRead(TOUCH_SENSOR_PIN); // Read touch sensor value
Serial.print("Touch Sensor Value: ");
Serial.println(touchValue); // Display the value on Serial Monitor
if (touchValue > 600) { // Adjust threshold based on sensor response
Serial.println("Touch detected! Rotating Servo...");
myServo.write(180); // Move to 180°
delay(3000); // Wait for 3 seconds
myServo.write(0); // Move back to 0°
Serial.println("Returning to 0°");
}
}
In the similar manner, I tried running an LED with the code. LED OUTPUT:
As the time progressed I milled and soldered a new PCB and and below I used serveral output devices I accounted
in the PCB,
in context with my Final Project test PCB. Below is the New PCB and its soldered JST pin. An error I while milling that is the
mirror option due to which I had to solder the PCB upside down.
The PCB has output as: Bo Motor, Led and a servo motor which I controlled by an IR sensor, ultra sonic and sliding pot.
Connections +code
Tested the relay module to enable a 5V signal for running a BO motor via an IR sensor..
Hero shot
int potPin = A0; // Potentiometer connected to A0 (D0)
int ledPin = D10; // LED connected to D10 (PWM)
int irPin = D2; // IR sensor output connected to D2
int motorPin = 9; // Motor control pin connected to D9
void setup() {
pinMode(potPin, INPUT);
pinMode(ledPin, OUTPUT);
pinMode(irPin, INPUT);
pinMode(motorPin, OUTPUT);
}
void loop() {
// --- LED Brightness Control via Potentiometer ---
int potValue = analogRead(potPin); // 0–1023
int brightness = map(potValue, 0, 1023, 0, 255); // 0–255
analogWrite(ledPin, brightness); // PWM LED control
// --- DC Motor Control via IR Sensor ---
int irValue = digitalRead(irPin); // Read IR sensor
if (irValue == LOW) {
digitalWrite(motorPin, HIGH); // Object detected → motor ON
} else {
digitalWrite(motorPin, LOW); // No object → motor OFF
}
delay(10); // Short delay for stability
}
Solenoid
During the lectures, I was mesmerized by the robotic_xylophone project. I learnt about how a soleoind works. A solenoid is an
electromechanical device that converts electrical energy into linear motion. It consists of a coil of wire
wound
around a movable metal core (plunger).

When electric current flows through the coil, it creates a magnetic field.
When strong magnets are coiled around a wire, the movement of magnet generates electricity.
Here, I decides to experiment with the solonoid. For which I referred to existing examples. I found a very
helpful
website which showed a detailed description of how to make a solenoid coil. You can refer to the link to
know more,
here.
Cut a pen to a tube
Laser cut a loop to supports sides of pen tube
Later, I rolled a Magnet wire 26 to 28 gauge to the pen loop.
Ripped of the insulator from the wire.
Then used a DC Voltage motor, I set the value to 12V
Connected the pins to the two ends of the wire.
Placed a Magnet to check if its functioning.
Learnings: Solenoid failure
The Above experiment failed. I synthesised my learnings for the failures as:
Coil Winding Issues:
Uneven or loose winding: If the wire is not wound tightly and uniformly, the magnetic field may not form
effectively.
Crossed or overlapping coils: Inconsistent winding pattern reduces efficiency and might cause short circuits
in enamel-coated wires.
Core Material & Orientation:
If you're inserting a metal rod, make sure it’s a ferromagnetic material like iron or steel—not aluminum or
stainless steel.
Also, the core should be properly inside the solenoid for a visible electromagnetic effect.
Direction of winding: The direction of winding and polarity of current affect how the magnetic field behaves.
The solenoid won’t work properly if coils are wound randomly or not along a single axis.
Axis of motion: Solenoids produce a pulling force along the axis. It's subtle unless the field is strong.
Also, the iron rod must be free to move and not stuck.
Group assignment
Check out this week’s Input Devices group assignment on Sharvari's documentation site
here
We measured the power consumption of a 4-digit display using a multimeter. By connecting the red probe to the
5V pin and the black probe to ground on the Xiao RP2040, we measured DC voltage and current while the
display was running. Using the Min/Max feature, we observed how current varied based on the number of active
segments.
Power consumption of a 4-digit display using a multimeter
On the multimeter used mA and mV for calculating current and voltage respectively.
connecting the red probe to the 5V pin and the black probe to ground on the Xiao
Max Voltage consumption
Max Current consumption

Power = Voltage × Current (P = VI),
Power Calculation
V = 3.3V
I = 0.06A
P = VI
P = 3.3 V x 0.06 = 0.198 watts
Through this activity, I learned how to properly configure and use a multimeter to measure both voltage and
current in a DC circuit. I understood the importance of probe placement and dial settings while working with
live circuits. Observing the current variation with changing display segments helped me realize how output
devices draw different amounts of power based on their state. This hands-on experience deepened my
understanding of real-time power monitoring and basic electrical principles like Ohm’s Law and energy
efficiency in electronics.
Project files
Servo Code
Touch sensor to servo
Touch sensor to servo and led