MPPT solar battery charger


Closed Thread
Results 1 to 40 of 41

Hybrid View

  1. #1
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Re: MPPT solar battery charger

    Quote Originally Posted by iw2fvo View Post
    Robert,
    i think it ias a problem related to panel power wp, panel voltage vp and duty cycle when switching among the various status...
    It needs to find out the proper values that controls the switching...
    tnks,
    Ambrogio
    Yup. I can't see bad GOSUB structure, nothing that stands out anyways.

    The STATE can evolve from 0 to 3 in a single pass of that SELECT CASE. I can only assume the readings from your hardware makes it jump unexpectedly.

    Are you able to debug in real time and step thru your code?

    It's about the only way I can think of the visualize what is going on. I see you dump a lot of information but I'm unable to follow that manually through your logic.

    I prefer to dump like this:

    MAIN --------------------------------------------------
    STEP 1, list of variables.
    SUBROUTINE XYZ ----------------------------------------
    STEP 1, list of variables.
    STEP 2, list of variables.
    SUBROUTINE ABC ----------------------------------------
    STEP 1, list of variables.
    ...etc...


    I find it easier to follow in the code this way. I place the STEPS in relevant places, like before & after IFs, etc.

    Robert
    Last edited by Demon; - 2nd May 2014 at 19:42.

  2. #2
    Join Date
    Jun 2008
    Location
    Varese , Italy
    Posts
    326


    Did you find this post helpful? Yes | No

    Default Re: MPPT solar battery charger

    Robert ,
    I agree with you.
    The point is the data input to the state machine.
    In particular sun condition it plays back and forth between the two status because of the data input.
    I have to change / find out some different duty / panel power / panel voltage to be used to control the staus and avoid oscillations.
    It does not happen frequently: just in some particular case and in a cloudy day.
    The delay applied to the program as stated reduce the oscillation frequency.
    Anyway it is not a real problem since it happens when the charging current is already low because of the low sun condition.
    Thanks for all.
    regards,
    Ambrogio

  3. #3
    Join Date
    Jun 2009
    Location
    Sc*nthorpe, UK
    Posts
    333


    Did you find this post helpful? Yes | No

    Default Re: MPPT solar battery charger

    A very impressive piece of code! I have been programing for over 40 years and never seen a novice produce such elegant code before.

    The issue is in your select case section. If case =0 then within this code case is set to 1 then case 1 code is run and again Case is set to 2 then Case is set to 3. Here is the main issue Case 3 is bulk charging because the battery is low as you would want but if a cloud comes over then Panel Voltage is less than Battery Voltage and Case is set to 0. Once the cloud goes then the Case will again revert to 3 bulk charge until the next cloud. Obviously depending on how dark the cloud is there is a possibility that the Panel Voltage can be above Battery Voltage changing to below Battery Voltage and then above as the cloud passes.

    This explains what is happening. My only question is why are you switching the Panel on and off?

    All my solar panels are permanently connected to the battery regulator. The panels do have a diode in line.

    If you do not switch the panels on and off you can take out all of the switching code and solve the problem.

  4. #4
    Join Date
    Jun 2008
    Location
    Varese , Italy
    Posts
    326


    Did you find this post helpful? Yes | No

    Default Re: MPPT solar battery charger

    Thanks EarlyBird2,
    Yes , the system works as you described.
    The point is that sometime it jumps or oscillates around OFF state. I think your suggestion to do not turn off the converter ( see EN_DCDC ) could solve the problem.
    I will try it durnig next week. I will post the results.
    Thanks again
    Regards,
    Ambrogio

Similar Threads

  1. DC/DC with MPPT for solar panels
    By iw2fvo in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 14th May 2013, 03:26
  2. Replies: 14
    Last Post: - 6th March 2011, 06:08
  3. Charger battery with pic12f675
    By Leonardo in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 24th July 2009, 20:15
  4. Li-Ion battery charger
    By Nicmus in forum Off Topic
    Replies: 6
    Last Post: - 21st May 2008, 01:28
  5. 12v Lead acid solar charger
    By docwisdom in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 26th May 2006, 23:01

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts