0% found this document useful (0 votes)
11 views10 pages

Obstacle 21 30

Robot obstacle

Uploaded by

JANANI C V
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views10 pages

Obstacle 21 30

Robot obstacle

Uploaded by

JANANI C V
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Chapter 3: Materials and Analysis Techniques

3.1 Materials

The following components were used for the hardware implementation of the project:

 1x HC-SR04 Ultrasonic sensor


 1x HC-SR04 holder
 3x 9v battery
 3x 9v battery connectors
 1x SG90 Servo Motor
 1x Arduino UNO R3
 2x Power switch
 1x 4WD Chassis RC car
 Jumper wires
 4x DC Motors
 1x L293D Motor Driver

3.2 Analysis

3.2.1 HC-SR04 Ultrasonic Sensor

Figure 3.1 Diagram showing the basic operation of the HC-SR04 Ultrasonic Sensor. (Adapted from
Electroschematics, 2015)

9
3.2.1.1 HC-SR04 Ultrasonic Sensor Overview
The word ‘ultra’ means ‘beyond’ and sonic means ‘sound’. Combining the two of them together
ultrasonic is a sound which is above the human hearing range (20 KHz).
An Ultrasonic sensor is a sensor that can detect ultrasound waves by converting the waves into electric
signals or vice versa [20], [21], [22].
An ultrasonic sensor is capable of measuring the total distance between itself and an object by sending
out a wave at a certain frequency and listening for that wave to bounce back to it. During this, it
records the tame taken between when the wave was generated and when it bounced back in order to
calculate the distance between it and an object [23].

3.2.1.2 HC-SR04 Ultrasonic Sensor Features


 It has a 5V DC power supply
 Its Quiescent current is less than 2mA
 Its working current is 15mA
 Its effectual angle is less than 15 degrees
 Its ranging distance is between 2cm – 400cm/1” – 13ft
 Its Resolution is 0.3cm
 Its measuring angle is 30degrees
 Its Trigger pulse width is 10uS
 Its dimension is 45mm x 20mm x 15mm

10
3.2.1.3 HC-SR04 Ultrasonic Sensor Pin Configuration

Figure 3.2 HC-SR04 Ultrasonic Sensor Pins

Table 3.1: HC-SR04 Ultrasonic Sensor Pins

Pin Number Pin Name Description

1 VCC The is used to power the sensor with 5V

2 Trigger This is an Input pin which has to be kept high


for 10us to initialize measurement by sending
Ultrasound wave.
3 Echo This is an output pin which goes high for a
period of time equal to the time taken for the
Ultrasonic wave to return back to the sensor.
4 Ground This pin is connected to the ground of the
system

11
3.2.1.4 Working of HC-SR04 Ultrasonic Sensor
Sonar is used by the ultrasonic sensor to obtain the distance between itself and an object. Here’s how
it works:

 The trig pin(transmitter) sends a signal which is a high-frequency sound


 The signal is reflected once it hits an object
 The echo pin(receiver) receives the reflection

For example, if the distance between the object and the sensor is 10cm, and the speed of sound is
340m/s, the sound wave will need to travel about 294μs. The value gotten at the echo pin will be twice
that number because the wave travels to and fro. To get the distance in cm, the time gotten at the echo
pin is multiplied by 0.034 and divided by 2 [24], [25].

3.2.1.5 Applications of HC-SR04 Ultrasonic Sensor


 It is used in robots to detect and avoid obstacles in the path of the robot.
 It is used to measure distance within a wide range (200cm-400cm)
 It can be used for mapping of objects around a sensor by rotation of sensor.
 Since the Ultrasonic waves are capable of penetrating water, it can be used to measure depths of
places like pits, wells, etc. [26].

12
3.2.2 SG-90 Servo Motor

Figure 3.3 SG-90 Servo Motor.

3.2.2.1 SG-90 Servo Motor Overview


A servo motor is an electrical device that pushes or rotates objects with high precision. If there is need
for an object to be rotated as a specific angle or distance, then a servo motor is used [27].

A servo motor consists of a motor that uses servo mechanism. The two types of servo motors are the
DC servo motors (DC powered) and the AC servo motor (AC powered) where the difference between
them is the input power. A very high torque can be obtained from a small and lightweight servo motor
which allows these servo motors to be used in applications like robots, toy cars, etc. The main reason
why a servo motor is used is because of its high angle precision, i.e. after rotating, it will stop and wait
for the next instruction to happen unlike a normal electric motor which rotates as long as it is being
supplied power and stops rotating when power supply is turned off [28][29].

3.2.2.2 Working Principle of Servo Motors


A servo motor includes motors (DC and AC), a potentiometer, gear assembly, and a controlling circuit.

Firstly, gear assembly is used to reduce the Revolutions per Minute (RPM) and to increase the torque
of the motor. At the initial position of the servo motor shaft, the potentiometer knob is in such a way
that no electrical signal is generated at the potentiometer output. An electrical signal is passed to
13
another input terminal of the error detector amplifier and the difference between these two signals is
that one is coming from the potentiometer and the other is coming from another source. The both
signals will be processed in a feedback mechanism and the output will be provided in terms of an error
signal. This error is used as the motor input to cause it to start rotating. The motor shaft is connected
to the potentiometer which causes the potentiometer to generate a signal as the motor rotates. As the
angular position of the potentiometer changes, its feedback output also changes and after a while the
potentiometer reaches a position that the potentiometer output and the external signal are the same.
Once the outputs are the same, the amplifier will not output anything into the motor since there is no
difference between the generated potentiometer signal and the external applied signal which in turn
causes the motor to stop rotating.

