Smart Bike ADAS System

 
Model Picture

1. Introduction

In modern traffic, especially for two-wheelers, rider safety is a top concern. Riders face risks due to blind spots, sudden obstacles, and human errors such as forgetting to retract the side stand.

This project presents a Smart Bike ADAS (Advanced Driver Assistance System) using Arduino Nano, integrating multiple safety and convenience features:

  • Collision Alert System (Front)
  • Blind Spot Detection (Left & Right)
  • Rear Warning System (Optional)
  • LCD Display with Alerts
  • Emergency Buzzer Warning
  • Side Stand Immobilizer (Safety Feature)
  • Remote Engine Start System (Convenience Feature)
  • Wireless Helmet Vibration Alerts (Bluetooth)

Suitable for engineering students, Arduino workshops, and real-time vehicle safety applications.


2. Components Required

A. Bike – Main Arduino Nano

ComponentQuantityUse / Notes
Arduino Nano1Main ADAS controller
JSN SR04T Ultrasonic Sensors (Waterproof)3Front, Left, Right detection
16x2 LCD with I2C1Shows distance & alerts
Buzzer1Emergency audio warning
LEDs (Left & Right)2Blind spot indicators
Relay Modules2Engine & Start relay
Side Stand Switch1Side stand immobilizer reed switch or Push to on switch will do need to set it correctly at stand
Key Switch1Engine ON/OFF (or connect to existing vehicle relays if you are an expert or take help of a trained technician, otherwise will damage your vehicle)
HC-05 Bluetooth Module1Sends alerts to helmet
RF Receiver Module (433 MHz, optional)1Optional remote start
Buck Converter (12V→5V)1Powers Arduino safely
Jumper wires, Resistors, Diodes, BreadboardAs neededConnections & prototyping

B. Helmet – Wireless Vibration Module

ComponentQuantityUse / Notes
Small Vibration Motor1Alerts rider on collision, blind spot, or side stand down
Arduino (Nano / Pro Mini )1Controls motor based on Bluetooth signal
HC-05 Bluetooth Module1Receives alerts from bike Arduino
NPN Transistor (2N2222 / BC547)1Switches motor safely
Diode (1N4007)1Protects against motor back EMF
Battery (3.7–5V Li-ion)1Powers helmet module
Wires / EnclosureAs neededMount securely inside helmet

C. Remote Start Arduino Nano (Optional)

ComponentQuantityUse / Notes
Arduino Nano1Reads remote start switch
Push Button / RF Switch1Sends signal to main Arduino
Jumper wires, ResistorsAs neededSafe connection to switch

3. Circuit and Connections

Arduino Nano Pinout Diagram
Arduino Nano Pinout Diagram

Pinout Diagram of JSN SR04T Ultrasonic Sensor
Pinout Diagram of JSN SR04T Ultrasonic Sensor
Pinout Diagram Buzzer
Pinout Diagram Buzzer


Pinout Diagram of 16X2 LCD with I2C
Pinout Diagram of 16X2 LCD with I2C

Pinout Diagram of Single Channel Relay Module
Pinout Diagram of Single Channel Relay Module

433MHz RF Module Pinout Diagram
433MHz RF Module Pinout Diagram

433 MHz RF Transmitter Module
433 MHz RF Transmitter Module
HC-05 Bluetooth Module Pinout Diagram
HC-05 Bluetooth Module Pinout Diagram

3.A. Bike – Main Arduino Nano

ComponentPinConnection Details
Front JSN SR04T                    TRIG → D2, ECHO → D3VCC → 5V, GND → GND
Left JSN SR04T                    TRIG → D4, ECHO → D5VCC → 5V, GND → GND
Right JSN SR04T                       TRIG → D6, ECHO → D7VCC → 5V, GND → GND
Buzzer                                            D8Positive → D8, Negative → GND
Left LED                                                D9Through 220Ω resistor → LED → GND
Right LED                                            D10Through 220Ω resistor → LED → GND
Side Stand Switch                    D11 → One end, GND → OtherActive when stand folded
Engine Relay                                            D12Controls engine ON/OFF
Start Relay                                            D13Crank/start relay
HC-05 Bluetooth                            RX → Arduino TX Pin D0,
                            TX → Arduino RX Pin D1
                            (or SoftwareSerial)
