Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

MPPT Charge controller

NIOZEMBOMB

Newbie
Newbie level 4
Joined
Aug 29, 2024
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
45
Hi I’m a fresher at lightning company ask to redo the code for mppt charge controller. The current IC used is nuvoton ms51 series with a pre designed layout the model is under production. I don’t where to start please help
 
Hi,

I'd start by
* deciding the functions and specifications of your application. Writing all down: description, numbers with units and tolerance.
... after this
* reading the datasheets and other documents provided by the manufacturer

And if - after reading - there still are questions, please refer to the according document, tell what you understood so far, and what is not clear.

Klaus
 
redo the code
This sounds like the boss asks you to figure out how the previous programmer named variables, and how variables interacted with instrument readings, and how it all interacts with electronic circuitry. You're lucky if the code has comments explaining each line. I have a hunch the boss hopes you'll achieve rapid results.

For this project the previous programmer may have had partial success or no success. You may manage to figure out his code or else start over and write your own code.

As the basic goal you want to maximize the amount of Amperes charging a battery. At the same time you want to maximize the amount of Amperes drawn from PV panels (we assume PV panels?) In order to achieve this you'll vary operation of the charge controller. Duty cycle, frequency, filtering, etc.
 
why does the code need redoing?
--- Updated ---

MPPT has several methods that depend on your customer and company's expectations. These must be given or you must request.
My company out sources it’s code so they only the hex and 3rd party application to load the code to the charge controller. So they want to develop a source code from scratch and want me to do. My company does not have any codes or programmers. The algorithm could be P&O or InCon based on the efficiency. So I don’t even where to start
 
This sounds like the boss asks you to figure out how the previous programmer named variables, and how variables interacted with instrument readings, and how it all interacts with electronic circuitry. You're lucky if the code has comments explaining each line. I have a hunch the boss hopes you'll achieve rapid results.

For this project the previous programmer may have had partial success or no success. You may manage to figure out his code or else start over and write your own code.

As the basic goal you want to maximize the amount of Amperes charging a battery. At the same time you want to maximize the amount of Amperes drawn from PV panels (we assume PV panels?) In order to achieve this you'll vary operation of the charge controller. Duty cycle, frequency, filtering, etc.
I do not have the source code and only the hex code.
 
My first question would be why you don't have the sources if the design was done for your company by a third party.

Secondly, MCS51 has moderate complexity and reverse engineering the code is surely possible, but I'm not sure if it's worth the effort.

In any case, a complete design specification (hardware, expected functionality) is the starting point.
 
example research paper reference https://www.researchgate.net/public..._Based_MPPT_Algorithm_for_Photovoltaic_System

My sanity check for any MPPT algorithm is based on matched impedance for Maximum Power Transfer (MPT) theorem.

Measure Voc, Isc and compare voltage of an LED or photo diode using voltaic mode to calibrate Panel Voc.

Regulate Vmpt @ 83% Voc at full solarity and ~<70% Voc at low solarity.

If this impedance Zmp deviates more than x% you are not getting MPPT.

Zmp = Voc/Isc rises with lower solarity.


1725011761720.png


LED or PD may be used to measure solarity to compare with Voc on panel.
1725012476767.png
 
My first question would be why you don't have the sources if the design was done for your company by a third party.

Secondly, MCS51 has moderate complexity and reverse engineering the code is surely possible, but I'm not sure if it's worth the effort.

In any case, a complete design specification (hardware, expected functionality) is the starting point.
1. The company pays 3rd party to use their source. So basically it is like a subscription to any ott and you can watch and likewise they pay and the other has a app when connects to their online server which has the hex and these ppl dump it on the board they want to eliminate this process.
I have schematic and the pin diagram that is all.
2. I don’t know either I used a 8051 disassembler but didn’t have much luck gave me a parsed ALP code which I’m not sure.
 
P&O or InCon based on the efficiency. So I don’t even where to start
The boss now relies on you to understand the workings of the hardware, and get the most performance out of it. A lot depends on how much of the workings are automatic, and how much of it you have to do manually.

Your hardware has names for its I/O connections. You take readings, then create settings which charge the battery at the most beneficial rate. Perturb and Observe is a method often mentioned at Edaboard. (A forum search might locate previous discussions.) Eventually a 12V lead-acid battery is near full when it reaches 14.4 V.
 
As you are a computer science guy say to your employer that mppt falls under the physics category (Battery-Solar Panel) and the physics guy needs to complete the algorithm for it and you can complete coding for that algorithm after he hands down the algorithm to you with proper instructions-Flowcharts etc. of what needs to be coded

As pointed out by KlausST your physics guy will write specifications, write algorithms (having read datasheets), draw flowcharts etc.(SDLC part) for implementation so that you code to produce a binary which can be flashed onto controller

Since you are a beginner, you can slowly understand its working as you code by under his guidance. :)
 
example research paper reference https://www.researchgate.net/public..._Based_MPPT_Algorithm_for_Photovoltaic_System

My sanity check for any MPPT algorithm is based on matched impedance for Maximum Power Transfer (MPT) theorem.

Measure Voc, Isc and compare voltage of an LED or photo diode using voltaic mode to calibrate Panel Voc.

Regulate Vmpt @ 83% Voc at full solarity and ~<70% Voc at low solarity.

If this impedance Zmp deviates more than x% you are not getting MPPT.

Zmp = Voc/Isc rises with lower solarity.


1725128419723.png


LED or PD may be used to measure solarity to compare with Voc on panel.
View attachment 193433
You should be asking , why is this significant and how you measure Isc and Voc to settle as quickly as possible in a controlled switch?
How does this vary with temperature (-2mV/'C per 0.65 V cell in series)
How does knowing Voc/Isc = Rmpt load make controlling MPPT faster?
How does load R vary with Solarity?
Why does using another sensor alert you sudden changes in solarity (cloud shading) help improve tracking?

What happens if the SMPS oscillator stalls? (drops PV voltage so much it cannot reach target output) Too much load !
 

LaTeX Commands Quick-Menu:

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top