Is engine speed and engine rpm the same??? What is the formula to calculate engine rpm...can u please guide.i am working on a project and need these values for calculation
sbit LCD_RS at RB0_bit;
sbit LCD_EN at RB1_bit;
sbit LCD_D4 at RB2_bit;
sbit LCD_D5 at RB3_bit;
sbit LCD_D6 at RB4_bit;
sbit LCD_D7 at RB5_bit;
sbit LCD_RS_Direction at TRISB0_bit;
sbit LCD_EN_Direction at TRISB1_bit;
sbit LCD_D4_Direction at TRISB2_bit;
sbit LCD_D5_Direction at TRISB3_bit;
sbit LCD_D6_Direction at TRISB4_bit;
sbit LCD_D7_Direction at TRISB5_bit;
//end lcd module connections
// RD7 pin is pulse input pin
int pulse=0;
int puls= pulse>=36;
unsigned int rpm;
int rps;
const double pi= 3.14159;
double x;
char text[15];
unsigned int speed;
void main() {
TRISD.F0 = 1;
TRISA=0X00;
PORTA=0;
Lcd_Init(); // Initialize the Lcd module
Lcd_Cmd(_LCD_CLEAR); // Clear Lcd display
Lcd_Cmd(_LCD_CURSOR_OFF); // Lcd Cursor off
Lcd_Out(1,1,"rpm");
Lcd_Out(2,5,"Circuit");
delay_ms(10);
Lcd_Cmd(_LCD_CLEAR);
Lcd_Out(1,3,"adil elsadiq");
Lcd_Out(2,1,"MINA TECHNOLOGY");
delay_ms(12);
Lcd_Cmd(_LCD_CLEAR);
Lcd_Out(1,1,"rpm");
puls=pulse;
if(++pulse>=36){
puls=0;
}
if(puls==36){
while(puls==pulse>=36);
rpm =2*pi*puls*11/60 ;
}
TRISD.F0 = 1;
TRISA=0X00;
PORTA=0;
TRISC=0X00;
PORTC=0;
#define SW PORTD.RD0 // RD7 pin is pulse input pin
while(1){
if(SW==1){
while(SW==1);
pulse++;
}
if(pulse>=721)
pulse = 0;
{
portc.f5=0;
porta.f2=0;
portc.f3=0;
portc.f4=0 ;
}
if(RD0_bit==1) pulse ++;
if(pulse== pulse <=128){
portc.f5=0;
porta.f2=0;
portc.f3=0;
portc.f4=0 ;
}
if (pulse>=129 && pulse<=180 );{
porta.f2=1;
portc.f5=0;
portc.f3=0;
portc.f4=0 ;
}
if (pulse>=181&& pulse <=308){
porta.f2=0;
portc.f3=0;
portc.f4=0 ;
}
if (pulse>=309 && pulse <=360){
porta.f2=0;
portc.f3=1 ;
portc.f4=0;
portc.f5=0;
}if (pulse>=361 && pulse <=488){
porta.f2=0;
portc.f3=0 ;
portc.f4=0;
portc.f5=0;
}
if (pulse>=489 && pulse <=540){
porta.f2=0;
portc.f3=0 ;
portc.f4=1;
portc.f5=0;
}
if (pulse>=541 && pulse <=668){
porta.f2=0;
portc.f3=0 ;
portc.f4=0;
portc.f5=0;
}
if (pulse>=669 && pulse <=720){
porta.f2=0;
portc.f3=0;
portc.f4=0;
portc.f5=1;
}
IntToStr(pulse,text); // Lcd show the pulse
Lcd_Out(2,1,text);
IntToStr(rpm,text); // Lcd show the pulse
Lcd_Out(1,1,text);
}
}
Whether it is without direction or not is very context dependent. In many situations the shaft can only turn one way and so it is immaterial. But if either direction of rotation is possible then it is customary to have a signed speed measure.Speed is without direction,
RPM is a circular speed.
You need to count haw many revolutions in a given period you have , to then calculate revolutions per minute,
or the other way around, you can measure the time for one revolution, and then calculate how many revolution per minute,
by Jake Hertz
by Robert Keim
by Jake Hertz
by Jake Hertz