Sends alerts to helmet
LCD I2C                                SDA → A4, SCL → A5Shows distance, warnings
RF Receiver (433 MHz)                            DATA → A0, VCC → 5V,
                                GND → GND
Optional remote signals
Buck Converter                                    Input → 12V,
                                    Output → 5V
Powers Arduino safely

3.B. Helmet – Wireless Vibration Module

ComponentConnectionNotes
HC-05 BluetoothRX → Arduino Nano TX Pin D0, TX → Arduino Nano RX Pin D1.Receives alerts
Arduino NanoVCC → Helmet Battery +5V, GND → Battery GNDControls motor
Vibration Motor+ → Collector of transistor, – → GNDMotor switched by transistor
NPN TransistorBase →Arduino Nano pin 5 (1kΩ resistor), Emitter → GND, Collector → Motor +Safe motor switching
DiodeAcross motor terminals (Cathode → +, Anode → –)Protects against back EMF
Battery+ → VCC, – → GNDPowers helmet module
Logic: Arduino Nano reads Bluetooth alert → Turns motor ON briefly → Vibrates helmet → Turns OFF.

3.C. Remote Start Arduino Nano (Optional)

ComponentConnectionNotes
Push Button One side → 5V, Other side → D2 (with 10kΩ pull-down)Detects Button Press
Arduino NanoVCC → 5V, GND → GNDPowers the Arduino
RF Transmitter ModuleDATA → D12, VCC → 5V, GND → GNDSends remote start pulse to main Arduino


4. Detailed Step By Step Circuit Working

4.1. Main Bike Arduino Nano Circuit

Purpose: Detect obstacles, monitor blind spots, side stand, trigger buzzer, display info on LCD, send Bluetooth alerts.

Components and Connections

  • Front Ultrasonic (JSN-SR04T) → TRIG D2, ECHO D3, VCC 5V, GND
    • Sends ultrasonic pulses to measure distance ahead.
  • Left Ultrasonic → TRIG D4, ECHO D5
  • Right Ultrasonic → TRIG D6, ECHO D7
  • 16x2 LCD I2C → SDA A4, SCL A5, VCC 5V, GND
    • Displays distance and warnings.
  • Buzzer → D8, GND
    • Produces sound alerts for collision and side stand.
  • LED Left & Right → D9/D10, through 220Ω resistor → GND
    • Indicates blind spot detection.
  • Side Stand Switch → D11, GND
    • Normally open → detects if stand is folded.
  • Engine Relay → D12, VCC & GND via relay module
    • Controls engine power.
  • Start Relay → D13, VCC & GND via relay module
    • Activates engine start.
  • HC-05 Bluetooth Module → TX → RX of Arduino, RX → TX
    • Sends alerts to helmet.
  • RF Receiver (optional) → DATA → A0, VCC 5V, GND
    • Receives remote start signal.

Circuit Working

  1. Ultrasonic Detection:
    • Arduino triggers sensors sequentially → measures echo → calculates distance.
    • Front sensor triggers collision warning.
    • Left/right sensors trigger blind spot LEDs.
  2. Side Stand Check:
    • Stand switch LOW → engine relay OFF → engine blocked.
    • LCD shows “STAND DOWN!”, buzzer sounds.
    • Bluetooth sends “STAND_DOWN” to helmet module.
  3. Collision Alert:
    • Distance <50cm → buzzer high-pitch, LCD “STOP!”, Bluetooth “COLLISION”.
    • Distance <100cm → short beep warning.
  4. Blind Spot LEDs:
    • Left <30cm → LED ON, Bluetooth “BLIND_LEFT”.
    • Right <30cm → LED ON, Bluetooth “BLIND_RIGHT”.
  5. Remote Start:
    • RF or digital input on A0 → triggers start relay if stand is UP.

4.2. Helmet Bluetooth Vibration Circuit

Purpose: Vibrates helmet motor when Arduino sends safety alerts via Bluetooth.