Servo motors are controlled by Pulse width Modulation (PWM) which is provided by the control
wires. There is a minimum pulse, a maximum pulse and a repetition rate. A servo motor can turn 90
degrees to either direction from its neutral position. The servo motor expects a pulse every 20ms which
determines how far the motor will turn. In the figure 4-11 below, a 1.5ms pulse will make the motor
turn 90 degrees. If the pulse is shorter than 1.5ms, the shaft moves to 0 degrees and if it is longer than
1.5ms, the shaft will turn to 180 degrees. Pulse with modulation simply means that the angle of
rotation is dependent on the duration of pulse applied to the control PIN.

Basically, servo motors are made up of a DC motor controlled by a potentiometer (Variable resistor)
and some gears which convert the high-speed force into torque [30].

3.2.2.3 Applications of Servo Motors


 Robotics
 Animatronics
 Radio Control Cars/Boats/Planes

3.2.2.4 Advantages of using Servo Motors


 Low Cost
 They have a wide range of sizes and torque ratings
 They are simple to control

14
3.2.3 Arduino UNO R3

Figure 3.4 Arduino UNO R3 Board.

3.2.3.1 Arduino UNO Power Overview

 External power supply voltage: 7V to 12V DC


 USB power or externally via barrel jack connector

Table 3.2: Arduino UNO R3 Pins

Pin Function
Vin Voltage from External power jack
5V 5V output from on-board Voltage regulator chip
3.3V 3.3V output from on-board Voltage regulator chip
Gnd 3 pins for ground
IOREF Tied to 5V, tells Arduino shields voltage level from which Arduino board operates
Reset From RESET pin on MCU, tied to VCC through 10K resistor, pull to GND to reset

15
3.2.3.2 Arduino UNO Digital Input/ Output Overview
 It has 14 Digital Inputs and Outputs
 It has a logic level of 5V
 Its Sink/Source is 20mA per pin
 It utilizes Universal Asynchronous Serial Receiver/Transmitter (UART) for which pin 0 is for
receiving and pin 1 is for transmitting
 It has 8-bit PWM
 It has a Serial Peripheral Interface [19].

3.2.3.3 Arduino UNO Analog Inputs Overview


 Analog Input pins are A0, A1, A2, A3, A4, A5
 Its sampled input is from 0V to 5V and it has a 10 bits resolution
 The AREF pin can be used to adjust the upper limit of the input range
 It has Two-wire Interface COM
 Pin A4 is SDA pin for data
 Pin A5 is SCL pin for clock [20].

3.2.3.4 Arduino UNO R3 Communication Overview


 It can communicate with a computer, another Arduino, shields, sensors [21].
 Asynchronous communication (No clock):
 UART TTL (5V)
 On board ATmegaU16 programmed to function as USB to serial chip
 ATmegaU16 uses standard USB COM drivers so that no external drivers are required for
communication with the board
 Synchronous communication (Clock) uses SPI Pins 10, 11, 12, 13, and TWI pins A4 and A5.

3.2.3.5 Arduino Programming Overview


 The bootloader firmware comes already preinstalled with the Arduino UNO [22]
 New sketches can be Uploaded via the USB

16
 External programmer can be used to upload sketches via the In-circuit serial programmer pins
(ICSP)
 It has 32KB of Flash memory where the sketches are stored
 It has 2KB of SRAM where the variables are stored until power cycled
 It has 1KB of EEPROM which stores long term information.

3.2.4 DC Motor

Figure 3.5 DC Motors (Adapted from Allaboutcircuits, 2017)

3.2.4.1 DC Motor Overview


A DC motor is a device that converts electrical energy into mechanical energy as it rotates. A magnetic
field is produced by an inductor inside the DC motor and this magnetic field creates a rotary motion
as DC voltage is applied to its terminal. There is an Iron shaft inside the motor which is wrapped in a
coil of wire. This shaft contains two fixed North and South magnets on both sides which causes both
an attractive and repulsive force thereby producing a torque.

3.2.4.2 Types of DC Motors


 Brushed Motors
 Brushless Motors
 Planetary Gear Motors
 Spur Gear Motors
 Stepper Motors

17
 Coreless & Coreless Brushless Motors
 Gear heads Motors

3.2.4.3 DC Gear Motor

Figure 3.6 DC Gear Motor. (Adapted from Allaboutcircuits, 2017)

DC Gear Motors are the most common kind of motors which convert electrical to mechanical energy.

A gear motor consists of a gearbox and a motor. The addition of a gear head to a motor reduced the
speed while increasing the torque output. Important parameters in gear motors include:

 Speed (rpm)
 Efficiency (%)
 Torque (lb.-in)

The factors to consider before selecting a gear motor for any application include:

 Speed
 Load
 Torque requirements

18

You might also like