The use of autonomous systems to perform relevant and delicate tasks is fast growing and their application in various fields cannot be over emphasized. But obstacle avoidance is an important task in robotics, as the autonomous robot’s aim is to reach the destination without collisions. One type of autonomous robot that can detect obstacles and edges, and takes alternative paths free of obstacles and edges, is a real-time obstacle avoiding edge detection robot.
This project proposes a robot with intelligence built into it, which guides it whenever an obstacle comes its way using an algorithm. The design allows the robot to navigate in an unknown environment by avoiding collisions. Obstacle avoidance in robots can bring more flexibility in varying environments and make them much more efficient, so that their continuous human monitoring is not required. The authors’ prototype is show in Fig. 1.
|Bill of Material|
1. Arduino Uno R3 -1
Block diagram of the obstacle avoiding robot is shown in Fig. 2 while its circuit diagram is shown in Fig. 3. This robot is constructed using ATmega 8 family’s microcontroller Arduino Uno R3. When its ultrasonic sensor detects an obstacle or an edge, it sends a command to the microcontroller. The microcontroller, based on the received input signal, directs the robot to push in an alternative direction by actuating the motors that are interfaced with it via a motor driver. Depending on the situation, the robot is able to choose a clear path and the decision-making process of obstacle avoidance and edge detection occurs spontaneously.
The sensor plays an important role in this project. First, the transmitter sends ultrasonic signal bursts at 40kHz. This signal gets reflected back when an object comes in front of the sensor and it is received by the receiver. The ultrasonic sensor generates high-frequency sound waves and evaluates the echo that reaches back to the receiver. So, by using this technique, the ultrasonic waves calculate the distance between the car and the reflected objects continuously.
After an obstacle detection, the car changes its direction by making an autonomous decision. It can measure the distance between itself and surrounding objects in real time.
The program is written in Arduino programming language Sketch. Arduino IDE 1.8.11 has been used to compile and upload the program in the prototype. The project needs various libraries, which have to be included in the external header file for programming.
For uploading the source code ARDUINO_OBSTACLE_AVOIDING_CAR.ino into Arduino Uno board, connect the Arduino board to desktop/laptop using a USB cable. Next, select the board and port and upload the source code.
Construction and testing
First of all, upload the source code into the Arduino Uno and follow the steps mentioned below to assemble the robot.
Step 1. Assembling the chassis (see Fig. 4, Fig. 5, and Fig. 6):
- Solder the wire to positive and GND of the DC gear motors
- Attach the DC gear motors to the bottom of the chassis
- Attach the wheels to the DC motors
Step 2. Mounting the components:
- Screw the Arduino onto top chassis
- Then plug the motor driver shield into Arduino
- Connect the motors to correct pair of terminals—the front motors to front terminals of motor shield and the rear motors to rear terminals of motor shield
Step 3. Setting up the servo:
• Attach the servo on top of the chassis
• Plug the servo into Servo 1 (SER1) header pins on the shield
Step 4. Preparing the ultrasonic sensor: (Fig. 11: Sensor connections)
Place the ultrasonic sensor on the servo using the sensor stand. Then plug four wires into the sensor using female jumpers. Next, connect sensor to Arduino Uno as described below:
TRIGpin 2 (AO)
ECHO→pin 13 (A1)
Step 5. Powering the robot:
Connect the Lipo battery to the L293D motor driver as follows:
Lipo battery (+)→+12V
Lipo battery (-)→GND
The obstacle-avoiding robot is now ready! It can be used for such applications as:
- Mobile navigation systems, military and law enforcement, search and rescue, and forest conservation.
- For household work like automatic vacuum cleaning.
- With proper programming, for weightlifting and auto parking assistance.
Dr S. Rajan is Professor, while Mythili M. is final year student at Department of ECE, Velalar College of Engineering and Technology, Thindal, Erode, Tamil Nadu