Introduction: 1kW Arduino MPPT Solar Charge Controller (ESP32 Wi-Fi)
Build a 1kW Wi-Fi MPPT Solar Charge Controller, equipped with phone app datalogging telemetry! (Android iOS) It is compatible with 80V 30A solar panel setups and all battery chemistries up to 50V. The project is based on an Arduino ESP32 and runs on my Open Source Fugu MPPT Firmware! Total project cost is roughly around 25 (sourced from the Asian market). It is significantly cheaper than buying ready made 200 MPPTs
WATCH THE COMPLETE VIDEO TUTORIAL:
PCB Purchase Link:Click Me
What Is An MPPT And Why It Is Important To Solar Panels?
Maximum power point tracking (MPPT) is a technique used with energy sources with variable power, like solar panels, to maximize energy harvesting! An MPPT solar charge controller is an essential device for solar setups. MPPTs are intelligent DC-DC converters. They regulate current and voltage to safely charge batteries and power inverters. Aside from regulation an MPPT uses a clever algorithm that tracks a solar panel’s maximum power point. The proper explanation gets technical but the easiest way to put it
“Using an MPPT for solar, helps you gather the most energy your solar panels can provide”
High Efficiency Synchronous Buck Design
Synchronous buck based MPPTs are one of the densest and energy efficient designs. Premium commercial grade MPPTs use the same circuit topology. It turns out, you are not paying for the materials but rather for a company’s RD costs. Building one is cheap, but producing a proper design takes a lot of work.
One Of The First Tutorials To Uncover A Working Synchronous MPPT Design
For years, the DIY community has made several attempts on building a True Synchronous Buck MPPT but is often met with serious problems. This tutorial will walk you through on how I implemented a fix to the age old problems that has plagued most DIY MPPT attempts on building a high-power MPPT. It will also walk you through on building my 6-month tested beta MPPT design.
- (09/11/21) Support For 80V Battery Chemistries. The MPPT can be modified to support batteries up to 80V (12V/ 24V/ 36V/ 48V/ 60V/ 72V/ 80V), through a mod. Kindly visit ‘step #38’ of the instructable tutorial link. Read it carefully!
- (09/11/21) Support For Solar Panels Above 80V. The MPPT can be modified to support solar panel voltages above 80V. Step #39 will guide you how to achieve it. This is mod isn’t for everyone, I highly discourage this mod!
- (09/11/21) Updated Calibration Guide. Is your build giving slightly inaccurate values? I have added the calibration process in the programming step in this instructable.
- (09/12/21) QR Code Fix. The QR code in the video is wrong. The QR code in this instructable was updated for the fix. Kindly refer to the QR code in this instructable.
- (12/04/21) Constant Voltage (CV) Regulation Bug Fixed. The GitHub and Gdrive code files were updated for the Arduino code fix for the CV regulation bug fix.
Step 1: Project Specs
My goal was to build a DIY MPPT that I would continually use for my off-grid solar setup. It had to be good so I beefed it up during the design process. This included the use of a 16bit ADC for precision sensor measurement, a really fast dual core 32-bit microcontroller for quick system computations, implementation of a higher PWM resolution and the addition of a wide selectable range of PWM frequencies for switching optimization. There’s also a bunch of telemetry options for IoT and a an opensource firmware that will be cross-compatible to my future MPPT builds.
- MPPT Perturbed Algorithm With CC-CV
- 80V, 30A Input (Solar, Wind Turbines, PSU)
- 50V, 35A Output (Li-ion, LifePO4, Lead Acid etc.)
- 98% Peak Conversion Efficiency (Synchronous Buck)
- Wi-Fi Bluetooth Blynk Phone App Telemetry
- Charger/PSU Mode (can operate as a programmable buck converter)
- 16bit/12bit Precision ADC Measurements (ADS1115/ADS1015)
- Automatic ACS712-30A Current Sensor Calibration
- Battery Input Disconnect Recovery Protection Protocol
- LCD Menu Interface (with settings 4 display layouts)
- Flash Memory (non-volatile settings save function)
- Settable PWM Resolution (16bit-8bit)
- Settable PWM Switching Freq (1.2kHz. 312kHz)
- 12V OUTPUT/ BATTERY. 420W @35A
- 24V OUTPUT/ BATTERY. 840W @35A
- 36V OUTPUT/ BATTERY. 1000W @35A (when safety unlocked 1260W)
- 48V OUTPUT/ BATTERY. 1000W @35A (when safety unlocked 1680W)
- 60V OUTPUT/ BATTERY. (mod required)
- 72V OUTPUT/ BATTERY. (mod required)
- 80V OUTPUT/ BATTERY. (mod required)
- The 80V input refers to the absolute Voc of your solar panel. Going slightly beyond this could potentially damage your MPPT. Take note that Voc and Vmp are two very different things.
- Kindly limit the current settings to 30A at the moment, the design has only been bench tested at an output of 48V 20A in PSU mode.
- As far as it goes, the charging mode has only been tested at 22V-27V 23A-19A continuous with an 8S LiFePO4 battery pack during peak sunlight hours last summer.
- Feedback on the design is much appreciated as I am new to switching electronics. I would be glad to rectify mistakes done in the tutorial.
- Firmware is locked to 1kW regardless of the theoretical power rating. This safety measure was done due to the lack of parallel MOSFETs and inductor wire thickness on this build. Regardless, I would have do conduct future tests in the future before unlocking the 1kW cap on this specific build.
- The project is limited with a maximum input current sensing range of 30A. Regardless, the output would be limited to an absolute output current of 35A due to the MPPT’s buck core design.
- How can a higher output current be measured if we only have one 30A current sensor at the input? Due to a buck topology’s characteristics, assuming input voltage is higher than of the output, input current is lower from the input than of the output. A simple formula was used to approximate the current at the output by using a single current sensor. This will be further explained in the tutorial.
- Why does it say 30A output at the video? The 35A tested inductor design had to be de-rated for safety reasons. The MPPT can possibly output 35A but for this specific project, the firmware is set to 30A by default. I am aware that the inductor’s saturation current is different from the RMS current of the buck. Assumptions were done that the inductor’s worst case saturation current is twice the tested current due to its powder core soft saturation characteristics. You can read more about this as you proceed to the write-up, some portions are yet to be updated as I am in the process of documenting the part 2 of the video tutorial.
Step 2: What’s New? (Fugu MPPT V1.0)
My First Truly Stable Build
This is my 6th MPPT SCC design, I made 5 prototype before this. The build underwent 6 months of testing. My MPPT project is still hooked up to my 640W solar setup that has been powering my off-grid workspace ever since it was installed. I waited for months to ensure that the design is free from problems before I released it for open sourcing. Today is the day!
The Inspiration For The Project
When I bought some solar panels a few months back, I was looking for some MPPT solar charge controllers only to find out that they were expensive! Being the tinkerer that I am, I decided to build one on my own. I knew the materials would be cheap but the design process would be a lot of work. I searched on different journals and tutorials. One that really stood out was Open Green Energy’s step by step design tutorial! (ARDUINO MPPT SOLAR CHARGE CONTROLLER) I read the entire tutorial, it was impressive! He did mention the issues that he encountered from his build and why the project was never considered finished. I tried to think of ways to solve these issues, thus the six different board revisions that lead me to my final problem-free build.
Step 3: My Earlier Prototypes
My old designs were based on a homebrew Arduino Nano using an ATmega328P-AU microcontroller IC, similar to what open green energy was using. I discovered that the Arduino Nano had a ton of limitations ever since I started designing higher power MPPTs. On the other hand, they were sufficient to lower power MPPT designs.
Some of my prototypes had lower specs and other had higher specs to than what I used on my stable build. I played around with different tradeoffs trying to find a proper balance between cost and performance.
Why I Stopped Using Arduino Nano For High Power MPPTs:
- Arduino Nano is an 8-bit microcontroller it is relatively slow at crunching math operations. Remember an MPPT is Smart and glorified SMPS converter (buck converter in out case). It needs to be able to crunch a lot of numbers while running a bunch of processes. These processes include, regulation, MPPT tracking, safety protection, telemetry, metering and a whole lot more. While I find the Arduino Nano sufficient at processing speed, it does a poor job at being fast at regulation, if you input voltage ramps up the output has a relatively slow response to limit voltage or current. I made a way around this, on my earlier prototypes. Whenever the Arduino Nano can’t keep up and exceeds the parameter limits, the MPPT charging stops as it tries to recover. This kept on triggering often and disrupts my energy harvest. On the next step I’ll show you a cheaper and faster alternative.
- The ATmega328P used in an Arduino Nano and uno has a 10-bit ADC. This are known to most as analog pins. 10-bits means there are 1024 values it can represent from 0V to 5V (5V being the default voltage reference). When the ADC pins are used with voltage and current sensors design for a wide range of voltage (ex: 80V 30A), you only have 1024 values to represent 0V-80V and 0A-30A. This gives us a sensing resolution of 78mV for voltage and 29mA for current. This means you have a very coarse way of detecting voltage and current.
- Arduino UNO/ Nano is also limited to an 8-bit PWM resolution and a maximum frequency of 62.5kHz. The frequency is not bad but an 8-bit PWM resolution simply isn’t enough if you want good performance. 8-bits of PWM resolution gives you 256 unique values on the duty cycle scale. When you apply this to a high power MPPT or buck design a single shift in the value would lead to large steps in voltages. This can be compensated by using larger capacitors as a buffer and speeding up the loop cycle processing time on an MCU based SMPS circuitry.
- At the end of the day there’s a cheaper alternative called the ESP32. On the next few steps I will explain why I resorted to using it.
Dual Current Sensor Version:
- One of my earlier protoypes used a dual current sensor configuration, one at the output and one at the input. This was essential since a buck converter has a different current from the input from output. In a buck type MPPT, the current is usually higher at the output than of the input. This meant I needed two different current sensors optimal for the two different ranges. I tried the ACS712-30A, ACS758-100A, LEM DLSR50-50A and etc. They all worked well, but they also made the builds more expensive.
- A single current sensor at the input was more than enough. You can simply derive and approximate the current output by getting the input current and input voltage and equate it to the output voltage and output current, while solving for the output current. (Three given values, one unknown). This comes from the assumption Power In = Power Out. This has one single disadvantage. All buck converters have power losses. The current at the output derived from the input current sensor will not be accurate as the power losses are not taken account of. But remember at the end of the day, you are only using the output current for limiting the charging current and for coulomb counting. The power at the output will always be lower than the power at the input in a buck converter. This mean is I set my charging current a lets say 30A, the actual current you will be getting is less than 30A (maybe around 29.5A lets say). Needless to say, you will not suffer from a tad of current discrepancy at the output.
A Better Current Sensor:
- The ACS712 has been one of the most popular current sensors used by tinkerers. Simply because it is cheap, effective, can sense current in both ways, has isolation and is easy to use. But it isn’t perfect. For one, it is noisy! There’s so much noise even when you are measuring a purely flat DC circuit (battery and load resistor), the values can be a tad twitchy. If you are using modules you can decrease the noise by replacing the filter capacitor with a larger one as stated by the Allegro’s datasheet to limit the bandwidth. The mod will be explained later. Another problem is that it uses the 5V Vcc pin as a voltage reference, so if your 5V regulated supply line changes in voltage, the analog output of the current sensor changes as well. This was a big turn off and requires attention during the design process. Since it is hall-effect based, any sort of EMI around the chip will cause the values to twitch, when designing an MPPT with the ACS712 near an inductor, some sort of magnetic shielding is required to keep it stable.
- THE UPGRADE! On one of my recent prototype builds, I used an industrial grade current sensor called the LEM HLSR50! It was one of the best I have tried on an MPPT. It had all the good things of the ACS712 and none of the bad things. It can measure bi-directional currents of 50A (125A peak), it was isolated and it was also easy to use. But this time it had very little noise! The analog output barely twitched on a pure DC test. It has an internal voltage reference so the analog output was independent from the 5V Vcc line. It also had a separate pin for the voltage reference. This meant a differential ADC can be used, a differential ADC eliminates the need of computing for the zero point in a bi-directional current sensor. This also meant that the HSLR50 barely required sensor calibration. It was magnetically shielded too! EMI was barely a problem, even putting it close to a neodymium magnet barely affected the performance unlike of the ACS712. There was only one down-side, the price. From where I live it’s only 6 at e-gizmo, but from the US or other western countries it costs around 16 from DigiKey. This was the main reason why I didn’t use it on my current build. Perhaps, you’ll see it on my futures builds someday.
If you’re interested to see my build diary, I casually post project porotypes on my personal account. There includes all the other projects I haven’t or never made an instructable tutorial or video tutorial for.
Step 4: WARNING
BORING DESIGN EXPLANATION AHEAD! SKIP TO STEP#11 IF YOU ARE ONLY INTERESTED IN BUILDING THE MPPT PROJECT.
- The following steps will explain a lot of things covered by the design process of the final schematic.
- Forgive me if I will butcher a bunch of technical terms into laymen’s terms. I would like to speak casually on this tutorial to make it easier for others to understand. (Ex: I will use the word MPPT to refer to Maximum Power Point Tracking Solar Charge Controller or MPPT SCC. Yes some people get triggered from not using terms like these properly).
PROJECT LESSON PREREQUISITES:
This tutorial will skim through these concepts required in designing an MPPT solar charge controller. If you have trouble understanding some of these concepts from this tutorial, you can google these topics to search for much more detailed explanation to fully understand the concepts involving this project.
- ESP32 MCU basics
- ESP32 MCU PWM resolution and frequency
- The MPPT algorithm concept
- Photovoltaic cell IV curve
- External ADC basics
- RC filters and bandwidth
- Noise rejection methods
- Voltage sensing using voltage dividers
- Current sensing using hall-effect based sensors
- Synchronous buck converter 101
- Synchronous buck backflow control
- Basics of half-bridge MOSFET drivers
- N-channel MOSFET operation and characteristics
- Advantages of low on-resistance N-channel MOSFETS
- Reverse blocking MOSFETs
- Concept of ORing diode emulation using N-channel MOSFETS
- Basics of inductors
- Toroidal core inductor design
- Methods of efficiency optimization in SMPS
Step 5: How MPPTs Work Simplified (For Engineer Dummies Like Me)
This step deserves a separate tutorial and will be included in part 2 of my video. For now I will give a quick no-brainer explanation of the Photovoltaic IV Curve.
How MPPTs Work:
When I was getting into building my first MPPT, I couldn’t get a grasp of how the Photovoltaic Cell’s IV curve behaves and its relationship with a buck. Text books will give you a bunch of terms that would alienate a lot of people. I understood some of them as they were taught on our engineering courses, but some were still new to me. While Part 2 of the video isn’t out yet, here’s a cool experiment that I did that is included on the story telling video I plan to make based on a real life experiment experience.
I only got an grasp on how it works when I built an experimental and raw buck converter with a solar panel as its input, a variable potentiometer for controlling the duty cycle (no voltage feeback) and used a nichrome as a load at the output. I connected the an LCD wattmeter in between the solar panel and the experimental buck’s input. As I turned the knob up (increasing the duty cycle of the buck), the power readout at the LCD wattmeter started to increase from 0W to 20W I continued turning the knob to further increase the duty cycle, the power readout kept on increasing rapidly up to 305W, it was when the power started to decrease slowly as I continued turning the knob to further increase the duty cycle. As I continued to reach the end of my knob (reached 100%. max duty cycle) I got 0W of power, almost 0 volts and 9A of current at the input. Weird right? High current but almost no power! Okay, now that we have 0W of power while the knob is turned all the way up, I started to decrease the duty cycle by turning the knob backwards, the wattmeter showed an increase of power again from 0W to 305W again, as I continued to decrease the knob the power started decreasing again from 305W to 300W. So I turned it up again (back and fourth) to maintain 305W. As the sun rises higher, the power started to change, so I had to move the knob back and fourth to sweep for the highest power I could get from the panel. It was like a game of see-saw. When the sunlight’s intensity changes, I had to sweep back and fourth to get the highest power I could get from my panel.
This is how MPPTs work! Me turning the knob, to control the duty cycle of my buck regulator while comparing the readings to get the highest power from the panels, is the most basic explanation how MPPTs work. The knob represents the duty cycle control of the MPPT’s buck converter. The wattmeter and I represent the feedback of the MPPT’s system. MPPTs work in a very similar way, but replaces the human turning the knob clockwise and counterclockwise with a machine such as a microcontroller. This way humans are not needed to constantly tune that knob to get maximum power.
In MPPTs this type of Power Point tracking is called the perturbed algorithm, also known as the hill-climb algorithm. The MPPT device (a glorified, intelligent buck converter) sweeps the duty cycle back and fourth while comparing the power harvested while keeping it close to the highest possible power that can be harvested from the solar panels.
I will be updating this explanation when I get the proper words for it. In the meantime, this article will help you get a much better understanding of the technicalities of the IV curve graph. (Read this Article)
Step 6: Highly Efficient Synchronous Buck Technology
A lot of people are new to this but there is a much more efficient buck topology that exists. This is called Synchronous Buck Converters and are widely used in high-end commercial grade MPPTs. It sounds fancy and complex, but design and cost wise it is actually simple and cheap (difficult to get going though). Luckily this guide will show you how to get one working as we will be implementing this on our MPPT.
Two Buck Regulator Designs:
- Asynchronous Buck Converter
- Commonly Used
- Typical Efficiency (75-87%)
- Not the most energy efficient
- Notable power loss due to the presence of a diode
- Very easy to implement
- Synchronous Buck Converter
- Less Common
- Typical Efficiency (88-98%)
- Extremely energy efficient
- Power loss reduced by replacing the Diode with a MOSFET
- A nightmare to implement without prior knowledge
This step will explain the operation of the two different buck converters with an assumption that you already have learnt on the basics of buck converters and N-channel MOSFETs. If you haven’t, kindly google how buck converters work and how N-channel MOSFETs work. This step will make more sense when you get to read on them both.
Buck Converters In General
Buck converters are regulators that converts a higher voltage input to a lower voltage input. It’s not the other way around as that would be called a Boost Converter. Unlike linear regulators, like the infamous 7805 IC, a buck regulator does not shed off voltage and current for regulation through heat. Whether it is a Buck, Boost or Buck-Boost, these regulators do its best to conserve power (Power In. Power Losses = Power Out). Notice the minus Power Losses, despite being efficient, a buck regulator will never achieve 100% efficiency and will still have losses, not unless you live in a utopians world. Also, a buck regulator creates a current amplification effect (sort of), as the voltage decreases at the Buck’s output the current it could provide at its output can be greater than of the current provided at the input. A buck converter is a form of switching regulator, where it uses a PWM signal, some transistors, some capacitor, an inductor and a feedback to regulate voltage and current.
Asynchronous Buck Converter. Example
The first thing that pops into peoples minds when the word buck converter comes up are those cheapo blue board LM2596 Buck Converter Modules. These modules that most of you are familiar with are based on the less efficient Asynchronous Buck Converter topology. It uses a diode and a MOSFET or BJT (which is inside the LM2596 chip with the PWM feedback driver). These things typically reaches an average efficiency of 75-85%. Aside from having a lower efficiency rating, you will also notice that those modules heat-up easily even when used with its advertised current rating. This heat-up is caused by thermal dissipation caused by the lack of efficiency (switching losses, conduction losses etc. ).
Asynchronous Buck Converter. Why it’s inefficient?
Don’t get me wrong, asynchronous buck converters are still efficient compared to linear regulators. But its efficiency could be better! The reason why these Asynchronous Bucks are incapable of reaching efficiency ratings close to 98% is due to the losses incurred by the presence of a Diode. The diode is essential to a buck converter as it prevents current from flowing back. There is something called a forward voltage drop (Vf), most silicon based diodes have forward voltage drops ranging from 0.4V-1.2V. That’s it? Well it doesn’t sound much, but when you are approaching high-power electronics territory, that mentioned voltage drop causes a ton of power losses. The drop in voltage from the diode isn’t just a drop in voltage, it results to heat and heat is a useless form of energy in electronics. Think of it as having a leak in your water pipes at home, you wouldn’t get the same amount of water volume from what your meter measured, as a result you lose water and pay a higher water bill. Similar to solar setups, waste power and you wouldn’t get to harvest the most out of what your solar panels can produce.
Synchronous Buck Converter
The answer to the Asynchronous Buck’s lack of efficiency is a slight mod to the Asynchronous buck. By simply replacing the diode with a MOSFET, the voltage drop caused by the diode is nearly eliminated. Why a MOSFET? Unlike BJT transistors a MOSFET does not have a diode’s voltage drop when it is activated. When a MOSFET conducts, by applying voltage across the Gate and Source pins, the MOSFET conducts. You can think of MOSFETs as a mechanical switch. They’re really fast too! Think of Marvel’s Flash pushing a light switch on-and-off in nano seconds. Now that we’ve solved that voltage drop from the diode problem, what’s next? It is a common practice that N-channel MOSFETs are to be used and not P-channel MOSFETs. MOSFETs have something called Rds(on), also known as the on-resistance. When the MOSFET conducts it behaves like a resistor now, and resistors also causes voltage drops too. N-ch MOSFETs have immensely lower on-resistances compared to P-ch MOSFETs. As a result the N-ch MOSFET has a SIGNIFICANTLY lower voltage drop effect compared to using a diode (most of the time). Now we have lesser power losses dissipated as heat. Operation is simple, when Q2 turns on Q3 turns off and when Q3 turns on Q2 turns off. Of course, deadtime must be implemented in order to prevent Q2 and Q3 from turning on at the same time, causing a quick short (cross-conduction). Easy? No, there’s more to it!
Synchronous Buck Converter. The Challenge!
Now there two main challenges in a Synchronous Buck. Now that we have replaced the diode with a second MOSFET, a new problem needs to be solved, mainly on switching them properly. The reason why Asynchronous Buck converters are easy to implement is because the diode, without any fancy circuit or code, automatically blocks current from flowing back. The MOSFETs on a Synchronous Buck on the other hand needs to be switched in sync with each other otherwise it would burn, thus the name Synchronous.
The first problem would have something to do with properly triggering the N-ch MOSFETs. Q3 is not a problem as the drain is tied directly to the ground. A simple totem-pole driver would be enough to switch the gate by providing a voltage between the gate and source pin of Q3. Q2 on the other hand is on top and its source pin is tied to the drain pin of Q3. This configuration is called a half-bridge. To properly switch Q2 a MOSFET driver must be used, specifically one that has a charge pump. This may not make sense to others who are unfamiliar yet to the importance of having a ground reference. A charge pump uses a capacitor to charge upon intervals while having a totem pole driver on the high-side MOSFET Q2 for switching. This ensures that the MOSFET gets the voltage it needs to switch-on entirely. While we know that MOSFETs can behave as switches, MOSFETs can behave as variable resistors too (operating in the active region). This happens when the MOSFET is provided with a lower voltage across the gate and source pin from the specified Vth (threshold voltage). The charge pump MOSFET driver ensures that the MOSFET saturates and gets the voltage it needs to fully conduct and have the lowest possible on-resistance for lesser power losses in the buck (Vgs are usually rated at 10V).
The second problem is the infamous low-side burning MOSFET present in almost all DIY synchronous buck MPPT builds. This is caused when the low-side MOSFET Q3 fails to emulate the diode it has replaced from the asynchronous buck. You can read more on this on the next step, I allocated a separate step for this since it deserves attention.
Synchronous Buck Converter. As a Asynchronous Buck
Fellow engineers would raise probably raise an eyebrow upon reading what I have written a few sentences back, as I have failed to mention that MOSFETs actually do have diodes inside them. Notice how there is a diode in parallel to the MOSFET’s drain and source pins. This is called a Body Diode. It has something to do with the MOSFET’s physical construction and material contents. When MOSFET Q3 is turned off indefinitely, the Buck behaves as an Asynchronous Buck. But when you switch it in sync, the MOSFET Q3 conducts and provides a lower resistance path thus it behaves now as a synchronous buck (now you get a lower voltage drop effect). You can continuously turn Q3 off and turn the synchronous buck to an asynchronous one, but there’s no point in doing that.
So It’s Simple, Right?
Yes and no, hahaha! The implementation is quite simple but the proper process of operation (without going kabooooom!) isn’t as straight forward as you think. To my surprise this is something you wouldn’t find in your college text books but rather found in academic journals, semicon application notes and design guides. Open green energy was the only instructable user to provide a DIY friendly guides to the DIY world, but even he had some troubles too in getting his to work without problems. For years synchronous buck converters have been a trade secret in the industry as very few electronics enthusiasts share detailed guides on how to properly get these things working. Luckily it is our job as electronics engineers and tinkerers to shed light on this design without blasting enthusiasts with engineering heavy jargons. In the following steps I will show you how we fixed common problems with DIY synchronous buck MPPTs through a collab with my colleagues and Open Green Energy.
Step 7: Solving the Burning Low-Side MOSFET Problem
Open green energy wrote one of the most detailed MPPT tutorials present, mentioning not only the things that went right but also mentioned the issues with his attempt just like any good and honest engineer would. Hands down! This really helped us all to collaborate with each other to fix and share the design. I had also encountered this problem with my earlier builds shown from one of the previous steps. It took me months to figure out the culprit that has been haunting us all for years.
The second problem stated from the previous step is the infamous low-side burning MOSFET present in almost all DIY synchronous buck MPPT builds. This specific problem of open green energy and mine are exactly the same and was solve through code. This is something I have not read on anything yet up to date, but discovered through a bunch of lab tests and analysis on my workspace. There are some papers that explained this but they’re either filled with a ton of jargons or does not specify this issue directly. The write-up below will explain everything.
Let’s Explain The MOSFET Driver First
Before I get to the solution to the problem, I need to explain how the MOSFET drivers work to avoid confusing you all. The well known IR2101 and IR2110 drivers are something I call raw logic MOSFET drivers. You have two logic inputs HIN and LIN for controlling the switching at the high-side and low-side MOSFET (Q2 and Q3). When HIN is HIGH, Q2 is turned on and when HIN is low, Q2 is LOW. When LIN is HIGH, Q3 is turned on and when LIN is low, Q3 is LOW. This requires two PWM complimentary signals for buck operation. This chip gives you more control over the switching as you have control over the deadtime duration as well. I liked this chip because I have direct independent control over the Q2 and Q3. I used this on my first prototype version and I stopped using it because I feared it would make the explanation on this educational tutorial much more complex as you would have to deal with MCU timers that are not code friendly to Arduino Users.
The easiest MOSFET driver to use is the IR2104 IC, which open green energy used as well. Let’s FOCUS more on this now since it is what I’m using on my latest build. The IR2104 has a built in deadtime function, making the coding process a lot easier. IR2104 has logic input pins name IN and SD. IN is the input logic for the PWM signal for switching and SD is an enable pin. SD is simply a pin that overrides everything. When SD is LOW; Q2 and Q3 both turns off regardless if there’s a PWM signal present at IN. When SD is HIGH, either Q2 or Q3 will turn on, depending on the IN pin logic state. When IN is HIGH; Q2 is HIGH and Q3 is LOW. When IN is LOW; Q2 is LOW and Q3 is HIGH. What does this mean? Well, now we only need 1 PWM signal to switch both Q2 and Q3 inversely, thus reducing the need for two complementary PWM signals. This means the higher the PWM duty cycle %; the longer Q2 switches on and the shorter Q3 switches on. On the other hand, the lower the PWM duty cycle %; the longer Q3 switches on and the shorter Q2 switches on. At this point some of you are probably getting a clearer picture of what the problem may be.
As it turns out, this is caused when the low-side MOSFET Q3 fails to emulate the diode it has replaced from the asynchronous buck. In controlling our buck MPPT design we provide a PWM duty cycle of 0-100% to the IR2104. Remember when I said the lower the PWM duty cycle %; the longer Q3 switches on and the shorter Q2 switches on, at some point Q3 (the low-side MOSFET) acts like a short and no longer acts like the diode it tends to emulate from the asynchronous buck counter part. There is a specific PWM duty cycle floor value that you cannot go lower to, otherwise Q3 would start to heat-up. (more explanation in a while)
There are two solutions to this problem (hardware vs. software), Either to implement an application specific MOSFET driver IC for synchronous buck converters equipped with flowback current control (Analog Devices offers a ton of them) or simply use the old IR2104 design and fix it through code. Obviously I went with IR2104 design and fixed it with code since the IR2104 is dirt cheap and isn’t anywhere the 10 price tag of a specialized chip for synchronous buck drivers.
I have discovered that there is a specific floor value for the PWM duty cycle % and should never be 0% or anywhere below that specified PWM floor value when a battery is connected at the output. So what is the PWM floor value I am referring to? I came up with a simple formula which I implemented to the open source firmware I wrote as well.
This means that the lowest possible PWM duty cycle should never be lower than the PWM Floor Duty Cycle. The formula takes the output voltage and input voltage ratio to compute for the ideal unloaded PWM duty cycle required by the buck to output a voltage matching the voltage of the battery connected at the output. When PWM signal has a lower duty cycle than the computed PWM floor value, the current flows in reverse and causes Q3 to conduct when it isn’t supposed to be conducting. So instead of charging the batteries, you are actually draining it. As you deviate to a lower PWM signal from the computed PWM floor limit, the reverse current Q3 experiences gets higher and higher causing it to burn. In the code the SD pin of the IR2104 is turned LOW when the PWM goes below the computed floor limit to ensure Q2 and Q3 never turns on at this state. You will notice that PWM Floor Duty Cycle is named as PPWM and PPWM_marginpwmMax was added, this was to limit the maximum allowable PWM duty cycle since charge pump MOSFET driver like the IR2104 cannot operate at 100% duty cycle due to its IC design. It also turns the duty cycle % to an integer value to which the anlogWrite or ledcWrite function accepts.
- PPWM =(PPWM_marginpwmMaxvoltageOutput)/(100.00voltageInput);
- PPWM = constrain(PPWM,0,pwmMaxLimited);
- PWM = constrain(PWM,PPWM,pwmMaxLimited);
The constrain function in the Arduino limits the PWM signal from going above the ceiling limit as well as from going below the floor limit. The function ledcWrite(pwmChannel,PWM) is the ESP32 equivalent of an analogWrite of an Arduino Uno/Nano, the function is used to set the PWM signal at the GPIOx pin. There’s a lot of codes in between the lines above, I just wrote the most important ones to highlight the fix solution.
Step 8: Solving the PV Backflow Current Issue
There’s is something called a body diode current leakage in both synchronous and asynchronous buck converter topologies. This problem has been present in most DIY synchronous buck MPPTs I’ve read on, up to this date. There were attempts to fix the the high-side reverse blocking MOSFET but often ended up not switching Q1 properly. Notice, regardless whether you turn Q2 on or off, the presence of a diode inside the MOSFET Q2, causes current from the batteries to flow back to the solar panels when the input voltage is less than the output voltage (Solar Panel Voltage Battery Voltage). This happens when solar panels produces lower voltages at dusk, dawn and at night-times. We are aiming for the highest possible efficiency, adding diodes at the input is the last thing we want. We need a solution!
The Expensive Solution:
This issue can easily be solved by a high-side N-channel MOSFET driver or something like an ORing MPSFET driver. I deviated away from this option as the driver chips required for this solution are rare and expensive.
The Cheaper Solution:
This is can be solved by adding a diode at the input (before Q2) to prevent current from flowing back, this is applicable to all buck topologies. But, remember from the previous steps I mentioned? Diodes cause voltage drops that leads to power losses! So again, we need to replace the input diode with another N-channel MOSFET, this time connected in reverse of Q2. This is called a reverse blocking MOSFET configuration. When Q1 and Q2 have body diodes opposing each other, current can no longer leak both ways, not unless we turn both MOSFETs Q1 and Q2 on. Now the challenge is to properly turn that newly added Q1 on and off. Clearly we can’t just apply voltage at Q1’s gate pin, since it is positioned at the high-side and far away from the ground. To fix this problem, we’re dedicating an isolated DC-DC converter for it to be switched with.
The isolated DC-DC converter I have chosen is B1212S component by EVsun. With a cost of 2 per piece, it is cheaper than buying a dedicated application specific high-side MOSFET driver (ex: Analog Devices, TI Maxim Chips). While another IR2104/IR2101 can be used, the isolated DC-DC converter MOSFET combo has a slight advantage of being capable of operating at 100% duty cycle.
The isolated DC-DC converter creates an isolated potential difference between the source and gate pin of Q1. R37 is a pulldown resistor that bleeds out the gate charge of Q1 whenever no power is provided at the input of U2. The PV backflow prevention unit as a whole is switched by Q4. When GPIO27 releases a HIGH signal, Q4 conducts and provides a path for current to power U2 (the isolated DC-DC converter). When U2’s input is powered, U2’s output releases an isolated voltage of 12V and is supplied to Q1’s gate and source pin, thus powering Q1 and closing the path from the Vin and Q2’s drain pin. Turning GPIO27 to low results to the opposite of everything I said and turns off Q1.
My implementation was simple but barbaric. Response time for turning Q1 has not been measured quantitatively but I can assure you it is fast enough. Regardless leakage of current back from the panels isn’t that high in the first place. This was just a feature needed to prevent draining the batteries during night. I understand that a better implementation would be to leave U2 turned on all the time while having an isolated totem-pole MOSFET driver chip to switch Q1. But hey it works!
But Solar Panels Have Diodes Inside Them? Right? Right.
While solar panels can convert sunlight into electrical energy, it can also absorb energy back when the solar panel’s voltage is lower than the battery’s voltage. Batteries feeding current back to solar panels? Yes it can happen! There are two types of diode positioned inside a solar panel. One are the bypass diodes, which eliminates the hot-spot phenomena which can damage PV cells (not our concern) and the other is the blocking diode, the diode that prevents current from chargers and batteries from flowing back. As it turns out, after checking my monocrystalline solar panel’s rear box, to my surprise it doesn’t have blocking diodes installed. I did some digging and found out that modern day solar panels does not include blocking diodes as it causes power losses. Instead it has somehow become a modern day standard that the diodes are to be installed in the Solar Charge Controller.
Step 9: Why I Am Using an External Precision ADC (ADS1115. Texas Instruments)
ADC In An Arduino Nano
The ATmega328P used in an Arduino Nano and uno has a 10-bit ADC. This are known to most as analog pins. 10-bits means there are 1024 values it can represent from 0V to 5V (5V being the default voltage reference). When the ADC pins are used with voltage and current sensors design for a wide range of voltage (ex: 80V 30A), you only have 1024 values to represent 0V-80V and 0A-30A. This gives us a sensing resolution of 78mV for voltage and 29mA for current. This means you have a very coarse way of detecting voltage and current and your voltages and currents could possibly jump with intervals of 78mV and 29mA.
ADC In An ESP32
The ESP32 has a built in ADC of 12-bits, this gives you 4096 values to represent your voltages and currents. That is four times higher than of the Arduino Uno/ Nano! For an 80V 30A setup, we get a voltage sensing resolution of 19.5mV and a current sensing resolution of 7.32mA. This is a far better voltage and current sensing resolution from the Arduino Uno and Nano! The ESP32 has a faster processor too! In terms of regulation, it will be able to poll faster as well, making it more responsive. But there is one downside! The ESP32 is known for having a bad ADC! It has a non-linear ADC response. This means the ADC is not that accurate for representing the voltages between 0V and Vref. It will suffice, but I did not want to settle with this. The solution?
External Precision ADC
The solution is to use an external precision I2C ADC! The one that I have chosen is the ADS1115 or ADS1015 by Texas Instruments. Why bother use an external ADC? These external ADCs were designed for a specific purpose, and that is to serve only as an ADC and nothing more, and it does its job extremely well! Notice how sensor values twitch unexpectedly when you connect them to an Arduino Uno? Try using an external ADC, you will notice that values barely ever twitch unexpectedly.
The ADS1x15 ADCs has a built in internal voltage reference. This means your analog value readings are independent from your ADC’s Vcc. This makes it less susceptible to a system’s supply line noise. It has a built in programmable Op-Amp, which means you can select a variety of gains. And most importantly the ADS1115 has a 16-bit ADC resolution! 16-bits for 860sps! 16-bits would give you a 65,5536 to represent your voltages and currents! This is 64 times better than and Arduino Uno’s ADC. For an 80V 30A MPPT setup, we now have a voltage sensing resolution of 1.22mV and a current sensing resolution of 0.457mA! It’s insane!
Should I go with the ADS1115 or ADS1015?
The big question is, which one do I need? Despite having slightly different specs, both chips are cross-compatible with Adafruit’s Arduino ADS1x15 library. Do I get the ADS1115 with 16-bit resolution and 860sps speed or the ADS1015 with 12-bit resolution with 3,300sps speed? As mentioned in the video I have tried them both. ADS1115 was unnecessary for this build, it has a resolution I barely needed for 80V 30A. I went with the ADS1015 for the entire project’s testing and documentation.
Why The 12-bit ADS1015?
ADS1015 has a 12-bit ADC resolution, same with the ESP32’s 12-bit ADC resolution, why choose the ADS1015 still? The answer is stability. Remember when I made different revisions of the board. I have tried the Arduino Nano, Arduino Uno and ESP32; all their ADCs were not as stable as a dedicated external ADC such as the ADS1x15. Even when unlocking the ATmega328P and ESP32’s internal ADC Vref (a mod for stability), it was nothing compared to an external ADC. Remember that now we are using a higher PWM resolution, we now need to sense minute changes in voltages and currents for the MPPT perturbed algorithm to work flawlessly. Slight noise and twitches in sensor readings heavily affects the MPP tracking. An external ADC is the way to go!
Step 10: Choosing an MCU (Why I Chose the ESP32 Over an Arduino Nano)
Some of you are probably familiar with the ESP32. There are two main version of it, the ESP32 Dev Board and the WROOM32 ESP32 Module. In terms of pins and specs, they are exactly the same. The dev board on the other hand has a USB port for programming, while the WROOM32 is a standalone MCU without a USB port. For a WROOM32 to be programmed via USB you need an external USB-TTL UART interface such as the CH340C. The ESP32 Dev Board has one, built-in to the board. Why did you go for the WROOM32? Mainly because of raw cost and space. Notice how I bought a reel of WROOM32s in the video, I bought 50 pcs of them for 1.80 each! They’re cheaper than 5-10 ESP32 Dev Boards. Second is space, the WROOM32 is tiny! Without expanding those SMD pads to THT pins, you can build a smaller project with it.
I’ve explained this in the previous steps but incase you have missed it, here’s the summary:
- The WROOM32 module is only 1.80 from where I live.
- It is Arduino Compatible, you can use it like any other Arduino!
- ESP32 is a very fast and powerful 240MHz 32-bit dual core microcontroller
- It has built in Wi-Fi and Bluetooth BLE, so you don’t have to buy expensive modules
- It has a maximum of 16-bit PWM resolution
- It has a 12-bit Internal ADC (we won’t be using)
- Has a low power core for low-power processing
- Capacitive Touch Pins
- Has a built in DAC
- The list goes on and on!
ESP32. Why I Specifically Chose It:
- For 1.80, it was cheaper than an Arduino Nano and is equipped with specs that surpasses it in all ways!
- The most important part for me was the 16-bit PWM resolution. A higher PWM resolution is much more favored in a buck converter based MPPT. The higher the resolution, the finer the voltage and current steps would be. It is adjustable, the lower the PWM bit resolution, a higher PWM frequency can be achieved! (will explain more on this later).
- When I said it has two cores, yes you can run two independent processes while sharing the same recorded variables in two independently running codes. An MPPT has a ton of algorithms that should never be bothered. This includes voltage and current regulation, MPP tracking and protection protocols. Wi-Fi telemetry for example takes 500ms of processing time to send. Combining Wi-Fi telemetry on the same core with the main system processes would make the MPPT dangerous and less responsive. By allotting a separate core for the Wi-Fi, I was able to get 9ms per loop cycle for the MPPT core.
- Wi-Fi and Bluetooth also a big bonus for the price as well
- Processing speed: This thing is extremely fast! Take my words for it
ESP32. PWM Resolution Frequency:
- AVR MCU based board like the Uno and Nano were challenging in setting the PWM timers.
- ESP32 has library that simply asks for the PWM bit resolution and PWM frequency you need, and the rest is magic as you can use almost any pins for that specific PWM settings.
- Take not that the are limits
- For a 16bit PWM resolution, a maximum of 1.22Khz PWM can be achieved
- For a 12bit PWM resolution, a maximum of 19.5Khz PWM can be achieved
- For a 11bit PWM resolution, a maximum of 39.06Khz PWM can be achieved
- For a 10bit PWM resolution, a maximum of 78.12Khz PWM can be achieved
- For a 9bit PWM resolution, a maximum of 156.25Khz PWM can be achieved
- For a 8bit PWM resolution, a maximum of 312.5Khz PWM can be achieved
Importance of PWM Resolution Frequency:
- The higher the PWM resolution, the finer the voltage and current steps would be on the MPPT’s buck regulator output. A lower PWM resolution will give you coarser steps in voltages and currents.
- The higher the PWM frequency the more power your MPPT’s buck can handle and the smaller the ripple voltages at the output.
- You can increase PWM frequency up to an extent, but remember electronics is a weighing game of trade-offs. While your MPPT buck can handle more power with a higher PWM frequency, the switching losses would also increase up to some point.
- Also there’s a limit between the PWM Reso Freq given by the formula
- Max PWM Freq = MCU Clock / PWM Resolution
- MCU clock of the ESP32 is 80MHz
- You can set either PWM Freq or Reso as the given or required variable
- Let us choose a PWM resolution of 11bits and find for the max PWM Freq
- Max PWM Freq = 80,000,000 Hz / 11bits
- Max PWM Freq = 39,062.5Hz
- This means for an 11bit PWM, we can only choose a max PWM freq of 39.0625Khz
Step 11: Excel MPPT Design Formula Calculator
Download The Excel File: Click Here
Finding The Required Inductor Inductance Saturation Current
I’m currently in the process of filming Part 2 of the tutorial video. Part 2 will explain the formulas used for designing a synchronous buck converter used in the MPPTs. For now, I have provided an excel calculator in the file package. You just simply have to input your off-grid setup’s specifications to the excel file and it will compute for the Inductor Inductance, Inductor Saturation Current and Bulk Capacitors required.
- You only have to input the required fields from the Required Parameters Section
- Vmp. Input your solar panel setup‘s total Vmp (maximum point voltage)
- Imp. Input your solar panel setup’s total Imp (maximum point current)
- Vbatt. Input your solar setup’s maximum battery voltage
- fsw. Leave it to 39kHz as this is the default PWM switching frequency that I have set through the MPPT firmware code. You may change this if you plan to set a different PWM switching frequency.
- Leave Assumed Parameters Section values to default.
- The highlighted yellow fields from the Solved Parameters Section will display the following:
- Ipk. The required inductor current rating
- L. The inductor’s inductance required
- Cout. The recommended capacitors for C7 and C8 from the schematic. It is just a recommended value, I do find a 470uF cap sufficient
General Inductor Capacitor Values
General Inductor Inductance: 64uH
General Inductor Current Rating: Above 30A
General C7 C8 Capacitances: 470uF
When you buy off the shelf commercial MPPTs, the units are manufactured with predetermined component values. These values have been selected for the MPPT to be usable for a wide range of voltages and currents. You can use the general values above for the inductor and bulk capacitors.
Step 12: The Final Schematic
Here is the final schematic of the final and fully functional board. I will be making a separate tutorial for tweaking this design for your needs. But if your off-grid setup fits my specification sheet shown on the earlier steps, there is no need to change anything. Here’s a quick explanation of the schematic:
- One of the key reasons why this project ended up having an extremely small form factor and high energy conversion efficiency was the careful selection of N-channel MOSFETs. CSD19505 was one of the best low cost MOSFETs I could source! With an on-resistance of 2.6mΩ and Vds of 80V this this was a beast! This meant lesser conduction losses.
- A single CSD19505 is equivalent to three IRF3205 connected in parallel and can handle a higher voltage of 80V. If we were to use something like an IRF3205 we would end up using nine of them in place of three CSD19505. CSD19505 also has a significantly lower gate charge, which also helps reduce switching losses.
- In finding MOSFET alternatives, find a MOSFET with a Vgs of 80V or above. ID must be higher than 90A. Rds(on) must be low as possible (I wouldn’t go any higher than 4mΩ in selecting individual MOSFETs without using a parallel config for this MPPT). A lower Qg will always be better.
- U8 is the ESP32 acting the microcontroller for the system
- R25-R28 are pull-down resistors for the buttons to keep the pins from floating
- R29 R39 are pull-up resistors for the I2C port
- C19 is a capacitor fix to the infamous auto-program problem in ESP32 programming
- C23 is a simple bypass capacitor for lowering ripples at the ESP32’s 3.3V line
- R21 R24 is a pull-up resistor for the ESP32’s EN pin (essential for the UART as well)
- LED1 and R36 is a simple LED indicator connected to the ESP32’s default LED indicator pin
- U9 is a CH340C USB-TTL UART chip for USB serial com and programming the ESP32 through USB
- U4 is a 3.3V regulator for the USB port’s 5V input. This is needed since our ESP32 uses 3.3V logic
- C21 and C22 are standard bulk resistors for the U4 regulator
- D7 is a Schottky diode with a low Vf for preventing current from flowing back to the USB port when the system is powered by the solar panels or batteries. 1N4007 can be used as an alternative.
- U10 is an external ADS1015 12-bit ADC (previous steps mentioned details about this)
- C20 is a standard bypass capacitor to reduce line noise to U10
- R31 is a pull-up resistor for the Alert Pin of U10. The alert pin is a programmable comparator which I plan to use in the future in a firmware update, as of the moment it is unsused.
- A0-A3 are the analog inputs of the external ADC U10.
- U10 has a set voltage reference (Vref) equivalent to 2.048V, this was universally set to fit U1’s analog output range (ACS712-30A current sensor).
- U10 is a highly stable, precise and accurate external ADC that gives cleaner sensor values compared to using an MCU’s internal ADC.
- Voltage sensing can easily be achieved using voltage dividers.
- R1 and R2 forms a voltage divider for an input range of 0-80V to a voltage divider output range 0-1.989V. This is a voltage lower than the 2.048V voltage reference of the external ADC U10. It is close to the Vref for maximizing ADC resolution but not too close that it could cause clipping.
- C1 is a bypass capacitor for filtering the input voltage divider’s output from noises.
- R32, R33 and R34 was originally of the same value to R1 and R1 for an 0-80V output range. And yes, the MPPT, originally can charge battery chemistries up to 80V and not 50V. However I decreased it to 50V to increase ADC resolution at the output voltage divider. People barely use batteries above 48V in the first place.
- R32, R33 and R34 forms a voltage divider for an input range of 0-50V to a voltage divider output range 0-2.04V. This is a voltage lower than the 2.048V voltage reference of the external ADC U10. It is close to the Vref for maximizing ADC resolution but not too close that it could cause clipping.
- C13 is a bypass capacitor for filtering the output voltage divider’s output from noises.
- U1 is an ACS712-30A bidirectional, isolated 30A rated current sensor IC.
- U1 is bi-directional, but we’re only interested on using it as a unidirectional current sensor for maximizing the ADC resolution for current sensing. The reason why U1’s.IP and IP pins are connected in a reverse manner is due to it’s negative current flow response. When there is no current Vout = Vcc/2. This means when no current passes through the current sensing pins.IP and IP, the analog output of the current sensor is half of the 5V Vcc, which is approximately 2.5V. When current flowing.IP to IP; Vout = 2.5. (Current Sensed 0.066). We now know that at.30A, Vout = 2.5V; at 0A, Vout = 0.52V. Now, we have a floor close to the ground and a ceiling of 2.5V that we can scale down to the ADC’s voltage reference. This way we don’t have to level shift and at the same time we have eliminated the half unused range of the sensor.
- R3 and R4 is a voltage divider that scales down the 2.5V ceiling we get from the U1’s analog output to a voltage slightly lower than U10’s 2.048V voltage reference. This prevents the sensor readings from getting clipped.
- C2 is a filter capacitor mention in U1’s (ACS712) datasheet. Increasing C2 results to a decrease on U1’s current sensing bandwidth. Since we are dealing with DC, we only need a low bandwidth to reject noises that could interfere with our current sensing. 10uF was suggested for maximum filtering for DC applications, but it was also mention in the datasheet that 10uF would yield a slower rise and response time. I eventually settled with 2.2uF.
- R5 and C9 is an RC filter to further reduce the noises picked up by U1’s analog output.
- Notice how I payed particular attention to the current sensor. From my past MPPT prototypes, using ACS712 modules with stock values deemed to be noisier than this modified version. There was a significant increase in MPP tracking performance after implementing this simple fix.
- R35 is a 10k NTC thermistor acting as a temperature sensor
- R12 is a pull-down resistor that forms a voltage divider with R35 to create a simple temperature sensor
- C12 is a bypass capacitor for filtering the analog output of the temp sensor.
- The analog output of the temp sensor unit is connected to GPIO35 (using ESP32’s internal ADC). I did not connect the temperature sensor to the external I2C ADC since it did not need much precision. The ESP32 also has a faster ADC for this sensor that does not need much priority on.
BACKFLOW CURRENT CONTROL UNIT (BCCU):
- The backflow current control unit was mention from the previous steps in detail
- Q1 is a reverse blocking, high-side N-channel MOSFET that provides a controllable blocking effect from Q2’s body diode current leakage.
- R37 is a pulldown resistor to bleed out the gate charge of Q1 when the BCCU is turned off.
- B1212 is an isolated 12V DC-DC converter. This is used to provide a separate ground potential for switching Q1’s source and gate pins.
- When GPIO27 is HIGH, Q4 conducts and U2 gets power from the 12V line. An isolated 12V supply is then provided to Q1 to turn on and conduct.
- When GPIO27 is low, power is cut from U2 and Q1, R37 bleeds out the remaining charge at the gate and source pins of Q1 causing it to turn off.
- C4 and C3 are datasheet recommended bypass capacitors for U2.
- R6 and LED3 is a simple LED indicator for indicating when the BCCU is active.
LINE BUCK REGULATORS:
- U5 and U6 are 80V 0.4A buck regulators for supplying a regulated voltage to all the other components in the MPPT system.
- U6 has a fixed output set to 3.3V by R17,R18 R19. This supplies all the 3.3V components
- U5 has a fixed output set to 10.625V by R14,R15 R16. This supplies 10.625V to the cooling fan port, the BCCU and the MOSFET’s driver gate drive supply pin. Originally this was set to 12V but I had to decrease it to reduce switching losses and as well to decrease the cooling fan’s consumption. Nonetheless, all components would still work with 10.625V
- U3 is a linear regulator connected at the 10.625V output of U5. This provides the 5V required by the U1 to operate. I am aware of the losses incurred to this, but it is negligible as the U1 requires very little current. A large voltage difference from U5 and U1 may also be a good thing as it would be able to regulate the 5V line better as U1’s analog output stability is heavily dependent on the 5V line regulation.
MPPT MAIN SYNCHRONOUS BUCK:
- This portion was also explained from the previous steps in detail (here’s a summary nonetheless)
- Q2 and Q3 are high-side and low side N-channel MOSFETs forming a halfbridge for switching.
- L1 is an inductor for the MPPT’s synchronous buck, a very fast energy storage device.
- C7 and C8 are bulk or bypass capacitors used to filter the input and output from ripple voltages caused by the fast switching nature of an SMPS buck unit.
- U7 is an IR2104 half-bridge MOSFET driver equipped with a charge pump
- R8 R11 are pull-down resistors for preventing Q2 from floating before startup
- R9 R10 are gate resistors for limiting the transient currents that U7 provides for triggering the gate pins of Q2 and Q3.
- D1 and D2 are Schottky diodes that provides a quick return path for draining the gate charges of Q2 and Q3 when any of them turns off.
- D3 is a Schottky diode to ensure that current never flows back the 12V supply line for charging C10
- C10 is a bootstrap capacitor used by the U7’s charge pump for providing proper power to the high-side N-channel MOSFET Q2.
- C11 is a datasheet recommended bypass capacitor for the U7
- R13 and R20 are essential pulldown resistors that prevent U7’s logic pins from floating. This is yet another important fix to a long existing problem in DIY MPPT designs. Without this, when your MPPT is operating, connecting a USB cable to your computer causes the MCU’s pins to float during operation. As a result the MPPT’s buck portion goes haywire at times and accidentally turns on Q2 or Q3 causing some magic smoke. Be sure to add these resistors, this ensures the MPPT’s buck is turned of when the GPIO pins float.
Step 13: The PCBs
You can purchase my fabricated boards from the PCBway links below. These are quick links, so you wouldn’t have to upload gerber files to the website. If you are interested in the gerber. You can find it in the google drive file package link. You can buy 10 pieces of the board for 5 (be sure to input 10pcs. since 5pcs is set by default). I do appreciate it when you buy from my PCBway link, I use the commission to fund my other projects and tutorials, your support would be much appreciated.
PCBWAY PCB LINKS:
GOOGLE DRIVE ALL FILES: (Schematics, PCB, Parts List, Firmware)
I did my best to make an extremely compact board without butchering the line gaps and widths. I won’t be providing printable PDFs for homebrew PCBs for this specific design since it uses a lot of vias and would be nearly impossible to make a homebrew PCB without using electroplating.
The project does involve a lot of surface mount components. This is my first tutorial to feature an SMD design. This isn’t my first board to use SMD though, I started way back from 2017. I’ve made hundreds of boards that used SMD, but I don’t feature it in my tutorials that much in fear that other enthusiast for fear of building it. For those who are new to SMD board projects, based from experience, it’s actually easier to assemble than through hole designs (THT).
Step 14: Materials Needed
I buy parts in bulk, the individually priced total component cost of the MPPT project is around 20 in the Asian market. may vary depending on where you buy your components from.
Complete Components List With Links: (click to view excel parts list)
- ESP32 WROOM32 MCU Module
- ADS1115/ADS1015 I2C ADC
- CSD19505 2.6mΩ N-ch MOSFETS (3x)
- ACS712-30A Current Sensor IC
- IR2104 MOSFET Driver
- B1212 DC-DC Isolated Converter
- XL7005A 80V 0.4A Buck Regulator (2x)
- CH340C USB TO UART IC
- 16X2 I2C Character LCD
- AMS1117-3.3 LDO Linear Regulator
- AMS1117-5.0 LDO Linear Regulator
- SS310 M7 Diodes (refer to excel sheet)
- SMD Resistors Caps (refer to excel sheet). Inductor Core MISC. (refer to excel sheet)
- Soldering Iron
- Soldering Lead
- Desoldering Pump
- Hot Air Reflow Station (optional)
- Solder Paste (optional)
PARTS SOURCE (GLOBAL ALTERNATIVE): https://lcsc.com/
Step 15: Component Alternatives
If you are new to surface mount (SMD) you can buy module breakout boards like these. Use a pair of tweezers on the component you want to desolder than heat the pads with a hot air reflow gun. In some instances this is a cheaper way of getting the chips without buying in lots or bulks.
SMD resistors are labelled. For example a 10k ohm resistor is 103, a 2.2k resistor is 222. SMD capacitors on the other hand are not labeled. You have to use your multimeter’s capacitance testing feature to know the capacitance of MSD capacitors when you are recycling them from boards.
Step 16: Board Assembly (Soldering Iron Method)
As seen on the video, there are various techniques you can use to solder the SMD components without using solder paste and a hot air reflow gun. This is how I soldered SMD components when I got into SMD back in 2017.
- Solder a single pad
- Grab you component with a tweezer
- Align it to the pads
- Melt the tinned pad that you have soldered previously. This acts as an anchor to your components
- Solder all the remaining feet of your components to the pads
- A little bit if flux on the surface helps with the soldering
- If the flux and solder creates a char or burnt residue, use a toothbrush and clean the board with alcohol
Step 17: Board Assembly (Hot Air Method)
My next favorite technique is the handheld reflow SMD soldering technique. What’s my first? A PID oven if my first, but I won’t be showing that today. Let’s go with the easiest SMD soldering technique.
Handheld Soldering Reflow Technique:
- Grab a solder paste syringe
- Inject a blob of solder paste on your PCB’s pads
- Align your component to the pads
- Heat the pads with a hot air reflow gun
- The paste would start to melt and the component’s feet will magically align with the pads as the solder paste melts and becomes a solder joint.
- If your components misaligned with your pads, use a pair of tweezers to realign them while using a hot air gun to melt the solder again.
- That’s it! Easy!
Step 18: The USB Port (Take Note)
Take note that the Mini USB port comes with nibble guides. These are meant to be used for proper alignment of the USB port to the board during automated factory assemblies. I did not implement holes to my PCB since I used the area underneath for line traces. For you to be able to solder this flat on the board and pads, you would have to snip of these nibbles.
Step 19: The CH340x UART Chip (Take Note)
If you are using the CH340C variant of the CH340 USB-TTL UART chip, kindly disregard the X1 pad by leaving it unpopulated. If you are using the CH340G, you must solder an SMD 12MHz crystal resonator on the pad, since the CH340G variant does not have an internal crystal built in to the chip. Bottom-line: get the CH340C it’s priced the same and has the same specs.
Step 20: Proper Heatsink Installation (Isolation Required)
If you are new to TO-220 packaged transistors, kindly read this and pay particular attention. MOSFETs using the TO-220 package always have their drain pins tied to the MOSFET tab, yes they are electrically connected. Screwing the MOSFETs directly would cause the heatsink to conduct with all the drain pins of the MOSFETs.
Now let’s do a recall from the schematic. MOSFETS Q1 and Q2 have drain pins that are connected in the first place, there’s no need for isolation between the two MOSFETs. MOSFET Q3 on the other hand has a drain pin that should not be conducting with Q1 and Q2’s drain pins. Q3 is the MOSFET we need to isolate from the heatsink.
Steps For Heatsink Assembly:
- Solder the MOSFETs first to the board.
- Grab you heatsink and place alongside with your MOSFETs
- Use a marker to mark the holes be drilled
- I am using 3.2mm bolts, so use a drill bit slightly smaller than the bolt size
- Drill through the aluminum heatsink.
- Before proceeding to the Isolation steps, force screw the bolts to the heatsink to create a thread on the heatsink. This is a simple, barbaric and effective way to have a thread or grooves on your heatsink without using tapping tools.
Steps For Isolation:
- Insert the plastic isolation bushing to your MOSFET’s hole or sleeve it on your bolt instead.
- Add the fiberglass or Mica isolation pad between your MOSFETs and heatsink.
- Screw the bolt with the plastic insulation bushing in between the MOSFET and heatsink
If Q3 is the only MOSFET needed to be isolated from Q1 and Q2, why did you Isolate them all on the video?
I isolated them all because I didn’t want the heatsink to be connected anywhere to the circuit. This was important to me especially during the time the board was under development and undergoing tests. If I leave Q1 and Q2 connected to the heatsink the heatsink would could conduct 80V from the panel, this was a risk I didn’t want to take when I was probing through the different pins for my lab equipment tests. One slight touch from a stray wire could have potentially damage my build, that’s a lot of parts to replace. On the other hand isolating Q3 only while leaving Q1 and Q2 conducting through the heatsink has a slight benefit, this provides a lower resistance path between Q1 and Q2, it it negligible though. I would recommend isolating them all from each other.
Step 21: The NTC Thermistor Temperature Sensor
NTC thermistors come in different packages. I bought the ring type of NTC thermistor since all I had to do with screw it on my heatsink. It is isolated so no need for galvanic isolation. If you go with the thermistor that looks like a capacitor, just glue it on the heatsink. The leads of the thermistor goes to R35 of the board. These things are non-polarized you can connect the two pins in both ways.
Step 22: Select a Fused Rated for Your Needs
You will notice I used 20A Green Mini Automotive Fuses and not the 35A I recommended from the schematic. The reason why I did this was to protect my circuit to what my solar setup runs with. While the MPPT runs with a ton of safety protection protocols, these protocols and safety features are microcontroller and code dependent. If the microcontroller were to malfunction and enter a lock-up state (which is highly unlikely based on my field test), the fuses could save a lot of your hardware from frying. I did not have the proper solderable fuse connectors at the time I documented this project, so I just soldered them to the board directly.
How To Select Fuses:
Step 23: Solder or Screw?
I made the solar and battery holes large enough for wires. You can solder wires directly if you plan to have the connectors mounted externally. I wanted to make mine screwable so I went with a 50A rated screw terminal for it. If you plan do the same and go with my 3D printed enclosure, kindly remove the screw terminal’s cover.
Step 24: Solder the Remaining Components
If you have watched the video, I showed a specific sequence of which parts to solder first. This was because surface mount components are much more difficult to solder when the THT components are soldered first (tall THT components block areas beside SMD components).
Solder all the SMD components first and the THT follows.
Step 25: Designing the Inductor
If you plan to follow my exact general design, you can skip this step but if you plan to use a different inductor inductance from your design, or perhaps use a different toroidal core from the 0077071A7 core model I used, this step will guide you in designing the required toroidal core for this project.
The Inductor I Used:
- Model: 0077071A7
- Manufacturer: Magnetics Inc.
- Core Material: Kool Mμ (Sendust. FeSiAl)
- Relative Magnetic Permeability: 60μ
- Dimensions: OD = 33.5mm. H = 11mm
- Al = 61 nH/T^2
- Ae = 65.6mm^2
- Bsat = 1.0T
- Individual Price: 0.50 USD (25 PHP)
- Retail Supplier Link: Click Me
- Datasheet Link: Click Me
Steps In Building A Toroidal Inductor:
- Find a suitable toroidal core (T-130 or larger)
- Yellow #26 iron powder core material is a common choice for the toroidal cores used in buck regs (you can go with these). Although I went with a sendust (Kool Mμ by Magnetics Inc.) since it is known to have 40-50% lesser core losses than of the regular Iron powder core material.
- Visit Coil32’s online calculator (Click me)
- Scroll down and find ferrite toroid calculator.
- We will be using a gauge 16 magnet wire, there is a dropbox on the upper right and select AWG 16
- In the text box L, input the inductance that you would want your inductor to have. My MPPT design required an inductance of 64μH, so I entered 64 in the box. (it was actually 48μH, the previous steps discussed why it became 64μH).
- OD refers to your toroid’s outer diameter, measure yours in mm and input it in the text box.
- ID refers to your toroid’s inner diameter, measure yours in mm and input it in the text box.
- H refers to your toroid’s height or thickness, measure yours in mm and input it in the text box.
- You can leave Chamfer to 0mm, unless your toroidal core’s datasheet specifies it.
- μr refers to the Relative Magnetic Permeability. This one is tricky and is often found in in your toroidal core’s datasheet. Luckily 0077071A7 has a datasheet that specified it of having 60μ, so I entered 60 in the text box. If you are dealing with an unknown toroidal core with no label, observe if it was colored with paint, some toroidal inductors have colors to specify the core material. Yellow toroids are often 75μ. (inductor color code article)
- Do not touch the other text boxes, leave them be!
- Press the Compute button.
- You will get results down below
- N. is the number of turns of gauge 16 magnet wire that you would have to wind around the toroidal core in order to get the inductance that you have specified in L
- Lw. is simple an approximation on the length of wire that you will need in order to get N number of turns around the toroidal inductor.
The Inductor Current Rating
The inductor current rating that you would often find in prebuilt inductors refer to something called the inductor saturation current. This refers to the applied DC current at which the inductance value drops a specified amount below its measured value with no DC current. Some manufacturers will rate their parts for a 30 % drop in inductance. Remember that inductors are really fast energy storage devices. Energy is stored through a magnetic field generated by the current flowing through the inductor. Materials can only store a specific amount of energy an inductor can take in. When an inductor can no longer absorb energy, the inductor saturates as the inductance decreases as well. Building an inductor and getting the required number of turns to get the required inductance is easy! But determining the inductor current from your toroidal inductor design is something that has haunted me for months! It is also not something you can easily come across google! There are two ways to determine the inductor current; one is by using datasheets and formulas, and the other is by conducting a inductor pulse test with an oscilloscope connected to a homebrew rig (which I will be demonstrating later).
Formula/ Calculator Method:
- Visit Pigeon’s Nest Calculator (Click me)
- If you want to learn, you can find the formulas from there as well!
- You will be asked to fill some parameters.
- These parameters can only be found from your toroidal core’s datasheet
- This is why I said it was difficult. Very few manufactures specify these fields in their datasheet.
- The parameters Al is the inductance per turn. This is something you would find in a toroidal core datasheet. If you don’t have datasheets for your toroidal core, you can visit (this link) for finding Al values for generic iron powder core toroids.
- Ae is simply the effective cross-sectional area of a toroid. This can also be found in the datasheet. If you don’t have one, use a formula from your geometry subject to solve for a toroid’s cross-sectional area.
- L is simply the inductance that your designed inductor has.
- Bsat is the Magnetic Saturation Flux Density and it is one of the most difficult to find. I couldn’t even find it in the datasheet, I didn’t want to settle with Pigeon’s Nest’s 0.4T assumption since I’m dealing with a different core material. Luckily, I found (this article) showing the different magnetic flux densities (Bsat) of the common core materials used in toroids. (Sendust Kool Mu cores like mine turned out to have a Bsat = 1.0T). But, if you are dealing with a generic iron powder core, Bsats can be found from (visit this link).
- Now that we have everything we need. Press the Calculate button on the Isat box.
- Isat is now your Inductor’s Saturation Current Rating!
Articles You May Want To Read:
Step 26: Build the Inductor
Are you using the 0077071A7 toroidal core? Follow my lead!
Steps On Building The Inductor:
- Grab a tape measure and cut 1.3 meters of Gauge #16 magnet wire.
- Wind it around the toroidal core 30 times. Clockwise or counterclockwise, it doesn’t matter.
- There will be a slight excess of wire after 30 turns. Cut the excess off but leave some behind for the inductor’s feet.
- The magnet wires at the ends must be sanded or filed! Magnet wire are enamel insulated. You have to scratch that enamel layer off to be able to solder the inductor to the PCB.
- You now have a 64uH 33A inductor! Some powerful stuff we got here!
Step 27: Testing the Inductor’s Inductance (Optional)
It is a good practice to verify a newly built inductor’s inductance. Getting the wrong inductance from your initial design is possible, especially if some of you are relying on generic toroidal cores. I was confident with mine since I built it on a branded toroidal core that came with a datasheet. Nonetheless I ran an inductance test. I used my Agilent 4263B Lab Grade LCR meter to verify mine. After connecting my inductor to the LCR meter’s kelvin probes the LCR meter displayed 63.790uH! That’s really close to my 64uH goal, it was perfect!
You don’t need fancy equipment like the Agilent LCR meter. You can grab yourself a 7 LCR meter for checking your inductor inductances. The cheapo LCR meter measured 0.05mH (50uH). It was poor in resolution, but hey at least you get a good estimate if your DIY inductor was close to your target inductance. Just don’t expect it to be as precise and accurate as lab grade LCR meters.
Step 28: Testing the Inductor’s Saturation Current (Optional)
Now we can verify the inductor’s saturation current. As mentioned from the previous step, the inductor’s saturation current is one of the factors that dictate on how much current our MPPT can handle. So I needed to be sure if my newly built inductor can truly handle 33A from what I have computed. So I built this inductor test rig that works with an oscilloscope. We have a large low ESR capacitor bank for storing energy, a MOSFET to switching the circuit, a 0.1 ohm shunt resistor for current sensing, Arduino ESP32 MCU for sending pulses to signal the MOSFET and a rotary encoder to set the MCU’s pulse duration.
The periodic frequency of the inductor test rig I built is 20Hz, it is design to be slow in order for the capacitor bank to charge. The on state of the pulse duration can be set from 1 nanosecond to 30 milliseconds. By adding a BNC connector to my oscilloscope and connecting that BNC connector across the shunt resistor, we can measure the voltage across the shunt resistor to measure the current. The curve you are seeing on the oscilloscope’s display is the current flowing across the inductor.
As expected, the inductor has a soft saturation current. This is common for powder core inductor materials. The saturation current point can be found at the point when the current ends to behave linearly (found at the end of the straight line). It is difficult to tell, but it is around 1.8 divs from the zero point to the saturation point. By using ohms law, the voltage measured across the shunt resistor and the resistance of the shunt resistor, we can get Isat or the saturation current.
It turns out we have a 36A rated inductor, that is 3A higher than the 33A inductor design that we have predicted. Our MPPT would be able to handle 36A after all!
Step 29: Solder the Inductor and the Bulk Capacitors
Once you have finished mounting the MOSFETs and building the inductor, you can now solder the inductor and bulk capacitors to the PCB.
Step 30: 3D Printed Enclosure
I am providing two 3D printed downloadable enclosure designs to choose from. You have a slim enclosure for a strip down Wi-Fi only build and a full-sized enclosure built for the Wi-Fi MPPT with a 16×2 LCD and four navigation buttons.
3D Printing STL File Download:Click Me
Step 31: Adding a Cooling Fan (2-Pin Fan Breakout Board)
You can omit using a cooling fan if you chose opt to use a larger heatsink. The original MPPT board design was meant to work with 3-pin PWM cooling fans. If you plan to use a 2-pin 12V cooling fan, a breakout board adapter must be built for the MPPT to properly work with a 2 pin cooling fan. Take note the if you were to substitute a MOSFET from the schematic shown above, be sure to select a logic level MOSFET such as the IRLZ44.
Step 32: Mount the Main MPPT Board to the Enclosure
Mount and secure the main MPPT board on the enclosure with screws. The 3D printed enclosure comes with printed standoffs, no need to buy those brass standoffs o keep the board elevated from the enclosure’s floor.
Step 33: Adding the Buttons LCD
I used the cheapest LCD I could find since I am going to use the Wi-Fi phone app much more often in the first place. For the LCD I have chosen an Arduino compatible 16×2 character LCD with an I2C backpack driver. I also built a simple breakout board for the tact buttons which also acts as an I2C port expander. I forgot to send the design over to PCBway so I made a quick homebrew breakout board.
Connect the four LCD wires to one of the button breakout board’s I2C expansion ports. Then, connect 8 wires from the button breakout board to the main MPPT board’s interface port.
Step 34: Front Panel Assembly
The 3D printed enclosure also comes with 3D printed button caps. You may add some tape for extra padding between the buttons and tact switches to eliminate the plastic rattling sound. Use your tweezers and insert the button caps to the front panel’s back and screw the button breakout board and LCD in place.
Step 35: Final Assembly
You can now screw and close the enclosure. I also screwed a pair of gauge 12 wires to the solar and battery ports then soldered some detachable XT60 connectors and the ends of each pair for convenience.
Step 36: Connect to USB PSU
Connect a Mini USB cable from your MPPT to your computer’s USB port and provide power at either the solar or battery port of the MPPT using any power source. The MPPT can still be programmed even without being powered externally but the LCD would be unreadable unless powered externally.
Step 37: Programming the Arduino ESP32 MPPT
The MPPT project is Arduino based. You can treat it just like any other Arduino ESP32 development board. I wrote a general purpose firmware code for all my future MPPT builds, I call it the Fugu Firmware. There are thousands of code lines, these codes are subdivided into 9 different sketch tabs for organization. You don’t have to change anything! The only thing you need to add is your Wi-Fi SSID, Wi-Fi password and Blynk authentication token if you want the Wi-Fi phone app telemetry to work. The rest can be set through the LCD interface. Your priority is just to be able to upload these Arduino Sketches (Fugu Firmware) to your MPPT.
- This code has been tested on the ADS1015. If you are using an ADS1115 kindly read the ADC selection step below
1.) Install The Latest Arduino IDE:
- Link for the latest Arduino IDE software
- The project is an Arduino based ESP32, you will have to download the Arduino IDE in order to upload the firmware or program to the ESP32 MCU.
2.) Download The Fugu MPPT Firmware:
- Download the latest version from GitHub (V1.1 above)
- Download the initial release from gDrive (V1.0)
- The GitHub link will provide the future updates for the Fugu firmware
- The google drive link includes the initial stable release featured in the tutorial
- There are currently nine.ino files for the firmware, you would have to place them all in one folder. Name the main folder after the main.ino file (folder name example: ARDUINO_MPPT_FIRMWARE_V1.1). If you fail to do this, the Arduino sketch/ firmware would not open properly.
- Click on any of the sketches with the properly labeled folder to open the program.
- If you see all the.ino tabs upon opening the Arduino IDE, that means you have opened the code properly.
- I used the Arduino tab feature to subdivide thousands of code lines for organization. You can click on the tabs to view the different sections of the firmware.
- You can leave all the parameter initializations to it’s default value as these can be set through the LCD interface of the MPPT later.
- My code’s Комментарии и мнения владельцев will guide you in understanding the codes in case you want to learn how the firmware works.
3.) Arduino Libraries Required To Be Installed:
- Blynk ESP32 Library
- Liquid Crystal I2C LCD Library (By: Robojax)
- Adafruit ADS1x15 Library
- The rest of the libraries come with the Arduino IDE by default
- The code/ firmware would not work compile these libraries
- If you are new to Arduino libraries, kindly search how to install Arduino libraries
- If you have trouble finding these libraries, you can just copy my personal Arduino library folder and paste it to your IDE! (My personal Arduino Library Folder Link)
4.) Add Wi-Fi IoT Credentials To The Code:
- Plan to use the MPPT Wi-Fi telemetry phone app? Follow these steps!
- In order for the MPPT’s ESP32 to connect to you Wi-Fi router, you would have to input your Wi-Fi credentials
- Find ssid =. then input your Wi-Fi SSID in the
- Find pass =. then input your Wi-Fi password in the
- The blynk phone app has a privacy and security feature. Blynk (Legacy) sends a unique authentication token to all users upon registration. This token is unique from all other tokens and ensure that only you, have complete control and access to your project.
- Copy the Authentication token sent by Blynk from your email.
- Find auth =. in the code and paste your token in the
5.) Selecting The Proper ADC Library For The ADS1015/ ADS1115
- The ADS1015 and ADS1115 ADCs are cross-compatible. But you have to specify which chip model you are using in the code.
- If you are using the ADS1015, leave everything by default! Do not change anything.
- If you are using the ADS1115 kindly follow these steps:
- Delete the line Adafruit_ADS1015 ads;
- Uncomment //Adafruit_ADS1115 ads; by removing the // from the beginning of the line.
6.) Electrical Price Setup
- The Blynk MPPT app can keep track of how much money you have saved from harvesting energy in kWh.
- To setup your energy savings currency you have to specify your local electrical currency rate (ex: 0.5 USD/ kWh)
- It is found in the main sketch of the code, under the USER PARAMETERS section
- Change the value in electricalPrice = 9.5000; to whatever your electrical price costs in your country. Example, 1kWh in our country costs 9.5 PHP. So input 9.5000 to the electricalPrice = ;
7.) Arduino Tool Settings:
- Hover over the tools tab
- Just follow the settings I use for uploading sketches to the ESP32
- Board: ESP32 Dev Module
- Upload Speed: 921600
- CPU Frequency: 240Mhz (Wi-Fi/BT)
- Flash Frequency: 80MHz
- Flash Mode: QIO
- Flash Size: 4MB(32Mb)
- Partition Scheme: Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)
- Core Debug Level: None
- PSRAM: Disabled
- Port: Select your com port
- Programmer: AVRISP mkII
8.) Upload The Codes/ Firmware
- On the upper right of your Arduino IDE, click on the check icon to compile.
- Wait for a few seconds for the program to compile.
- If your program compiles without errors, this means you are ready to upload the program.
- Click on the Right Arrow button to upload the program to your MPPT’s Arduino ESP32.
- It will say done uploading once all the codes and sketches successfully upload.
- Congratulations! You now have a firmware for your MPPT project!
- Current sensor calibration is not required as the Fugu MPPT firmware comes with automatic current sensor calibration
- Temperature sensor calibration can be done by changing ntcResistance = 9000.00. This is the NTC resistor’s rated resistance value. I am using a 9k ohm NTC which explains the 9000.00.
- Voltage calibration on the other hand can be done by trial and error. Follow these steps:
- Enter the settings menu an leave it open every trial. Entering the settings menu puts all charging processes to a halt. You have to do this every time you upload the code to the MPPT since the MPPT will reset back to the Main Menu every time you upload the code.
- Connect the MPPT’s solar panel input to a PSU (set it to 60V)
- Connect the MPPT’s battery output to a battery pack
- Connect the MPPT to a USB port
- Open the Arduino IDE on your PC
- Press CTRLSHIFTM to open the serial monitor
- Find VI in the serial feed.
- Measure the voltage at your input using a voltmeter
- If your serial feed reads a higher or lower voltage from your voltmeter’s measurement calibration needs to be done to the input voltage sensor.
- Find the inVoltageDivRatio = 40.2156 from the calibration parameters section of the main code. Increase or decrease it
- Upload the code to the MPPT
- Measure the input voltage again with a voltmeter and compare the serial feed’s measured VI. Do this step again and again until your voltmeter measures the same voltage as your serial feed’s VI
- The same thing applied to the output voltage sensor. Do these exact same steps for outVoltageDivRatio = 24.5000
- inVoltageDivRatio and outVoltageDivRatio are pre-calculated voltage divider ratio values for the input and output voltage dividers. Writing the resistor values individually takes up processing power, this was done to reduce processing time. The formula is the inverse of the voltage divider formula:
- Voltage Divider Ratio = ((top resistor bottom resistor) / bottom resistor)
- I hope this explains why you guys aren’t seeing resistor values in the code.
- These notes are for those who plan to modify the firmware. If you just want to use the MPPT unit as intended, you may skip reading this notes section.
- ADS1015 and ADS1115 are both compatible on the same code, the library works for both! Please don’t change anything!
- The LCD menu interface uses the non-volatile flash memory to save all your settings. These settings are pre-loaded upon startup. If you plan to use the MPPT without the LCD and buttons, you can override the autoload feature by changing the disableFlashAutoLoad = 0 to disableFlashAutoLoad = 1. This will disable the MPPT from grabbing the saved settings from the LCD interface and use the default settings at the Arduino sketch. You can manually set the battery voltages, currents etc. through the parameter section of the code. From here you can also access a lot of hidden features that you can’t find from the LCD interface.
- Disabling the Wi-Fi saves you 0.3-0.5W of power consumption.
- serialTelemMode gives you different serial feed formats.
- pwmResolution and pwmFrequency can be set to a custom switching frequency for the buck and PWM resolution (there is a limit to this, I made a step explaining the formula for the limit).
- avgCountVS and avgCountCS are number of voltage and currents sampled from the sensors for averaging. Setting these both to 1 would disable sampling and will significantly make your code run faster and have faster tracking. I recommend 2 and 4, increasing the sampling count gives a cleaner sensor data at the expense of adding some processing time.
- There’s a lot more! I need to make a separate tutorial for this (Part 3 of the Video
Step 38: MOD#1 UPDATE: Support for Batteries Up to 80V
I have received requests for battery support above 80V (12V/ 24V/ 36V/ 48V/ 60V/ 72V/ 80V). Follow these steps if you want to charge battery voltages from 0-80V.
1.) CHANGING THE VOLTAGE DIVIDER RESISTORS
- Change R32 to 200k Ohms
- Change R34 to 5.1k Ohms
- Leave R33 unconnected or unpopulated
2.) MODIFY THE CODE (ADJUSTING PARAMETERS)
- You have to change the set parameter values in the main sketch in the calibration parameters section
- Change outVoltageDivRatio = 24.5000 to outVoltageDivRatio = 40.2156
- Change vOutSystemMax = 50.0000 to vOutSystemMax = 80.0000
- There is no issue if you are using a legitimate ADS1115 16-bit ADC. But if you are using an ADS1015 12-bit ADC, voltage sensing resolution at the output will decrease as mentioned from the previous steps. I highly discourage modifying an ADS1015 system. Please do not attempt this mod if you do not know what you are doing! I am not liable to accidents that may result from attempting this mod.
Step 39: MOD#2 UPDATE: Support for Higher Solar Panel Voltages (100V-150V)
This V1.0 build can actually support solar panel voltages above 80V. Take note that this mod is also highly discouraged as it was not considered in the initial design process. Doing this mod will disable the PSU mode, you can no longer use the MPPT in bench bench power supply mode. I will not be giving the modified input resistor values and suggested MOSFETs for this mod. This is a test if you truly know how to get this mod done properly. But for those enthusiasts and engineers equipped with knowledge and experience, I will be giving some hints and tips on this step. Only attempt this if you know what you are doing! I repeat, I am not liable for any accidents caused by attempting this mod.
1.) SELECTING THE PROPER VOLTAGE DIVIDER RATIO
- Since we are dealing with a mod that increases the MPPT’s input voltage. You need to properly select the proper voltage divider resistors to create a ratio for the 2.048V ADC voltage reference to properly scale and take your newly set input voltage scale into account.
2.) LETTING THE XL7005A HANDLE VOLTAGES ABOVE 80V
- The XL7005A can only handle 80V max! It can’t handle anything above this! For this mod to work, you have to remove D8 to prevent the MPPT’s system from drawing voltages from the input source which is your solar panel.
- Removing D8 while leaving D4 results to the MPPT drawing power only from the batteries.
- At this point, you probably know why I discourage this mod. If your synchronous buck malfunctions in terms of voltage regulation, it could potentially output voltages above 80V. A single short spike of voltage above 80V could damage the XL7005A buck reg chips instantly.
3.) MODIFY THE CODE (ADJUSTING PARAMETERS)
4.) SELECTING MOSFETS THAT CAN HANDLE IT
- Your MOSFETS needs to be replaced with ones that can handle your maximum input voltage. This is denoted by Vds in the datasheet. If you were to design a 150V MPPT, you have to find MOSFETs with a Vds slightly above 150V!
- ID and Rds(on) also needs to be taken into account
5.) CHANGING THE INPUT CAPACITOR (C7)
- There is one capacitor in particular that needs to be changed! C7! It needs to be rated slightly above you new input source voltage. If your mod will have a 150V input, C7 must be slightly above 150V as well, other wise it will explode!
Step 40: USB Serial Telemetry
The project also comes with a USB serial telemetry feed! You have the option to enable or disable this through the code. This feature can be used for diagnostics, troubleshooting, design tweaking, code optimization or perhaps experimentation on creating your own MPPT algorithm. This can be accessed through the Arduino IDE by pressing CTRLSHIFTM to display the serial monitor.
Variables In USB Telemetry Feed
- ERR. Number of errors present
- FLV. Fatally low system voltage (unable to resume operation)
- BNC. Battery not connected indicator
- IUV. Input undervoltage indicator
- IOV. Input overvoltage indicator
- OOV. Output overvoltage indicator
- OOC. Output overcurrent indicator
- OTE. Overtemperature indicator
- REC. Recovery from fault indicator
- MPPTA. MPPT algorithm enable indicator
- CM. Output mode (1 = Charger mode, 0 = PSU mode)
- BYP. Backflow Current Control Unit MOSFET indicator
- EN. Buck Enable Indicator (1 = MPPT Buck is Operational, 0 = Not operational)
- FAN. Fan Running Indicator
- Wi-Fi. Wi-Fi Enable Indicator
- PI. Input Power (Power harvested from solar in watts)
- PWM. PWM injected to the IR2104 (decimal equivalent value)
- PPWM. Allowable PWM Floor Limit
- VI. Input Voltage (solar panel voltage in volts)
- VO. Output Voltage (battery voltage in volts)
- CI. Input current (solar panel current in amps)
- CO. Output current (battery charging current in amps)
- Wh. Energy harvested (in watt-hours)
- Temp. Heatsink Temperature (in degrees Celsius)
- CSMPV. Calibrated current sensor zero current point
- CSV. Instantenous current sensor analog voltage output
- VO%Dev. Percent deviation of VO from the set maximum output battery voltage (in %)
- SOC. State of charge, the battery’s charge (in %)
- LoopT. Loop time, the time it takes to complete one loop cycle of code (in miliseconds)
Step 41: Wi-Fi Telemetry App
The project has a Wi-Fi telemetry and free sever based datalogging phone app. The MPPT’s phone app is based on the Blynk Legacy platform. It is available from to both Android and iOS.
Steps In Installing The Phone App:
- Download it from the app store and register as a new user.
- Open the QR code scanner in the Blynk Legacy App
- Scan the QR code from the image above
- You instantly get a copy of the MPPT’s phone app!
- Just click the play button for it to start
- You can add a home menu shortcut so you can open the MPPT app directly without going through the blink menu all the time.
Features Of The MPPT Blynk App:
- Displays a live feed of the energy harvested from the Solar Panels
- Displays solar panel Power (watts)
- Displays solar panel Voltages and Currents.
- Displays battery charge in %
- Displays battery’s charging Voltage and Current
- Displays energy harvested in kWh
- Displays energy saved in currency (USD, Euro, Peso etc. )
- Displays temps
- Three different real-time graphs of all the displayed data.
- The data is logged at Blynk’s free database and refreshes every year.
Watch The Blynk Tutorial (Skip To: 13:01)
Step 42: Setting Up the MPPT (via LCD Menu)
Just like any other off the shelf commercial MPPT, I have added an LCD interface to project. This is not only used data for display but for also setting up the MPPT’s settings without dealing with codes. The interface is dead simple and easy to navigate through. Here is the LCD Menu’s layout:
Navigation Buttons (1, 2, 3, 4):
MAIN PAGE #1
- Row 1: Solar Power, Energy Harvested, Days Running
- Row 2: Battery %, Battery Voltage, Battery Charging Current
MAIN PAGE #2
- Row 1: Solar Power, Solar Voltage, Solar Current
- Row 2: Battery %, Battery Voltage, Battery Charging Current
MAIN PAGE #3
- Row 1: Solar Power, Energy Harvested, Battery %
- Row 2: Energy bar with 16 blocks representing battery life 0-100%
MAIN PAGE #4
Main Page #5 (Settings Menu Prompt)
- Press select to enter the settings menu
- Entering the settings menu puts charging process to a halt for safety.
- Supply Algorithm
- MPPT CC-CV. use this if you you are using solar panels or wind turbines for your MPPT’s input. The MPPT algorithm is required to extract the most power out of your solar panels and wind turbines.
- CC-CV Only. use this if you plan to connect your MPPT’s input to a PSU.
- Charger/ PSU Mode
- Charger Mode. ALWAYS USE THIS WHEN CHARGING BATTERIES! When charging batteries, the Charge Mode needs to be selected as it contains all the safety protocols required for battery charger. This includes the battery disconnect and connect feature! Without this, your MPPT will definitely get damaged upon connecting to a battery.
- PSU Mode. you can use this if you plan to connect the MPPT’s battery terminals directly to a DC load such as an inverter without using batteries. Yes the MPPT can operate without batteries. This is an experimental feature that can be useful for tinkerers. You can also use the MPPT unit as a programmable buck converter or bench power supply.
- Max Battery V
- Input the maximum charging voltage your battery pack can handle
- Selectable from 0-50V
- Min Battery V
- Input the minimum battery voltage your battery pack has
- Selectable from 0-50V
- This is important for the state of charge
- Charging Current
- Input the charging current that your batteries can handle\
- Selectable from 0-50A (please don’t exceed 35A for this unit)
- Fan Enable
- Enable. The cooling fan will operate when the fan temperature is reached
- Disable. Forces the cooling fan to turn off 24/7.
- Fan Temperature
- The temperature at which the cooling fan will turn on
- Selectable from 0-120 deg C (default is 60 deg C)
- Shutdown Temperature
- The temperature at which the MPPT will stop charging to prevent overheating
- Selectable from 0-120 deg C (default is 90 deg C)
- Wi-Fi Feature
- Enable. Turns on Wi-Fi feature (consumes 0.3W of power)
- Disable. Turns off Wi-Fi feature for power saving.
- Autoload Feature
- Enable. Autoloads stored settings from the flash memory upon startup
- Disable. Disables autoload and uses Arduino default variable settings instead.
- Backlight Sleep
- Turns off backlight when no buttons are pressed for a settable duration
- Durations: Never, Seconds, Minutes, Days, Weeks and Months
- Factory Reset
- Resets all the MPPT settings back to default
- Press select then select yes to reset
- Firmware Version Page
- Displays the Fugu MPPT Firmware version that is installed on the unit.
Step 43: Setting Up My Solar Panels
I have two 320W solar panels connected in series. Philippines is still in lockdown due to the pandemic. We don’t have the manpower to install these solar panels on the roof so I went with a temporary solution. I laid a lengthy flat cord wire (guage #14) from our yard to my workspace. I am aware of the losses that this solution incurs. That is why I went with series, to increase the voltage and decrease the current, reducing the losses compared to using a parallel setup.
Step 44: My Workspace Off-Grid Setup
Here’s a photo of my MPPT’s first day of installation from 6 months ago. I am still using it up to this date and has remained problem free from the past 6 months and counting. It has harvested over 334kWh of energy from my solar setup since it was first installed. It isn’t much since I don’t consume much power in the workspace. It is connected to my 1kVA 220V pure sinewave inverter and to my 8S 2.56kWh LiFePO4 Battery Pack (it’s now in a fireproof box).
Step 45: 98% Peak Efficiency
If you have watched the video, you will find the different board revisions I made. I made a homebrew PCB version of my final build, which is a stripped down version of it (running on a single ESP32 core, Wi-Fi disabled no LCD).
From the stripped down version, I did an efficiency curve test by connecting voltmeters and ammeters at the MPPT’s input and output ports. I then connected a variable load controller with a nichrome water bath as a high power load. As I increased the load, I recorded the corresponding voltages and currents to compute for the power-in and power-out per row. After using the efficiency formula, I plotted the points on a graph to find the efficiency curve.
To my surprise it recorded a conversion efficiency rating of 98.6% at 270W with an input of 61.4V and an output of 27.00V. I was unable to find the end of the graph as my DMM’s ammeters were limited to 10A. It sounded to good to be true and I remain skeptical to whether my 9999 count DMMs are accurate enough. On the bright side, even without active cooling the MOSFETs barely heated up, it’s a good sign that we have minimal conduction losses from the MOSFETs. Part 4 of the video will be allotted for tests like these. I would have to revisit this and do it with my Agilent 34401A TTi 1604 Lab DMM for better accuracy.
Efficiency Curve Lab Test Excel Sheet:
Step 46: Future Plans
I will keep you guys posted for updates. I hope you guys like this tutorial!
- You can actually modify this for 150V DC operation. It’s simple, change the MOSFETs with a Vds of 150V, change the input voltage divider to a proper ratio for the input to be able to detect up to 120V/150V and finally remove D8 so that the MPPT’s can just get power from the batteries and not exceed the buck regs’ 80V limit. Part 4 of the video will explain this.
- The MPPT can actually charge battery chemistries up to 80V and not 50V! This was set in my original design, but I changed the output’s voltage divider to a lower scale to increase voltage sensing resolution at the output. Changing the voltage divider resistors at the output with the same resistor values of the input, you can charge batteries up to 80V. You just have to change the voltage divider ratio value from the code as well.
- You can use a 20×4 character LCD or an I2C AMOLED LCD for better display. I didn’t bother since I view most of the data from the Wi-Fi phone app in the first place.
- Inductor can be mounted externally if you plan to build a bigger one!
- Connecting 4 MOSFETs in parallel to decrease on-resistance for lower conduction losses. This makes a higher current MPPT variant possible! A larger inductor is also needed to achieve this as well.
- My plan for version 2.0 would be to use IGBTs to accommodate 150V or 300V solar panel setups and try to give it a 50A or 100A current capability. There is something called an interleaving synchronous buck configuration, this could easily increase the power handling capability of the MPPT.
- Coulomb counting for state of charge calculation is in the testing stage of my personal Fugu MPPT firmware.
- Part 2 of the video will show the complete design process of the MPPT
- Part 3 of the video will be the in-depth explanation of the Fugu MPPT firmware and the algorithms involved
- Part 4 of the video will be a montage episode of the tests that we will be conducting on the MPPT unit.
People Made This Project!
Did you make this project? Share it with us!
Colors of the Rainbow Contest
3D Printing Student Design Challenge
8 Комментарии и мнения владельцев
I cant find the CSD19505 anywhere. Any alternatives to it?
after buying a lot of fake CSD19505, i opted for the mosfet hy4008, it has the same specs
hi, can you make a version without esp32? I mean all information i need like battery voltage, solar voltage and ampe can be displayed by LCD screen (an expensive solar charger that can show how many kilowatt are generated by days and life time), and i don’t need to track by phone I know it would be easier to buy a cheap solar charger but i want to make it myself
ESP32 is basically cheaper than dedicated hardware solution. If you don’t want any Wi-Fi or Bluetooth features, then just remove them from the code. Or don’t use them.
Any chance for a mqtt version of the firmware instead of blynk, so it can be used in home assistant directly for example?
I have it integrated in HA and it works flawlessly.
This is very, very cool work. I have never seen anything better and more thorough on the Internet. And I have already started work on repeating the controller. But I thought that I could go further and, based on this circuit, also make a DC-AC converter. instead of inductance, put a transformer and you’re done. But my problem is that I don’t have a mid-point transformer. Then I thought, is it possible to implement a circuit on 4 mosfets? I drew a diagram, but I doubt it will work.My knowledge is not enough. Can anyone suggest if this will work? And if not, what needs to be changed to make it work. P.S. Program code is not a problem. It ready now.
I also built a hybrid inverter, from this charge controller, it turned out very well.but I wanted to use this display to get a better view
Wow. Coool. Just ordered the same one. I just don’t understand how to use it. when it arrives I will delve into it, I will write it off.
that’s what i want to know
Best Cheap PWM Solar Charge Controllers
Just so you know, this page contains affiliate links. If you make a purchase after clicking on one, at no extra cost to you I may earn a small commission.
The Wanderer 30A is easy to use, versatile, and dependable. It’s great for solar power systems of 400 watts or less, making is the best PWM controller for most people.
- Handles up to 400 watts
- Compatible with flooded, sealed, gel, and lithium batteries
- Optional remote monitoring with Renogy app
The Wanderer 10A is a good choice for smaller 12 or 24 volt systems. The features and build quality you get for the price make it the best cheap PWM charge controller.
- LCD display
- Compatible with 12 and 24 volt flooded, sealed, gel, and lithium batteries
- Optional remote monitoring with Renogy app
- Current rating of 10 amps limits its use to lower-wattage systems
- No temperature sensor port
The SunSaver comes with the best out-of-the-box battery protections. It’s pricier, but it may pay for itself by increasing the lifespan of your batteries.
- Excellent build quality
- Maximizes battery life with good voltage accuracy and a built-in temperature sensor
I spent weeks testing 5 of the best PWM solar charge controllers available. After wiring them to custom-built solar power systems, assessing their user-friendliness, and researching their safety features and battery compatibility, I think the Renogy Wanderer 30A is the best PWM charge controller for most people.
The Wanderer 30A is designed for 12 volt batteries and can handle up to 400 watts of solar. That’s a good amount of power for most small-scale solar projects, such as those used in small vehicles and buildings. With that much solar you can power lights and some small devices and appliances — like phones, laptops, and maybe even a small 12 volt fridge.
The best PWM charge controller
The Wanderer 30A is my favorite PWM controller because of its blend of build quality, ease of use, and value. It’s ideal for 12 volt batteries and can handle up to 400 watts of solar.
|Nominal battery voltage:||12V||Charge current rating:||30A|
|Battery compatibility:||Sealed, gel, flooded, lithium||Operating temperature range:||-20°F to 113°F (-35°C to 45°C)|
|Max. PV open circuit voltage (Voc)||25V||LCD display:||No|
|Temperature sensor:||Yes (requires additional purchase)||Bluetooth monitoring:||Yes (requires additional purchase)|
The Wanderer 30A is easy to use and has plenty of built-in safety features, such as overcharging protection, to protect your system and maximize your battery’s lifespan.
It also has a place to add a battery temperature sensor for improved temperature compensation. Many PWM charge controllers don’t have a temperature sensor port, and it’s important if your batteries experience wide temperature swings.
The LED indicators are easy to understand and useful for monitoring your system at a glance. They’re all you need for set-it-and-forget-it systems. But if you want to see exact specs like charging current and battery voltage, you can purchase the Renogy BT-1 Bluetooth Module to monitor your system from your phone.
All Renogy PWM charge controllers I tested, including the Wanderer 30A, are compatible with sealed, gel, flooded, and lithium batteries. That’s another great thing about this controller — most other PWMs work with only lead acid batteries.
The Wanderer 30A is also one of the cheaper 30-amp PWM charge controllers available. Overall, it’s a great value.
The best cheap PWM charge controller
The Wanderer 10A is an excellent budget option for smaller solar systems. It’s compatible with 12 and 24 volt batteries and has an LCD display for easy monitoring.
|Nominal battery voltage:||12/24V||Charge current rating:||10A|
|Battery compatibility:||Sealed, gel, flooded, lithium||Operating temperature range:||-31°F to 113°F (-25°C to 45°C)|
|Max. PV open circuit voltage (Voc)||50V||LCD display:||Yes|
|Temperature sensor:||No||Bluetooth monitoring:||Yes (requires additional purchase)|
The Wanderer 10A is a great cheap charge controller for lower-wattage 12 or 24 volt systems. For 12 volt systems, it can handle up to 130 watts of solar. For 24 volt systems, Renogy recommends a maximum of 260 watts.
That’s enough power to run some lights and charge your phone and laptop. For instance, I paired this controller with a 20 watt solar panel to solar power some LED lights in my dad’s shed. It was the perfect size for the project.
You could also use it to solar charge 12 and 24 volt batteries. It’ll treat your batteries better than most other cheap charge controllers, which tend to be low-quality.
There are a couple other features worth mentioning: Its LCD display makes it easy to see if everything is working properly. You can also use its 2 USB ports for charging phones and other USB devices.
In the sea of cheaply made charge controllers, the Wanderer 10A stands out as a top option.
A PWM charge controller that’s built to last
The SunSaver line has excellent build quality and is backed by a 5-year warranty. It has some of the best out-of-the-box battery protections to help maximize your battery’s lifespan. It’s expensive, though, and limited to sealed or flooded lead acid batteries.
|Nominal battery voltage:||12-24V (depending on model)||Charge current rating:||6-20A (depending on model)|
|Battery compatibility:||Sealed, flooded||Operating temperature range:||-40°F to 140°F (-40°C to 60°C)|
|Max. PV open circuit voltage (Voc)||30-60V (depending on model)||LCD display:||No|
|Temperature sensor:||Yes (built-in)||Bluetooth monitoring:||No|
The Morningstar SunSaver is the buy-it-for-life option. It’s expensive, but it’s built to last and comes with a 5-year warranty.
Cheaper controllers cut costs by using plastic cases and screws that are all too easy to strip. The SunSaver, on the other hand, sports marine-grade terminals and an anodized aluminum case. It feels like you could drop it off a building with little consequence.
It has a built-in temperature sensor and, according to Morningstar, good voltage accuracy. There are also models available with low voltage disconnect (LVD). This means it has some of the best out-of-the-box battery protections.
It’s pricey, and only works with sealed or flooded lead acid batteries. If it’s right for your system, though, this controller may pay for itself by maximizing your battery’s lifespan.
Best PWM Solar Charge Controllers
- Top Pick:Renogy Wanderer 30A
- Budget Pick:Renogy Wanderer 10A
- Honorable Mention:Morningstar SunSaver
- Renogy Adventurer 30A
- Allpowers 20A Solar Charge Controller
Top Pick: Renogy Wanderer 30A
|Nominal battery voltage:||12V||Charge current rating:||30A|
|Battery compatibility:||Sealed, gel, flooded, lithium||Operating temperature range:||-20°F to 113°F (-35°C to 45°C)|
|Max. PV open circuit voltage (Voc)||25V||LCD display:||No|
|Temperature sensor:||Yes (requires additional purchase)||Bluetooth monitoring:||Yes (requires additional purchase)|
PWM charge controllers, with their low cost and limited current ratings, are best suited for small-scale solar projects of roughly 400 watts or less. For these sorts of applications, the Wanderer 30A is likely all you need.
It has a current rating of — you guessed it — 30 amps, which works out to around 400 watts of solar. That’s enough to power quite a bit, like lights, phones, laptops, and maybe even a small appliance.
It’s simple to mount and set up. Just connect the battery then the solar panel to their respective terminals. LED indicators let you know if everything is working properly. The manual has step-by-step setup instructions and a legend detailing what the various indicator lights mean.
For set-it-and-forget-it solar systems, I think the LEDs are all you need. For closer monitoring, you can buy the Renogy BT-1 Bluetooth Module to monitor your system from your phone. It’s convenient but by no means necessary.
Selecting your battery type is as simple as pressing the buttons a few times. You can choose between 4 types: sealed, flooded, gel, and lithium. Most other PWM controllers only work with lead acid batteries.
The Wanderer 30A is a good choice if your battery will experience wide temperature ranges — such as in a building or vehicle without air conditioning. Temperature affects a battery’s ideal voltage and charging current set points. But many budget PWM controllers don’t compensate for temperature. So on hot and cold days, they can overcharge or overdischarge your battery and shorten its lifespan.
However, with the Wanderer 30A, you can get the compatible battery temperature sensor. It gives a more accurate battery temperature reading, allowing the charge controller to provide better temperature compensation. It can help your battery last longer, saving you money in the long run.
I’d still consider using the Wanderer 30A with 100 watts of solar or less. It gives you the ability to add more solar panels if you want to expand your system later on. You could start with LED lights and add a Wi-Fi router later, for instance. PWMs with lower current ratings are more limited.
It’s sized well for 12 volt solar systems of 400 watts or less. It’s easy to set up and a good value for the price. For most people, I think the Renogy Wanderer 30A is the best PWM solar charge controller for the job.
Full review: Renogy Wanderer
Budget Pick: Renogy Wanderer 10A
|Nominal battery voltage:||12/24V||Charge current rating:||10A|
|Battery compatibility:||Sealed, gel, flooded, lithium||Operating temperature range:||-31°F to 113°F (-25°C to 45°C)|
|Max. PV open circuit voltage (Voc)||50V||LCD display:||Yes|
|Temperature sensor:||No||Bluetooth monitoring:||Yes (requires additional purchase)|
The 10-amp model in the Wanderer lineup is my pick for low-wattage solar systems. It has a current rating of 10 amps and is compatible with 12 and 24 volt batteries. It can handle about 130 watts of solar in 12 volt systems and 260 watts in 24 volt systems.
That’s enough energy for powering lights and charging small devices and batteries. For example, here’s a solar lighting system I built with mine:
It has an LCD display that tells you charging current, PV voltage, battery voltage, and other useful system specs. Like it’s big sibling, it’s compatible with the Renogy BT-1 Bluetooth Module for remote monitoring.
Cheap solar controllers can treat your battery poorly, so I checked the Wanderer 10A’s battery voltage reading against a multimeter. Turns out it’s pretty accurate.
Many budget controllers are usually off in their battery voltage readings by a tenth of a decimal place or so, which — depending on the direction of the error — can lead to slight chronic overcharging or overdischarging and reduce your battery’s lifespan.
The Wanderer 10A doesn’t have a temperature sensor port, so it can’t provide accurate temperature compensation. Because of this, I recommend using it with batteries that are placed indoors where they won’t get too hot or too cold. Or, at the very least, use it with a cheap battery whose lifespan you aren’t trying to maximize.
I’d caution against buying the Wanderer 10A if you plan to add more solar panels later on. Its current rating is limiting, so you might have to replace it with another charge controller when you do.
There are cheaper charge controllers with higher current ratings, but be warned — they’ve been known to make wrong or misleading claims. The quality of the Wanderer 10A is a step above those.
That’s not to say it — or any cheap PWM — is perfect. I’ve had issues with mine. Like I said, I used it to solar power some lights for my dad’s shed. Well, he accidentally left the lights on too long and drained the battery. The Wanderer 10A was unable to recharge the battery with such a low voltage, and reported a constant “PV over-voltage” error. Replacing the battery didn’t fix the problem, so I eventually had to replace the controller itself.
Cheap PWMs are cheap for a reason. They work but lack some of the protections of more expensive PWM and MPPT controllers. They leave less room for user error. If you decide to get one, take care when designing and building your solar setup.
Honorable Mention: Morningstar SunSaver
|Nominal battery voltage:||12-24V (depending on model)||Charge current rating:||6-20A (depending on model)|
|Battery compatibility:||Sealed, flooded||Operating temperature range:||-40°F to 140°F (-40°C to 60°C)|
|Max. PV open circuit voltage (Voc)||30-60V (depending on model)||LCD display:||No|
|Temperature sensor:||Yes (built-in)||Bluetooth monitoring:||No|
The SunSaver is built to last. It has an aluminum anodized enclosure and marine-grade terminals. It can work in incredibly hot and cold temperatures.
It feels like a brick. Compared to the plastic cases of the other controllers I tested, the SunSaver seems indestructible. It’s even backed by a 5-year warranty.
It has a built-in temperature sensor and, according to MorningStar, a voltage accuracy of /- 25mV. Models with low voltage disconnect are also available.
These features give it some of the best out-of-the-box battery protections among PWM controllers. It may pay for itself by extending your battery’s lifespan.
It’s compatible with sealed or flooded lead acid batteries, and is available in 12 or 24 volt models. Current ratings range from 6 to 20 amps.
It’s pricey and has limited battery compatibility. (If you’re using lithium batteries, you’ll have to look elsewhere.) But for systems using lead acid batteries, the SunSaver is worth a look. Morningstar is known for making charge controllers that last.
Renogy Adventurer 30A
|Nominal battery voltage:||12/24V||Charge current rating:||30A|
|Battery compatibility:||Sealed, gel, flooded, lithium||Operating temperature range:||-13°F to 131°F (-25°C to 55°C)|
|Max. PV open circuit voltage (Voc)||50V||LCD display:||Yes|
|Temperature sensor:||Yes (requires additional purchase)||Bluetooth monitoring:||Yes (requires additional purchase)|
The Adventurer 30A combines the best of both Wanderer models in one.
Start with the 30 amp current rating and temperature sensor port of the Wanderer 30A. Combine that with the LCD display and 12/24V compatibility of the Wanderer 10A. Make sure it’s still Bluetooth compatible. Add a battery voltage sensor port. And don’t forget the Adventurer’s own party trick — flush mounting.
This combination of features means the Adventurer 30A is great for 12 volt systems of up to 400 watts and 24 volt systems of up to 800 watts. That’s almost a 1kW system — we’re starting to talk serious power. That’s enough power for some small vehicles and off-grid buildings.
Flush mounting means the Adventurer is well-suited for vans, campers, RVs, and anywhere else you want an aesthetically cleaner flush mount.
But if you don’t, it can also be surface mounted to the wall like any other charge controller. It comes with an included surface mount attachment that lets you decide.
Then there’s the battery voltage sensor (BVS) port. Adding a BVS helps the controller maximize battery life when your charge controller and battery are far apart. On longer wire runs, there can be a voltage discrepancy between the battery and controller terminals.
The downside is the Adventurer 30A is one of the pricier PWM models out there. The Wanderer 30A performs similarly and costs less. For most 12 volt systems, I’d go with the Wanderer 30A.
But if you want its blend of features — or a flush mounted controller — the Adventurer 30A is a good option.
Allpowers 20A Solar Charge Controller
|Nominal battery voltage:||12/24V||Charge current rating:||20A|
|Battery compatibility:||Sealed, gel, flooded||Operating temperature range:||-31°F to 140°F (-35°C to 60°C)|
|Max. PV open circuit voltage (Voc)||50V||LCD display:||Yes|
|Temperature sensor:||No||Bluetooth monitoring:||No|
Nearly all the cheap charge controllers on Amazon look identical to this one: a small blue and black box, similar graphics, similar labels. The misspelled “build-in timer.”
It’s not a coincidence. You’ve just stumbled upon the most popular design for cheap charge controllers.
And when I say cheap, I mean it. A quick search on Aliexpress for “solar charge controller” turns up one of these blue-and-black models for just 2 USD. Two dollars!
As you’d expect, the Allpowers 20A charge controller was the cheapest model I tested. It works fine, but — as you’d also expect — the quality is lacking.
I nearly stripped the screws when applying a normal amount of torque. The controller got warm to the touch with only 3-4 amps of current running through it. No other controller heated up as much as this one.
The model I bought has a claimed current rating of 20 amps. I’d be nervous to give it 10.
It does have an LCD display, though it doesn’t show charging current (I only knew because I’d installed an inline watt meter). This is a nitpick, but the screen is also quite fuzzy. You might think my photos of it are out of FOCUS. That’s just what the screen looked like.
I checked the battery voltage accuracy against a multimeter, and it was off by about a tenth of a volt. That’s not great, but for the price it’s acceptable.
The user manual mine came with says the battery charging voltage has an error margin of ± 0.15 volts. That’s not great. Voltage discrepancies can cause the charge controller to chronically overcharge or overdischarge your battery, shortening its lifespan.
If you want a budget PWM, I’d recommend spending a few bucks more for the Renogy Wanderer 10A if you can afford it.
But there is a use case for these budget models. I’d reserve them for very low-wattage solar projects with cheap lead acid batteries. They should work fine if that’s what you’re using them for. Just understand that they can have little margin for user error. You’ll have to design and build your system well, otherwise they may not last long.
How to Choose the Best PWM Solar Charge Controller for Your System
Nominal Battery Voltage
Your charge controller’s nominal battery voltage should match the nominal voltage of your battery bank.
If you’re using a 12 volt battery, you need a solar charge controller compatible with 12 volt batteries. Got a 24 volt battery? Use a charge controller compatible with 24 volt batteries.
Some PWM charge controllers are compatible with 12 and 24 volt battery voltages, making them more versatile.
Charge Current Rating
Choose a charge controller with a current rating that is greater than the expected max charge current from controller to battery. You can damage a charge controller if you exceed this number. You’ll also want to make sure this number is below the battery’s maximum recommended charge current.
You charge controller’s charge current rating (in amps) is usually included in the product name. For example, the Renogy Wanderer 30A can charge a battery at up to 30 amps, and the Wanderer 10A can do up to 10 amps.
If you don’t see the current rating in the product name, at the very least it should be listed on the product page and in the instruction manual.
Once you know how much current (amperage) your charge controller can output, you need to use a solar panel, or build a solar array, that stays below this limit.
You find out how much current your panel can produce by looking at the specifications label. The label will list a short circuit current (Isc) in amps. Make sure the controller’s current rating is greater than the panel’s short circuit current. Add a small buffer to be safe.
If you have solar panels connected in parallel, add together all panel’s short circuit currents to get your array’s short circuit current. Add a small buffer, then use this number for your comparison.
Maximum PV Input Power: Some brands, such as Renogy, also list a maximum PV input in watts for their charge controllers. This is simply another way of helping you to stay below the controller’s current rating.
Pick a charge controller that is compatible with your type of battery. All PWM models I tested are compatible with sealed and flooded lead acid batteries. Some models are also compatible with gel batteries.
The most versatile PWMs are also compatible with lithium batteries.
Operating Temperature Range
Choose a charge controller with an operating temperature range suited to the location you plan to put it. Some PWMs have narrow operating temperature ranges that could exclude them from being used in buildings or vehicles without air conditioning.
Example: Let’s say you live in Florida and want to solar power your workshop. Your workshop doesn’t have AC, so on hot summer days it can get up to 110°F (43°C) inside.
The maximum operating temperature for the Renogy Wanderer 10A and 30A models is 113°F (45°C). The temperature inside your shed will get close to this limit, so you may want to choose a charge controller with a higher maximum temperature.
Note: Batteries have their own temperature ranges. Consider these as well when designing your system.
Maximum PV Open Circuit Voltage (Voc)
The maximum open circuit voltage (Voc) of your solar panel(s) shouldn’t exceed the maximum PV voltage of your charge controller.
Use our solar panel maximum voltage calculator to calculate your maximum open circuit voltage. Then, make sure you pick a charge controller whose max PV voltage is greater than this number.
25-30V: Models in this range can handle one 12V solar panel wired in series and are designed for use with 12V batteries. To add panels, you’ll need to wire them in parallel.
50-60V: Models in this range can handle one to two 12V solar panels wired in series and are usually designed for use with 12V and 24V batteries.
60V: It’s rare to see PWMs with a PV voltage limit greater than 60V. Models in this range are usually designed to handle 3 or more 12V solar panels wired in series.
Maximum Wire Gauge
Many charge controllers list the maximum wire size compatible with their terminals. The max wire gauge often allows much more current than the controller’s current rating. This means you can over-gauge your wires for added safety if you want.
Some charge controller reviews pay close attention to the wire terminals as a proxy for quality. I generally found this to be true in my testing.
LCD displays: LCD screens make it easy to see important specs at a glance, such as charging current or PV voltage. The alternative is LED indicators that flash at different speeds and glow in different colors to convey system status.
Temperature compensation: As batteries get hot or cold, the charging current and voltage set points should be adjusted. Not doing so risks damaging the batteries. This feature, called temperature compensation, is important for batteries that experience wide temperature swings, such as those placed outside or in buildings or vehicles without air conditioning.
There are two ways that charge controllers provide temperature compensation:
Built-in temperature sensors are convenient, but can only monitor the ambient temperature near the charge controller. If your battery is far away or has heated up from working, its temperature could be quite different.
Temperature probes can be taped directly to the battery for a more accurate battery temperature reading.
Some cheap PWM charge controllers claim to have temperature compensation. However, unless they have a built-in temperature sensor or a port for attaching a temperature probe, they have no actual way of measuring temperature. They usually just assume a set temperature of 25°C (77°F), regardless of how hot or cold the battery gets.
Remote Bluetooth monitoring: Bluetooth monitoring lets you monitor and control your system from an app on your phone.
Bluetooth monitoring is common on more expensive MPPT charge controllers, but rare on cheaper PWM models. In fact, none of the 5 PWM models I tested have it built-in.
All the Renogy PWM charge controllers I tested come with an RS232 port. It’s used to connect the Renogy BT-1 Bluetooth Module. You can then sync the BT-1 to your phone via the Renogy DC Home app.
These sorts of apps let you monitor your system in real time. You can also adjust system parameters, such as which type of battery you’re using.
PWM vs. MPPT Charge Controllers
PWM charge controllers are cheaper, but less efficient at converting incoming solar energy to the right current and voltage parameters to safely charge the battery. The rule-of-thumb efficiency for PWM charge controllers is around 75%.
PWM models are often used for small-scale solar power systems where efficiency isn’t a top priority.
For instance, I recently installed solar power lights in my dad’s shed. He didn’t need to use them that often, meaning charge controller efficiency wasn’t an important consideration. Accordingly, I chose a PWM controller for the project.
MPPT charge controllers are much more efficient, around 95% or so. However, they are much more expensive.
MPPT controllers are best for solar systems where efficiency is important. They also have higher current and PV voltage ratings, making them better suited for larger systems of around 400-1000 watts.
An example where an MPPT could be ideal is on a van with limited roof space. Because of the limited space, you want to maximize the amount of solar energy you can pull from your panels. You decide to go with an MPPT for its conversion efficiency.
Charge your 36v or 48v Golf Cart with almost any solar module!
Increase your range and battery life using the power of solar and the Solar EV MPPT Solar Boost Charge Controller.
Run your golf carts longer, with less maintenance using solar.
The Solar EV MPPT-Boost Solar Charge Controller is specifically designed for adding solar panel(s) to a golf cart. With the ability to use lower voltage (12V to 24V) solar panels with 36V or 48V batteries, our MPPT-Boost Controller is the industry’s most efficient voltage-boosting solar charge controller. With a powerful panel and sunshine, you will be able to drive up to 10 miles per day on the sun. You may never need to plug your cart in!
325-350W 8A input 36/48V MPPT Controller
- 99% Peak Efficiency
- Continuous MPPT
- Advanced electronic protections
- 5-Year Warranty
- MADE in the USA
Boosting Panel Voltage Saves Money
Most solar charge controllers move power from a higher voltage panel to a lower voltage battery bank. These golf cart solar charge controllers will take almost any solar panel and boost the voltage to charge a 36V or 48V battery pack. Because these controllers feature true MPPT, no configuration is necessary; the controller will automatically adapt to your panel and not to forget the Four-Wire installation.
Running circles around the Competition
You have a limited amount of space on the roof of your golf cart. Advanced electronics in the our controller extract more usable power from your panel than any other controller. These solar charge controllers are fully waterproof, which makes them ideal for golf carts and other applications where the controller will be exposed to moisture.
High-Speed MPPT: Always on Target
Not all Maximum Power Point Tracking controllers were created equally. Most use a sweep and sleep method that scans the entire voltage range every 30-60 seconds. That’s okay for a clear day, with a stationary panel. But moving vehicles, and changing Cloud cover requires a faster, more advanced controller. The Solar EV controllers adapt to changing light conditions 15 times every second. They are always on target, capturing every bit of available sunshine. Simply put, other controllers can’t keep up.
Computer Controlled, Temperature-Compensated 3-Stage Battery Charging
Precise computer controlled charging ensures the optimal charge cycle for your battery. This increases the battery life and maximizes battery capacity. Our controllers for lithium batteries feature industry-standard Constant-Current Constant-Voltage (CC/CV) charging for widest battery compatibility. Please call us for Lithium Chargers Pricing!
Made in the USA
XY-CD60 DC 6-60V Solar Battery Charger Controller Module Current Protection
Product Type Business IndustrialElectrical Equipment SuppliesElectronic Components SemiconductorsSemiconductors ActivesPower Regulators Converters
Features: Made of high quality material, sturdy, durable and practical to use. Great for fixing overload and low voltage, protects the battery from undervoltage, protects the battery from overcharg.
Features: Made of high quality material, sturdy, durable and practical to use. Great for fixing overload and low voltage, protects the battery from undervoltage, protects the battery from overcharging, and protects the load control, prolong battery life. When the battery voltage is insufficient, disconnect the load and connect the charger. When the battery voltage is too high, disconnect the charger and connect the load. Adjustable parameters and LCD screen, show you the parameters clearly, easy to use. With a control voltage 6-60V, it is suitable for batteries, lithium batteries, etc.
Specification: Material: Plastic Model: XY-CD60 Size: app. 3.11 x 1.69 x 1.50in Control voltage: 6-60V Modes: Charging Mode; Discharging Mode Color: As picture shown
Charging mode IN: By setting the upper limit voltage UP and the lower limit voltage dn; when the battery voltage is less than or equal to the lower limit voltage dn, the relay turns on and the charger starts charging the battery; when the battery voltage is more than or equal to the upper limit voltage UP, the relay disconnects to complete an automatic charging; when the relay turns on, IN flickers, indicating that it is charging.
Discharging mode OUT: By setting the upper limit voltage UP and the lower limit voltage dn; when the battery voltage is greater than or equal to the upper limit voltage UP, the relay turns on and starts discharging; when the battery voltage is less than or equal to the lower limit voltage dn, the relay turns off and completes an automatic discharging function; when the relay turns on, the OUT flickers, indicating that it is discharging.
Tip: This product is a simple voltage controller. It can turn on and off the output by relay. It only plays the role of switching, and can not change the voltage.
Functional instruction: 1. Calculation of Voltage Percentage: Battery Voltage/(Upper Voltage-Lower Voltage) 2. Key function: UP: Short press display % and time, long press 5 seconds to switch mode; charging mode: IN, discharge mode: OUT. SET: Short press to check the parameters currently set; long press to enter the parameter setting interface, set UP: voltage upper limit, dn: voltage lower limit, OP: turn-on time, dOP: delay turn-on time (0-999 seconds), FOP: forced turn-on time (0-10 seconds) in discharge mode. DOWN: Turn off/on electric relay enable (emergency stop function) turn off, LCD display OFF, relay disconnect: long press to set the status of LCD backlight, L-P: OFF backlight constant brightness, ON: Backlight automatically extinguishes after 5-10 minutes; after extinguishing, press any keys to wake up.
Parameter Settings a. Enter the parameter setting interface by pressing the SET; b. After entering the parameter setting interface, switch the setting parameters by short pressing SET; c. After choosing parameters, it can be set by UP/DOWN key, supporting short press or long press. d. If you want to set other parameters, repeat steps b and c; e. After all parameters are set, long press SET to exit and save;
3.1 Charging/Discharging Time Control Function 1) When the time parameter OP is non-zero, start charging/discharging time control. 2) When the relay turns on a charge/discharge, the countdown begins; when it is completed, the relay is automatically disconnected to complete a charge/discharge process; if the time is completed, under the charging mode, the detection voltage is less than the lower limit voltage dn or in the discharge mode, the detection voltage is larger than the upper limit voltage UP, and the charging time control function is automatically turned off and flashes. Indicate H: ER reminds users that time parameter setting is unreasonable; press any key to stop flickering; 3) When the charging/discharging time control is not turned on, the product will record a complete time. When entering the time display interface, flashing shows the charging time, then exiting the time display interface or clearing the next time the charging is turned on (relay is turned on).
3.2 Automatic parameter detection: When the parameters are set and exit, if the lower voltage limit DN is larger than the upper voltage up, the system will flicker to display ERR as a reminder.
3.3 Delayed turn-on function (0-999 seconds): Completion of a charge/discharge, the interval between re-opening;
3.4 Discharge Conduction Forced Start Time (0-10S): After satisfying the relay conduction condition, the relay is forced to turn on (0-10S) to detect the battery voltage again. This function is mainly aimed at discharging function. Some test loads will pull down the lower limit voltage instantaneously at the moment of conduction, which will lead to the disconnection of the relay and the failure of normal discharge process.
Analysis of Common Faults: Question 1: How many V levels are suitable for use? How many V voltage does this module fit? Answer 1: This model is suitable for use in the range of minimum 6V, maximum 60V voltage and maximum expenditure level 48V, because 48V battery is full of electricity at about 60V, and then burns at a higher level. If your battery is higher than 48V, please choose another one.
Q2: The relay clicks after power-on! Does the light flicker? A2: This is because your charging current is too large or the battery capacity is too small. Once the battery is powered up, it immediately reaches the upper voltage limit. The relay is disconnected. After disconnection, the voltage quickly drops to the lower voltage limit and starts charging again. At this time, you need to reduce the charging current. Usually, the charging current is 10% of the battery capacity. From 1 to 1.5, the charging current of 20AH batteries is generally about 2-3A. Note that high current charging can cause battery heating, accelerated aging, bulging and even explosion!
Q3: What control method? Can it be recharged automatically? Can you fill it while you use it? Can we limit the current? A3: This is voltage control, such as setting the lower limit of voltage 12.0V, the upper limit of voltage 14.5V, when the voltage is charged to 14.5V, the power is cut off, the voltage is lowered to 12.0V and the relay is closed to start charging; while charging, the voltage control mode can only switch on and off, not limit the current, the charging current depends entirely on your charger!
Q4: Can I charge a 24V battery with 12V input, or can I charge a 12V battery with 48V input? A4: This is a simple voltage controller. It only plays a switching role. It can’t change the voltage to charge the battery. So what kind of charger should you prepare to charge the battery? Necessary!
Package Included: 1 x DC 6-60V Solar Battery Charger Controller Module Current Protection Board Instructions/schematic are NOT included. We don’t provide technical assistance please make sure that you are familiar with the product before purchasing.
You may return most new, unopened items within 30 days of delivery for a full refund. We’ll also pay the return shipping costs if the return is a result of our error (you received an incorrect or defective item, etc.).
You should expect to receive your refund within four weeks of giving your package to the return shipper, however, in many cases you will receive a refund more quickly. This time period includes the transit time for us to receive your return from the shipper (5 to 10 business days), the time it takes us to process your return once we receive it (3 to 5 business days), and the time it takes your bank to process our refund request (5 to 10 business days).
If you need to return an item, simply login to your account, view the order using the ‘Complete Orders’ link under the My Account menu and click the Return Item(s) button. We’ll notify you via e-mail of your refund once we’ve received and processed the returned item.
We can ship to virtually any address in the world. Note that there are restrictions on some products, and some products cannot be shipped to international destinations.
When you place an order, we will estimate shipping and delivery dates for you based on the availability of your items and the shipping options you choose. Depending on the shipping provider you choose, shipping date estimates may appear on the shipping quotes page.
Please also note that the shipping rates for many items we sell are weight-based. The weight of any such item can be found on its detail page. To reflect the policies of the shipping companies we use, all weights will be rounded up to the next full pound.
Reviews and information on the best Solar panels, inverters and batteries from SMA, Fronius, SunPower, SolaX, Q Cells, Trina, Jinko, Selectronic, Tesla Powerwall, ABB. Plus hybrid inverters, battery sizing, Lithium-ion and lead-acid batteries, off-grid and on-grid power systems.
What is a solar charge controller?
A solar charge controller, also known as a solar regulator, is basically a solar battery charger connected between the solar panels and battery. Its job is to regulate the battery charging process and ensure the battery is charged correctly, or more importantly, not over-charged. DC-coupled solar charge controllers have been around for decades and are used in almost all small-scale off-grid solar power systems.
Modern solar charge controllers have advanced features to ensure the battery system is charged precisely and efficiently, plus features like DC load output used for lighting. Generally, most smaller 12V-24V charge controllers up to 30A have DC load terminals and are used for caravans, RVs and small buildings. On the other hand, most larger, more advanced 60A MPPT solar charge controllers do not have load output terminals and are specifically designed for large off-grid power systems with solar arrays and powerful off-grid inverter-chargers.
Solar charge controllers are rated according to the maximum input voltage (V) and maximum charge current (A). As explained in more detail below, these two ratings determine how many solar panels can be connected to the charge controller. Solar panels are generally connected together in series, known as a string of panels. The more panels connected in series, the higher the string voltage.
- Current Amp (A) rating = Maximum charging current.
- Voltage (V) rating = Maximum voltage (Voc) of the solar panel or string of panels.
MPPT Vs PWM solar charge controllers
There are two main types of solar charge controllers, PWM and MPPT, with the latter being the primary FOCUS of this article due to the increased charging efficiency, improved performance and other advantages explained below.
PWM solar charge controllers
Simple PWM, or ‘pulse width modulation’ solar charge controllers, have a direct connection from the solar array to the battery and use a basic ‘Rapid switch’ to modulate or control the battery charging. The switch (transistor) opens until the battery reaches the absorption charge voltage. Then the switch starts to open and close rapidly (hundreds of times per second) to modulate the current and maintain a constant battery voltage. This works ok, but the problem is the solar panel voltage is pulled down to match the battery voltage. This, in turn, pulls the panel voltage away from its optimum operating voltage (Vmp) and reduces the panel power output and operating efficiency.
PWM solar charge controllers are a great low-cost option for small 12V systems when one or two solar panels are used, such as simple applications like solar lighting, camping and basic things like USB/phone chargers. However, if more than one panel is needed, they will need to be connected in parallel, not in series (unless the panels are very low voltage and the battery is a higher voltage).
MPPT solar charge controllers
MPPT stands for Maximum Power Point Tracker; these are far more advanced than PWM charge controllers and enable the solar panel to operate at its maximum power point, or more precisely, the optimum voltage and current for maximum power output. Using this clever technology, MPPT solar charge controllers can be up to 30% more efficient, depending on the battery and operating voltage (Vmp) of the solar panel. The reasons for the increased efficiency and how to correctly size an MPPT charge controller are explained in detail below.
As a general guide, MPPT charge controllers should be used on all higher power systems using two or more solar panels in series, or whenever the panel operating voltage (Vmp) is 8V or higher than the battery voltage. see full explanation below.
What is an MPPT or maximum power point tracker?
A maximum power point tracker, or MPPT, is basically an efficient DC-to-DC converter used to maximise the power output of a solar system. The first MPPT was invented by a small Australian company called AERL way back in 1985, and this technology is now used in virtually all grid-connect solar inverters and all MPPT solar charge controllers.
The functioning principle of an MPPT solar charge controller is relatively simple. due to the varying amount of sunlight (irradiance) landing on a solar panel throughout the day, the panel voltage and current continuously vary. In order to generate the most power, an MPPT sweeps through the panel voltage to find the sweet spot or the best combination of voltage and current to produce the maximum power. The MPPT continually tracks and adjusts the PV voltage to generate the most power, no matter what time of day or weather conditions. Using this clever technology, the operating efficiency greatly increases, and the energy generated can be up to 30% more compared to a PWM charge controller.
PWM Vs MPPT Example
In the example below, a common 60 cell (24V) solar panel with an operating voltage of 32V (Vmp) is connected to a 12V battery bank using both a PWM and an MPPT charge controller. Using the PWM controller, the panel voltage must drop to match the battery voltage and so the power output is reduced dramatically. With an MPPT charge controller, the panel can operate at its maximum power point and in turn can generate much more power.
Best MPPT solar charge controllers
See our detailed review of the best mid-level MPPT solar charge controllers used for small scale off-grid systems up to 40A. click on the summary table below. Also see our review of the most powerful, high-performance MPPT solar charge controllers used for professional large-scale off-grid systems here.
Battery Voltage options
Unlike battery inverters, most MPPT solar charge controllers can be used with a range of different battery voltages. For example, most smaller 10A to 30A charge controllers can be used to charge either a 12V or 24V battery, while most larger capacity, or higher input voltage charge controllers, are designed to be used on 24V or 48V battery systems. A select few, such as the Victron 150V range, can even be used on all battery voltages from 12V to 48V. There are also several high voltage solar charge controllers, such as those from AERL and IMARK which can be used on 120V battery banks.
Besides the current (A) rating, the maximum solar array size that can be connected to a solar charge controller is also limited by the battery voltage. As highlighted in the following diagram, using a 24V battery enables much more solar power to be connected to a 20A solar charge controller compared to a 12V battery.
Based on Ohm’s law and the power equation, higher battery voltages enable more solar panels to be connected. This is due to the simple formula. Power = Voltage x Current (P=VI). For example 20A x 12.5V = 250W, while 20A x 25V = 500W. Therefore, using a 20A controller with a higher 24V volt battery, as opposed to a 12V battery, will allow double the amount of solar to be connected.
- 20A MPPT with a 12V battery = 260W max Solar recommended
- 20A MPPT with a 24V battery = 520W max Solar recommended
- 20A MPPT with a 48V battery = 1040W max Solar recommended
Note, oversizing the solar array is allowed by some manufacturers to ensure an MPPT solar charge controller operates at the maximum output charge current, provided the maximum input voltage and current are not exceeded! See more in the oversizing solar section below.
Solar panel Voltage Explained
All solar panels have two voltage ratings which are determined under standard test conditions (STC) based on a cell temperature of 25°C. The first is the maximum power voltage (Vmp) which is the operating voltage of the panel. The Vmp will drop significantly at high temperatures and will vary slightly depending on the amount of sunlight. In order for the MPPT to function correctly, the panel operating voltage (Vmp) must always be several volts higher than the battery charge voltage under all conditions, including high temperatures. see more information about voltage drop and temperature below.
The second is the open-circuit voltage (Voc) which is always higher than the Vmp. The Voc is reached when the panel is in an open-circuit condition, such as when a system is switched off, or when a battery is fully charged, and no more power is needed. The Voc also decreases at higher temperatures, but, more importantly, increases at lower temperatures.
Battery Voltage Vs Panel Voltage
For an MPPT charge controller to work correctly under all conditions, the solar panel operating voltage (Vmp), or string voltage (if the panels are connected in series) should be at least 5V to 8V higher than the battery charge (absorption) voltage. For example, most 12V batteries have an absorption voltage of 14 to 15V, so the Vmp should be a minimum of 20V to 23V, taking into account the voltage drop in higher temperatures. Note, on average, the real-world panel operating voltage is around 3V lower than the optimum panel voltage (Vmp). The String Voltage Calculator will help you quickly determine the solar string voltage by using the historical temperature data for your location.
In the case of 12V batteries, the panel voltage drop due to high temperature is generally not a problem since even smaller (12V) solar panels have a Vmp in the 20V to 22V range, which is much higher than the typical 12V battery charge (absorption) voltage of 14V. Also, common 60-cell (24V) solar panels are not a problem as they operate in the 30V to 40V range, which is much higher.
In the case of 24V batteries, there is no issue when a string of 2 or more panels is connected in series, but there is a problem when only one solar panel is connected. Most common (24V) 60-cell solar panels have a Vmp of 32V to 36V. While this is higher than the battery charging voltage of around 28V, the problem occurs on a very hot day when the panel temperature increases and the panel Vmp can drop by up to 6V. This large voltage drop can result in the solar voltage dropping below the battery charge voltage, thus preventing it from fully charging. A way to get around this when using only one panel is to use a larger, higher voltage 72-cell or 96-cell panel.
When charging 48V batteries, the system will need a string of at least 2 panels in series but will perform much better with 3 or more panels in series, depending on the maximum voltage of the charge controller. Since most 48V solar charge controllers have a max voltage (Voc) of 150V, this generally allows a string of 3 panels to be connected in series. The higher voltage 250V charge controllers can have strings of 5 or more panels which is much more efficient on larger solar arrays as it reduces the number of strings in parallel and, in turn, lowers the current.
Note: Multiple panels connected in series can produce dangerous levels of voltage and must be installed by a qualified electrical professional and meet all local standards and regulations.
Solar panel voltage Vs Temperature
The power output of a solar panel can vary significantly depending on the temperature and weather conditions. A solar panel’s power rating (W) is measured under Standard Test Conditions (STC) at a cell temperature of 25°C and an irradiance level of 1000W/m2. However, during sunny weather, solar panels slowly heat up, and the internal cell temperature will generally increase by at least 25°C above the ambient air temperature; this results in increased internal resistance and a reduced voltage (Vmp). The amount of voltage drop is calculated using the voltage temperature co-efficient listed on the solar panel datasheet. Use this Solar Voltage Calculator to determine string voltages at various temperatures.
Both the Vmp and Voc of a solar panel will decrease during hot sunny weather as the cell temperature increases. During very hot days, with little wind to disperse heat, the panel temperature can rise as high as 80°C when mounted on a dark-coloured rooftop. On the other hand, in cold weather, the operating voltage of the solar panel can increase significantly, up to 5V or even higher in freezing temperatures. Voltage rise must be taken into account as it could result in the Voc of the solar array going above the maximum voltage limit of the solar charge controller and damaging the unit.
Panel Voltage Vs Cell Temperature graph notes:
- STC = Standard test conditions. 25°C (77°F)
- NOCT = Nominal operating cell temperature. 45°C (113°F)
- (^) High cell temp = Typical cell temperature during hot summer weather. 65°C (149°F)
- (#) Maximum operating temp = Maximum panel operating temperature during extremely high temperatures mounted on a dark rooftop. 85°C (185°F)
Voltage increase in cold weather
Example: A Victron 100/50 MPPT solar charge controller has a maximum solar open-circuit voltage (Voc) of 100V and a maximum charging current of 50 Amps. If you use 2 x 300W solar panels with 46 Voc in series, you have a total of 92V. This seems ok, as it is below the 100V maximum. However, the panel voltage will increase beyond the listed Voc at STC in cold conditions below 25°C cell temperature. The voltage increase is calculated using the solar panel’s voltage temperature coefficient, typically 0.3% for every degree below STC (25°C). As a rough guide, for temperatures down to.10°C, you can generally add 5V to the panel Voc which equates to a Voc of 51V. In this case, you would have a combined Voc of 102V. This is now greater than the max 100V Victron 100/50 input voltage limit and could damage the MPPT and void your warranty.
Solution: There are two ways to get around this issue:
- Select a different MPPT solar charge controller with a higher input voltage rating, such as the Victron 150/45 with a 150V input voltage limit.
- Connect the panels in parallel instead of in series. The maximum voltage will now be 46V 5V = 51 Voc. Note this will only work if you use a 12V or 24V battery system; it’s unsuitable for a 48V system as the voltage is too low. Also note, in parallel the solar input current will double, so the solar cable should be rated accordingly.
Note: Assuming you are using a 12V battery and 2 x 300W panels, the MPPT charger controller output current will be roughly: 600W / 12V = 50A max. So you should use a 50A MPPT solar charge controller.
Guide only. Use the new String Voltage Calculator to determine panel voltages accurately.
The charge controller Amp (A) rating should be 10 to 20% of the battery Amp/hour (Ah) rating. For example, a 100Ah 12V lead-acid battery will need a 10A to 20A solar charge controller. A 150W to 200W solar panel will be able to generate the 10A charge current needed for a 100Ah battery to reach the adsorption charge voltage provided it is orientated correctly and not shaded. Note: Always refer to the battery manufacturer’s specifications.
Advanced Guide to off-grid solar systems
Before selecting an MPPT solar charge controller and purchasing panels, batteries or inverters, you should understand the basics of sizing an off-grid solar power system. The general steps are as follows:
- Estimate the loads. how much energy you use per day in Ah or Wh
- Battery capacity. determine the battery size needed in Ah or Wh
- Solar size. determine how many solar panel/s you need to charge the battery (W)
- Choose the MPPT Solar Charge Controller/s to suit the system (A)
- Choose an appropriately sized inverter to suit the load.
Estimate the loads
The first step is to determine what loads or appliances you will be running and for how long? This is calculated by. the power rating of the appliance (W) multiplied by the average runtime (hr). Alternatively, use the average current draw (A) multiplied by average runtime (hr).
- Energy required in Watt hours (Wh) = Power (W) x Time (hrs)
- Energy required in Amp hours (Ah) = Amps (A) x Time (hrs)
Once this is calculated for each appliance or device, then the total energy requirement per day can be determined as shown in the attached load table.
Sizing the Battery
The total load in Ah or Wh load is used to size the battery. Lead-acid batteries are sized in Ah while lithium batteries are sized in either Wh or Ah. The allowable daily depth of discharge (DOD) is very different for lead-acid and lithium, see more details about lead-acid Vs lithium batteries. In general, lead-acid batteries should not be discharged below 70% SoC (State of Charge) on a daily basis, while Lithium (LFP) batteries can be discharged down to 20% SoC on a daily basis. Note: Lead-acid (AGM or GEL) batteries can be deeply discharged, but this will severely reduce the life of the battery if done regularly.
For example: If you have a 30Ah daily load, you will need a minimum 100Ah lead-acid battery or a 40Ah lithium battery. However, taking into account poor weather, you will generally require at least two days of autonomy. so this equates to a 200Ah lead-acid battery or an 80Ah lithium. Depending on your application, location, and time of year, you may even require 3 or 4 days of autonomy.
Sizing the Solar
The solar size (W) should be large enough to fully charge the battery on a typical sunny day in your location. There are many variables to consider including panel orientation, time of year shading issues. This is actually quite complex, but one way to simplify things it to roughly work out how many watts are required to produce 20% of the battery capacity in Amps. Oversizing the solar array is also allowed by some manufacturers to help overcome some of the losses. Note that you can use our free solar design calculator to help estimate the solar generation for different solar panel tilt angles and orientations.
Solar sizing Example: Based on the 20% rule, A 12V, 200Ah battery will need up to 40Amps of charge. If we are using a common 250W solar panel, then we can do a basic voltage and current conversion:
Using the equation (P/V = I) then 250W / 12V battery = 20.8A
In this case, to achieve a 40A charge we would need at least 2 x 250W panels. Remember there are several loss factors to take into account so slightly oversizing the solar is a common practice. See more about oversizing solar below.
Solar Charge controller Sizing (A)
The MPPT solar charge controller size should be roughly matched to the solar size. A simple way to work this out is using the power formula:
Power (W) = Voltage x Current or (P = VI)
If we know the total solar power in watts (W) and the battery voltage (V), then to work out the maximum current (I) in Amps we re-arrange this to work out the current. so we use the rearranged formula:
Current (A) = Power (W) / Voltage or (I = P/V)
For example: if we have 2 x 200W solar panels and a 12V battery, then the maximum current = 400W/12V = 33Amps. In this example, we could use either a 30A or 35A MPPT solar charge controller.
Selecting a battery inverter
Battery inverters are available in a wide range of sizes determined by the inverter’s continuous power rating measured in kW (or kVA). importantly, inverters are designed to operate with only one battery voltage which is typically 12V, 24V or 48V. Note that you cannot use a 24V inverter with a lower 12V or higher 48V battery system. Pro-tip, it’s more efficient to use a higher battery voltage.
Besides the battery voltage, the next key criteria for selecting a battery inverter are the average continuous AC load (demand) and short-duration peak loads. Due to temperature de-rating in hot environments, the inverter should be sized slightly higher than the load or power demand of the appliances it will be powering. Whether the loads are inductive or resistive is also very important and must be taken into account. Resistive loads such as electric kettles or toasters are very simple to power, while inductive loads like water pumps and compressors put more stress on the inverter. In regards to peak loads, most battery inverters can handle surge loads up to 2 x the continuous rating.
Inverter sizing example:
- Average continuous loads = 120W (fridge) 40W (lights) TV (150W) = 310W
- High or surge loads = 2200W (electric kettle) toaster (800W) = 3000W Considering the above loads, a 2400W inverter (with 4800 peak output) would be adequate for the smaller continuous loads and easily power the short-duration peak loads.
ATTENTION SOLAR DESIGNERS. Learn more about selecting off-grid inverters and sizing solar systems in our advanced technical off-grid system design guide.
MPPT Solar Oversizing
Due to the various losses in a solar system, it is common practice to oversize the solar array to enable the system to generate more power during bad weather and under various conditions, such as high temperatures where power derating can occur. The main loss factors include. poor weather (low irradiation), dust and dirt, shading, poor orientation, and cell temperature de-rating. Learn more about solar panel efficiency and cell temperature de-rating here. These loss factors combined can reduce power output significantly. For example, a 300W solar panel will generally produce 240W to 270W on a hot summer day due to the high-temperature power de-rating. Depending on your location, reduced performance will also occur in winter due to low solar irradiance. For these reasons, oversizing the solar array beyond the manufacturers ‘recommended or nominal value’ will help generate more power in unfavourable conditions.
Oversizing by 150% (Nominal rating x 1.5) is possible on many professional MPPT solar charge controllers and will not damage the unit. However, many cheaper MPPT charge controllers are not designed to operate at full power for a prolonged amount of time, as this can damage the controller. Therefore, it is essential to check whether the manufacturer allows oversizing. Morningstar and Victron Energy allow oversizing well beyond the nominal values listed on the datasheets as long as you don’t exceed the input voltage and current limits. Victron MPPT controllers have been successfully used with 200% solar oversizing without any issues. However, the higher the oversizing, the longer the controller will operate at full power and the more heat it will generate. Without adequate ventilation, excess heat may result in the controller overheating and derating power or, in a worst-case scenario, complete shutdown or even permanent damage. Therefore always ensure adequate clearance around the controller according to the manufacturer’s specifications, and add fan-forced ventilation if required.
Warning. you must NEVER exceed the maximum INPUT voltage (Voc) or maximum input current rating of the solar charge controller!
IMPORTANT. Oversizing solar is only allowed on some MPPT solar charge controllers, such as those from Victron Energy, Morningstar and EPever. Oversizing on other models could void your warranty and result in damage or serious injury to persons or property. always ensure the manufacturer allows oversizing and never exceed the maximum input voltage or current limits.
about Solar Sizing
As previously mentioned, all solar charge controllers are limited by the maximum input voltage (V. Volts) and maximum charge current (A – Amps). The maximum voltage determines how many panels can be attached (in series), and the current rating will determine the maximum charge current and, in turn, what size battery can be charged.
As described in the guide earlier, the solar array should be able to generate close to the charge current of the controller, which should be sized correctly to match the battery. Another example: a 200Ah 12V battery would require a 20A solar charge controller and a 250W solar panel to generate close to 20A. (Using the formula P/V = I, then we have 250W / 12V = 20A).
As shown above, a 20A Victron 100/20 MPPT solar charge controller together with a 12V battery can be charged with a 290W ‘nominal’ solar panel. Due to the losses described previously, it could also be used with a larger ‘oversized’ 300W to 330W panel. The same 20A Victron charge controller used with a 48V battery can be installed with a much larger solar array with a nominal size of 1160W.
Compared to the Victron MPPT charge controller above, the Rover series from Renogy does not allow solar oversizing. The Rover spec sheet states the ‘Max. Solar input power’ as above (not the nominal input power). Oversizing the Rover series will void the warranty. Below is a simple guide to selecting a solar array to match various size batteries using the Rover series MPPT charge controllers.
20A Solar Charge Controller. 50Ah to 150Ah battery
- 20A/100V MPPT. 12V battery = 250W Solar (1 x 260W panels)
- 20A/100V MPPT. 24V battery = 520W Solar (2 x 260W panels)
- 40A/100V MPPT. 12V battery = 520W Solar (2 x 260W panels)
- 40A/100V MPPT. 24V battery = 1040W Solar (4 x 260W panels)
Remember that only selected manufacturers allow the solar array to be oversized, as long as you do not exceed the charge controller’s max voltage or current rating. always refer to manufacturers’ specifications and guidelines.
solar charge controller Price guide
The older, simple PWM, or pulse width modulation, charge controllers are the cheapest type available and cost as little as 40 for a 10A unit. In contrast, the more efficient MPPT charge controllers will cost anywhere from 80 to 2500, depending on the voltage and current (A) rating. All solar charge controllers are sized according to the charge current, which ranges from 10A up to 100A. Cost is directly proportional to the charge current and maximum voltage (Voc), with the higher voltage and current controllers being the most expensive.
A general guide to the cost of different size solar charge controllers:
- PWM 100V Solar controllers up to 20A. 40 to 120
- MPPT 100V Solar controllers up to 20A. 90 to 200
- MPPT 150V Solar controllers up to 40A. 200 to 400
- MPPT 150V Solar controllers up to 60A. 400 to 800
- MPPT 250V Solar controllers up to 80A. 800 to 1200
- MPPT 300V Solar controllers up to 100A. 900 to 1500
- MPPT 600V Solar controllers up to 100A. 1600 to 2800
About the Author
Jason Svarc is a CEC-accredited off-grid solar power system specialist who has been designing and building off-grid power systems since 2010. During this time, he also taught the stand-alone power systems design course at Swinburne University (Tafe). Living in an off-grid home for over 12 years and having designed, installed and monitored dozens of off-grid systems, he has gained vast experience and knowledge of what is required to build reliable, high-performance off-grid solar systems.
This is to be used as a guide only. Before making any purchases or undertaking any solar/battery related installations or modifications, you must refer to all manufacturer’s specifications and installation manuals. All work must be done by a qualified person.