Components and Connections

  • HC-05 Bluetooth Module: RX/TX to helmet microcontroller
    • Receives real-time alerts from bike Arduino.
  • Vibration Motor: + → Collector of NPN transistor, – → GND
  • NPN Transistor (e.g., 2N2222):
    • Base → microcontroller pin via 1kΩ resistor, Emitter → GND, Collector → Motor +
  • Diode (1N4007) across motor: Protects microcontroller from back EMF.
  • Battery: 3.7–5V → powers motor & microcontroller.

Circuit Working

  1. Bluetooth receives text alerts: “COLLISION”, “BLIND_LEFT”, “BLIND_RIGHT”, “STAND_DOWN”.
  2. Microcontroller pin goes HIGH → base of transistor receives current → switches collector → vibration motor ON.
  3. Motor vibrates for a short duration (500ms) → alerts rider.
  4. Diode prevents reverse voltage damaging Arduino.

4.3. Remote Start Arduino Nano Circuit

Purpose: Sends remote start signal to main Arduino safely.

Components and Connections

  • Push Button: D2 → one side, 5V → other side, 10kΩ pull-down resistor
  • Arduino Nano: Powers push button detection.
  • RF Transmitter (optional): DATA → D12, VCC 5V, GND → GND
    • Sends remote signal to main Arduino.

Circuit Working

  1. Button pressed → Arduino reads LOW on D2.
  2. Arduino sets RF transmitter or digital output HIGH → sends start pulse.
  3. Pulse lasts 500ms → then LOW.
  4. Main Arduino receives pulse on remotePin → checks side stand → triggers start relay if safe.
  5. Prevents accidental engine start if side stand is down.

4.4. Signal Flow Summary

  1. Sensors → Main Arduino → Collision, blind spot, side stand status.
  2. Main Arduino → Helmet Module via Bluetooth → Vibrates motor.
  3. Remote Start Nano → Main Arduino via RF / Digital Signal → Starts engine safely.

5. Libraries to be Included

5.1. Main Arduino Nano (Safety & Alerts)

  • Wire.h → Required for I2C communication with LCD.
  • LiquidCrystal_I2C.h → For controlling 16x2 I2C LCD.
  • SoftwareSerial.h → For Bluetooth communication with helmet (if using HC-05).
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <SoftwareSerial.h>
  • Usage:
    • Wire.h → Handles the I2C bus.
    • LiquidCrystal_I2C.h → Displays distance, warnings, and alerts.
    • SoftwareSerial.h → Allows Arduino Nano to communicate with Bluetooth module on digital pins (e.g., D10, D11) instead of hardware serial.

5.2. Helmet Arduino Nano (Bluetooth Vibration Module)

  • SoftwareSerial.h → For receiving Bluetooth data from main Arduino.
#include <SoftwareSerial.h>
  • Usage:
    • Creates a serial interface for HC-05.
    • Reads alert messages and triggers vibration motor.

5.3. Remote Start Arduino Nano

  • No extra libraries needed if using a simple push button + digital output.
  • Optional if using RF module:
#include <VirtualWire.h> // For 433 MHz RF modules
  • Usage:
    • Sends the remote start pulse to main Arduino safely.

6. Complete Code

6.1. Code – Main Nano

#include <Wire.h>
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27, 16, 2);

// Ultrasonic pins
#define trigF 2
#define echoF 3
#define trigL 4
#define echoL 5
#define trigR 6
#define echoR 7

#define buzzer 8
#define ledL 9
#define ledR 10

#define standSwitch 11
#define engineRelay 12
#define startRelay 13

#define remotePin A0

long duration;
int distF, distL, distR;

int getDistance(int trig, int echo) {
digitalWrite(trig, LOW);
delayMicroseconds(2);
digitalWrite(trig, HIGH);
delayMicroseconds(10);
digitalWrite(trig, LOW);

duration = pulseIn(echo, HIGH);
return duration * 0.034 / 2;
}

