Author Topic: Questions: MPPT Controller Design / Dig. controllable BuckBoost Converter 60V 5A  (Read 2606 times)

0 Members and 1 Guest are viewing this topic.

Offline Wi_ZeusTopic starter

  • Newbie
  • Posts: 7
  • Country: de
I'm currently designing a MPPT-Controller that should be as universal as possible.
These converters will be used on a solar boat, a university project.
https://www.hs-emden-leer.de/fileadmin/user_upload/pm-Fotos/Bild_Solarbootregatta_1.jpg
Each panel will have it's own MPPT tracker in order to mitigate the effects of certain areas being shadowed.
I'd like to make this MPPT very flexible Vin <= Vout and vice versa and support output currents of 5A or even more.

The planned use-case is like this:
Input: up to 26 OCV @ 7A Short circuit, the output of each panel is isolated
Output: up to 60V, to be safe, the battery charge voltage is 50.4V, variable current output. All outputs will be connected in parallel and charge a LiPo battery.
One STM32 monitors multiple MPPT-channels and adjusts each channel's output voltage to get maximum power out of each panel.
No. of channels: TBD/expandable (let's say ~6)
All channels are connected to one common (opto-isolated) bus (I²C for example).
The user can append extra channels to the MPPT-Mainboard, as needed.
Each module has small DIP switches for configuration / addressing.

In order to make the device as flexible as possible, I'd like to implement one buck boost converter per channel. It would get pretty messy to control each channel directly from the STM32.
Not only would I have to route many control signals, the feedback would also need to "travel" quite a long way.
That's why I laid eyes on the LTC2992 https://www.mouser.de/datasheet/2/609/ltc2992-1504204.pdf to measure Vin, Iin, Vout and Iout.
This would give me pretty much all the data I need for the MPPT algorithm.

Unfortunately I wasn't able to find a suitable digitally controllable boost buck converter IC anywhere that would fulfill my requirements.
I found one that uses resistors as feedback and would otherwise be pretty good: LT8390 [url]https://www.analog.com/media/en/technical-documentation/data-sheets/8390fa.pdf]https://www.analog.com/media/en/technical-documentation/data-sheets/8390fa.pdf] [url]https://www.analog.com/media/en/technical-documentation/data-sheets/8390fa.pdf[/url]
Q: Would it be feasible / possible to control the output voltage using a digital pot? So far I only found ones that go up to 32V anyways.

But maybe I'm going in the wrong direction? Each channel would not only be pretty expensive, they'd be pretty complicated too...
Q: Does anyone have suggestions as to how I should design each channel? I really wouldn't want to use a microcontroller on each channel, to maintain one central control board.
This would make accessing telemetry data easier and I think that it would be a bit more elegant.  :)
« Last Edit: November 07, 2019, 06:40:59 pm by Wi_Zeus »
 

Offline jhpadjustable

  • Frequent Contributor
  • **
  • Posts: 295
  • Country: us
  • Salt 'n' pepper beard
Welcome aboard! Just random notes, hope this helps...

Wired-OR over a single long wire feels scary to me. A differentially-based single-line protocol like CAN or half-duplex RS-485 would be a little easier to isolate and to wire, and allow for a longer, more robust bus at more comfortable bit-rates. CAN's multi-master broadcast-centric design is especially suited to the use case of a virtual wiring harness, and, it's made in Germany :)

You can push down the voltage of any four-terminal regulator by injecting current into the feedback node, replacing some portion of current that would ordinarily flow through the upper resistor of the feedback divider.

As a cost-reducing alternative to the LTC2992, see the ACS70331 giant-magnetoresistive current sensor and discrete ADCs such as MCP3424.

I wouldn't too quickly dismiss the design direction of a microcontroller on each channel. STM32F0/F1 are cheap and can absorb much of the complexity of the analog and mixed chips you're using now, which might lower the channel cost by quite a lot. You could simply use the chip as a smart peripheral for periodically sending ADC values to the bus and accepting commands from the coordinator. Or you could go all the way to distributed computation and controlling the buck-boost switch(es) directly from a timer-counter, with the onboard op-amps detecting faults and instantly forcing the converter into a safe state. Or anywhere in between.
« Last Edit: November 08, 2019, 05:05:18 am by jhpadjustable »
"There are more things in heaven and earth, Arduino, than are dreamt of in your philosophy."
 
