กลับไปหน้ารวมไฟล์
4-wd2wd-auto-obstacle-avoidance-car-bluetooth-control-car-6acc89-en.md

Front Obstacle IR LED should be facing to Ground

Auto Mode.... with obstacle avoidance

Manual Mode with Bluetooth connected

Android Application to Control via Bluetooth

Hybrid Mechatronics: The Smart 4WD Rover

The Smart Obstacle / Bluetooth 4WD Car is the final evolution of the basic robot kits. It is a "Hybrid" project: It isn't entirely autonomous, nor is it entirely manual. It represents modern Drive-by-Wire technology—you drive using an app, but the car will override your bad decisions to ensure safety.

I made this car since I found there is only one kind of option, either it is obstacle avoidance or Bluetooth control so if you want to take over manually you cannot do it. (or might be available and I haven't found it :))

This car can be auto driven by detecting obstacle on its way or if you connect with Bluetooth it will automatically come to manual mode and then you can control it manually, once Bluetooth connection disconnected or lost it will then automatically drive itself.

Fusing Comm Logic with Sensor Math

The structure of the loop() must be perfectly timed.

  1. The Radar Check: First, the HC-SR04 ping sensor mounted on the front bumper checks the distance.
  2. The Override Check: If distance is < 20cm, the Arduino fires an interrupt. It forces speed = 0 to all four motors, spins an alarm buzzer, and completely ignores any forward commands coming from your phone!
  3. The Listening Phase: If clear (> 20cm), it checks Serial.read() for incoming Bluetooth packets.
  4. The Execution: If the phone transmits "Forward", the L298N pushes current to all four motors simultaneously.

There are three obstacle sensor, first the Ultrasonic which will work on both Auto mode and manual mode to avoid bumping the car in front, the back one is IR Obstacle sensor and will work just to avoid hitting from back when reversing and front IR Obstacle sensor will help to avoid dropping in front if there is no ground further or the ground distance further then set distance of the sensor.(Please make sensor LED downwards at floor/Ground)

Pan/Tilt Scanning (Optional Upgrade)

To make the car truly intelligent, the ultrasonic sensor is often mounted on a Micro Servo (SG90). When the car auto-stops before hitting a wall, it:

  1. Turns the servo left and pings. (60cm clear).
  2. Turns the servo right and pings. (10cm blocked).
  3. The Arduino decides the safest route is Left, spins the wheels, and continues its autonomous mission!

Central Hardware List

  • Arduino Uno/Mega: The hybrid processor.
  • L298N Motor Driver Module: Necessary for massive current draw.
  • 4WD Chassis Kit (4 Motors, 4 Wheels).
  • HC-SR04 Ultrasonic Sensor.
  • HC-05 Bluetooth Module.
  • Dual 18650 Battery Pack: 7.4 Volts minimum is required to beat the stall current of four engaged motors.

Note: Please tune Potentiometer on IR Obstacle sensor to tune distance as per your need. Please also flip wires from D4-D7 if motor is not going forward and instead going backward.

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

apps:
  - "1x Bluetooth RC Controller"
  - "1x Arduino IDE"
author: "adhome"
category: "Motors & Robotics"
components:
  - "1x HC-05 Bluetooth Module"
  - "1x Slide Switch"
  - "1x Buzzer"
  - "1x SG90 Micro-servo motor"
  - "1x Ultrasonic Sensor - HC-SR04 (Generic)"
  - "1x Soldering iron (generic)"
  - "2x IR Obstacle Sensor"
  - "1x Multitool, Screwdriver"
  - "1x Solder Wire, Lead Free"
  - "1x Dual H-Bridge motor drivers L298"
  - "1x LED (generic)"
  - "1x Battery Holder, 18650 x 2"
  - "3x Battery, 3.6 V"
  - "2x Maker Essentials - Micro-motors & Grippy Wheels"
  - "1x Jumper wires (generic)"
  - "1x Arduino Nano I/O Shield"
  - "1x Arduino Nano R3"
description: "The ultimate rover! Build an advanced robotic chassis that accepts wireless Bluetooth commands, but uses ultrasonic radar to abruptly stop you from driving it into a wall."
difficulty: "Intermediate"
documentationLinks: []
downloadableFiles:
  - "https://projects.arduinocontent.cc/24280abd-e3d5-4278-b610-40f304cf9e47.ino"
  - "https://projects.arduinocontent.cc/24280abd-e3d5-4278-b610-40f304cf9e47.ino"
encryptedPayload: "U2FsdGVkX1/jxPCS9iEDPeJnzu0yK0EIZEkPWQi2ISyFoERNS0enwCiJWcXCsWiJ0xc42m8A7M3+vDpcICFZKrnfz2NdYv2BpWpu+kx3TUmBfchf7fWRjVBzbSe5Gm6k"
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/4-wd2wd-auto-obstacle-avoidance-car-bluetooth-control-car-6acc89_cover.jpg"
lang: "en"
likes: 0
passwordHash: "babae62e12fba17c41cad7b72e05086bdd242b66b7c64b16cc76c2a9accdb472"
price: 2450
seoDescription: "Arduino 4 WD/2WD car project featuring auto obstacle avoidance and Bluetooth control."
tags:
  - "obstacleavoidecar"
  - "obstacle avoidance car"
  - "auto pilot car"
  - "obstacle avoidance car bluetoo"
  - "arduino nano car"
  - "2wd"
  - "cars"
  - "4wd"
  - "bluetooth car"
title: "4 WD/2WD auto obstacle avoidance car / Bluetooth control car"
tools: []
videoLinks:
  - "https://www.youtube.com/embed/SbG4yOk0GMs"
  - "https://www.youtube.com/embed/mruq8QJLWoo"
  - "https://www.youtube.com/embed/QXNRWZF3dbw"
views: 7318