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.

Variable PWM with 8051

Status
Not open for further replies.

khansaab21

Advanced Member level 4
Joined
Apr 12, 2008
Messages
108
Helped
4
Reputation
8
Reaction score
2
Trophy points
1,298
Activity points
2,214
pwm in 8051

Hello friends.

I have selected automatic temperature control as my semester project. I have almost developed the code in C. But there is one logical error in the code which I am unable to remove.

Basically there are 2 temperatures.
1. User input from keypad (desired temperature).
2. Obtained from ADC connected to LM35 (surrounding temperature).

Both temperatures are of two digit and in packed BCD form.

What i want is the difference of two temps and a pulse proportional to the difference driving the fan. When the difference is 0, the (min) on time of fan is 10 ms. The on time increases linearly with the difference.

The problem is when these temp values are supplied to the formula evaluating the on time of the fan, it doesnt respond as desired. Instead the on time is always at random. But, when decimal values are forced in the formula, it does respond as it should be in the former case.

Plz help me.
 

variable pwm

When you solve your problem.You need to put hysteresis in your temperature or else damping would occur.It then depend on your outer closed loop and compensation.I advise you to get a bode plot and you should find step response of your system or else your system will work, but will be inefficient, but that work for you as this is your final year project.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top