Questions: MPPT Controller Design / Dig. controllable BuckBoost Converter 60V 5A - Page 1
Forum section: electronics / projects

author: Wi_Zeus
author_rank: Newbie
timestamp: November 07, 2019, 05:25:45 pm
content: 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.jpgEach 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<= Voutand 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 isolatedOutput: 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.OneSTM32monitors 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 onecommon(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 LTC2992https://www.mouser.de/datasheet/2/609/ltc2992-1504204.pdfto measure Vin, Iin, Voutand 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: LT8390https://www.analog.com/media/en/technical-documentation/data-sheets/8390fa.pdf]https://www.analog.com/media/en/technical-documentation/data-sheets/8390fa.pdf] https://www.analog.com/media/en/technical-documentation/data-sheets/8390fa.pdfQ: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.

author: jhpadjustable
author_rank: Frequent Contributor
timestamp: November 08, 2019, 05:03:03 am
content: 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 GermanyYou 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.

author: jbb
author_rank: Super Contributor
timestamp: November 08, 2019, 05:54:30 am
content: 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.

author: OwO
author_rank: Super Contributor
timestamp: November 08, 2019, 06:25:30 am
content: 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.

author: OwO
author_rank: Super Contributor
timestamp: November 08, 2019, 06:39:10 am
content: 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.

author: Wi_Zeus
author_rank: Newbie
timestamp: November 08, 2019, 11:23:37 am
content: Quote from: jhpadjustable on November 08, 2019, 05:03:03 amYes, we already use the CAN bus quite extensively on other parts of the boat, it's pretty good for this applicationQuote from: jhpadjustable on November 08, 2019, 05:03:03 amWould 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.Quote from: jhpadjustable on November 08, 2019, 05:03:03 amQuote from: jbb on November 08, 2019, 05:54:30 amI'm more and more convinced that this is the way to go. Thanks

author: Wi_Zeus
author_rank: Newbie
timestamp: November 08, 2019, 11:36:54 am
content: Quote from: OwO on November 08, 2019, 06:25:30 amThanks, now that I'm considering this, it makes a lot of senseQuote from: OwO on November 08, 2019, 06:25:30 amThis 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?Quote from: OwO on November 08, 2019, 06:25:30 amLogic level meaning the control signals going to the gate driver IC or the actual limitations, as far as voltage goes, of the MOSFETs?

author: jhpadjustable
author_rank: Frequent Contributor
timestamp: November 08, 2019, 11:51:48 am
content: Quote from: Wi_Zeus on November 08, 2019, 11:23:37 amI neglected the current requirement. Sorry! I just htookad another look atDigi-Key's current sensors sectionand 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.

author: Wi_Zeus
author_rank: Newbie
timestamp: November 08, 2019, 12:13:45 pm
content: Quote from: jhpadjustable on November 08, 2019, 11:51:48 amDoes 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.

author: jhpadjustable
author_rank: Frequent Contributor
timestamp: November 08, 2019, 01:20:44 pm
content: Quote from: Wi_Zeus on November 08, 2019, 12:13:45 pmIt's analog, therefore continuous-time. So the sensor only becomeslesssensitive 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.

author: OwO
author_rank: Super Contributor
timestamp: November 08, 2019, 02:11:58 pm
content: Quote from: Wi_Zeus on November 08, 2019, 11:36:54 amIt 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 withdiode 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.

author: Wi_Zeus
author_rank: Newbie
timestamp: November 08, 2019, 06:06:05 pm
content: Quote from: OwO on November 08, 2019, 02:11:58 pmThanks for the elaborate explanation but I need a boost converter

author: OwO
author_rank: Super Contributor
timestamp: November 09, 2019, 04:25:33 am
content: 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.