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.

Constant current control and AN1138

Status
Not open for further replies.

Molectric

Newbie level 6
Newbie level 6
Joined
Nov 3, 2012
Messages
14
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,417
Hi,
I need to control the output current of a flyback converter to be constant using the dsPIC33FJ64MC802. the converter is to drive a 20W high power LED. I am using a hall effect sensor (LEM, LTSR 6NP)for output current sensing. i want to maintain my output current to a constant value of 1A. i have checked the application note AN1138 from microchip, i think if the code used in the application note is properly modified it can suit my application.

I am willing to have a maximum tolerance of 10% on the output current.
As i have already mensioned i am using a flyback converter.

I am new to programming in c and using dspics. I need to someone who can modify the AN1138 code for me and explain it to me.

I am also to use the same dspic33 to control my power factor, if anyone knowns how to do so please help. This is urgent as my project is due next week Monday the 28th of January 2013.
 

Hi,
I need to control the output current of a flyback converter to be constant using the dsPIC33FJ64MC802. the converter is to drive a 20W high power LED. I am using a hall effect sensor (LEM, LTSR 6NP)for output current sensing. i want to maintain my output current to a constant value of 1A. i have checked the application note AN1138 from microchip, i think if the code used in the application note is properly modified it can suit my application.

I am willing to have a maximum tolerance of 10% on the output current.
As i have already mensioned i am using a flyback converter.

I am new to programming in c and using dspics. I need to someone who can modify the AN1138 code for me and explain it to me.

I am also to use the same dspic33 to control my power factor, if anyone knowns how to do so please help. This is urgent as my project is due next week Monday the 28th of January 2013.
Hi Molectric
A short answer :
You can easily use a hiccup current limiter and i think using a hall effect sensor is unnecessary here ! and of course it won't be required because a simple resistor can handle this aim .
Best Wishes
Goldsmith
 

hi, first all i don't know what a hiccup current limiter is. From the documents i have seen on this it looks like i will need an extra IC for such, if not so i dont have enough time figure out how it works. i am to use a dsPIC to control my output current.
 

hi, first all i don't know what a hiccup current limiter is. From the documents i have seen on this it looks like i will need an extra IC for such, if not so i dont have enough time figure out how it works. i am to use a dsPIC to control my output current.
Hi again
So you don't know what a hiccup current limiter is ! if so how you're going to design a PSU , without knowing basics of it ??! if you've a DSPIC , then it might has an ADC . right ? so via that ADC , you're able to take sample from current and then break the loop if the current has been exceeded from allowed value .

All the best
Goldsmith
 

PSU, power supply unit? i have a switch mode power supply that is working. it is a flyback converter. yes the dsPIC has an ADC and it working fine, i am able to read the voltages from the sensor out on the dsPIC's ADC buffer. yes i can take sample of the current. "....then break the loop if the current has been exceeded from allowed value"- I don't understand you here. what i need is the control algorithm (with either PI or PID cotrol or any siple control method) that is part of the main code which will suit my needs. As i have mentioned the code example on AN1138 has something similar. i just don't undertand in the application note how they control current.
Again please explain more on ".... break the loop if the current has been exceeded from allowed value"

Thank you for the replies.
 

on AN1138 has something similar. i just don't undertand in the application note how they control current.
Again please explain more on ".... break the loop if the current has been exceeded from allowed value"

Simplification : PWM is a square wave which it's duty cycle is variable . if when out put current became higher than your desired value if you turn off the PWM wave ( duty cycle being zero percent ) then current will become lower and then current is lower than your allowed value and then PWM will being on and current will be increased but this procedure will be as a chain hence average of current will be exactly in your desired range .
So when i tell you should break the loop it means you'll need something like and interrupt function which will do it's best when current has been increased .
Is that clear now ?

Good Luck
Goldsmith
 
Thank you it is clear, now the important question is how does one come up with such a fuction?
 

How do i automatically adjust my PWM signal to suit my output current needs?
According to what you said, if i am correct, when my output current is below setpoint(1A) my PWM signal should increase to bring it close to setpoint also when current is higher than setpoint PWM signal should decrease to bring back the current close to setpoint. I don't know how to do this using digital control (dsPIC), the question is do you know a way of doing so?
 

How do i automatically adjust my PWM signal to suit my output current needs?
Hi again
I think you've misunderstood something ! you shouldn't change the duty cycle to control the out put current ! you should just turn it off and turn it on pronto . duty cycle should be changed to have variable out put or perhaps fixed out put . but for current limiting procedure it must be off or on !
While you're going to limit the current it should be off and vice versa .
I don't know how to do this using digital control (dsPIC), the question is do you know a way of doing so?
Recall : as i've told you before , you can use interrupt function of your MCU and then affect what you're reading from ADC or perhaps a usual I/O pin in situation of input , ( 0 or 1 ) , when in your ADC you've voltage which is higher than your desired value , then interrupt should be worked in your program and then turn the PWM off . and vice versa .
i.e : you can do it without using ADC too . if you consider one of your I/O pins as input and then use a simple op amp then when op amp gives 3.3 volts ( for DSPIC ) it can sense that it's pin became 1 so it will do it's best to limit your current .

I hope you've got the idea as well .
Best Wishes + Good Luck
Goldsmith
 
Ok now I undestand what you are saying, l will go and try this and will come back to you after testing it.
Again thank you very much.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top