Skip to content

Add MPPT, Original CC/CV, Reduce ADC Jitter and fix LCD freeze on DPS5020 #241

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

art103
Copy link

@art103 art103 commented May 25, 2021

Hi,
Please find a pull request for the following changes:

  • Apply the LCD freeze workaround to the DPS5020 model.
  • Reduce jitter by using ADC oversampling

art103 added 9 commits May 25, 2021 08:18
Apply oversampling to the ADC values to reduce jitter (OVP / OCP) and LCD readings.
Turn output off if v_in drops below threshold for current output voltage.
Control the fan automatically on DPS5020 to mimic original firmware.
This replaces CC / CV / CL with a CCCV screen.
The use of a SW i_limit is replaced with the HW DAC for limiting current.
This makes the unit behave much like the original, without the SW limit cutting power.
The SW limit is now set to the maximum output current supported by the DPS model.
Be careful with this!
This screen automatically enables the output (so it starts when the solar panel generates power).
It uses a binary tree search to quickly find the maximum power point of the input source.
The output is limited to the voltage / current limits set on the screen.
@art103
Copy link
Author

art103 commented May 25, 2021

Oops, sorry - the pull request was only supposed to be for the first 2 commits.
The rest are entirely optional, but CC/CV makes the unit behave much more like the original :)

@art103 art103 changed the title Fix LCD freezing on DPS5020 models. Fix LCD freezing on DPS5020 models and reduce ADC jitter May 25, 2021
@art103 art103 changed the title Fix LCD freezing on DPS5020 models and reduce ADC jitter Add MPPT, Original CC/CV, Reduce ADC Jitter and fix LCD freeze on DPS5020 May 25, 2021
@eliasmagn
Copy link

eliasmagn commented Aug 2, 2021

I can confirm its working, flashed on dps5020 v2.6. nO BUGS yet.
I build from your master branch and i wonder how you would use mppt? Any documentation?
Its a bad decision to start in mppt mode! Couldnt we set cc/cv mode as default instead?
I created pull request to your fork!

@ItsMeAubey
Copy link

Hi @art103,

Does your re-implementation of the cc/cv mode work with control over serial?

@art103
Copy link
Author

art103 commented Feb 7, 2023

Hi @art103,

Does your re-implementation of the cc/cv mode work with control over serial?

It was a long time ago and I haven't tried it, but looking back through the code changes, I think it should...

@art103
Copy link
Author

art103 commented Feb 7, 2023

I can confirm its working, flashed on dps5020 v2.6. nO BUGS yet. I build from your master branch and i wonder how you would use mppt? Any documentation? Its a bad decision to start in mppt mode! Couldnt we set cc/cv mode as default instead? I created pull request to your fork!

Sorry - it's been a while!
I agree that for normal use cases, starting in MPPT is a bad idea. For my use case, the unit would power down when there was no solar input, and I wanted it to come up in MPPT mode.
I ended up modifying one of my units to have HW controlled PWM based on Input Voltage instead of Output Current. This allows much better (and faster) MPPT control targeting a particular solar panel voltage after doing a MPPT sweep.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants