Giter Club home page Giter Club logo

mppt-charger_software's Introduction

MPPT Charger Software

Software based on ARM mbed library for the LibreSolar 20 A MPPT solar charge controller

See also development branch for most recent updates.

Important remarks

  • Do not use mbed Ticker class, as it disturbs the timer settings and might cause the charge controller to crash. In addition to that, it contains a lot of overhead and is not very efficient. Timers should be programmed bare metal. Currently, TIM1 is used for PWM generation and TIM15 to trigger ADC readings.

  • The PWM signal generation for the DC/DC controller inside the charge controller is done in the file dcdc.cpp. Most of the dangerous functions which could turn your MOSFETs into magic smoke are implemented here, so don't touch it unless you know what you're doing.

State machine of the charge controller

The charge management is implemented using a state machine with the following states:

Standby

Initial state of the charge controller. If the solar voltage is high enough and the battery is not full, charging in CC mode is started.

CC / bulk charging

The battery is charged with maximum possible current (MPPT algorithm is active) until the CV voltage limit is reached.

CV / absorption charging

Lead-acid batteries are charged for some time using a slightly higher charge voltage. After a current cutoff limit or a time limit is reached, the charger goes into trickle or equalization mode for lead-acid batteries or back into Standby for Li-ion batteries.

Trickle charging

This mode is kept forever for a lead-acid battery and keeps the battery at full state of charge. If too much power is drawn from the battery, the charger switches back into CC / bulk charging mode.

Equalization charging

This mode is only used for lead-acid batteries after several deep-discharge cycles or a very long period of time with no equalization. Voltage is increased to 15V or above, so care must be taken for the other system components attached to the battery. (currently, no equalization charging is enabled in the software)

Text

Toolchain and flashing instructions

See the Libre Solar website for a detailed instruction how to develop software and flash new firmware.

Please note that you have to create the file config.cpp by using / changing one of the provided templates to your needs before the software compiles successfully. The file config.cpp is not tracked in git since it represents a specific configuration. Please do not add it in a pull request, change the templates if necessary.

mppt-charger_software's People

Contributors

martinjaeger avatar

Watchers

James Cloos avatar Shujaat Ali Khan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.