Discussion in "8051 Discussion Forum" started by    dstarke    Oct 22, 2007.
Mon Oct 22 2007, 07:10 AM
#1
Thanks for the forum!

I have never implemented PWM before, and as such have no idea of what values for on/off times are a good starting point. I am trying to vasy the speed of a 12VDC fan using a MOSFET (IR540N) via a 7406 level shifter driven by an ATM89C55WD port pin. I think I would like to drive a counter externally with a 500 uSec pulse, and use it as the quanta for the interrupt to create on/off pulses. Is this too fine grain? What would be a reasonable nominal cycle time? 20mSec? Like I said, I have no real handle on the basic cycle time or what would be a reasonable minimum on time.

I can't figure out the formula for #levels vs min on-pulse vs cycle time vs Fan V+. Unless I am mistaken the fan speed is directly related to the fan-v+ and the integral of the on-pulses. Is it advantageous to use a larger fan V+ (like 15V for example) to provide more control?

I am writing the code in C (Keil) but can just as well use assembly (a small learning curve there).

Thank you in advance for yout kind input, and RTM is greatfully received if you can direct me to the relevant manuals.

David.

Mon Oct 22 2007, 08:45 AM
#2
well i never took PWM this serious

Lets just discuss the factors one by one.
first Fan V+ - It will increase the speed of motor and if its higher than the maximum rating of fan then it can ultimately burn the coil. So i Whatever voltage you use keep it <= max rating.
the more important is the current being supplied to the coil. That should be enough to generate sufficient torque. here also.. keep the current less than the max rating.

Now talking about the minimum pulse time.. i say.. there is no specific, it depends on the motor how fast it reacts to the change in polarity of the voltage. So all you can do is experimenting..
What i did was.. used timer in Mode 0 and varied the value to be loaded in THx of the timer..
lets say..
if THx is loaded with a value X when Pulse is ON or high, then THx should be loaded with value 255-X when Pulse is OFF or how.

I found that there is no directly proportional change in the speed vs the loaded value, rather there is a parabolic change in the speed.. i mean.. variation in o/p at higher values are pretty close to each other than the lower values.

So you might need to do experimentation according to the components you use and value you load. PWM seems difficult but its not so difficult.. its just need some experimentation thats all... So give it a try..

I cannot see your circuit too clear but as per the parts you mentioned the circuit seems to be ok. you have connected all the things necessary. As you are just sinking the current so just a normal NPN can also be used in place of that MOSFET. but make sure of the current and voltage that can be handled also heat sink if necessary.

regarding the code.. you can try working on it but there is also an assembly code posted by me in the forum "Project Doubt" with topic name temperature controlled fan.. if you want to see it then you can take it as a reference.

Get Social

Information

Powered by e107 Forum System

Conversation

No messages yet.

Downloads

Comments

Mirza123
Thu Jun 25 2020, 03:46 PM
eunicelove124
Mon Jun 22 2020, 03:03 PM
cerouno
Tue Jun 16 2020, 05:10 PM
Marce
Sat Jun 13 2020, 09:43 PM
Davidthils
Thu May 21 2020, 12:44 PM
Jakeror
Thu May 21 2020, 01:28 AM
motorCar
Wed May 20 2020, 07:05 PM
Vordrync
Wed May 20 2020, 11:52 AM

Online

Guests: 148, Members: 0 ...

most ever online: 182184
(Members: , Guests: 182184) on 06 Aug 2010: 05:37 AM

Members: 38215
Newest member: Mirza123