Bukit Mertajam, Penang

Obstacle Avoiding Robot

Since we have successfully build Bluetooth Mobile Robot, let’s try to turn this robot to an “Obstacle Avoiding Robot” by adding an ultrasonic sensor to it. This robot will avoiding any obstacle in distance of 10 cm in front of it. Just follow this tutorial to know more 🙂

Hardware Preparation

This tutorial use :

  1. Maker UNO Bluetooth Robot Kit
  2. HC-SR04 Ultrasonic Sensor

You can make the hardware connection based on the diagram and table below.

Connection
Ultrasonic : TrigMaker UNO: Pin 3
Ultrasonic : EchoMaker UNO: Pin 4
Ultrasonic : GNDMaker UNO: GND
Ultrasonic : VCCL298ND : 5V
L298ND : ENAMaker UNO: Pin 5
L298ND : ENBMaker UNO: Pin 6
L298ND : IN1Maker UNO: Pin 7
L298ND : IN2Maker UNO: Pin 9
L298ND : IN3Maker UNO: Pin 10
L298ND : IN4Maker UNO: Pin 11
Figure 1 : Hardware Connection

Sample Code

This is the sample code used for this tutorial. Try it!

Thank you

Thank you for reading this tutorial and we hope it helps your project development. If you have any technical inquiry, please post at Cytron Technical Forum.

Comments (2)

How to use this kit to control a lawn mower? Because lawn mower is too heavy for these small DC motors. And how can I make this kit to control power window motors since it requires higher voltage to work.

Hi, this tutorial shows a concept of obstacle avoidance robot. To build an actual size of lawn mower using this kit is not suitable. To control power window motors, you might need to use higher rating of motor drivers. For further discussion, please post at Cytron Technical Forum. Thanks.

Leave a comment