9. Output Devices¶
This week we had to:
Measure the power consumption of an output device.
We will learn about and use two devices to measure power consumption: DC Power supply and multimeter.
Power supply¶
Power supply is a universal tool to generate DC power (DC stands for direct current), set current limits, tresholds and measure power consumtion for projects that require no more than 30 Volts and 3Amps max. The Power supply we have is: Instek GPD-3303D it has 2 controlled channels 0-30V and one fixed with tis options 2.5V/3.3V/5V/3A. We mainly use the controlled channels.
At the back of the device we have the input voltage options: As you can see we use 220V that’s our countries standard voltage. We are going to measure power consumtion of several DC motors and a led strip. We need to connect DC motor to power supply the polarity doesn’t matter since the only difference is the direction of rotation. Then we need to make sure we use the right channel and adjust the voltage and current limit. The top turning knob is for voltage the lower one for current. If you click the knob you can fine tune the value. In our case it’s 12V and 0.5 amp Then we need to click “OUTPUT” button which outputs the voltage with current limit. When the power consumption is more than current set value a red led lights up at the back and a relay clicking sound is heard that disconnects the output to avoid any damage to the devices.
Multimeter¶
When working with a multimeter, there are two options for connecting wires. Since when measuring voltage or resistance you need to connect probes parralel to the pins and in case of current, you need to connect the device in series, so usually the red cable must be switched into the appropriate slot. The black probe or the (-) always goes to the “COM” slot. The red one goes to different ones depending what we are measuring.
Results¶
Conclusion¶
Use the three backticks to separate code.
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}