The following users thanked this post: Wi_Zeus

Offline jbb

  • Super Contributor
  • ***
  • Posts: 1265
  • Country: nz
I too think that deploying an STM32 per mode would be good. The local processors can think about local things, and connect to a multi drop bus (CAN or RS485) to receive ‘supervisory’ commands.  Making the local nodes a bit smarter can enable nice things like protection at the module, easier monitoring of the panel behaviours, broken wire detection (practically guaranteed on such DIY projects) etc.

It would indeed be possible to run the main PWM control loop as software inside an STM32. That way, you mostly need to add voltage sensing (voltage dividers), current sensing (a Hall Effect sensor etc. is good, or you could use a shunt resistor and amplifier on the low side MOSFET) and gate driving.

The big upside of solar panels connected to a boost converter is that the solar panels are inherently current limiting, so if your controller locks up and leaves the bottom switch on, nothing goes bang.

For this power level, I suggest you consider synchronous rectification too.
 
The following users thanked this post: Wi_Zeus

Offline OwO

  • Super Contributor
  • ***
  • Posts: 1250
  • Country: cn
  • RF Engineer.
Yes, independent controllers per channel is a better approach. To actually do MPPT it suffices to just measure load current for each channel, even if the channel outputs are ultimately paralleled. There is no need for communications between the MCUs.

Don't use a digitally controllable buck/boost converter because these all take feedback from the output side and will NOT be stable with a CC/CV source like a solar panel. The moment the load power demand exceeds what the solar panel can deliver at MPP, the input voltage will collapse rapidly as the buck/boost regulator attempts to maintain output voltage by drawing more current. You need a buck/boost system where the feedback loop attempts to maintain a "constant" input voltage, not output voltage. Then you can vary the input voltage setpoint (say by injecting current into the feedback node) and monitor output current to implement the MPPT algorithm.

I've just recently implemented a micro-mppt system using an ordinary sot26 buck IC and a stm32f0. I used a one-transistor circuit to invert the feedback polarity (necessary when you move the feedback from output side to input side), and simple pwm to generate a bias signal to control voltage setpoint. I used the stm32's built-in ADC to sense load current directly from the current sense resistor (current sense amplifier was omitted to reduce cost, and dithering was added to be able to sense currents <50mA).

Personally I would first try to get rid of the buck-boost requirement and design the system in a way that either Vin > Vout or Vin < Vout, not both. For this power level I would either use a purpose built solar buck controller (e.g. CN3791) or generate the PWM signals on the stm32 and use a bridge driver IC (e.g. NCP81151, but be careful about the logic level, I can give more details if needed) with MOSFETs.
« Last Edit: November 08, 2019, 06:28:10 am by OwO »
Email: OwOwOwOwO123@outlook.com
 
The following users thanked this post: Wi_Zeus

Offline OwO

  • Super Contributor
  • ***
  • Posts: 1250
  • Country: cn
  • RF Engineer.
Here are the schematics for the micro mppt controller:

There are a few minor errata so don't build from this schematic, but look at how the feedback is done.
« Last Edit: November 08, 2019, 06:42:05 am by OwO »
Email: OwOwOwOwO123@outlook.com
 

Offline Wi_ZeusTopic starter

  • Newbie
  • Posts: 7
  • Country: de

Wired-OR over a single long wire feels scary to me. A differentially-based single-line protocol like CAN or half-duplex RS-485 would be a little easier to isolate and to wire, and allow for a longer, more robust bus at more comfortable bit-rates. CAN's multi-master broadcast-centric design is especially suited to the use case of a virtual wiring harness, and, it's made in Germany :)
Yes, we already use the CAN bus quite extensively on other parts of the boat, it's pretty good for this application  :)

