High Efficiency MPPT Solar Charger

A 75 watt MPPT Solar Charger with tons of features. Efficiency > 97%, USB interface, data logging, 2 USB charging ports and much more...

Similar projects worth following
After 3 years of development, this open source project is nearing completion. From its modest beginnings it has evolved into a rather sophisticated device with a USB interface, powerful USB charging ports, a 20x4 character LCD, a rotary encoder with push button, precision measurement of everything from voltages and currents to temperatures. There are 4 PWM power outputs, 4MB of storage for a year's worth of data logging with real time clock and calendar. It connects to a desktop app via USB where users can monitor and adjust every aspect.
But what makes this charger truely special is its extremely high efficiency of around 97% over a very wide power range from 1 to 75 watts. And there's more: When there is no sun, this charger won' t drain your battery. It will enter a very low power state where most sub-circuits are powered off while still logging data.
It works with any type of battery with a nominal voltage of 6 to 13 volts.

Versatile stand-alone or as a Module

While this project started as a stand-alone solar charger, is is nowadays often used as a module in larger projects. The prime example of this is MeshPoint, a WiFi hotspot for disaster and outdoor areas. That project is all about WiFi and 4G mobile networks, not about power harvesting. Using this solar charger as a module, Valent and his team can focus on WiFi connectivity without getting overly distracted with power management.

Don't re-invent the Wheel

Whatever your project, if there's no wall outlet nearby you will sooner or later have to worry about power. Developing a quality solar charger is a major project in its own right as I have found out over the course of the last few years. Chances are high that your project's specific requirements can be met by this charger. It works with many types of batteries over a wide power range. Very often, it is only a matter of configuration to make it fit your needs. So don't re-inventing the wheel. Use this solar charger as a module in your project and focus on what you really want to archieve.

For more involved projects like MeshPoint mentioned above, you may decide to customize the hardware by laying out your own PCB so that it pysically fits and maybe even strips some features that you don't need. Even so, the work involved is only a small fraction compared to starting from scratch.

If your can live with the hardware as it is, your life is even simpler. Just decide if you need the user interface or not and start configuring your charger. The various interfaces from SPI over I2C to USB make it easy for your application to communicate with this charger. 

Standalone Use

There are many situations where one needs (or would simply like to have) power but there is no wall outlet anywhere near. Be it a camper van, a boat, or an off-grid hut. Its nice to have some power for electric lighting, charging cell phones and more. And the availability of affordable solar panels makes solar often the energy source of choice in such situations. 

Yes, you could just buy one of the countless solar chargers out there. But if you are like me, you want a bit more than a black plastic box. I want to see what's going on, I want to be able to control and configure it, I want to be able to adapt it to my specific needs. I want to be able to connect my laptop computer and see what it did while I was away. If you are so inclined, this charger is for you.

Beyond Energy Harvesting

There are also ways how this charger can support your project beyond providing energy. For example, you can access the real-time clock and calendar via any of the interfaces. You may also store data on its EEPROM or its 4MB flash chip. 

If your project is about logging environmental data, you may even rely entirely on this project. The two analog inputs originally intended for temperature measurement can also be used for other purposes. If you need a bit more than that, you can connect an external ADC directly to the I2C or SPI interface and let the solar charger do all the work. All you will need to do is to customize the firmware so that it takes care of your extra hardware.

Beyond Solar

There is even a project harvesting wind energy that decided to use this solar charger as a starting point. While a wind turbine is certainly different from a solar panel, there are many similarities. It's all about extracting as much energy as possible and converting it in an efficient way. Starting with this open source design saved countless hours in both software and hardware development.

Features & Details

High Efficiency DC-DC Buck Converter

At the core of this project is a highly efficient DC-DC switcher rated at 75 watts and entirely controlled by software. It operates at 187.5kHz and can operate both in synchronous or asynchronous mode. The latter is more efficient at light loads. Together with the careful layout and thoughtfully chosen components this allows for an efficiency in the...

Read more »


Bill of materials for the latest revision of the solar charger

sheet - 21.10 kB - 07/10/2018 at 20:58


Gerber files for the latest revision of the solar charger. The gerbers are exactly the ones that I used to order my boards from

x-zip-compressed - 160.57 kB - 07/10/2018 at 20:56


Gerber files for the latest revision of the user interface. The gerbers are exactly the ones that I used to order my boards from

x-zip-compressed - 106.96 kB - 07/10/2018 at 20:54



Bill of materials for the latest revision of the user interface.

