Maker Pro
Maker Pro

Microcontroller to control PWM IC

eem2am

Aug 3, 2009
429
Joined
Aug 3, 2009
Messages
429
Hello,

I wish to use the UC3843 current mode controller to drive a SEPIC LED Driver.

Do you know how I can use a microcontroller to adjust the duty cycle of the UC3843?

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

So far, I have this idea……but it does not work.
-It’s basically using an op-amp to draw current out of the UC3843 ‘COMP pin.
(LT1243 is very similar to UC3843)

Microcontroller applying DC level to OP-Amp input which then varies the duty cycle of UC3843
http://i49.tinypic.com/2dj6ohs.jpg

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

I know that the UC3843’s duty cycle can be adjusted by varying the amount of current drawn out of its ‘COMP’ pin.

COMP pin of UC3843 ---with current source
http://i47.tinypic.com/106lrmr.jpg

UC3843 DATASHEET:
http://www.datasheetcatalog.org/datasheet/fairchild/UC3842.pdf

Block Diagram of UC3843
http://i45.tinypic.com/2qa20p5.jpg


…….You see, there are various LED loads, of different voltages, and its just impossible to get a feedback compensation network which suits all loads……especially since I have extremes of duty cycle, both very high and very low.

Therefore , I wish to use the UC3843 as a “controllable FET driver”, and control its duty cycle by using a microcontroller to apply a control voltage (in some way) to the “COMP” pin , such that I can control the UC3843’s duty cycle with the microcontroller.

I can easily get a variable DC control voltage from a microcontroller by PWM’ing an RC network with variable duty cycle, depending on the DC level required.

I will measure the LED current using the microcontrollers ADC to read the voltage across a current sense resistor….and then use the microcontroller to increment/decrement the UC3843’s duty cycle to suit

So:
Do you know how I can use a microcontroller to adjust the duty cycle of the UC3843?

(I appreciate that some other circuitry may also be required)
 

Mitchekj

Jan 24, 2010
288
Joined
Jan 24, 2010
Messages
288
Hmm...

Generally with the 384X duty cycle is controlled via the FB and Isense pins. The COMP pin is the output of the error amplifier that you would connect a compensation network to. Above ~50% duty cycle, this compensation network becomes more important. As you have it drawn, it looks like you're trying to bypass the internal error amplifier and have replaced it with your own. Try using the FB pin with your microcontroller output? The Isense pin should be measuring the current through your inductor, in order to accurately terminate the switching cycle (this is where the current mode control comes from.)

Also, I'm not grasping the zener on the Vcc pin... I wager you mean to use it to limit the voltage on the Vcc pin? I'm not sure that would work so hot as drawn.

I get that you're trying to regulate over a very wide range of line and load conditions... bad news is that the UC384X family is horrible when it comes to control, and it's slower than molasses when trying to do it. It's an ancient chip, the first real current-mode controller, and suffers from severe shortcomings as such. There are many controller ICs out on the market which can do a much better job as a SEPIC controller, and would probably be in the same price range. (I'm assuming you want to use the 384X since they're dirt cheap.)

Nice idea, I just don't know how feasible it would be without adding much more complexity, (read cost,) thus defeating the purpose.
 

blocka

Jul 7, 2010
18
Joined
Jul 7, 2010
Messages
18
I have done similar to be able to set a power supply voltage either using pwm or dac output from PIC.

You are on the right track but need to make some changes.
1) U2 opamp output needs to go to FB pin. You then need feedback components between FB and COMP. I would actually still connect the output of the power supply to FB pin aswell so you set the dc voltage by the PIC output but the PWM chip can still regulate noise on your power supply.

2) The gain of you amplifier is probably too big. I had a gain of 1. It doesnt take that much to change the output voltage. The gain of 100 going to be hard to control.

3) I would make the amplifier inverting otherwise your transfer function from PIC to Vout is going to inverted, ie need to decrease PIC out to increase Vout which is a little annoying.
 
Top