# Is engine speed and engine rpm the same???

#### huida__huida

Joined Apr 18, 2014
7
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

#### huida__huida

Joined Apr 18, 2014
7
Code:
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(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);

}
}

#### Sensacell

Joined Jun 19, 2012
3,476
Revolutions-Per-Minute

#### WBahn

Joined Mar 31, 2012
30,252
This is akin to asking if car speed and miles per hour are the same thing. The latter is one unit of measure of the former.
As for calculating it, you need a measure of how many times the engine crankshaft rotated in a particular amount of time. How are you getting those two values?

#### Deleted member 115935

Joined Dec 31, 1969
0
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,

#### Alec_t

Joined Sep 17, 2013
14,382
Although 'speed' is a declared variable I couldn't see any use of it in the code?

#### WBahn

Joined Mar 31, 2012
30,252
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,
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.

The fact that there was a concerted effort by physics texts back in the first part of the 20th century to dictate that speed was the magnitude of velocity and that weight was a force and not a mass, the real world, including standard setting bodies, largely ignored them.

#### huida__huida

Joined Apr 18, 2014
7
HI dear thank you in advance iam asking if you can help me by giving me velocity and the time example simply look at my code while pulse equal 128 NEED compraison speed . i mean at 128 and specific speed velocity do something else don't.

#### caugusti

Joined Jan 24, 2020
1
Technically what do you mean by engine speed? Because what you are stating is the same thing with RPM just thrown in. The only factor here that could affect engine RPMs and actual RPMs coming out is any gearing in the motor. The rest of this stuff goes into what I think you are asking....

RPM is related to vehicle speed by the differential in the motor and/or another gearbox AND the wheel circumference. For each motor revolution how far in inches etc do you go forward or reverse? You have to relate RPM too speed this way. This assumes you get an accurate RPM reading AND the constant you figure out is GOOD for gearing. In a car you might have a 3:1 rear end differential gear; where here the wheel spins 1 times per 3 engine RPMs. All that is left is to figure out the math. If nothing affects the gearing (anywhere) of the motor then you will go the circumference of the wheel every RPM.

This gets you speed of vehicle.

Last edited:

#### bwilliams60

Joined Nov 18, 2012
1,450
Forgive my ignorance but I don't understand either of the last two posts. Maybe just the way I am reading them but there is no gearing in a motor to change engine speed.
The term engine speed in automotive refers to the crankshaft speed or RPM. If an engine is running at 600 RPM, the crankshaft has made 600 revolutions in one minute or 10 revolutions per second. So the answer to the OP's question is "yes", engine speed and RPM are the same.
In terms of your programming, I can only tell you that where a crankshaft position sensor(CKP) is used, there are teeth on a reluctor ring or tone ring attached to the crankshaft that the CKP senses from. This ring may have several teeth on it and each pulse is sent back to the ECM where it is processed usually in conjunction with the camshaft signal to position exact location of pistons within each cylinder. It can sense TDC at #1 with an additional tooth or a missing tooth and can have many teeth in between for pulses. So if you see the reference to a 36-1 trigger wheel, that means that every revolution will produce 35 pulses and there will be an extended pulse for the missing tooth.
If you are programming, that would have to be taken into account. If you are using an Arduino, the forum has covered this a few times with some good literature.
Also, when calculating the "speed" of the vehicle", there is more to the calculation than engine RPM and differential ratios.