For this week's assignment, we measured the power consumption of an output device and documented our findings.
We decided to test the power consumption of a small servo motor, the Tower Pro SG-5010.
It has an operating voltage of 4.8V – 6V DC max (5V works well). The product page recommends using the Arduino's Servo library, so we used a Pico W dev board with that library, and used the Sweep example code:
#include <Servo.h>
Servo myservo; // create Servo object to control a servo
// twelve Servo objects can be created on most boards
int pos = 0; // variable to store the servo position
void setup() {
myservo.attach(9); // attaches the servo on pin 9 to the Servo object
}
void loop() {
for (pos = 0; pos <= 180; pos += 1) { // goes from 0 degrees to 180 degrees
// in steps of 1 degree
myservo.write(pos); // tell servo to go to position in variable 'pos'
delay(15); // waits 15 ms for the servo to reach the position
}
for (pos = 180; pos >= 0; pos -= 1) { // goes from 180 degrees to 0 degrees
myservo.write(pos); // tell servo to go to position in variable 'pos'
delay(15); // waits 15 ms for the servo to reach the position
}
}
We connected the red wire to the board's 5V, black wire to Ground, and yellow wire to pin 9, as suggested by the sample code.
After making sure everything was working, we disconnected the red wire and put the multimeter in between to measure current, setting it to 200 mA max.
As seen in the video below, we could observe the power consumption:
Then we switched the multimeter to measure power consumption in the control signal, but it was hardly noticeable, even when we switched the multimeter to measure lower currents, so it was below 1 mA.