Click here to Skip to main content
15,903,030 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Good day to all,
Please i need your support on how to manually control the temperature of High Power Leds using PID controller. I have two GUIs,one reads the temperature from the Led while the second is used to ON/OFF the Leds and at the same time controls the Led brightness using slider control.The GUI that reads the temperature has a PID controller application on it.The output from this controller is what i want to use to increase or decrease the Led brightness which invariable changes the Led temperature.How to go about using this PID controller to control the Led brightness is what i have not been able to grasp well.The slider on the GUI is scaled from 0% to 100%.My thinking is that the output from the controller should be in percentage which will make me to adjust the slider accordingly.My question is that will this type of arrangment produce an output that will efficiently control the Led brightness.
If yes,i would be glad if somebody could put me through on how to accomplish that. Attached to this post is a modified code of a tutorial on
PID controller which i found on the net.
Again i would be very grateful if somebody could direct me to a tutorial on how to develop a graph. i wish to display the Setpoint,Process value and the output value on a graph.Thank you all for the usual Support.
Best regards.

[edit]SHOUTING removed - OriginalGriff[/edit]
Posted
Updated 19-Mar-15 23:16pm
v2
Comments
OriginalGriff 20-Mar-15 5:16am    
DON'T SHOUT. Using all capitals is considered shouting on the internet, and rude (using all lower case is considered childish). Use proper capitalization if you want to be taken seriously.
Joan Magnet 20-Mar-15 5:36am    
Have you searched inside Codeproject?

There is a PID article.

http://www.codeproject.com/Articles/49548/Industrial-NET-PID-Controllers

1 solution

C#
SteadyError += error ;
float integral = Ki * SteadyError;
float deltaTime = (LastCorrectionTime - DateTime.Now.Ticks) / 500000.0
if ( SteadyError > MaxSteadyError ) SteadyError = MaxSteadyError;
if ( SteadyError < MinSteadyError ) SteadyError = MinSteadyError;
if (error < -270) error += 360;
if (error >  270) error -= 360;
float derivative = Kd * (error - PrevError);

http://stackoverflow.com/questions/3902713/pid-controller-integral-term-causing-extreme-instability[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900