

A barrel jack is a type of electrical connector commonly used for power supply connections in electronic devices. It features a cylindrical shape that allows for easy insertion and secure connection of a power adapter. Barrel jacks are widely used in consumer electronics, development boards, and DIY projects due to their simplicity and reliability. They are designed to handle low to moderate power levels and are available in various sizes to accommodate different voltage and current requirements.








The barrel jack typically has three pins for connection:
| Pin Name | Description |
|---|---|
| Outer Sleeve | Connects to the negative (-) terminal of the power supply. |
| Inner Pin | Connects to the positive (+) terminal of the power supply. |
| Switch Pin | Optional pin used to detect the presence of a plug or to switch power sources. |
Note: Not all barrel jacks include a switch pin. Check the datasheet of your specific model.
Determine the Voltage and Current Requirements:
Connect the Pins:
Mount the Barrel Jack:
Test the Connection:
// Example code to blink an LED on an Arduino UNO powered via a barrel jack
// Ensure the power adapter provides 7-12V DC to the Arduino's barrel jack.
int ledPin = 13; // Pin connected to the onboard LED
void setup() {
pinMode(ledPin, OUTPUT); // Set the LED pin as an output
}
void loop() {
digitalWrite(ledPin, HIGH); // Turn the LED on
delay(1000); // Wait for 1 second
digitalWrite(ledPin, LOW); // Turn the LED off
delay(1000); // Wait for 1 second
}
No Power to the Circuit:
Overheating Barrel Jack:
Intermittent Power Loss:
Switch Pin Not Working:
Q: Can I use a barrel jack for AC power?
A: No, barrel jacks are designed for DC power only. Using AC power can damage your circuit.
Q: How do I identify the polarity of my power adapter?
A: Look for the polarity symbol on the adapter. A diagram with a "+" in the center indicates the center pin is positive.
Q: What size barrel jack does the Arduino UNO use?
A: The Arduino UNO uses a 5.5mm OD / 2.1mm ID barrel jack.
Q: Can I use a higher voltage adapter with my barrel jack?
A: No, always use an adapter within the voltage range specified for your circuit to avoid damage.
By following this documentation, you can effectively use a barrel jack in your electronic projects while ensuring safety and reliability.