กลับไปหน้ารวมไฟล์
obstacle-avoiding-robot-car-6f5de8.md

This project is based on a smart obstacle avoiding car with as low a cost as possible. Here I do not use an Arduino motor shield (Adafruit motor shield), instead of this I make my own motor driver with a shift register and l293d. If you want to learn how to build this, then watch this video.


🛠️ เจาะลึกเบื้องหลังการทำงาน (Deep Dive / Technical Analysis)

The Obstacle Avoiding Car is a classic rite of passage for every aspiring roboticist. It transforms a simple RC chassis into a smart autonomous vehicle capable of navigating complex environments and choosing paths without any human intervention.

![images/projects/expanded/images/projects/expanded/obstacle_avoiding_car_chassis_1772704596677.png)

The Navigation Loop

The car follows a logic loop that mimics how simpler animals navigate:

  1. Move: Start by driving both motors forward.
  2. Scan: Constantly monitor the distance in front using an ultrasonic sensor.
  3. Analyze: If the sensor detects a wall or obstacle closer than 20cm, stop!
  4. Choose: Turn the car (usually by reversing the left motor and driving the right one forward) until the path is clear.
  5. Repeat: Resume moving forward.

Core Hardware

  • Arduino Uno: The "brain" that executes the navigation code.
  • HC-SR04 Ultrasonic Sensor: Acts as the car's primary radar system.
  • L298N Motor Driver: Allows the Arduino to control the speed and direction of powerful DC motors.
  • 2WD or 4WD Robot Kit: Includes motors, wheels, and a sturdy acrylic base.
  • Battery Pack: Usually 2x 18650 Li-ion batteries to provide 7.4V.

![images/projects/expanded/images/projects/expanded/obstacle_avoiding_logic_diagram_1772704609938.png)

Customization Ideas

Once the basic car is working, there are many ways to improve it:

  • Servo Scanning: Mount the ultrasonic sensor on a servo so it can look left and right before turning.
  • Speed Control: Use PWM to make the car slow down as it gets closer to an obstacle for smoother movement.
  • Buzzer Alerts: Add a piezo buzzer to beep when the car is reversing or when it gets "stuck" in a corner.

ข้อมูล Frontmatter ดั้งเดิม

title: "Obstacle Avoiding Robot Car"
description: "This smart car avoids obstacles: when the distance is less than 15 cm from itself, it will stop and make a decision where to move."
author: "Aritra_B"
category: "Motors & Robotics"
tags:
  - "autonomous robot car"
  - "obstacle avoiding robot car"
  - "obstacle avoiding car"
  - "autonomous car"
views: 23338
likes: 28
price: 699
difficulty: "Easy"
components:
  - "1x Arduino UNO"
  - "1x Ultrasonic Sensor - HC-SR04 (Generic)"
tools: []
apps: []
downloadableFiles: []
documentationLinks: []
passwordHash: "30d88548997f8b5d826414e50b93b3eddf0a3e0bf6e507dc82dc837542b3e8f8"
encryptedPayload: "U2FsdGVkX184HDl4wUk/6lfXwQON7h7IjwEXZlyOqb8YFld88myxNyu+JaUuSxcr54BsLYZ97/+MY063Cdrhm6Wf+1VfWptC5WiEyvAQLeu/QMbtcfqXTnrAfjc/HkQnBXa+METYgekioSAZQwBkD98dYMZtHxRZx1j2aSuvoN2WN9LgJQ/OyhK+ZUXyaZ4oIq57dAETq686owhxRNsPRjOdyAT2/hhlxFpjcKsYfuM="
seoDescription: "Build an Obstacle Avoiding Robot Car. The smart car stops and decides its next move when it detects obstacles within 15 cm."
videoLinks:
  - "https://www.youtube.com/embed/wTFwxgjUSfE"
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/obstacle-avoiding-robot-car-6f5de8_cover.JPG"
lang: "en"