Battery-Powered Solar Charging System with Arduino-Controlled Ultrasonic Sensor and LCD Display
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit is designed to manage power from multiple 18650 batteries, charge them using TP4056 modules, and utilize a solar panel for additional charging. It also includes an Arduino UNO for control and monitoring, an HC-SR04 ultrasonic sensor for distance measurement, an LCD screen for display, and a 12V single-channel relay for switching.
Component List
Battery 18650
- Description: Rechargeable lithium-ion battery.
- Pins: +, -
TP4056
- Description: Lithium battery charger module.
- Pins: OUT-, B-, B+, OUT+, IN-, IN+
Solar Panel
- Description: Solar panel for generating power.
- Pins: gnd, vcc
Arduino UNO
- Description: Microcontroller board based on the ATmega328P.
- Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0, A1, A2, A3, A4, A5, SCL, SDA, AREF, D13, D12, D11, D10, D9, D8, D7, D6, D5, D4, D3, D2, D1, D0
HC-SR04 Ultrasonic Sensor
- Description: Ultrasonic distance sensor.
- Pins: VCC, TRIG, ECHO, GND
LCD Screen 16x2 I2C
- Description: 16x2 character LCD display with I2C interface.
- Pins: SCL, SDA, VCC, GND
12V Single Channel Relay
- Description: Relay module for switching high voltage devices.
- Pins: NC, COM, NO, IN, GND, VCC
Micro USB to Cable (2 Pin)
- Description: Micro USB to 2-pin cable for power input.
- Pins: Micro USB, +, -
Wiring Details
Battery 18650
+ Pin Connections:
- Connected to the + pins of other Battery 18650 components.
- Connected to the B+ pin of TP4056.
- Pin Connections:
- Connected to the - pins of other Battery 18650 components.
- Connected to the B- pin of TP4056.
TP4056
B+ Pin Connections:
- Connected to the + pins of Battery 18650 components.
B- Pin Connections:
- Connected to the - pins of Battery 18650 components.
IN- Pin Connections:
- Connected to the OUT- pin of another TP4056.
- Connected to the gnd pin of the Solar Panel.
IN+ Pin Connections:
- Connected to the OUT+ pin of another TP4056.
- Connected to the vcc pin of the Solar Panel.
OUT- Pin Connections:
- Connected to the IN- pin of another TP4056.
- Connected to the - pin of Micro USB to Cable (2 Pin).
- Connected to the GND pin of Arduino UNO.
- Connected to the GND pin of HC-SR04 Ultrasonic Sensor.
- Connected to the GND pin of 12V Single Channel Relay.
OUT+ Pin Connections:
- Connected to the IN+ pin of another TP4056.
- Connected to the COM pin of 12V Single Channel Relay.
- Connected to the Vin pin of Arduino UNO.
- Connected to the VCC pin of HC-SR04 Ultrasonic Sensor.
- Connected to the VCC pin of 12V Single Channel Relay.
Solar Panel
gnd Pin Connections:
- Connected to the IN- pin of TP4056.
vcc Pin Connections:
- Connected to the IN+ pin of TP4056.
Arduino UNO
GND Pin Connections:
- Connected to the OUT- pin of TP4056.
- Connected to the GND pin of HC-SR04 Ultrasonic Sensor.
- Connected to the GND pin of LCD Screen 16x2 I2C.
- Connected to the GND pin of 12V Single Channel Relay.
Vin Pin Connections:
- Connected to the OUT+ pin of TP4056.
- Connected to the VCC pin of HC-SR04 Ultrasonic Sensor.
- Connected to the VCC pin of 12V Single Channel Relay.
5V Pin Connections:
- Connected to the VCC pin of LCD Screen 16x2 I2C.
SCL Pin Connections:
- Connected to the SCL pin of LCD Screen 16x2 I2C.
SDA Pin Connections:
- Connected to the SDA pin of LCD Screen 16x2 I2C.
D10 Pin Connections:
- Connected to the ECHO pin of HC-SR04 Ultrasonic Sensor.
D9 Pin Connections:
- Connected to the TRIG pin of HC-SR04 Ultrasonic Sensor.
D8 Pin Connections:
- Connected to the IN pin of 12V Single Channel Relay.
HC-SR04 Ultrasonic Sensor
GND Pin Connections:
- Connected to the GND pin of Arduino UNO.
- Connected to the OUT- pin of TP4056.
VCC Pin Connections:
- Connected to the Vin pin of Arduino UNO.
- Connected to the OUT+ pin of TP4056.
TRIG Pin Connections:
- Connected to the D9 pin of Arduino UNO.
ECHO Pin Connections:
- Connected to the D10 pin of Arduino UNO.
LCD Screen 16x2 I2C
SCL Pin Connections:
- Connected to the SCL pin of Arduino UNO.
SDA Pin Connections:
- Connected to the SDA pin of Arduino UNO.
VCC Pin Connections:
- Connected to the 5V pin of Arduino UNO.
GND Pin Connections:
- Connected to the GND pin of Arduino UNO.
12V Single Channel Relay
NC Pin Connections:
- Connected to the + pin of Micro USB to Cable (2 Pin).
COM Pin Connections:
- Connected to the OUT+ pin of TP4056.
NO Pin Connections:
- Not connected.
IN Pin Connections:
- Connected to the D8 pin of Arduino UNO.
GND Pin Connections:
- Connected to the GND pin of Arduino UNO.
- Connected to the OUT- pin of TP4056.
VCC Pin Connections:
- Connected to the Vin pin of Arduino UNO.
- Connected to the OUT+ pin of TP4056.
Micro USB to Cable (2 Pin)
Micro USB Pin Connections:
- Not connected.
+ Pin Connections:
- Connected to the NC pin of 12V Single Channel Relay.
- Pin Connections:
- Connected to the OUT- pin of TP4056.
Documented Code
Arduino UNO Code (sketch.ino)
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
Additional Documentation (documentation.txt)