sheet - 12.57 kB - 07/10/2018 at 20:52


  • USB MSD Bootloader Ready

    Lukas Fässler6 days ago 0 comments

    This project has just reached another important milestone: The USB bootloader is up and running. This part of the project will enable the non-technical end user to easily and reliably update the firmware in the field. 

    Unlike a USB HID (Human Interface Device) bootloader that requires some application to run on the host computer, this USB MSD (Mass Storage Device) bootloader requires absolutely nothing in terms of host software. It's entirely independent of the OS used. Windows, Linux, Mac, it all doesn't matter. As long as they can deal with a USB drive, they're good to go. Just copy the new software (in the form of an .hex file) to the Solar Charger drive and follow the instructions on the display. 

    It might even be that this bootloader is the world's first of its kind for the PIC18 platform. To be sure, this kind of bootloader has been around for years for more powerful 32-bit microcontrollers like ARM Cortex and the like. But in my online research I have been unable to find any other such project for the PIC18 family (or any other 8-bit microcontroller). So I had no choice than to write my own. If you know of any other implementation, please let me know.

    Once the file has been found and the user has pressed the button, the file is checked. If all those checks pass, we can be confident that we have a valid hex file. Of course, it doesn't tell us anything about the quality of that code, that's an other issue. But technically we should be fine.

    Once the checks have passed, the user is once again requested to press the push button to confirm that this file should be programmed onto the chip. While it's programming, it keeps displaying the current hex file entry it is processing to give the user an idea of the progress. It also keeps track of the number of flash pages it has written. One page corresponds to 1024 bytes on this architecture.

    Once all the new code is flashed onto the chip, a message is displayed and the user is asked to once again press a key to re-boot the device into normal operating mode.

    There are two different ways to enter bootloader mode. One is to press the push button at power-up. The other one consists in writing the value 0x94 (an arbitrarily chosen value) to the EEPROM address 0x100. In this case, the device will start up in bootloader mode no matter the state of the push button. The bootloader then overwrites this value (to 0x00) in order to start up normally next time.

    After the reboot, you should be greeted by the startup screen of the solar charger firmware as shown above.

  • Outdoor Testing

    Lukas Fässler07/07/2018 at 22:49 0 comments

    As much as I enjoy C programming, today the weather was just too nice to lock myself inside and stare at a computer screen. So I changed my schedule and did some real-life outdoor testing. 

    So I moved my 35 watt solar panel outside, grabed one of the Rev F solar chargers, connected a battery, my laptop and some more gear. 

    This is an ongoing project but it has been going on for almost 3 years so that the charger is mature enough to be deployed. Some software features are still missing and others are still a bit rough around the edges but it can easily be used as is.

    As a hobbyist, I do most of my development and testing late at night when there tends to be little sun so this represented a rare opportunity for me to do some testing with a real solar panel as opposed to a lab supply.

    As mentioned above, I only used a 35 watt panel which happens to be the only panel I have. So this test was not so much about pushing the charger to its limits but rather how usable it is at this stage of development and about how it performs in a more real-world setting.

    The test was rather unspectacular but successful for that very reason. I set it up and let it do its thing. And it just worked. It never crashed or performed weirdly. It just harvested energy all day long. Typically around 20 watts which was what the panel was able to provide.

    The solar charger app which I ran on my laptop also performed as it should. It worked reliably monitoring and controlling the charger without ever crashing. USB connection was never an issue. I plugged it in, started the app and it just worked.

    The 45Ah (I think) battery was relatively empty when I started so the battery was charged at full current without overcharging ever being an issue. Besides that, I used some of the energy to charge my cell phone.

    During most of the day, the charger sat in the sun while performing without getting overly hot. The on-board temperature stabilized around 45 degrees centigrade which can mainly be attributed to the sun, rather than losses in the charger.

    Later, after the sun had long set, I used a stip of warm white LEDs to provide some light. Rarely has embedded engineering been such a pleasent task.

  • Working on the USB Bootloader

    Lukas Fässler07/05/2018 at 21:59 0 comments

    It's programming time once again. More specifically, I'm working on the USB bootloader. The bootloader is extremely user-friendly: When connected to a computer via USB, it behaves just like a memory stick or USB drive. You then just copy the new firmware hex file to that drive and confirm that you want to use it. 

    As you may have guessed from the photo above, the bootloader looks for a file named FIRMWARE.HEX. Once such a file is found, it will display its size and ask the user if this file should be used.

    Once the button is pressed, the content of the file is checked. Is it a valid hex file? How many entries are in that file? Do the memory locations correspond to what we expect? Are all the check sums ok? There are a lot of checks to perform in order to make sure we have a valid file. 

    In order to perform all these tasks, the first step is to understand what data is on the drive. For that, I had to implement a simple, lightweight FAT16 implementation. Only so will the bootloader know when there is a  suitable drive on the file and where to read its content from. That was quite a bit of work but I have learned a lot about the inner workings of that file system in the process.

    All the steps described above are already implemented and somewhat tested. The software is able to parse, understand and verify the hex file. It is also able to write data to the internal flash but I still have to put the two pieces together. 

    Somehow I manage to hang the software when writing real code from the hex file to the flash. When I use the same routines to write dummy data, everything works. Anyway, I have to continue working on this...

    I will keep you posted.

  • Board Revision F: Additional interfaces and a new microcontroller

    Lukas Fässler07/04/2018 at 21:38 0 comments

    While the solar charger was originally intended to be used as a standalone device, it can just as well be integrated into other projects. In such applications, the user interface can be left away without sacrificing functionality other than the display and rotary encoder.

    One project doing just that is MeshPoint, a rugged wifi hotspot for disaster and outdoor areas. But in most cases, the main application needs to be able to communicate with the solar charger. It wants to know if power is harvested, how full the battery is and so on. It needs to be able to enable and disable the various power outputs and maybe to control the fan. Or maybe it wants to make use of the charger's real time clock and calendar. Or store some configuration data on the charger's EEPROM. Possibilities are endless.

    And when it comes to external communication interfaces, all the chargers up to revision D had little to offer other than the USB interface. Depending on your project, adding USB host functionality may be inconvenient or even totally out of the question. There was always the possibility to somehow tap the display's I2C port but there was no extra header on the board for that.

    Revision E has finally changed that. The charger now comes with two extra headers, one for I2C and one for SPI. As of now, the PIC acts as a master on both of those buses but slave functionality can be (and is planned to be) added in software. Hardware-wise it is even possible to update the charger's firmware through those interfaces. I must admit that this is not the number one priority to be implemented but its nice to know that the possibility is there.

    With the implementation of the USB bootloader next on the agenda I also upgraded the microcontroller to the newly introduced PIC18F47J53. It is extremely similar to the previously used PIC1846J50 and entirely pin compatible so it didn't require any changes to the board. But it has twice as much flash memory (now 128kB) which allows for a feature-rich USB bootloader without runing into any issues memory-wise.

    Another nice thing about it is that it has many more PWM modules which means that all four power outputs can now be PWM controlled. Think of LED lighting which is probably one of the main uses of those outputs. As a bonus, it also comes with an 12bit ADC which means four times the resolution on the temperature sensors.

    When modifying the software to fit the new board and microcontroller, I noticed that my pin choice for the external SPI slave select signal was somewhat unlucky. I happend to pick one of the few pins without PPS (peripheral pin select) functionality which can be a problem if you try to use that interface with the charger configured as slave. The fix was easy, just swapped two pins but required a slightly modified board. That's why the current version is now revision F.

