Measuring the energy consumption of output devices is an important aspect in the design and evaluation of electronic systems, as it allows the determination of the power required during operation and helps optimize energy usage. Servo motors are widely used actuators in automation, robotics, and control applications due to their ability to achieve precise angular positioning.
In this practice, an SG90 micro servo motor controlled by an ESP32 was used to analyze its electrical power consumption during movement. Voltage and current measurements were taken using a multimeter while the servo motor moved between 0° and 180°. Subsequently, the power consumption values were calculated based on the measured data.
Initially, the connections between the ESP32 and the SG90 micro servo motor were established. The servo power supply wire (VCC) was connected to the ESP32 5 V pin, the GND wire was connected to the ground pin, and the signal wire was connected to GPIO 13.
Subsequently, a program was developed in Arduino IDE to control the movement of the servo motor. The code enabled the servo to rotate from 0° to 180° and then return continuously to its initial position.
#include
Servo myServo;
int servoPin = 13;
void setup() {
myServo.attach(servoPin);
}
void loop() {
// Move from 0° to 180°
for (int pos = 0; pos <= 180; pos++) {
myServo.write(pos);
delay(15);
}
delay(1000);
// Move from 180° to 0°
for (int pos = 180; pos >= 0; pos--) {
myServo.write(pos);
delay(15);
}
delay(1000);
}
Once the program was uploaded to the ESP32, the system was powered through the USB port. Using a digital multimeter, voltage and current measurements were taken while the servo motor was in motion. Finally, the electrical power consumption was calculated using the following equation:
P = V × I
Where:
- P = Power (W)
- V = Voltage (V)
- I = Current (A)
The following experimental values were obtained during the operation of the servo motor:
| Operating Condition | Voltage (V) | Current (mA) | Power (W) |
|---|---|---|---|
| Idle (Estimated) | 4.74 | 10 | 0.047 |
| Minimum Movement | 4.71 | 15 | 0.071 |
| Moderate Movement | 4.74 | 19 | 0.090 |
| Maximum Movement | 4.74 | 22 | 0.104 |
It was observed that the voltage remained practically constant throughout the test, while the current increased when the servo motor was in motion. As a result, the power consumption also showed a proportional increase.
The practice made it possible to measure and analyze the power consumption of an output device using an ESP32 and an SG90 micro servo motor. The obtained results demonstrated that electrical consumption increases during servo movement, reaching an approximate maximum power of 0.104 W. Furthermore, the usefulness of the multimeter as a tool for evaluating basic electrical parameters was verified, and the understanding of the relationship between voltage, current, and power in electronic systems was reinforced.