Skip to content

soham-kar/intelligent_car

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿค– Arduino Voice-Controlled Obstacle Avoidance Robot

This project implements a smart robot that can move using voice commands (via serial input) and intelligently avoid obstacles using an ultrasonic sensor and IR sensor. The robot is controlled using an Adafruit Motor Shield, and features a servo-based head to visually indicate turns.


๐Ÿง  Features

  • ๐ŸŽค Voice control via serial commands
  • ๐Ÿงญ Obstacle avoidance using ultrasonic sensor (NewPing)
  • ๐Ÿš— 4-wheel drive using AFMotor
  • ๐Ÿฆพ Servo-based directional head movement
  • ๐Ÿ” Bidirectional motion (forward + reverse)
  • ๐Ÿšฆ IR sensor safety for backward movement
  • ๐Ÿ›‘ Auto-stop when obstacle detected

๐Ÿ”ง Hardware Required

Component Quantity
Arduino Uno / Mega 1
Adafruit L293D Motor Shield 1
DC Motors (TT gear or BO) 4
Ultrasonic Sensor (HC-SR04) 1
IR Sensor (for reverse) 1
Servo Motor (SG90) 1
Battery Pack (9V or 12V) 1
Jumper Wires + Chassis -

๐Ÿ› ๏ธ Libraries Used

Install these libraries via Arduino Library Manager:


๐ŸŽฎ Voice Commands

Command Action
move forward Move forward while checking distance
move backward Move backward (uses IR safety)
left / turn left Turn left with servo indicator
right / turn right Turn right with servo indicator
stop Stop all motors immediately

๐Ÿ—ฃ๏ธ Voice commands are sent via Serial Monitor (9600 baud) or Bluetooth module (e.g., HC-05).


๐Ÿ–ผ๏ธ System Diagram


๐Ÿ“ท How It Works

  1. ๐Ÿง  Robot listens for a voice command (via Serial).
  2. ๐ŸŽฏ For move forward, it checks ultrasonic distance:
    • If distance < 10cm โ†’ Stop
    • Else โ†’ Drive forward
  3. ๐Ÿงผ For move backward, it checks IR sensor:
    • If object detected โ†’ Stop
    • Else โ†’ Drive backward
  4. โ†ช๏ธ For left/right, it:
    • Turns servo to look left/right
    • Rotates wheels accordingly
  5. ๐Ÿ›‘ After obstacle, resets servo and motor state.

๐Ÿ“ Code Overview

  • AFMotor controls all 4 DC motors.
  • NewPing reads distance from HC-SR04.
  • Servo rotates head to show turning direction.
  • Commands are matched from Serial.readString().

๐Ÿงช Includes safety: robot stops if obstacle is too close or IR detects danger when reversing.


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages