In this week's assignment we have to basically learn how to measure the power consumption of any output device. This can be done using a multimeter, by using it to measure the output voltage consumption, and also the current that it draws when it is turned on.
By doing that, you can have the data to use the formula for Power.
P = Volt x Amp
For this, we decided to use the "Mandy Xiao" with a servo motor connected to one of the GPIOs already reserved for that and have a very simple program that will help us turn the motor 180° and also go back to 0°.
We decided to use the MicroPython environment to program this in a very easy way, using the PWM, we create a function that reads the angle, and sends it to the PWM using the “duty” calculated with how the analog read works.
Here a picture of the program:
We got 0.42V when the motor turns to 180° and 0V when it is in 0°.
After having that value, we proceed to change the probes of place, to measure the current that flows through the circuit in that moment. And we get this:
We notice that the value changes but its peak is the one shown in the picture above. So we use this value as it’s the most current the circuit has to endure. The value is in micros so this has to be adjusted when the 30,7 is used in the formula.
Using this two we get this:
P = Volt x Amp
P = 0.42 (30.7)-6
P = 50.1pW
So, we can conclude, that the circuit only draws a power consumption of 50.1pW.