As a cost-reducing alternative to the LTC2992, see the ACS70331 giant-magnetoresistive current sensor and discrete ADCs such as MCP3424.
Would it be possible / good practice to parallel up two low-resistance current sense resistors and put a current-sense IC in series to one of them? This way the max. current that can be measured could be doubled (at the expense of accuracy?). If I know the internal resistance of the sense chip and assume that both current sense resistors are perfectly identical I could even eliminate the small measurement error too. I got this idea a while back, when looking for suitable chips, since most cheap ones aren't rated for high enough currents.

I wouldn't too quickly dismiss the design direction of a microcontroller on each channel. STM32F0/F1 are cheap and can absorb much of the complexity of the analog and mixed chips you're using now, which might lower the channel cost by quite a lot. You could simply use the chip as a smart peripheral for periodically sending ADC values to the bus and accepting commands from the coordinator. Or you could go all the way to distributed computation and controlling the buck-boost switch(es) directly from a timer-counter, with the onboard op-amps detecting faults and instantly forcing the converter into a safe state. Or anywhere in between.
I too think that deploying an STM32 per mode would be good. The local processors can think about local things, and connect to a multi drop bus (CAN or RS485) to receive ‘supervisory’ commands.  Making the local nodes a bit smarter can enable nice things like protection at the module, easier monitoring of the panel behaviours, broken wire detection (practically guaranteed on such DIY projects) etc.

It would indeed be possible to run the main PWM control loop as software inside an STM32. That way, you mostly need to add voltage sensing (voltage dividers), current sensing (a Hall Effect sensor etc. is good, or you could use a shunt resistor and amplifier on the low side MOSFET) and gate driving.

The big upside of solar panels connected to a boost converter is that the solar panels are inherently current limiting, so if your controller locks up and leaves the bottom switch on, nothing goes bang.

For this power level, I suggest you consider synchronous rectification too.

I'm more and more convinced that this is the way to go. Thanks
« Last Edit: November 08, 2019, 11:25:15 am by Wi_Zeus »
 

Offline Wi_ZeusTopic starter

  • Newbie
  • Posts: 7
  • Country: de
Don't use a digitally controllable buck/boost converter because these all take feedback from the output side and will NOT be stable with a CC/CV source like a solar panel. The moment the load power demand exceeds what the solar panel can deliver at MPP, the input voltage will collapse rapidly as the buck/boost regulator attempts to maintain output voltage by drawing more current. You need a buck/boost system where the feedback loop attempts to maintain a "constant" input voltage, not output voltage.
Thanks, now that I'm considering this, it makes a lot of sense

I've just recently implemented a micro-mppt system using an ordinary sot26 buck IC and a stm32f0. I used a one-transistor circuit to invert the feedback polarity (necessary when you move the feedback from output side to input side), and simple pwm to generate a bias signal to control voltage setpoint. I used the stm32's built-in ADC to sense load current directly from the current sense resistor (current sense amplifier was omitted to reduce cost, and dithering was added to be able to sense currents <50mA).
This approach only works with an existing converter IC, if I understand correctly? If I can find a suitable boost converter IC (because that is what we really need), I might look into this.
Could you point me towards resources explaining the use of dithering in this use-case?

Personally I would first try to get rid of the buck-boost requirement and design the system in a way that either Vin > Vout or Vin < Vout, not both. For this power level I would either use a purpose built solar buck controller (e.g. CN3791) or generate the PWM signals on the stm32 and use a bridge driver IC (e.g. NCP81151, but be careful about the logic level, I can give more details if needed) with MOSFETs.
Logic level meaning the control signals going to the gate driver IC or the actual limitations, as far as voltage goes, of the MOSFETs?
 

Offline jhpadjustable

  • Frequent Contributor
  • **
  • Posts: 295
  • Country: us
  • Salt 'n' pepper beard
