Maker.io main logo

Obstacle Detection using 4Duino

2016-09-21 | By 4D Makers

License: None Arduino

 

In this project, we will use several ultrasonic sensors to create a robot car with obstacle detection feature. The sensors will help us estimate the distance of the car from the nearby obstacles. Thus allowing us to create routines that we can execute when the car is about to hit the obstacle while moving.

This project makes a robot car move in a straight line unless it detects an obstacle. If an obstacle has been detected, the robot car will simply try to avoid it by turning left or right. In case, there are obstacle present in the left and right, the robot will instead move back. If it detects an object in all four directions, it will stop.

How it works

 how          

Components

  • 4Duino
  • 2 Motors
  • Motor Driver
  • 4 Ultrasonic Sensors
  • µUSB cable
  • 5 Volts Power Supply

Implementation

Step 1: Build

 build

Build the circuit as shown in the following diagram.

Step 2: Program
Workshop 4 – 4Duino Basic Graphics environment is used to program this project.

This project requires the Arduino IDE to be installed as Workshop calls the Arduino IDE for compiling the Arduino sketches. The Arduino IDE however is not required to be opened or modified to program the 4Duino.

Open this file using Workshop 4.open

Step 3: Comms Port
Connect the 4Duino to the PC using µUSB cable.
nhvThen navigate to the Comms tab and select the Comms port to which the 4Duino connected.

Step 4: Compile and Upload
Go back to “Home” tab. This time, click on the “Comp’nLoad” button.
                                                           upload
After uploading, 4Duino will start moving as soon as it detects a display touch.

 

Step 5: Connect Power Supply
Finally, connect a 5 Volts power supply via µUSB.

as                             

Demonstration

Now, here are the states the robot car will do.

 k

The chassis for the robot car was made from acrylic using laser cutting technology. However, you can easily make your own with other materials or buy from the market.

 

 

制造商零件编号 4DUINO-24
4DUINO ATMEGA32U4/ESP8266/PICASO
4D Systems Pty Ltd
¥691.50
Details
Add all DigiKey Parts to Cart
TechForum

Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.

Visit TechForum