View all 4 project logs

Enjoy this project?



prosto wrote 06/26/2018 at 09:16 point

where usb output?
is possible using 3-4 different accumulators? big and small.........

  Are you sure? yes | no

Lukas Fässler wrote 5 days ago point

Hi Prosto

What exactly do you mean with accumulators? 

  Are you sure? yes | no

prosto wrote 4 days ago point

one 20Ah one 7Ah and one 12V but from my car

3 different accumulators.

och, You are not from europe. In europe battery=accumulator.

baterry is not acumulator.

  Are you sure? yes | no

Lukas Fässler wrote 4 days ago point

If you can connect the different batteries in parallel, no problem. So if those are all 12V lead acid batteries, then the answer is probably yes. It is also possible to have one main battery and connecting others to the 4 power outputs. So the main battery is always connected and the other ones are only added when needed or when the main battery is full and more energy is available.

  Are you sure? yes | no

prosto wrote 2 hours ago point

no no parallel.

normal each separately. different size. this is important. many accumulator is no new from shop. it is indiwidual efficiency

  Are you sure? yes | no

Lukas Fässler wrote 06/22/2018 at 11:25 point

Hi Sophie. Thanks for your interest in this project. So far, the project description is on my blog at but I will add more info to this hackaday price submission asap

  Are you sure? yes | no

Sophi Kravitz wrote 06/18/2018 at 16:18 point

Hi Lukas! I'd love to read more about this project :)

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates