Renewable Energy Technology
Institute of Energy
University of Dhaka
Assignment for Solar Photovoltaic Energy
and Systems
Submitted by:
MD. SHARTAZ MALIK
Roll: SH-2022
Semester: 2nd
Course: MRET 203
Submitted to:
Dr. Md. Habibur Rahman
(Professor & Chairman)
Department of Electrical and Electronic Engineering
University of Dhaka
A microcontroller-based solar charge controller is an
intelligent device that manages the power flow from solar panels
to a battery bank, ensuring efficient charging and preventing
overcharging or deep discharge. Using a microcontroller (like
Arduino, PIC, ESP32, or STM32) allows for advanced features like
MPPT (Maximum Power Point Tracking), LCD displays etc.
Key Components of a Microcontroller-Based Solar Charge
Controller
1. Microcontroller (MCU) – Acts as the brain (Arduino, ESP32,
STM32, PIC).
2. Solar Panel (PV Module) – Input power source.
3. Battery (Lead-Acid/Li-ion/LiFePO4) – Energy storage.
4. MOSFET/Relay for Switching – Controls charging/discharging.
5. Voltage & Current Sensors – Measures PV voltage, battery
voltage, and current.
6. DC-DC Converter (Buck/Boost for MPPT) – Optimizes power
transfer.
7. Display (LCD/OLED) – Shows voltage, current, battery status.
8. Protection Circuits – Overcharge, deep discharge, short-
circuit protection.
9. Communication Module (Optional) – Bluetooth, Wi-Fi, or GSM
for remote monitoring.
Fig: Circuit diagram of a microcontroller-based charge controller.
Relay RL1 connects the solar panel to the battery through diode D1. Under normal
conditions, it allows the charging current from the panel to flow into the battery.
When the battery is at full charge (14.0V), the charging current becomes ‘pulsed.’
To keep the overall current consumption of the solar controller low, normally
closed (N/C) contacts of the relay are used and the relay is normally in
deenergised state.
One terminal of the load is connected to the battery through fuse F1 and another
terminal of the load to an n-channel power MOSFET T3. MOFETs are voltage
driven devices that require virtually no drive current. The load current should be
limited to 10A. One additional MOSFET is connected in parallel for more than 10A
load current.
Basically, there are two methods of controlling the charging current: series
regulation and parallel (shunt) regulation. A series regulator is inserted between
the solar panel and the battery. The series type of regulation ‘wastes’ a lot of
energy while charging the battery as the control circuitry is always active and
series regulator requires the input voltage to be 3-4 volts higher than the output
voltage. The current and voltage output of a solar panel is governed by the angle
of incidence of light, which keeps varying.
Parallel regulation is preferred in solar field. In parallel regulation, the control
circuitry allows the charging current (even in mA) to flow into the battery and
stop charging once the battery is fully charged. At this stage, the charging current
is wasted by converting into heat (current is passed through low-value, high-
wattage resistor); this part of the regulation dissipates a lot of heat.
In this project, we have used parallel regulation technique but instead of wasting
the charging current as heat, we have made it pulsed and applied to the battery
to keep the battery topped-up.
After power-on, the microcontroller reads the battery voltage with the help of the
ADC and displays the values on the LCD. It monitors the input signal from the
dusk-to-dawn sensor and activates the load or charging relay RL1 accordingly. The
digital voltmeter works up to 20V. As Vref of the ADC is connected to VCC (5V),
the input voltage to the ADC cannot exceed +5V. A potential divider is used at pin
2 of the ADC (IC2) using resistors R5, R6 and R7 to scale down the voltage from
0V-20V to 0V-05V. The ADC output is multiplied four times and displayed on the
LCD as battery voltage.
When the solar panel voltage is present, the dusk-to-dawn sensor provides a
signal to the microcontroller, which then displays ‘charging’ message on the LCD.
During charging, the battery voltage is continuously monitored. When the voltage
reaches 14.0V, the microcontroller interrupts the charging current by energising
the relay, which is connected to MOSFET BS170 (T2), and starts a 5-minute timer.
During this stage, the LCD shows “battery full.”
After five minutes, the relay reconnects the panel to the battery. This way, the
charging current is pulsed at the intervals of five minutes and the cycle repeats
until the panel voltage is present.
When the panel voltage falls below the zener diode (ZD1) voltage of the dusk-to-
dawn sensor, the microcontroller senses this and activates the load by switching
on MOSFET T3 via optocoupler IC3 and “load on” message is displayed.
In this mode, the microcontroller monitors for low battery. When the battery
voltage drops below 10 volts, the microcontroller turns off the load by switching
off MOSFET T3 and “battery low—load off” message is displayed.
Normally, when the load is switched off, the battery voltage tends to rise back
and the load oscillates between ‘on’ and ‘off’ states. To avoid this, the
microcontroller employs a hysteresis control by entering into a ‘lock’ mode during
low-battery state and comes out of the lock mode when the dusk-to dawn sensor
receives the panel voltage (the next morning). During lock mode, the
microcontroller keeps converting the ADC value and displays the battery voltage
on the LCD.
Fig: Flow-chart of the source program.
Math Example: Refrigerator A costs $600 and uses 150 kWh of electricity per
month. It is designed to last 10 years with no repairs. Refrigerator B costs $800
and uses 100 kWh of electricity per month. It is also designed to last 10 years with
no repairs. Assuming all the other features of the two refrigerators are the same,
which is the better buy if the cost of electricity is $0.07/kWh? What if the cost of
electricity is $0.15/kWh? Assume a discount rate of 10% and assume an inflation
rate of 3% for the electrical costs.
Here,
1+i 1.03
X= 1+ d = 1.10 = 0.9364
For refrigerator A,
The electrical cost for the first year = (12 month) (150 kWh/month) ($0.07/kWh) =
$126
For refrigerator B,
The electrical cost for the first year = (12 month) (100 kWh/month) ($0.07/kWh) =
$84
Solar Home System Design
Designing a small-scale solar home system (SHS) involves selecting the right
components to meet basic electricity needs efficiently.
Determine Power Requirements
First, calculate the daily energy consumption (Wh/day) of our appliances.
Loads Power (W) Hours Used/Day Energy (Wh/Day)
LED Light 5W 5 25
Phone Charger 10W 2 20
Small Fan 20W 4 80
Total 125 Wh/Day
Solar Panel Sizing
Daily Energy Needed: 125 Wh
System Losses (30%): 125 × 1.3 = 163 Wh/day
Sunlight Hours (Avg): 4-5 hours (adjust for your location)
Solar Panel Size (Wp):
Panel Size=Daily Energy (Wh)Sun Hours=1634≈40W
Panel Size=Sun HoursDaily Energy (Wh)=4163≈40W
(A 50W-100W panel is recommended for better efficiency and cloudy days.)
Battery Sizing
Battery Voltage: 12V (standard for small systems)
Required Capacity (Ah):
Capacity=Daily Energy (Wh)Battery Voltage=16312≈14AhCapacity=Battery Voltage
Daily Energy (Wh)=12163≈14Ah
(A 20Ah-50Ah deep-cycle battery is recommended for longer backup and
efficiency.)
Charge Controller Selection
Type: PWM (cheaper) or MPPT (more efficient, 20-30% better)
Current Rating:
Controller Current=Solar Panel Power (W)System Voltage (V)=50W12V≈4.2A
Controller Current=System Voltage (V)Solar Panel Power (W)=12V50W≈4.2A
A 10A controller is recommended - (MPPT).
Inverter (If Using AC Loads)
Total AC Load: ~35W (LED + Fan + Charger)
Recommended Inverter: 100W-300W Pure Sine Wave (for small
appliances)
Final System Components
Component Specification
Solar Panel 50W-100W (12V)
Battery 12V 20Ah-50Ah (Deep Cycle)
Charge Controller 10A MPPT
Inverter (Optional) 100W-300W (12V DC to 220V AC)