Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Thread Tools Display Modes
Old 5th December 2005, 03:59 PM   (permalink)
Experienced Member
 
ChArLyZzZ is on a distinguished road
Default calculate RPM of a DC motor

hey guys
I'm using PIC16F877a...i'm connecting a DC motor on pin RC2/CCP1 (PWM) and getting the speed back from an optical interrupter on pin RC1/CCP2 (capture mode)...I'm using a 4 MHz crystal
I'm letting CCP2 generating an interrupt every 16th rising edge, then i display the values of CCPR1L and CCPR1H on LCD
I want to know how can i calculate this value to be the RPM of the motor??
I know how to calculate the period of the signal,but what next??
Thank you guys for ur help
ChArLyZzZ is offline   Reply With Quote
Old 5th December 2005, 04:12 PM   (permalink)
Super Moderator
 
Nigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to behold
Default

It's simple maths, dividing 1 by the time taken per revolution gives you revs per second, you then multiply that by 60 to give RPM. I've shown that as two steps, but in practice you would do it in a single step.

Presume one revolution takes 10mS (0.01 seconds), you simply divide 60 by 0.01 to give 6000 RPM.

If you have more than one pulse per revolution, you just alter the top value accordingly - so if you had two pulses per revolution then you would divide into 30 instead of 60.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes




All times are GMT. The time now is 11:12 PM.


Electronic Circuits  |  Radio Controlled
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.