Getting started with Robotics -

CREATING YOUR FIRST ARDUINO ROBOT

Shivansh Srivastava
6 min readAug 24, 2018

There are an endless number of things to discover about robotics. A lot of it is just too fantastic for people to believe.

Daniel H. Wilson

INTRODUCTION

Robotics is branch of Computer Science,Mechanical engineering as well of Electronics engineering that deals with the construction, the design , the operation and the application of robots as well as the computer systems for their control, sensory feedback , and information processing.

Historically, robotics has seemingly produced more novelties than any other industry. We’ve seen laughably useless creations such as Harvard’s origami-folding robot and Disney’s sand-art robot. But now that the field has matured, the winds seem to be shifting in a more utilitarian direction. Robots can not only be useful, but also lifesaving. Robotics has made exciting advancements in health care technology in the past few years, and the potential for medical robots appears limitless. Not only health care robotics has made its reach to almost all sectors ,from industries to photography to military and much more .Even robotics has become one of the biggest research domain.So let us get started with our First project.

Making Our First Bot

Robots have always filled our thoughts with awe and admiration. So what if we could make one

Lets first create our own simple Obstacle Avoiding Robot which can detect the obstacle in its path and change its path accordingly.And then one can deploy the concept to other bots .

COMPONENTS REQUIRED-

1. Arduino : The brain of our bot

For our first bot we have used Arduino UNO Microcontroller.

Arduino is an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. It’s intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments.

Out of numerous microcontrollers out their we used Arduino UNO because :

1. Nearly instantaneous start (plug in a USB cord and load an example program and you can see something work)

2. A huge community of people working in the same environment.

3. A large assortment of included libraries for interfacing to a wide range of hardware.

4. Ease of use. The Arduino Uno has built in pinouts for providing you with 5v, 3.3V, ground, analog input, digital output, SPI, I2C which comes in handy.

5.Arduino is great for prototyping.

2.Arduino IDE

See Arduino is a microcontroller and to make it to work as needed it needs to be programmed. So for programming our Arduino we require Arduino IDE.The Arduino integrated development environment (IDE) is a cross-platform application.It is used to write and upload programs to Arduino board.The Arduino IDE supports the languages C and C++ using special rules of code structuring. The Arduino IDE supplies a software library from the Wiring project, which provides many common input and output procedures. User-written code only requires two basic functions, for starting the sketch and the main program loop, that are compiled and linked with a program stub main() into an executable cyclic executive program

3.Ultrasonic Sensor(HC-SR04)-

The other most important component after arduino is Ultrasonic sensor because this is the component that detects the obstacles and then sends signal to arduino .

How It Works — Ultrasonic Sensor

It emits an ultrasound at 40 000 Hz which travels through the air and if there is an object or obstacle on its path It will bounce back to the module. Considering the travel time and the speed of the sound you can calculate the distance.

The HC-SR04 Ultrasonic Module has 4 pins, Ground, VCC, Trig and Echo. The Ground and the VCC pins of the module needs to be connected to the Ground and the 5 volts pins on the Arduino Board respectively and the trig and echo pins to any Digital I/O pin on the Arduino Board.

In order to generate the ultrasound you need to set the Trig on a High State for 10 µs. That will send out an 8 cycle sonic burst which will travel at the speed sound and it will be received in the Echo pin. The Echo pin will output the time in microseconds the sound wave traveled.

For example, if the object is 10 cm away from the sensor, and the speed of the sound is 340 m/s or 0.034 cm/µs the sound wave will need to travel about 294 u seconds. But what you will get from the Echo pin will be double that number because the sound wave needs to travel forward and bounce backward. So in order to get the distance in cm we need to multiply the received travel time value from the echo pin by 0.034 and divide it by 2.

4.L293D Motor Driver-

Arduino works on 5V power supply and it is not capable of driving motors.Also if we directly use power source than high current drawn may damage arduino..So here comes the need of motor driver.A motor driver is an integrated circuit chip which is usually used to control motors in autonomous robots. Motor driver act as an interface between Arduino and the motors.

5.Robot Chassis-

To provide platform for holding various Components.

6.Servo Motor-

For Constant motion of our ultrasonic sensor.

7. 9V Battery and Jumper Wires -

For Supplying power and connecting the circuit.

WORKING -

Block Diagram-

Schematics-

Algorithm/Flowchart Diagram-

Code-

RESULT-

So we Successfully made our first Robot .The same concept of obstacle avoiding can be deployed to many other projects like Parking Sensors , Stick for blind people and can be used to create your very own Radar and much more…….

--

--