Building MPPT-2420-RC solar charger

Martin, thanks for update!
I’ve tried develop branch with latest commit:

  • Multimeter at battery port: 12.10V
  • Controller: 12.24 V

There is again fixed ADC offset around 15-16 LSB (checked also HV port), but this time it doesn’t change after reset. Tried to set internal BOD circuit at 2.7V, but measurement remains same. Also tried external 3.3V for MCU supply - no result. I will check things again, may be missing something.

Mhh, that’s disappointing that it didn’t completely fix the issue. I will also keep an eye on the topic.

After a little vacation I’m back and continue with project build.
I’ve done some new tests regarding measurement accuracy and still can’t find the root of the problem, but found a workaround - a second ADC calibration immediately after first one:

#if defined(CONFIG_SOC_SERIES_STM32G4X)
LL_ADC_StartCalibration(adc, LL_ADC_SINGLE_ENDED);
#elif defined(CONFIG_SOC_SERIES_STM32F0X) || defined(CONFIG_SOC_SERIES_STM32L0X)
LL_ADC_StartCalibration(adc);
#endif
while (LL_ADC_IsCalibrationOnGoing(adc)) {;}

That reduced ADC offset to 2-3 LSB:

  • Multimeter at battery port: 12.26V
  • Solar charger: 12.23 V

I’m satisfied with results and planing some charge test with real battery for next week :slight_smile:

1 Like

Ah, nice, good to know and thanks for sharing. Will probably do some additional tests tomorrow and if I can confirm the improvement I will add it to the code.

BTW: All previous changes from the development and adc-playground branch have been merged to master now, so you can use the master branch now.

1 Like

Thanks for update. I’ve switched to master branch now.
So some real test results. First some words about setup itself:

  • Battery - 4 x LiFePO4 cell A123 20Ah
  • PSU 48V 150W
  • mppt-2420-rc charger

I set-up charging current to 5A via console and applied power. Charger start working, but instead 5A it delivers around 11A. This is a maximum achievable current with this PSU (indeed that is MPPT mode, but without solar panel) This puzzled me and debugging process begin. :thinking: Enabled maximum level of logging and found that maximum positive current is set to 20A which explains higher current during first test.
I’m not very familiar with software architecture of charger but found these things:
DC-DC stage is controlled by PowerPort class object dcdc_lv_port and during creation its member variable pos_current_limit is set to value form DTS file (20A):

lvs->pos_current_limit = DT_PROP(DT_PATH(dcdc), current_max);

If change this value, charger sets max. charging current accordingly. On other hand in object charger there is PowerPort object port, which variable pos_current_limit is set to charge_current_max from battery config:

port->pos_current_limit = bat_conf->charge_current_max;

But those two limits remains unrelated and dc-dc stage works with value form DTS file. I’ve made some dirty hack just before entering main while cycle:

dcdc_lv_port.pos_current_limit = bat_conf.charge_current_max;

And now can limit max. charging current of battery form serial console.
Martin can you please suggest a proper way to resolve this issue?
Then started a charge cycle with 10A for one hour. At the end of cycle MOSFET temperature reached 62 deg with open pcb in vertical postion. Also noticed that charger doesn’t stop at 1A (topping_off current level). Tomorrow planing tests with 8 cell battery and will check also that issue.

1 Like

Quick update with some test numbers:
Tested with 8S LiFePO4 battery and 48V/300W PSU and charging at 11A. In an hour MOSFET’s temperature reached 72 deg and power inductor was around 60 deg. So charger was very close to power throttling temp (80 deg) and for more amps it definitely needs better cooling.
Also noticed that charger current is not very stable.There is a fluctuation around 10 percent. I think this is due to relatively low control frequency (10Hz).
I’ve continued with tests and yesterday hooked up one 290W solar panel. It starts generate around 150W (it was afternoon and sky wasn’t very clear) and in one hour battery accumulated around 100Wh. That was my first real solar charging test and I’m very happy :slight_smile:
So what next - I need to fix issue with charger topping current and attach a BMS to battery, before continuing. Not very sure weather my solar panel is well suited for 24V battery, it’s 60 cell panel.

1 Like