Controlling UC3843 duty cycle with microcontroller
Controlling UC3843 duty cycle with microcontroller
(OP)
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:
ht tp://www.d atasheetca talog.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)
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:
ht
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)





RE: Controlling UC3843 duty cycle with microcontroller
There are lots of switching regulators on the market laid out for constant-current output and optimised for LED-drive. Most of them have a separate PWM input for dimming, which you can drive directly from you MCU.
Start with Fairchild, Infineon, NXP, ON Semiconductors etc. etc.
Cheers,
Benta.
RE: Controlling UC3843 duty cycle with microcontroller
V(in) could be 2.1V, or V(in) at other times could be 30V
Also, the LED load could be 3.5V @ 500mA, or it could be 23V @ 210mA, or 23V @ 21mA.
-When V(in) = 2.1V, the load power is always less than 2.6W.
There are no cheap, off-the-shelf LED drivers which can handle this.
RE: Controlling UC3843 duty cycle with microcontroller
(as you can tell, V(in) is sometimes above, and sometimes below V(out), so SEPIC is best here)
RE: Controlling UC3843 duty cycle with microcontroller
Sepic, yes, but CuK and buck/boost are also possibilities, even flyback might be an option.
A quick search found this one, which does not do all what you want, but there are solutions out there.
http:
Benta.
RE: Controlling UC3843 duty cycle with microcontroller
The NCP5030 has a max V(in) of around 6V , so we could not use it
Cuk and Buck-boost converters both invert the V(out), so our current sensing would not be so easy.
Flyback would be nice, but too expensive, since it requires a "transformer", a custom wound component......the SEPIC inductors can be coupled but can also be two cheap parts separately.
The thing is , we need a way of varying the duty cycle of UC3843, "manually", so to speak.
RE: Controlling UC3843 duty cycle with microcontroller
And how do you get around the 8.5 V UVLO?
And what is the 10 V Zener doing in series with Vcc?
And...?
And...?
I have the feeling you once built something with this IC, and now it's a "fit for all" device (sort 555-like...)
Benta.
RE: Controlling UC3843 duty cycle with microcontroller
-there will be a separate , small 10V(out) SMPS which will supply the UC3843 (this small SMPS is a SEPIC and can produce 10V(out) from 2.1V(in) or 30V(in) etc)
The 10V zener is here as in that schematic the V(in) is 30V, above the maximum V(in) of UC3843.
-Well spotted though, as in our circuit, the Zener will not be there, and UC3843 will be directly supplied by the 10V supply.
We like UC3843 because it is far cheaper than most other PWM controllers.
RE: Controlling UC3843 duty cycle with microcontroller
To be honest, I don't like the circuit. You have one major problem that I don't see a way around: passing the current sense voltage through your MCU, closed loop response is completely unpredictable, and basically impossible to analyse.
My suggestion would be to manipulate the current sense feedback voltage, for example through a digital pot or an analog multiplexer/resistor combination network if you only have discrete current settings.
You can then control the pot or multiplexer digitally from the MCU to set the output current.
Benta.
RE: Controlling UC3843 duty cycle with microcontroller
So we will just measure the LED current with the microcontroller ADC, and increment/decrement the duty cycle as necessary.
The "read LED current and adjust duty cycle" operations will be only done once per second, so feedback loop oscillations won't affect us.
The problem is, we don't know how to adjust the duty cycle of the UC3843.
-we perhaps expect to generate a variable DC voltage from the PIC via PWM & RC filter....and somehow use this to vary the UC3843 duty cycle.
Does any reader know how to do this?
RE: Controlling UC3843 duty cycle with microcontroller
-i am afraid we can't do this, since for our range of loads and lines, it is not possible to get a single feedback compensation network that can give stability over all these conditions of line and load.
also, the amount of slope compensation needed at the highest duty cycle is ridiculously high....and the converter ends up virtually in voltage mode.
...so its much easier to just do it with the microcontroller as described.....particularly since although we have lots of different lines and loads..........at any given time, it will only have one fixed line and load......so the microcontroller and slow feedback loop will be fine
RE: Controlling UC3843 duty cycle with microcontroller
Gunnar Englund
www.gke.org
--------------------------------------
100 % recycled posting: Electrons, ideas, finger-tips have been used over and over again...
RE: Controlling UC3843 duty cycle with microcontroller
Benta.
RE: Controlling UC3843 duty cycle with microcontroller
http://i47.tinypic.com/106lrmr.jpg
the current source at the COMP pin will put a voltage across a resistor for example that is connected from COMP pin to ground.
....the COMP pin is used to hook up to an opto transistor collector for isolated flybacks for example, and the result is that the duty cycle is varied since the trip point for the PWM comparaotr is altered.
...so it is this behaviour that i am effectively looking to exploit.
that is, i am trying to adjust the duty cycle by varying and controlling the amount of current pulled out of the COMP pin
Unfortunatley, i am not sure of a god method to do this.
RE: Controlling UC3843 duty cycle with microcontroller
RE: Controlling UC3843 duty cycle with microcontroller
RE: Controlling UC3843 duty cycle with microcontroller
-but mainly because microcontollers have a failure mechanism where the PWM pin may stick high and keep the fet on..........obviously the watchdog would catch this but by then the fet would have blown.
-this failure mechanism is not common but to design robustly and avoid "stuck pin", we need the UC3843, which has an output which won't "stick high"