×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Controlling UC3843 duty cycle with microcontroller

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:
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)
 

RE: Controlling UC3843 duty cycle with microcontroller

Why don't you use something a bit more modern?
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

(OP)
the thing is......

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

(OP)
sorry i forgot to add that the 2.1V is the lower voltage of a 2 cell NiMH battery, which could sometimes be 4 cell...so battery voltage is anywhere from 2.1V to 6.4V.

(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

Nice with a bit more information.

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://www.onsemi.com/pub_link/Collateral/NCP5030-D.PDF


Benta.
 

RE: Controlling UC3843 duty cycle with microcontroller

(OP)
hello,

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

Could you please explain how the UC3843 is supposed to generate a Vref of 5 V with 2.1 V input voltage?
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

(OP)
HI,
-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

OK, more and more is coming to the surface...

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

(OP)
-as far as the control loop with the microcontroller is concerned, that does not bother us.......whichever LED load is connected will be a more or less constant load, with no load transients to worry about.

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

(OP)
regarding the digital pot idea....do you mean to do this to avoid using the 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

Why do I feel tired and somewhat sad?

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

Adjusting the DC is done by changing the DC level at the "COMP" point. However, as this is also the output of your error amp, these's no way you can do this with the UC3843. Sorry.

Benta.

RE: Controlling UC3843 duty cycle with microcontroller

(OP)
I can asure you that the method described is a genuine way of doing this..............

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

Just set the error amp gain to -1 and apply a voltage. Depending on the voltage you'll vary the duty cycle.
 

RE: Controlling UC3843 duty cycle with microcontroller

I'm wondering at the whole scenario here. If you have a microcontroller which has a duty cycle output, why do you need to go through a PWM IC?

RE: Controlling UC3843 duty cycle with microcontroller

(OP)
its partly because i need a fet gate driver and UC3843 is cheaper than fet gate drivers

-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"

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources