SMART SPEED GOVERNOR SYSTEM


BLOCK DIAGRAM

WORKING

Speed governor is an essential system to avoid over speed of vehicles. So we have introduced a smart Speed governor system. This system consists of micro-controller, Alcohol detector GPS, GSM, RELAY and alarm system.  When the speed reaches near to predefined range alarm system will wake up. If limit crosses message is sent to authorities through GSM and corresponding location is also sent through GPS.. The corresponding location is read and sends SMS to authority. The engine can be start if no alcohol present.
            The speed sensor detects the speed of the vehicle. Piezo sensor will detects if any accident is happened and it sends a message signal to the respective authorities through GSM. Alcohol sensor will activate when alcohol presence is activated and it will turn off the vehicle. 

CIRCUIT

PROGRAM

int c=0;
int a=0;
int f1=0;
int f2=0;
int d=0;
void setup()
{

  Serial.begin(9600);
  pinMode(13,INPUT);
  pinMode(9,OUTPUT);
    digitalWrite(9,HIGH);
  Serial.print("AT+CMGF=1;");
Serial.write(0xd);
delay(2000);
  attachInterrupt(0, blink, FALLING);
}

void loop()
{
ff();

 
delay(50);
ff();

 
delay(50);
ff();

 
delay(50);
ff();

 
delay(50);
ff();

 
delay(50);
ff();

 
delay(50);
ff();

 
delay(50);
ff();

 
delay(50);
ff();

 
delay(50);
ff();

 
delay(50);
//Serial.println(c);
//Serial.println(c);
if((c>13)&&(f2==0))
{
  message1();
  f2=1;
}
c=0;
   
}

void blink()
{
  c=c+1;
}
void message(void)
{

Serial.print("AT+CMGS=");
Serial.write(0X22);
Serial.print("9895565566");
Serial.write(0X22);
Serial.write(0xd);
delay(1000);
Serial.print("ACCIDENT AT ");
for(int v=0;v<40;v++){Serial.write(Serial.read());}
Serial.write(0x1a);
}
void message1(void)
{
Serial.print("AT+CMGS=");
Serial.write(0X22);
Serial.print("9895565566");

Serial.write(0X22);
Serial.write(0xd);
delay(1000);
Serial.print("OVER SPEED AT ");
for(int v=0;v<40;v++){Serial.write(Serial.read());}
Serial.write(0x1a);
}
void ff(void)
{
  a=analogRead(A5);
  d=digitalRead(13);
  digitalWrite(9,HIGH);
  if(a>425)
  {
    digitalWrite(9,LOW);
  }
  else if((d==1)&&(f1==0))
  {
    message();
    f1=1;
  }
 
}