A 9V battery is a common type of battery used in various electronic devices, providing a nominal voltage of 9 volts. It is often used in smoke detectors, remote controls, and other portable electronics. The compact size and reliable power output make it a popular choice for both hobbyists and professionals in the electronics field.
Specification | Value |
---|---|
Nominal Voltage | 9V |
Capacity | 500-600 mAh |
Chemistry | Alkaline / Lithium |
Dimensions | 48.5 x 26.5 x 17.5 mm |
Weight | Approx. 45 g |
A 9V battery does not have pins in the traditional sense, but it has two terminals:
Terminal | Description |
---|---|
Positive | The terminal marked with a "+" |
Negative | The terminal marked with a "-" |
Connecting the Battery:
Powering Devices:
Device Not Powering On:
Short Battery Life:
Battery Leakage:
If you are using a 9V battery to power an Arduino UNO, here is a simple code example to blink an LED:
// Define the pin for the LED
const int ledPin = 13; // Built-in LED pin
void setup() {
// Initialize the digital pin as an output
pinMode(ledPin, OUTPUT);
}
void loop() {
// Turn the LED on (HIGH is the voltage level)
digitalWrite(ledPin, HIGH);
// Wait for a second
delay(1000);
// Turn the LED off (LOW is the voltage level)
digitalWrite(ledPin, LOW);
// Wait for a second
delay(1000);
}
This code will blink the built-in LED on the Arduino UNO every second, demonstrating how to use the 9V battery to power the board. Make sure to connect the battery to the VIN and GND pins of the Arduino for proper operation.