Would it be possible / good practice to parallel up two low-resistance current sense resistors and put a current-sense IC in series to one of them? This way the max. current that can be measured could be doubled (at the expense of accuracy?). If I know the internal resistance of the sense chip and assume that both current sense resistors are perfectly identical I could even eliminate the small measurement error too. I got this idea a while back, when looking for suitable chips, since most cheap ones aren't rated for high enough currents.
I neglected the current requirement. Sorry! I just htookad another look at Digi-Key's current sensors section and found the ACS71240. Variants available that read up to ±45A bidirectional or 50A unidirectional, with analog output, <2mΩ shunt resistance, available in SOIC-8 or QFN-12, still under $2 each. 120kHz should be enough bandwidth, I think?

These magnetic current sensors aren't tightly controlled for shunt resistance. But, if you have two, you could connect them in parallel, read both (or more) and sum the results.
« Last Edit: November 08, 2019, 11:54:25 am by jhpadjustable »
"There are more things in heaven and earth, Arduino, than are dreamt of in your philosophy."
 

Offline Wi_ZeusTopic starter

  • Newbie
  • Posts: 7
  • Country: de
Would it be possible / good practice to parallel up two low-resistance current sense resistors and put a current-sense IC in series to one of them? This way the max. current that can be measured could be doubled (at the expense of accuracy?). If I know the internal resistance of the sense chip and assume that both current sense resistors are perfectly identical I could even eliminate the small measurement error too. I got this idea a while back, when looking for suitable chips, since most cheap ones aren't rated for high enough currents.
I neglected the current requirement. Sorry! I just htookad another look at Digi-Key's current sensors section and found the ACS71240. Variants available that read up to ±45A bidirectional or 50A unidirectional, with analog output, <2mΩ shunt resistance, available in SOIC-8 or QFN-12, still under $2 each. 120kHz should be enough bandwidth, I think?

These magnetic current sensors aren't tightly controlled for shunt resistance. But, if you have two, you could connect them in parallel, read both (or more) and sum the results.

Does the bandwidth matter in my use-case? I'm basically measuring DC, all be it changing, load dependent DC (AC ???). Does the switching regulator impact the measurement in a relevant way so that I need a higher bandwidth or would a lower one actually be better to filter out the switching spikes and give the average? Sorry for my many maybe uneducated questions, now after looking at the datasheet, it looks like the bandwidth refers to the output of the chip, meaning that it is updated at a frequency of 120kHz? I guess that it would be more than enough for a MPPT application but this might have to be determined through testing.
 

Offline jhpadjustable

  • Frequent Contributor
  • **
  • Posts: 295
  • Country: us
  • Salt 'n' pepper beard
Does the bandwidth matter in my use-case? I'm basically measuring DC, all be it changing, load dependent DC (AC ???). Does the switching regulator impact the measurement in a relevant way so that I need a higher bandwidth or would a lower one actually be better to filter out the switching spikes and give the average? Sorry for my many maybe uneducated questions, now after looking at the datasheet, it looks like the bandwidth refers to the output of the chip, meaning that it is updated at a frequency of 120kHz? I guess that it would be more than enough for a MPPT application but this might have to be determined through testing.
It's analog, therefore continuous-time. So the sensor only becomes less sensitive at 120kHz (the -3dB frequency), see top graph on p15. That is, the 120kHz ac component of the input current will only appear 70.7% as large as a 5kHz ac component of the same magnitude. The dc component will still be sensed and reported faithfully.

But I don't think any of that matters for your use case. That ACS71240 is just fine for slow-moving signals. In case noise from the switching converter turns out to be a problem, just add a little RC low-pass filter at the ADC to attenuate it.
"There are more things in heaven and earth, Arduino, than are dreamt of in your philosophy."
 

Offline OwO

  • Super Contributor
  • ***
  • Posts: 1250
  • Country: cn
  • RF Engineer.
