Introduction: How to Make an Arduino Battery Tester
This Arduino project will test the voltage of a 1.5V battery.
Step 1: Materials
Here are the Materials needed to create the battery tester:
- Arduino Uno
- 2 yellow LEDs
- 1 Red LED
- 1 RGB LED
- 4 330 ohm resistors
- 9 wires (colors don't matter)
- Any 1.5V battery
Step 2: Create the Circuit
When connecting the normal LEDs (not the RGB) connect the longer metal leg to the positive side (the wire that comes out of the numbered pins). The smaller side should be connected to a resistor and a ground pin. When connecting the RGB LED the longest leg is negative. The other pin in the center is the green LED control. Connect the green control to the ~10 pin and make sure that a resistor is between the wire coming out of the pin and the leg of the LED.
Step 3: The Program
This is the code that should be uploaded to the Arduino:
Attachments
Step 4: Test a Battery
Attach the positive end of the battery to the wire coming out of pin A0, and connect the negative to the wire coming out of the ground pin. If everything is set up correctly the LEDs should light up based on the level of charge in the battery.
Key:
Red LED: Battery very low.
One Yellow LED + Red LED: Battery moderately low.
Two Yellow LEDs + Red LED: Battery moderately high.
All LEDs lit: battery is full.
2 Comments
7 years ago
but it only measures the voltage and not "power" of battery. The measurement should be made e.g. at 100 mA load.
7 years ago
Cool way to test a battery! Thanks for sharing your project!