A 12V power supply is an electronic device that converts input power into a stable 12-volt direct current (DC) output. It is widely used in various applications such as powering electronic circuits, computer peripherals, LED lighting systems, and other devices that require a consistent 12V DC power source.
Pin No. | Description | Notes |
---|---|---|
1 | AC Input (L) | Live wire of AC input |
2 | AC Input (N) | Neutral wire of AC input |
3 | Ground (⏚) | Protective earth ground |
4 | DC Output (+12V) | Positive terminal of DC output |
5 | DC Output (GND) | Ground terminal of DC output |
Connecting AC Input:
Connecting DC Output:
Q: Can I use this power supply with an Arduino UNO?
Q: What should I do if the power supply makes noise?
// Example code to demonstrate how to power an Arduino UNO with a 12V power supply
// through the VIN pin. The Arduino UNO has an onboard voltage regulator that can
// handle input voltages from 7V to 12V.
void setup() {
// Initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
// Turn the LED on (HIGH is the voltage level)
digitalWrite(LED_BUILTIN, HIGH);
// Wait for a second
delay(1000);
// Turn the LED off by making the voltage LOW
digitalWrite(LED_BUILTIN, LOW);
// Wait for a second
delay(1000);
}
// Note: When using a 12V power supply, connect the positive terminal to the
// Arduino's VIN pin and the ground to one of the Arduino's GND pins.
Remember to keep the power supply's current rating in mind when connecting additional components to the Arduino to prevent overloading the power supply.