This approach only works with an existing converter IC, if I understand correctly? If I can find a suitable boost converter IC (because that is what we really need), I might look into this.
Could you point me towards resources explaining the use of dithering in this use-case?
It is preferable to use a buck IC that supports input voltage feedback because otherwise you will need a feedback inverter circuit, which has to be carefully designed to give the correct voltage setpoint range and also not affect loop stability (it should have a gain of 1 and not too much delay). There are off the shelf "MPPT" charger ICs like the CN3722 or CN3791 which already have the feedback polarity reversed and can take feedback directly from the input. Note that these are NOT true MPPT controllers - they use a fixed voltage setpoint which has to be adjusted to the panel you are using. However all it takes is a MCU adjusting the feedback bias (the same way as in the micro mppt schematic I showed) to add true MPPT.

Another approach is to implement the buck controller in the MCU. You would use a PWM output to drive a half bridge driver (ncp81151) which then drives MOSFETs. Normally I wouldn't recommend this approach because it's very difficult to implement a current mode controller (you need cycle by cycle current limiting, which requires very fast current sensing and ADCs, as well as careful software design to bound latency), but in this specific case (solar charging) you don't need to implement a current mode controller and duty cycle mode may be sufficient (solar panel is itself current limiting in the event of faults, but you need to assess whether the stored energy in the capacitors is enough to do damage).

Either way you probably want synchronous buck for the best efficiency, which means a 2-MOSFET half bridge. However it is dangerous to simply drive the bridge on or off because you could short the output to ground which might be a battery. You need to use a bridge driver with diode emulation mode. If you read the ncp81151 datasheet carefully you will see the control logic level is 5V, but there is a mid-state where the chip enters diode emulation mode. Therefore you most likely want to toggle the control pin between 2.5V and 5V (and never 0V). I would probably design some capacitor coupled circuit with diode to drive the ncp81151 that will fail safe in the event the MCU locks up.
Email: OwOwOwOwO123@outlook.com
 

Offline Wi_ZeusTopic starter

  • Newbie
  • Posts: 7
  • Country: de
This approach only works with an existing converter IC, if I understand correctly? If I can find a suitable boost converter IC (because that is what we really need), I might look into this.
Could you point me towards resources explaining the use of dithering in this use-case?
It is preferable to use a buck IC that supports input voltage feedback because otherwise you will need a feedback inverter circuit, which has to be carefully designed to give the correct voltage setpoint range and also not affect loop stability (it should have a gain of 1 and not too much delay). There are off the shelf "MPPT" charger ICs like the CN3722 or CN3791 which already have the feedback polarity reversed and can take feedback directly from the input. Note that these are NOT true MPPT controllers - they use a fixed voltage setpoint which has to be adjusted to the panel you are using. However all it takes is a MCU adjusting the feedback bias (the same way as in the micro mppt schematic I showed) to add true MPPT.

Another approach is to implement the buck controller in the MCU. You would use a PWM output to drive a half bridge driver (ncp81151) which then drives MOSFETs. Normally I wouldn't recommend this approach because it's very difficult to implement a current mode controller (you need cycle by cycle current limiting, which requires very fast current sensing and ADCs, as well as careful software design to bound latency), but in this specific case (solar charging) you don't need to implement a current mode controller and duty cycle mode may be sufficient (solar panel is itself current limiting in the event of faults, but you need to assess whether the stored energy in the capacitors is enough to do damage).

Either way you probably want synchronous buck for the best efficiency, which means a 2-MOSFET half bridge. However it is dangerous to simply drive the bridge on or off because you could short the output to ground which might be a battery. You need to use a bridge driver with diode emulation mode. If you read the ncp81151 datasheet carefully you will see the control logic level is 5V, but there is a mid-state where the chip enters diode emulation mode. Therefore you most likely want to toggle the control pin between 2.5V and 5V (and never 0V). I would probably design some capacitor coupled circuit with diode to drive the ncp81151 that will fail safe in the event the MCU locks up.

Thanks for the elaborate explanation but I need a boost converter ;)
 

Offline OwO

  • Super Contributor
  • ***
  • Posts: 1250
  • Country: cn
  • RF Engineer.
Same principles apply, but boost is much harder if you want to do synchronous. I haven't found any bridge driver ICs that can do diode emulation on the top MOSFET. If the output is minimum 26V then a schottky diode won't be too bad.
Email: OwOwOwOwO123@outlook.com
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf