Author Topic: Power supply  (Read 5097 times)

0 Members and 2 Guests are viewing this topic.

Offline ZedyTopic starter

  • Contributor
  • Posts: 26
Power supply
« on: September 09, 2010, 05:26:15 pm »
hi all!
What do you think about adjustable power supply design, where MCP4921 (DAC, 12bit, with SPI)  is used to control voltage. (MCP4921 output goes to transistor network, that amplifiers voltage and current.) PIC microcontroller would be used as brains. (for feedback and DAC control).
All writes to the MCP4921 devices are 16-bit words.

Will it be able to adopt to the load fast enough?
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 18065
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Power supply
« Reply #1 on: September 09, 2010, 05:55:54 pm »
so your saying use an MCU as a SMPS controller ? generally they are not fast enough, we had a similar discussion on here a while ago. I think if you work it out and see how much resolution you get with your 16 bits and factor in that there will be a +/-1 bit error (so double the voltage of your min resolution) your looking at a lot of potential ripple. also to get the full resolution of the PMW output you will need to run the MCU at astronomical speeds or have very very poor regulation due to low resolution PWM output (with an already poor feedback circuit thats more trouble), if you used the MCU you would have a very low switch frequency even at just 256 bits of PWM (19.5 KHz on a 20 MHz low or midrange pic)

I've seen projects on the net where an MCU is used to make a basic constant current SMSP to drive a led but then the lead is not too fussy.
Essentially the feedback loop of a SMPS is a comparator with a hysteresis (RC network) so if you want to "do it yourself" use a comparator
« Last Edit: September 09, 2010, 05:59:16 pm by Simon »
 

Offline ZedyTopic starter

  • Contributor
  • Posts: 26
Re: Power supply
« Reply #2 on: September 09, 2010, 06:18:12 pm »
so your saying use an MCU as a SMPS controller ?
Not, it would be a Linear adjustable power supply, not a SMPS, I use just DAC, not a PWM.

But I think I get it, it would be too slow anyway :), thanks
« Last Edit: September 09, 2010, 06:21:14 pm by Zedy »
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 18065
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Power supply
« Reply #3 on: September 09, 2010, 06:39:24 pm »
well to do that you need some sort of analogue output, on MCU's this is often done by using PWM and a suitable output low pass filter to render the pulse width value into a an analogue voltage, but then your back to square one, poor resolution of the DAC and poor resolution and respond of the PWM output.

Anyway, why do you want to use an MCU in a linear regulator ? it's a very simple circuit in principle that needs no MCU to do it as descretes.
 

Offline ZedyTopic starter

  • Contributor
  • Posts: 26
Re: Power supply
« Reply #4 on: September 09, 2010, 08:13:02 pm »
well to do that you need some sort of analogue output, on MCU's this is often done by using PWM and a suitable output low pass filter to render the pulse width value into a an analogue voltage, but then your back to square one, poor resolution of the DAC and poor resolution and respond of the PWM output.

Anyway, why do you want to use an MCU in a linear regulator ? it's a very simple circuit in principle that needs no MCU to do it as descretes.

I am using MCU to control LCD(it shows voltage and current), and thought, maybe there is some good way to control voltage by MCU, to get extra funcioanlity. Like set up maximum current or turn off power, when circuit is shortened.
« Last Edit: September 09, 2010, 08:15:15 pm by Zedy »
 

alm

  • Guest
Re: Power supply
« Reply #5 on: September 09, 2010, 08:50:19 pm »
Not sure about the sample rate of the ADC/DAC, but my guess it that in won't be fast enough for good transient response. Even an ancient opamp like an LM324 has a bandwidth of 1MHz at unity gain.
 

Offline scrat

  • Frequent Contributor
  • **
  • Posts: 608
  • Country: it
Re: Power supply
« Reply #6 on: September 10, 2010, 09:50:19 am »
I'm of the same thought of alm, I don't think putting the ADC-MCU-DAC cascade directly in the control chain would be a good idea. On the contrary, if you use them to provide reference for your linear regulator, that of course works. For example, some colleagues here in the lab use a PIC as the "brain" in little SMPS for photovoltaic applications. In the FW they implement maximum power tracking (MPPT) and battery/supercap managing, but PIC outputs (PWM then filtered) are given as reference to external switching regulators (usually as current ref).
One machine can do the work of fifty ordinary men. No machine can do the work of one extraordinary man. - Elbert Hubbard
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 18065
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Power supply
« Reply #7 on: September 10, 2010, 11:50:28 am »
yes an MCU cancontrol the reference voltage of an SMPS and so control it but control it's setting not actually be the SMPS controller
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19998
  • Country: gb
  • 0999
Re: Power supply
« Reply #8 on: September 10, 2010, 12:20:03 pm »
Yes, it's an analogue application, PICs are digital not analogue, of course there are ADCs and DACs but they're slow and performing signal processing is even slower.

I agree, use a controller and interface it with the PIC via an ADC/DAC.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf