Author Topic: Is there a way to control buck converter IC with MCU?  (Read 1471 times)

0 Members and 1 Guest are viewing this topic.

Offline 2strokeforeverTopic starter

  • Contributor
  • Posts: 15
  • Country: ca
Is there a way to control buck converter IC with MCU?
« on: January 18, 2024, 10:05:59 pm »
I am looking for a faster way to control output voltage for a buck converter. This buck converter has its own fet driver and I am not willing to change it. I really only need the signal to run the gate driver.

A little about the project

60 khz

0-100 percent duty cycle

voltage mode control

current limiting, would be nice, but not necessary. I do have an ACS758 sensor on board if that the MCU will be attached to so its not a big deal to do it that way. It dosent hurt my FET is way overkill and I have desat protection.

350-600 volt input, about 0-350v output 30 amps

How should I go about this?

Ideally I want my MCU to set the target voltage (0-5V) and have something like a TL494 take that voltage as its setpoint/target voltage and do all the work to maintain that setpoint. I have been wildly unsuccessful at finding such a chip. everything seems to generate its own internal reference.
If possible I want to stick with analog since its much easier and more versatile, but if I have no other option I could go with I2C.

Right now I am using the arduino to measure voltage and set duty cycle. the loop runs at about 10 khz, it works great for dumping excess electricity into a heating element, but when summer rolls around I want to be putting that power into the DC bus of the VFD drive that runs my air conditioning and I want something much faster to be able to not dip or overshoot during rapidly changing current draws.

Any help appreciated
 

Online Andy Chee

  • Frequent Contributor
  • **
  • Posts: 783
  • Country: au
Re: Is there a way to control buck converter IC with MCU?
« Reply #1 on: January 18, 2024, 10:17:24 pm »
How should I go about this?

Ideally I want my MCU to set the target voltage (0-5V) and have something like a TL494 take that voltage as its setpoint/target voltage and do all the work to maintain that setpoint.
Connect the TL494 voltage reference to your MCU's DAC.

Then feed that DAC analog voltage into the TL494 error amplifier.
« Last Edit: January 18, 2024, 10:19:32 pm by Andy Chee »
 
The following users thanked this post: Psi

Offline PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 1682
  • Country: au
Re: Is there a way to control buck converter IC with MCU?
« Reply #2 on: January 18, 2024, 10:23:55 pm »
Ideally I want my MCU to set the target voltage (0-5V) and have something like a TL494 take that voltage as its setpoint/target voltage and do all the work to maintain that setpoint. I have been wildly unsuccessful at finding such a chip. everything seems to generate its own internal reference.
You can treat the internal reference as an offset ground, so if you really need the output to go to 0V, just add another voltage reference (say 2x) the internal one, and inject an precise offset current.


 

Offline jbb

  • Super Contributor
  • ***
  • Posts: 1188
  • Country: nz
Re: Is there a way to control buck converter IC with MCU?
« Reply #3 on: January 19, 2024, 01:12:34 am »
Now that's a buck converter :).  I hope you can get it working to inject power into your aircon.

Please forgive me poking my nose in, but I'm not sure I could see balancing or bleed resistors on those DC link capacitors.  You want to be really confident that these are attached or you can end up with a live capacitor waiting to shock you...

On the control front, I have a couple of suggestions:
  • See if you can find an isolated communications / programming cable so that if the converter blows up it won't wreck your computer too
  • I thoroughly recommend some output over voltage protection (e.g. a voltage divider & comparator)
  • I recommend moving to a current mode control scheme.  You can use a current mode control chip to do the fast control of the 60 kHz switching; this will try to make the inductor current match a reference signal.  You can then use a microcontroller to control the output voltage at a slower rate
  • These days there are microcontrollers around which can do very fast current control loops (e.g. TI 'Piccolo' series), but you'll need to do more software for that
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16899
  • Country: us
  • DavidH
Re: Is there a way to control buck converter IC with MCU?
« Reply #4 on: January 19, 2024, 01:14:21 am »
Connect the TL494 voltage reference to your MCU's DAC.

Then feed that DAC analog voltage into the TL494 error amplifier.

That is what I would do, unless the DAC already has a better reference.  Switching regulator controllers that have separate references and error amplifiers are not difficult to find.

The TL494 also includes two error amplifiers and the second one is commonly used to implement current limiting.
 

Offline 2strokeforeverTopic starter

  • Contributor
  • Posts: 15
  • Country: ca
Re: Is there a way to control buck converter IC with MCU?
« Reply #5 on: January 19, 2024, 02:30:37 am »
Quote
thoroughly recommend some output over voltage protection (e.g. a voltage divider & comparator)

Already have that for voltage and current, either one goes too high and it charges an RC timer which pulls the gate driver low, enables the gate driver fault, activates 50watt dump load (voltage only), and pulls the MCU voltage feedback pin high to keep the code from winding up.

I guess another option would be to rely on this more heavily and also implement one that if the voltage sags too low it adds more duty?


Quote
That is what I would do, unless the DAC already has a better reference.  Switching regulator controllers that have separate references and error amplifiers are not difficult to find.

The TL494 also includes two error amplifiers and the second one is commonly used to implement current limiting.

Would the TL494 be the best and simplest solution for what I am trying to do?
Once I can commit to using a certain IC I can spend the many hours it will take me to understand it, my issue is I cant commit without understanding, but cant commit to one unless I know its a reasonably good choice.
If you guys can verify what I should use I can go full speed ahead.

Any chance you can point to an example schematic?
 

Offline 2strokeforeverTopic starter

  • Contributor
  • Posts: 15
  • Country: ca
Re: Is there a way to control buck converter IC with MCU?
« Reply #6 on: January 19, 2024, 02:36:57 am »
Doing some more digging and it seems like MC34063 could be good if it would end up doing what I need.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16899
  • Country: us
  • DavidH
Re: Is there a way to control buck converter IC with MCU?
« Reply #7 on: January 19, 2024, 11:41:45 am »
Doing some more digging and it seems like MC34063 could be good if it would end up doing what I need.

Are you trying to summon the wrath of T3sl4?

Would the TL494 be the best and simplest solution for what I am trying to do?

A better solution would implement current-mode control, which the TL494 does not support.

I think Unitrode was really the expert at this sort of thing, but after Texas Instruments bought them, all of their nice selection guides were removed from public consumption.

Quote
Any chance you can point to an example schematic?

350-600 volt input, about 0-350v output 30 amps

No, not for that.

It looks to me like you need a really big synchronous buck converter.  A synchronous design will be required to maintain continuous conduction mode at low output voltages simplifying frequency compensation.  Variable output switching lab power supplies work this way.

Current mode control has advantages but also requires measuring the inductor current, which may be difficult with a 600 volt swing on the input and a 350 volt swing on the output.  Maybe someone else has a suggestion for how this is easily done with high voltages and DC.
 

Offline 2strokeforeverTopic starter

  • Contributor
  • Posts: 15
  • Country: ca
Re: Is there a way to control buck converter IC with MCU?
« Reply #8 on: January 19, 2024, 12:23:42 pm »
Quote
Current mode control has advantages but also requires measuring the inductor current, which may be difficult with a 600 volt swing on the input and a 350 volt swing on the output

Yep, oscilloscope does the chicken near it, good news is I can measure the fet turn on just by putting the probe near it.
 

Offline johansen

  • Super Contributor
  • ***
  • Posts: 1076
Re: Is there a way to control buck converter IC with MCU?
« Reply #9 on: January 19, 2024, 05:54:30 pm »
You can simulate the inductor current with a capacitor and a switch and a resistor.

The capacitor's voltage gets reset to the current flowing through the low side mosfet. You can use the on resistance of the mosfet for the resistor.

The lm5119 does this iirc.
 

Offline 2strokeforeverTopic starter

  • Contributor
  • Posts: 15
  • Country: ca
Re: Is there a way to control buck converter IC with MCU?
« Reply #10 on: January 20, 2024, 06:33:22 am »
For the next guy with this problem the chip you want is a TL5002...
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16899
  • Country: us
  • DavidH
Re: Is there a way to control buck converter IC with MCU?
« Reply #11 on: January 20, 2024, 01:44:37 pm »
For the next guy with this problem the chip you want is a TL5002...

