Author Topic: MCU control of smps  (Read 8739 times)

0 Members and 1 Guest are viewing this topic.

Offline Jeroen3Topic starter

  • Super Contributor
  • ***
  • Posts: 4381
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
MCU control of smps
« on: October 26, 2014, 08:20:09 pm »
First I must confess I'm not that familiar with power supply design (mostly using Recom and LDO's). That's why this design is a challenge.

Basically I'm looking for a way to create a variable voltage (or current?) using a switch-mode power supply.
The goal is to dim (over USB of course) multiple strips of 12V LED's up to 2 Amps. Without linear mosfets or direct PWM outputs.
As the first is easy, it has obvious drawbacks for small enclosures. The latter however, has less obvious drawbacks:
- Flickering, LED's are made to be fed DC, not AC.
- EMI, running high current PWM over long distance emits all kinds of trouble. Right now I have direct pwm output, and I can "hear" the pwm since the LED's are next to my speakers.

Currently my search for capable buck converters isn't successful. Some offer "tracking" options, yet this is designed for ramp-up usage, not for continuous usage.
Most of them use a feedback using a resistor divider. Which you can offset using an opamp. But you risk destabilizing it's control loop.
Some offer current limiting capabilities using a current output (to which you attach a resistor), you might be able to use a current mirror to control this.

I was initially looking for a smps with some kind of analog (0 to Vcc) or pwm input. Maybe a digital protocol.
Those seem to be limited to low voltage CPU and GPU power applications.

Does someone know of any chip or design related? Or a better approach?

Sidenote, the goal is to fit three channels into a 35x50x13mm pcb area. As it's looking now I'm in need of some huge inductors, and I'm not sure if it's going to fit.
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 29461
  • Country: nl
    • NCT Developments
Re: MCU control of smps
« Reply #1 on: October 26, 2014, 08:55:12 pm »
There are boost converters for LED drivers which have a current control pin. That is one solution.
Another solution is to use a buck converter and feed the error amplifier summing point with an offset voltage through a resistor. You can even use a (filtered) PWM output.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline Mad ID

  • Regular Contributor
  • *
  • Posts: 167
  • Country: 00
Re: MCU control of smps
« Reply #2 on: October 26, 2014, 11:09:48 pm »
You are wrong, simply add a third resistor in the middle of the feedback resistors and drive it with a buffer. The buffer buffers an RC filtered PWM and you can regulate the output voltage. I've done that multiple times and it's standard practice.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: MCU control of smps
« Reply #3 on: October 26, 2014, 11:11:46 pm »
Quote
Does someone know of any chip or design related?

Depending on how you want to get the mcu involved.

The simplest would be for the actual dc/dc conversion to be done by a separate module. That module will likely need to have a feedback from its output (either voltage or current). Your mcu can influence that feedback point, thus exercising control over the output. This can be done via either open loop or close loop (for the mcu).

A more involved approach would consist of a pwm generator from the mcu, its duty cycle influenced by your desired output and the converter's output (voltage or current).

This approach can be very computationally extensive if you need high dynamic performance + stability over a large range of output. It is unlikely you need that here.
================================
https://dannyelectronics.wordpress.com/
 

Offline Jeroen3Topic starter

  • Super Contributor
  • ***
  • Posts: 4381
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: MCU control of smps
« Reply #4 on: October 27, 2014, 09:05:10 am »
You are wrong, simply add a third resistor in the middle of the feedback resistors and drive it with a buffer. The buffer buffers an RC filtered PWM and you can regulate the output voltage. I've done that multiple times and it's standard practice.
I like that idea. That's doable using some small internal switch smps ic.
If you offset the feedback voltage a few millivolts positive, the regulator will output a lower voltage. Without compromising the feedback bandwidth a lot.
When indeed as easy as biasing the resistor divider in the middle, this will surely be the best solution.
I'll have to make a test design for this. Any recommendation on what IC to use?

An TL494, as inside my lab power supply, is a huge component for my small target area.

Current control isn't really achievable since there is no knowlegde of the connected load. Dimming would be only effective in the first few % of total load when 10 cm strip is connected instead of 5 meter.
 

Offline Mad ID

  • Regular Contributor
  • *
  • Posts: 167
  • Country: 00
Re: MCU control of smps
« Reply #5 on: October 27, 2014, 09:11:49 am »
You are wrong, simply add a third resistor in the middle of the feedback resistors and drive it with a buffer. The buffer buffers an RC filtered PWM and you can regulate the output voltage. I've done that multiple times and it's standard practice.
I like that idea. That's doable using some small internal switch smps ic.
If you offset the feedback voltage a few millivolts positive, the regulator will output a lower voltage. Without compromising the feedback bandwidth a lot.
When indeed as easy as biasing the resistor divider in the middle, this will surely be the best solution.
I'll have to make a test design for this. Any recommendation on what IC to use?

An TL494, as inside my lab power supply, is a huge component for my small target area.

Current control isn't really achievable since there is no knowlegde of the connected load. Dimming would be only effective in the first few % of total load when 10 cm strip is connected instead of 5 meter.

I don't have any particular SMPS IC to recommend you, but can say that this adjustment technique will probably work with any smps IC :)
Good luck.
 

Offline Jeroen3Topic starter

  • Super Contributor
  • ***
  • Posts: 4381
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: MCU control of smps
« Reply #6 on: October 27, 2014, 09:54:09 am »
One thing I don't know yet. What will happen when the output voltage == input voltage?
Does the coil survive DC? The idea is to feed 12 V, and reduce this when dimming.
 

Offline diyaudio

  • Frequent Contributor
  • **
  • !
  • Posts: 683
  • Country: za
Re: MCU control of smps
« Reply #7 on: October 27, 2014, 10:45:49 am »
You probably want something with the on board EA (Error Amp) output pinned out. One example is the UCC3843 any controller designed for isolated outputs will be similiar. This means though you would need to supply another opamp and use your micros DAC as the reference, that is what I do for flyback converters that I use for LED driving. A good canidate is the PIC16F708 OR 713 family everything on board you need.

One possible canidate off the top of my head is the TL494 two EA's and both inputs are pinned out, use one input for feedback and your DAC as the refrence on the other input. Without looking at data sheets thats the only one off the top of my head that looks like it may be configured to enable you to do what you want. You would have to look deeper into the chip, I haven't used it myself in years. Basically you want one that gives either access to the refrence or the EA output.


This is the path I would recommend as well. the TL494 can operate both as current and voltage mode. interfaced with simple 8-pin mico (of your choice) with a dac, the internal EA has fixed 2.5 reference and 3 points that imposes and controls duty cycle up to 99%, EA1, EA2 and a Dead Time control pin PIN-4 (I think)


vie been repairing car audio amplifiers for a while with this chip, its a rather jelly bean part for power electronics.





 

Offline Jeroen3Topic starter

  • Super Contributor
  • ***
  • Posts: 4381
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: MCU control of smps
« Reply #8 on: October 27, 2014, 07:31:58 pm »
I've just tested it with one of those highly affordable LM2596 boards. If I regulate the on board pot to Vout 12V, while Vin is 12V, it turns off. Which is good, no unnecessary switching.
When I inject current into the resistor divider, 0 to 2 mA in this case, I can regulate the Vout down from 12 to 5 volts.

Concluding that all I need is a pwm output to a filtered voltage follower (with diode?) to lower the output voltage of a SMPS IC.

Only one detail, Vout dropped 1 Volt of Vin. And now 12 Watts of power is dissipating into the coil or the internal switch.
I don't want that!
 

Offline miceuz

  • Frequent Contributor
  • **
  • Posts: 387
  • Country: lt
    • chirp - a soil moisture meter / plant watering alarm
Re: MCU control of smps
« Reply #9 on: October 27, 2014, 08:00:27 pm »
I was able to hack a random chinese SMPS by removing a potentiometer that was there for fine-tuning and connecting PWM DAC from mcu instead of the wiper leg. Had to change one resistor in the SMPS feedback network to make it's output voltage to be in the range I need.

Offline Marco

  • Super Contributor
  • ***
  • Posts: 7528
  • Country: nl
Re: MCU control of smps
« Reply #10 on: October 27, 2014, 08:15:22 pm »
There are tons of synchronous buck converters on alixpress and ebay, if they are what they say they are this gets rid of another 0.3V drop (from the Schottky).
« Last Edit: October 27, 2014, 08:17:14 pm by Marco »
 

Offline Jeroen3Topic starter

  • Super Contributor
  • ***
  • Posts: 4381
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: MCU control of smps
« Reply #11 on: October 28, 2014, 08:06:44 am »
The LM2596 doesn't go 1005 duty cycle when feedback isn't grounded.
One of the little * in the specsheet:
Feedback pin removed from output and connected to 0V to force the output transistor switch ON

That why it generating drop. The TPS54340 seems more suitable for the job.
 

Offline Jeroen3Topic starter

  • Super Contributor
  • ***
  • Posts: 4381
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: MCU control of smps
« Reply #12 on: November 15, 2014, 11:53:52 pm »
I got to play around with some AOZ1037's on a little demo board I made. They can really regulate when Vin==Vout.
And, when injecting current into R2 of the feedback diodes I'm able to lower the output voltage.

My calculations for coil & caps are currently wrong, since there are massive instabilities and voltage ripple when I load the supply.
The given calculations spit out 12uF for input and 20uF for output... Even with 100 uF tantalum and 220uF electrolytic the input current ripple is problematic.
The output has 100 mV ripple (no load) using the same set of caps, but this increases to 2 Volts when I load 1 Amps, after that it gives up and turns off.
An application note suggested 2x22 uF ceramic, but that is an ideal part, expensive and weird shaped (stacked mlcc's).

Guess I'd need to play around a bit more with this.

Update:
I've put on 27 uH with an Isat of 5Amps, output is very stable <10mV. Apart from some oscillation points of 100 mV on specific load values.
The control mechanism doesn't work at all, the regulator becomes very unstable and even short-circuits the inputs for some reason.
Guess I need to think of some fancy amplifier circuit to make feedback adjustable with a pwm/dac signal.
« Last Edit: November 17, 2014, 06:13:04 pm by Jeroen3 »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf