Introduction: The Autonomous Remote Controlled Car

This instructable was created in fulfillment of the project requirement of the Makecourse at the University of South Florida (www.makecourse.com).

This project demonstrates how an Arduino along with a Dual H-bridge Motor Drive is able to control four DC motors and three ultrasonic sensors. The objective here is to demonstrate the circuit schematic and C program that allows the RC car to drive autonomously while avoiding all obstacles in its path. Along with this, this car will also be controlled via an IR remote.

Once accomplished, this car will be able to utilize two modes: the autonomous mode and the remote control mode. The autonomous mode will allow the car to move freely without coming into contact with its surroundings. The remote control mode will allow the user to control the car and move it according to the IR remote. During this mode, the ultrasonic sensors are not operational and thus the car can be moved in whichever direction the user wants.

All in all, this instructable will allow you, the reader, to reproduce my project with ease and satisfaction.

Step 1: Control System and Functionality

Step 2: 3D Printed Design

In order to accomplish this project, it is best to design all the components necessary before assembling. Relative to the project shown, the 3D printed part is the chassis, which needs to be carefully designed to fit all the components. For better results, it is a good idea to print two copies of the chassis and stack them on top of each other in order to gain more space.

Step 3: Gather Parts and Components

  • 1 Arduino Uno
  • 1 L298 Dual H-Bridge Motor Drive
  • 3 HC-SR04 Ultrasonic Sensors
  • 1 IR Receiver
  • 1 IR Remote
  • 4 DC Motors
  • 4 Wheels
  • 1 or 2 RC Car Chassis
  • 1 Mini Breadboard
  • 1 or 2 Battery Packs
  • 8 AA Batteries
  • M-M & M-F Jumper Wires

Step 4: Circuit Schematic Overview

DC Motors & Motor Drive

Right Motors:

  • Connect the top pin of the first motor and the bottom pin of the second motor to OUT1 pin of Motor Drive.
  • Connect the bottom pin of the first motor and the top pin of the second motor to OUT2 pin of Motor Drive.

Left Motors:

  • Connect the top pin of the first motor and the bottom pin of the second motor to OUT3 pin of Motor Drive.
  • Connect the bottom pin of the first motor and the top pin of the second motor to OUT4 pin of Motor Drive.

L298N Motor Drive:

  • Connect +12V terminal of power supply to VCC pin of Motor Drive.
  • Connect -12V terminal of power supply to GND pin of Motor Drive.
  • Connect 5V pin of Motor Drive to 5V pin of Arduino.
  • Connect GND pin of Motor Drive to GND pin of Arduino.
  • Connect input pins IN1, IN2, IN3, and IN4 to Arduino digital pins 2, 3, 4, and 5, respectively.
  • Connect ENA and ENB pins to Arduino digital pins 12 and 13, respectively.

Ultrasonic Sensors

Front Sensor:

  • Connect VCC pin to 5V pin of Motor Drive.
  • Connect Echo pin to Digital pin 6 of Arduino.
  • Connect Trig pin to Digital pin 7 of Arduino.
  • Connect GND to GND pin of Motor Drive.

Right Sensor:

  • Connect VCC pin to 5V pin of Motor Drive.
  • Connect Echo pin to Digital pin 8 of Arduino.
  • Connect Trig pin to Digital pin 9 of Arduino.
  • Connect GND pin to GND pin of Motor Drive.

Left Sensor:

  • Connect VCC pin to 5V pin of Motor Drive.
  • Connect Echo pin to Digital pin 10 of Arduino.
  • Connect Trig pin to Digital pin 11 of Arduino.
  • Connect GND pin to GND pin of Motor Drive.

IR Receiver

  • Connect Signal pin to Analog pin A0 of Arduino.
  • Connect GND pin to GND pin of Arduino.
  • Connect VCC pin to 5V pin of Arduino.

Step 5: Video of the Autonomous Car in Action

Step 6: Arduino Code