The TL494 at least has a second error amplifier to support current limiting.

Do not forget that you likely need a half-bridge driver IC to handle the pair of output transistors like an NCP1392.  In the past a pulse transformer would have been used for this providing isolation and the level shift.

I did not find any current mode controller chips for this application, unless you count those TI models that fake it.  They all rely on sensing the inductor current at low or ground potential, or sensing through a transformer which requires AC current.  Designing a high voltage synchronous buck converter which avoids this limitation would be fun.
« Last Edit: January 20, 2024, 02:29:40 pm by David Hess »
 

Offline dobsonr741

  • Frequent Contributor
  • **
  • Posts: 688
  • Country: us
Re: Is there a way to control buck converter IC with MCU?
« Reply #12 on: January 20, 2024, 05:07:18 pm »
At that power, a simple buck controller, like TL494 will not be safe. Will need to deal with startup, overload conditions, loop instability, while you want stable operation for a very wide output range. Any professional solution in this category would be digital control loop this day and age, so that your parameters can change with the output voltage and safely handle failures.

Take a look at the software tools TI offers, so that you don't need to write software: https://www.ti.com/tool/FUSION-DIGITAL-POWER-STUDIO?keyMatch=DIGITAL%20POWER
« Last Edit: January 20, 2024, 05:40:17 pm by dobsonr741 »
 

Offline johansen

  • Super Contributor
  • ***
  • Posts: 1076
Re: Is there a way to control buck converter IC with MCU?
« Reply #13 on: January 20, 2024, 05:49:44 pm »

I did not find any current mode controller chips for this application, unless you count those TI models that fake it.  They all rely on sensing the inductor current at low or ground potential, or sensing through a transformer which requires AC current.  Designing a high voltage synchronous buck converter which avoids this limitation would be fun.

Read the datasheet on thr lm5119.

If you had to, you can copy the internal schematic of its low side current sense plus RC current simulation, and add it to your tl494 voltage control loop such that you can have both a voltage control loop plus cycle by cycle current limiting
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16899
  • Country: us
  • DavidH
Re: Is there a way to control buck converter IC with MCU?
« Reply #14 on: January 20, 2024, 07:38:35 pm »
At that power, a simple buck controller, like TL494 will not be safe. Will need to deal with startup, overload conditions, loop instability, while you want stable operation for a very wide output range. Any professional solution in this category would be digital control loop this day and age, so that your parameters can change with the output voltage and safely handle failures.

I am not sure why more would be required.  The TL494 supports soft startup and current limiting, and the dual wired-or operational transconductance error amplifiers simply frequency compensation if you understand how to use transconductance outputs.  I doubt any safe design at this power level will be simple.

The TL494 would probably not be my first choice either if I did an exhaustive search of alternatives.  But what I would select would be very similar.

I would prefer to use current-mode control which includes cycle-by-cycle current limiting and better stability, however this is not straightforward on a high voltage buck converter.

I did not find any current mode controller chips for this application, unless you count those TI models that fake it.  They all rely on sensing the inductor current at low or ground potential, or sensing through a transformer which requires AC current.  Designing a high voltage synchronous buck converter which avoids this limitation would be fun.

Read the datasheet on thr lm5119.

If you had to, you can copy the internal schematic of its low side current sense plus RC current simulation, and add it to your tl494 voltage control loop such that you can have both a voltage control loop plus cycle by cycle current limiting

I understand how the LM5119 works and why, but I am dubious about relying on it, especially with TI's history of misleading datasheets and marketing claims.  To put it simply, I do not trust TI.

It looks to me like the LM5119 will severely underestimate the inductor current during the on-cycle when severe overload is present because it has no way to estimate saturation.  I also do not consider the difficulty of the inductor's current measurement to be unworkable, but merely challenging.
 

Offline johansen

  • Super Contributor
  • ***
  • Posts: 1076
Re: Is there a way to control buck converter IC with MCU?
« Reply #15 on: January 20, 2024, 08:45:53 pm »
The inductor should be able to handle one cycle of the output of the buck converter shorted, before so much current flows that your mosfets explode.

The current loop will then register an overload as soon as the low side fet turns on and the current is measured.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf