Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

UC3842 PWM controlwith microcontroller control of duty cycle

Status
Not open for further replies.

eem2am

Banned
Advanced Member level 4
Joined
Jun 22, 2008
Messages
1,179
Helped
37
Reputation
74
Reaction score
24
Trophy points
1,318
Activity points
0
Hello,

I wish to use the UC3842 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 UC3842?

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

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

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

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

Block Diagram of UC3842
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 UC3842 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 UC3842’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 UC3842’s duty cycle to suit


So

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

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

Hi,
If you see the block diagram, you can see that you can control the duty cycle through the VFb pin as well, as this connects the error amp to the COMP pin.
The "+" pin of the error amp is connected internally to 2.5v.
So applying a voltage greater than 2.5v to the "-" pin causes the output to go low, thus causing duty cycle to increase, and vice versa.

Hope this helps.
Tahmid.
 
  • Like
Reactions: lklkmn

    lklkmn

    Points: 2
    Helpful Answer Positive Rating
HI,

unfortunately, the amount of duty cycle variation, for a tiny variation in Vfb volts, is too great, and i cannot make such tiny, accurate adjustments to a control voltage.
 

Re: UC3842 PWM controlwith microcontroller control of duty c

Do you want a PWM with defined duty cycle or an adjustable peak current?

In the first case, you won't use a 3842 normally, because it hasn't a ramp generator but defines the duty cycle indirectly by setting a peak current. Of course you can design a modified 3842 circuit that implements a ramp generator, but you may want to use a standard voltage mode controller instead.

A controllable duty cycle can be generated by a uC alternatively.
 

FvM:
Thankyou for replying.

I cannot use a microcontroller to generate PWM , as it cannot be ruled out, that sometime in the products life-time, a PWM pin will stick high and keep a FET on too long annd blow it up...the watchdog is not quick enough to catch this.


"Do you want a PWM with defined duty cycle or an adjustable peak current? "

.....i want both.

I have LED loads of :-

3.5V @ 500mA
23V @ 210mA
23V @ 21mA

(at different times, a different LED load will be connected -one at a time)

My V(in) could be a 2 series NiMH (2.1V to 3.2V)
or a 4 series cell NiMH (4.2V to 6.4V)
or 30V.

"you may want to use a standard voltage mode controller instead. "

...unfortunately, standard voltage mode controllers are far too expensive......UC3843 is about the cheapest PWM chip in the world....
-and you are correct, i have added a ramp generator as follows....(Q1)

https://i49.tinypic.com/2dj6ohs.jpg

---------------------
Anyway......
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
https://i49.tinypic.com/2dj6ohs.jpg
 

Hi,
You can work around the "stick" problem. When you turn the PWM timer off, before doing so, set duty cycle at 0 and wait for a few timer overflows and then turn timer off. This prevents the "stick" problem. I've used this to get around the problem when I used PWM with ATMEGA.

Hope this helps.
Tahmid.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top