void setup() {
pinMode(trigF, OUTPUT); pinMode(echoF, INPUT);
pinMode(trigL, OUTPUT); pinMode(echoL, INPUT);
pinMode(trigR, OUTPUT); pinMode(echoR, INPUT);

pinMode(buzzer, OUTPUT);
pinMode(ledL, OUTPUT);
pinMode(ledR, OUTPUT);

pinMode(standSwitch, INPUT_PULLUP);
pinMode(engineRelay, OUTPUT);
pinMode(startRelay, OUTPUT);

pinMode(remotePin, INPUT);

lcd.init();
lcd.backlight();
}

void loop() {

int stand = digitalRead(standSwitch);
int remote = digitalRead(remotePin);

distF = getDistance(trigF, echoF);
distL = getDistance(trigL, echoL);
distR = getDistance(trigR, echoR);

lcd.clear();
lcd.setCursor(0,0);
lcd.print("F:");
lcd.print(distF);

// SIDE STAND CHECK
if (stand == LOW) {
digitalWrite(engineRelay, LOW);
lcd.setCursor(0,1);
lcd.print("STAND DOWN!");
tone(buzzer, 2000);
return;
} else {
digitalWrite(engineRelay, HIGH);
}

// COLLISION ALERT
if (distF < 50) {
tone(buzzer, 2000);
lcd.setCursor(0,1);
lcd.print("STOP!");
} else if (distF < 100) {
tone(buzzer, 1000);
delay(200);
noTone(buzzer);
} else {
noTone(buzzer);
}

// BLIND SPOT
digitalWrite(ledL, distL < 30);
digitalWrite(ledR, distR < 30);

// REMOTE START
if (remote == HIGH && stand == HIGH) {
digitalWrite(startRelay, HIGH);
delay(1000);
digitalWrite(startRelay, LOW);
}
}

6.2. Code – Helmet Nano

#include <SoftwareSerial.h>
#define motorPin 5 #define btRx 2 #define btTx 3 SoftwareSerial BT(btRx, btTx); void setup() { pinMode(motorPin, OUTPUT); BT.begin(9600); } void loop() { if (BT.available()) { String msg = BT.readStringUntil('\n'); if(msg == "COLLISION" || msg == "BLIND_LEFT" || msg == "BLIND_RIGHT" || msg == "STAND_DOWN") { digitalWrite(motorPin, HIGH); // vibrate delay(500); // vibration duration digitalWrite(motorPin, LOW); } } }

6.3. Code – Remote Start Nano

#define buttonPin 2
#define rfPin 12 void setup() { pinMode(buttonPin, INPUT_PULLUP); pinMode(rfPin, OUTPUT); } void loop() { int button = digitalRead(buttonPin); if(button == LOW) { // pressed digitalWrite(rfPin, HIGH); // send start signal delay(500); digitalWrite(rfPin, LOW); } }

7. Detailed Step By Step Code Working

7.1. Main Bike Arduino Nano – Safety & Alerts

Purpose

Detects obstacles, blind spots, side stand status, triggers buzzer, updates LCD, and sends Bluetooth alerts to helmet.

Step by Step Working

  1. Initialization
    • LCD initialized (lcd.init() + lcd.backlight()) to display info.
    • Pins for ultrasonic sensors set as OUTPUT (Trig) and INPUT (Echo).
    • LEDs, buzzer, relays set as OUTPUT.
    • Side stand switch set as INPUT_PULLUP.
    • SoftwareSerial begins communication with helmet HC-05 (BT.begin(9600)).
  2. Distance Measurement
    • Each ultrasonic sensor is triggered sequentially:
      • digitalWrite(trig, HIGH) for 10 µs → sends pulse.
      • pulseIn(echo, HIGH) measures return pulse duration.
      • Converts to distance in cm: distance = duration * 0.034 / 2.
    • Sensors:
      • Front: TRIG D2, ECHO D3 → Collision alert.
      • Left: TRIG D4, ECHO D5 → Blind spot left.
      • Right: TRIG D6, ECHO D7 → Blind spot right.
  3. Side Stand Check
    • Reads side stand switch (D11).
    • If LOW → stand down:
      • Engine relay turned OFF → prevents riding.
      • LCD shows "STAND DOWN!".
      • Buzzer sounds high-pitch alert.
      • Bluetooth message "STAND_DOWN" sent to helmet.
    • If HIGH → engine relay ON → safe to ride.
  4. Collision Alert
    • If front distance <50 cm:
      • Buzzer high-pitch.
      • LCD shows "STOP!".
      • Sends "COLLISION" to helmet.
    • If front distance <100 cm (but >50 cm):
      • Buzzer short beep (1000Hz, 200ms).
    • Else → Buzzer OFF.
  5. Blind Spot Detection
    • Left sensor (<30 cm) → LED ON, sends "BLIND_LEFT" to helmet.
    • Right sensor (<30 cm) → LED ON, sends "BLIND_RIGHT" to helmet.
    • Else → LEDs OFF.
  6. Remote Start Signal
    • Reads remotePin (A0 or serial pin for RF).
    • If HIGH and side stand UP, triggers start relay for 1 second → starts engine.
  7. LCD Update
    • Always shows front distance and current alert/warning.

