CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Motor speed control using pot

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
charlie93
Guest







Motor speed control using pot
PostPosted: Wed Dec 23, 2009 12:13 am     Reply with quote

hye all,
I would like to use pc fan (the one inside pc) in my experiment (just a small hobby lol).
My question is can I use a pot to control the motor speed?
The fan use pwm right? So that means the pot is used to modify pwm signal, is it possible? I would like to use 16f84 pic.
How can I do this? Anyone can give advice or helpful link?
bungee-



Joined: 27 Jun 2007
Posts: 206

View user's profile Send private message

PostPosted: Wed Dec 23, 2009 12:59 am     Reply with quote

Use PIC with PWM module. Old 16F84 is not a good choice here. I did similar project with small 12F683 Wink
charlie93
Guest







PostPosted: Wed Dec 23, 2009 10:08 am     Reply with quote

can i see it?
the layout or circuitry
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Dec 23, 2009 1:27 pm     Reply with quote

On a PIC that has a hardware PWM module, this test program shows
how to set the pwm duty cycle with a trimpot:
http://www.ccsinfo.com/forum/viewtopic.php?t=40007&start=1
If you used PWM to run a motor, a larger duty cycle would give a
faster motor speed. A smaller duty cycle would give a slower speed.
bungee-



Joined: 27 Jun 2007
Posts: 206

View user's profile Send private message

PostPosted: Wed Dec 23, 2009 3:47 pm     Reply with quote

charlie93 wrote:
can i see it?
the layout or circuitry


This is working prototype version. KLIK here
mkuang



Joined: 14 Dec 2007
Posts: 257

View user's profile Send private message Send e-mail

PostPosted: Wed Dec 23, 2009 3:51 pm     Reply with quote

bungee- wrote:
charlie93 wrote:
can i see it?
the layout or circuitry


This is working prototype version. KLIK here


What does C2 do? Some kind of snubber?
bungee-



Joined: 27 Jun 2007
Posts: 206

View user's profile Send private message

PostPosted: Wed Dec 23, 2009 4:27 pm     Reply with quote

Yes a snubber, C2 removes the noise and at low speeds motor is running smoother. C2 is ~1uF or so. If you put in larger C2, than the upper duty rates "disappear".

On the schematic values are not correct. BAS15 is not the correct type - it was put there because of the size of real element. It should be fast shotky diode with enough voltage/current ratings for the motor type.

Schematic provided is for "educational" purposes Wink
mkuang



Joined: 14 Dec 2007
Posts: 257

View user's profile Send private message Send e-mail

PostPosted: Wed Dec 23, 2009 4:29 pm     Reply with quote

bungee- wrote:
C2 is ~1uF or so. If you put in larger C2, than the upper duty rates "disappear".


Yeah, that's why I was wondering why there is a cap there...
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group