กลับไปหน้ารวมไฟล์
obstacle-avoidance-robot-f436fc-en.md

In the previous tutorial, I've been explaining the basics about L298N Motor Driver, let's see how much it's useful in robotics.

When we build/design a robotic system we need to make sure we get 5 essential things straight :

First,The Task & the functionality, in our example the task is vacuuming and the functionality required in order to reach the task properly is avoiding obstacles so let's focus on this functionality and get it done properly.

Second, The Parameter at the input and the sensor responsible about collecting it's data, we need to make sure we know which parameter is involved and then we need to purchase the adequate sensor to collect it's data, in our example the parameter required is the obstacle and the adequate sensor is an ultrasonic range finder that I've already explained it's basics on my first tutorial.

Third, the brain ! after collecting data there's a need for data processing, choosing the optimal brain technology for that is kinda tricky sometimes, in our case we only need a micro-controller to perform one task like an arduino uno !

Fourth, the actuators at the output, in our case it's clearly Motors, after processing the data collected by the micro-controller from the sensor, it's time that the micro-controller order the actuators to " make a move " and that's depends on when we programmers decided to ! isn't a great job to be a programmer ?!

Fifth , Power !!! and that's will lead us to read datasheets in order to calculate how much voltage we need and in which form is suitable, in our case a 9V battery is suitable regarding the voltage drop of L298N and arduino uno, i've already explained the working of L298N in one of my previous tutorials.

Finally, all the things above need to be on the Chassis of the robot ! so get your hands dirty a little !

EXPANDED TECHNICAL DETAILS

Ultrasonic Rangefinding

This autonomous robot navigate its environment using "Bat-like" echolocation.

  • HC-SR04 Sensor: The Arduino triggers a 10µs ultrasonic pulse. It then measures the time taken for the "Echo" pin to return. Using the speed of sound (343m/s), it calculates the distance to the nearest object.
  • Sweep Logic: In many versions, the sensor is mounted on a Micro Servo, allowing the robot to "look" left and right before deciding which way to turn.

Navigational Algorithms

  • Threshold Detection: If an object is detected within 20cm, the robot stops, reverses slightly, scans both sides, and pivots toward the path with the longest clear distance.
  • Motor Control: Driven via an L298N or L293D H-Bridge, allowing the Arduino to independently control the speed and direction of the left and right wheels for zero-radius turns.

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

title: "Obstacle Avoidance Robot"
description: "Have you ever seen a vacuum cleaner robot? Have you been wondering what was its main functionality? Then check out this tutorial!"
author: "Fouad_Roboticist"
category: ""
tags:
  - "embedded"
  - "robots"
views: 3564
likes: 0
price: 699
difficulty: "Intermediate"
components:
  - "1x Arduino UNO"
  - "1x 9V battery (generic)"
  - "1x Premium Male/Male Jumper Wires, 40 x 3\" (75mm)"
  - "1x Premium Female/Male Extension Jumper Wires, 40 x 6\" (150mm)"
  - "1x 9V Battery Clip"
  - "1x Dual H-Bridge motor drivers L298"
  - "1x Ultrasonic Sensor - HC-SR04 (Generic)"
  - "1x Toggle Switch, Toggle"
tools: []
apps:
  - "1x Arduino IDE"
downloadableFiles:
  - "https://projects.arduinocontent.cc/1b2e6045-c9a5-42ad-b708-5cd233be080e.ino"
  - "https://projects.arduinocontent.cc/1b2e6045-c9a5-42ad-b708-5cd233be080e.ino"
documentationLinks: []
passwordHash: "61d5aefb99439d8a189c25278ba3e330f980c207dc5cff523a192735f77d0d48"
encryptedPayload: "U2FsdGVkX181D7MWBFeqGt25w5/5RU5sjSQMMYqpds0ubO2JEQs4d7jwUnjislOb3Wqp05flNrdScykkH7H9uUf4tsWcYPTrFMii4EWOG/w="
seoDescription: "Learn to build an Obstacle Avoidance Robot with Arduino. Discover its core functionality in this easy-to-follow tutorial."
videoLinks:
  - "https://www.youtube.com/embed/E4GMPTPF0GI"
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/obstacle-avoidance-robot-f436fc_cover.jpg"
lang: "en"