7.2. Helmet Wireless Vibration Module

Purpose

Receives Bluetooth messages from bike Arduino and vibrates helmet motor for rider alert.

Step by Step Working

  1. Initialization
    • Bluetooth module (HC-05) initialized using SoftwareSerial.
    • Motor pin set as OUTPUT.
  2. Bluetooth Communication
    • Helmet microcontroller constantly checks for incoming Bluetooth messages:
      • BT.available() → reads string until newline.
    • Messages include:
      • "COLLISION" → Front obstacle.
      • "BLIND_LEFT" → Vehicle on left.
      • "BLIND_RIGHT" → Vehicle on right.
      • "STAND_DOWN" → Side stand down.
  3. Motor Activation
    • On receiving any alert:
      • Transistor switches vibration motor ON.
      • Motor vibrates for 500ms → alerts rider.
      • Then turns OFF automatically.
    • Diode across motor protects microcontroller from back EMF.
  4. Battery Power
    • Helmet module powered by 3.7–5V Li-ion.
    • Ensures continuous operation during ride.

7.3. Remote Start Arduino Nano

Purpose

Allows engine start remotely using a push button or RF switch.

Step by Step Working

  1. Initialization
    • Push button set as INPUT_PULLUP.
    • RF transmitter/data pin set as OUTPUT.
  2. Button Press Detection
    • Constantly reads buttonPin (D2).
    • If button pressed (logic LOW):
      • Sets rfPin HIGH → sends start signal.
      • Maintains signal for 500ms → simulates remote pulse.
      • Sets rfPin LOW → stops transmission.
  3. Main Arduino Reception
    • Main bike Arduino receives this signal on remotePin.
    • Checks side stand status:
      • If stand UP → start relay triggered for 1 second → starts engine.
      • If stand DOWN → engine start blocked for safety.

7.4. Signal Flow Summary

  1. Sensors → Main Arduino Nano
    • Collision, blind spot, side stand → Logic & alerts.
  2. Main Arduino → Helmet Arduino
    • Bluetooth sends "COLLISION", "BLIND_LEFT", "BLIND_RIGHT", "STAND_DOWN".
  3. Helmet Arduino → Vibration Motor
    • Alerts rider in real-time.
  4. Remote Start Arduino → Main Arduino
    • Button press or RF signal triggers engine start only if safe.

8. Tips

  • Use JSN SR04T for waterproof operation.
  • Helmet module battery should last 2–3 hours.
  • Place vibration motor where rider feels alerts clearly.
  • Test sensors in different lighting and weather.
  • Secure all connections to avoid loose wiring on the bike.

9. Uses

  • Smart bike safety system
  • Accident prevention
  • Engineering student projects
  • Arduino/automotive electronics learning

10. Conclusion

This Smart Bike ADAS with Arduino Nano combines collision detection, blind spot monitoring, side stand protection, remote start, and wireless helmet vibration alerts. It is low cost, expandable, and provides real-time safety alerts, making it ideal for modern two-wheeler riders and educational projects.

തുടക്കക്കാർക്കായി ഇലക്ട്രോണിക്സ് ലളിതമായി പഠിക്കാം.

Empowering students in Kerala with hands-on technical skills.