adrianos_botis
Published © GPL3+

Automotive Engine Rev-Limiter

Easy implementation of Rev-limiter for Automotive or Motorcycle Engine.

IntermediateFull instructions provided6,706
Automotive Engine Rev-Limiter

Things used in this project

Hardware components

Arduino Nano R3
Arduino Nano R3
×1
IRF520 Mosfet Driver, Arduino Compatible
×1
5V Relay
×1
LM2569 Voltage Regulator
×1
Inductive Proximity Sensor, Stainless Steel
Inductive Proximity Sensor, Stainless Steel
×1
Machine Screw, M4
Machine Screw, M4
×2
Resistor 10k ohm
Resistor 10k ohm
×2
Mounting Bracket, Bracket
Mounting Bracket, Bracket
×1

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)
Solder Wire, Lead Free
Solder Wire, Lead Free
Hot glue gun (generic)
Hot glue gun (generic)
Drill / Driver, Cordless
Drill / Driver, Cordless
Multitool, Screwdriver
Multitool, Screwdriver

Story

Read more

Schematics

Circuit Schematic

Code

Arduino Code for Rev-Limiter

Arduino
// Rev-Limiter Code for Arduino Project Hub
//
//Written by Adrianos Botis: adrianosbotis@gmail.com
//
//Use at your own and change the parameters: rpm_val to set the rpm limit of your engine.
//You can also change the delay of milliseconds at the end of the code to set how fast your engine will be switched on-off.
//


int sensor_pin = 3;
// set number of hall trips for RPM reading (higher improves accuracy)
float sensor_thresh = 5.0;
int ignition = 2;

void setup() {
  // initialize serial communication at 9600 bits per second:
  Serial.begin(9600);
  // make the sensor pin an input:
  pinMode(sensor_pin, INPUT);
  pinMode(ignition, OUTPUT);
}

// this loop routine runs over and over again forever:
void loop() {
  // preallocate values for tach
  float hall_count = 1.0;
  float start = micros();
  bool on_state = false;
  // counting number of times the hall sensor is tripped
  // but without double counting during the same trip
  while(true){
    if (digitalRead(sensor_pin) == 1){
      if (on_state==false){
        on_state = true;
        hall_count+=1.0;
      }
    } else{
      on_state = false;
    }
    
    if (hall_count>=sensor_thresh){
      break;
    }
  }
  
  // print information about Time and RPM
  float end_time = micros();
  float time_passed = ((end_time-start)/1000000.0);
  Serial.print("Time Passed: ");
  Serial.print(time_passed);
  Serial.println("s");
  float rpm_val = (sensor_thresh/(2*time_passed))*60.0;
   if(rpm_val > 8000.0){
     digitalWrite(ignition, HIGH);
     } 
     else { 
     digitalWrite(ignition, LOW);
  } 
  
  Serial.print(rpm_val);
  delay(1);        // delay in between reads for stability
}

Github/Arduino Code for Rev-Limiter

Credits

adrianos_botis

adrianos_botis

3 projects • 7 followers

Comments