0% found this document useful (0 votes)
35 views51 pages

Robotics Lab Manual Final

The document outlines the lab manual for the Robotics course (ES1053) at Vishwakarma Institute of Technology, detailing course outcomes, assignments, and experiments related to Arduino Uno interfacing. It includes specific tasks for students, such as interfacing LEDs and LDRs, with a focus on practical applications and programming using Arduino IDE. The manual serves as a guide for students to learn about microcontrollers, sensors, and various interfacing techniques in robotics.

Uploaded by

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

Robotics Lab Manual Final

The document outlines the lab manual for the Robotics course (ES1053) at Vishwakarma Institute of Technology, detailing course outcomes, assignments, and experiments related to Arduino Uno interfacing. It includes specific tasks for students, such as interfacing LEDs and LDRs, with a focus on practical applications and programming using Arduino IDE. The manual serves as a guide for students to learn about microcontrollers, sensors, and various interfacing techniques in robotics.

Uploaded by

sukrutkokate123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Bansilal Ramnath Agarwal Charitable Trust’s

Vishwakarma Institute of Technology,Pune-37


(An autonomous Institute of Savitribai Phule Pune University)

Department of Engineering Science and Humanities (DESH)

Lab Manual

Course Code Course Name Teaching Scheme(Hrs. /Week) Credits


ES1053 Robotics Theory: 3 Hours / Week 4
Lab: 2 Hours / Week

Course Outcomes:

1. Interpret various terminologies from Robotics and Robot Kinematics


2. Identify, distinguish, and analyze fundamental terms and working mechanisms of different actuators
used in Robotics.
3. Identify, distinguish, and interpret different semiconductor devices, digital devices used in robotics.
4. Illustrate the internal configuration, architecture, and terminologies of microcontroller.
5. Analyze and interface different sensors and its peripherals with microcontroller.
6. interpret and distinguish different serial communication protocols used in Robotics
VISHWAKARMA INSTITUTE OF TECHNOLOGY
Department of Engineering, Sciences and Humanities (DESH)
FYBTech –Robotics – ES1053 – Laboratory Journal
A.Y. 2023-2024 – semester 1

INDEX
Assign. Page Instructor’s
Date Title Marks Sign.
No. No.

1. 04/02/2024 Know your Micro-controller Kit 4-6

2. 11/02/2024 Interfacing of LED with Arduino Uno Kit 8-12

3. 25/02/2024 Interfacing of LDR with Arduino Uno Kit 14-17

4. 03/03/2024 Interfacing of Ultrasonic sensor with 19-22


Arduino Uno Kit

5. 17/03/2024 16x2 LCD Interfacing with Arduino Uno Kit 24-29

6. 01/04/2024 Thermistor analog temperature sensor 31-33


interfacing with Arduino

7. 08/04/2024 IR sensor interfacing with Arduino Uno. 35-38

8. 15/04/2024 Seven Segment Display Interfacing with 40-43


Arduino

9. 22/04/2024 Servo Motor Interfacing with arduino 45-47

10. 29/04/2024 DC Motor Interfacing with Arduino 49-51

The above Laboratory assignments are performed and completed by the following student.

Name of the student – Sukrut Kokate

Roll No. – 53 Batch – 3 Division – I PRNo. – 12310129

Laboratory Instructor Head of the Department

(Prof. Kiran More) (Prof. Dr. C. M. Mahajan)


Vishwakarma Institute of Technology
Department of Engineering, Sciences and Humanities
FY: 2023-2024: Semester I
ES1053: Robotics

Robotics Laboratory Assignment No. 01

Title of the assignment – Know your Micro-controller Kit

Name of the student – Sukrut Kokate

Roll No. – 53 Batch – 3 Division – I PRNo. – 12310129

Date of performance – 02/03/2024


Vishwakarma Institute of Technology
Department of Engineering, Sciences and Humanities
FY: 2023-2024: Semester I
ES1053: Robotics

Experiment No-1.
Title: Know your Micro-controller kit.

Tasks:
A) Get introduced to the Arduino Uno kit hardware.
B) Get introduced to the features of Arduino IDE.

History & important features of the Arduino UNO kit hardware:

The Arduino UNO is an open-source microcontroller board based on the Microchip AT mega 328P
microcontroller and developed by Arduino. Arduino is a prototype platform(open-source) based on an
easy-to-use hardware and software. It consists of a circuit board, which can be programmed (referred to
a microcontroller) and a ready- made software called Arduino IDE(Integrated Development
Environment),which is used to write and upload the computer code to the physical board.
Key Features -
 Arduino boards are able to read analog or digital input signals from different sensors and turn it in
to an output such as activating a motor, turning LED on/off, connect to the cloud and many
actions.
 You can control your board functions by sending a set of instructions to the microcontroller on the
board via Arduino IDE (referred to as uploadingsoftware).
 Unlike most previous programmable circuit boards, Arduino does not need an extra piece of
hardware (called a programmer) in order to load a new code onto the board. You can
simply use the USB cable since it provides the in system programming facility.

 Additionally, the Arduino IDE uses a simplified version of C++, making it easier to learn to
program.
 Finally, Arduino provides a standard form factor that breaks the functions of the micro-
controller into an easily accessible package.

Specifications of Arduino UNO:

 Microcontroller: ATmega328

 Operating Voltage – 5V Input voltage - 7-12 V Recommended), 6-20v (limits).

 Digital / pins: 14 C6 are PWM) 01 Analog Vo pins 16. • De current per 1/0 pin - 40mA for
3.3v pin-50mA

 Flash memory - 32 KD of which 0.5 XB wed by boot loader → SRAM -2kh (ATmega328)

 EEPROM - 1xb. (AT mega 32), Clock speed - 16 MHz


Vishwakarma Institute of Technology
Department of Engineering, Sciences and Humanities
FY: 2023-2024: Semester I
ES1053: Robotics

Parts of Arduino Uno:

Important features of Arduino IDE and the menu:

 Sketch editing tools- Arduino programs are called as sketch. Tool has various libraries to
perform different mathematical, interfacing functions. Also provides the facility of a Serial
Monitor to observe interim results. One can choose board of the choice as per requirements.
Port selection is also available.
 Arduino programs can be divided in three main parts: Structure, Values (variables and
constants), and Functions. In this tutorial, we will learn about the Arduino software program,
step by step, and how we can write the program without any syntax or compilation error.
Software structure consists of two main functions −
 Setup( ) function - The setup() function is called when a sketch starts. Use it to initialize the
variables, pin modes, start using libraries, etc. The setup function will only run once, after
each power up or reset of the Arduino board.
 Loop( ) function - After creating a setup() function, which initializes and sets the initial
values, the loop() function does precisely what its name suggests, and loops consecutively,
allowing your program to change and respond. Use it to actively control the Arduino board.

Pins of Arduino Uno:


Vin: This is the input voltage pin of the Arduino board used to provide input supply from an
external power source.
5V: This pin of the Arduino board is used as a regulated power supply voltage and it is used
to give supply to the board as well as onboard components.
3.3V: This pin of the board is used to provide a supply of 3.3V which is generated from a
voltage regulator on the board
GND: This pin of the board is used to ground the Arduino board.
Reset: This pin of the board is used to reset the microcontroller. It is used to Resets the
microcontroller.
Analog Pins: The pins A0 to A5 are used as an analog input and it is in the range of 0-5V.
Digital Pins: The pins 0 to 13 are used as a digital input or output for the Arduino board.
Vishwakarma Institute of Technology
Department of Engineering, Sciences and Humanities
FY: 2023-2024: Semester I
ES1053: Robotics

Serial Pins: These pins are also known as a UART pin. It is used for communication between
the Arduino board and a computer or other devices. The transmitter pin number 1 and
receiver pin number 0 is used to transmit and receive the data resp.
External Interrupt Pins: This pin of the Arduino board is used to produce the External
interrupt and it is done by pin numbers 2 and 3.
PWM Pins: This pins of the board is used to convert the digital signal into an analog by
varying the width of the Pulse. The pin numbers 3, 5, 6,9,10 and 11 are used as a PWM pin.
SPI Pins: This is the Serial Peripheral Interface pin; it is used to maintain SPI
communication with the help of the SPI library. SPI pins include:
1. SS: Pin number 10 is used as a Slave Select
2. MOSI: Pin number 11 is used as a Master Out Slave In
3. MISO: Pin number 12 is used as a Master In Slave Out
4. SCK: Pin number 13 is used as a Serial Clock
LED Pin: The board has an inbuilt LED using digital pin-13. The LED glows only when the
digital pin becomes high.
AREF Pin: This is an analog reference pin of the Arduino board. It is used to provide a
reference voltage from an external power supply.

Conclusion -

In this lab we learnt about the Arduino UNO and its features and how it can be used to do innumerable tasks.
We also learnt about it being a multipurpose device.
Vishwakarma Institute of Technology
Department of Engineering, Sciences and Humanities
FY: 2023-2024: Semester I
ES1053: Robotics

Robotics Laboratory Assignment No. 02

Title of the assignment – Interfacing of LED with Arduino Uno Kit

Name of the student – Sukrut Kokate

Roll No. – 53 Batch – 3 Division – I PRNo. – 12310129

Date of performance – 11/02/2024


Vishwakarma Institute of Technology
Department of Engineering, Sciences and Humanities
FY: 2023-2024: Semester I
ES1053: Robotics

Experiment No- 2

Title: Interfacing of LED with Arduino Uno kit.

Pre-requisite: Information about safe voltage levels and protection of LEDS.

Tasks: Interface external LEDs with the UNG kit in a variety of combination and write a
program.

A) To glow 3 LEDS in

1) Alternate fashion &


2) Running light sequence in continuous loop.

B) To glow 8 LEDS in - i) alternatively ii) simultaneously.

C) To simulate working of traffic signal for two three way road. Formulate your own theme and
delay cycle Decide the hardware required and assemble the same on a breadboard for your theme

Theory: As per the problem statement, we need to connect given LEDS into the specified variety
of combinations using Arduino Uno, jumpers, LED's, breadboards and resistance.

In the case of 5-LED problem statement, we need to arrange the LEDs in Specified manner along
with appropriate resistance in order to prevent LED from bursting. Similarly, vehicle turn
indicator and traffic signal are safety measures, which would work on similar principle.

Working: When we complete the total connection and coding part, the working can be
understood easily.

 First of all, in all the 3 cases, LED's blink or glow so using “Digital write" they can glow.
 In the alternating lightening case 1, 3, 5 glow while LED, 2, 4 are off and vice-versa...

Whereas in loop run, we just increase the delay time. In case of parking light system, similar
mechanism is used. used along with delay, where the system depicts left led glowing to show that
vehicle is turning left and right glower when the vehicle is turning right and bath of them glow
when the vehicle u parked, while above two cases are similar, traffic light has 6 Led's in total (for
two way) and two glow at a time, where delay time is quite different as compared to above two
cares.
Vishwakarma Institute of Technology
Department of Engineering, Sciences and Humanities
FY: 2023-2024: Semester I
ES1053: Robotics

Electronic components and materials required:


 Arduino Uno - operating voltage 5.v. AT mega 328P. No of digital 1/o pins-14, Input voltage
limits 6-20 V.

 LEDs should be available in different colors as per requirement. Specification forward biased.
1.2 to 36 V rated about 10 to 30 mA.

 Bread board - 5A rated. 2 distribution strips.

 Jumpers should be male to male.

 Resistors - As per requirement, but 182 recommended.

 Arduino IDE software - Latest supporting version supporting UNO.

ACTUAL CONNECTED CIRCUIT PHOTOS

Task 1

Circuit Connection photo before operation/ Working


Vishwakarma Institute of Technology
Department of Engineering, Sciences and Humanities
FY: 2023-2024: Semester I
ES1053: Robotics

Actual Photograph during Working of the circuit

3 LED Alternate 3 LED Simultaneous

Task 2

Circuit Connection photo before operation/ Working


Vishwakarma Institute of Technology
Department of Engineering, Sciences and Humanities
FY: 2023-2024: Semester I
ES1053: Robotics

Actual Photograph during Working of the circuit

8 LED Alternate 8 LED Simultaneous


EXPALNATION OF THE RESULT OF EACH TASK

In first Task with 8 LEDs, the code was such that the LEDs would glow alternatively.
In second Task with 3 LEDs, the code was written such that the 8 LEDs would glow simultaneously.
When one LED glows the other seven are off.

Task 3

Circuit Connection photo before operation/ Working


Vishwakarma Institute of Technology
Department of Engineering, Sciences and Humanities
FY: 2023-2024: Semester I
ES1053: Robotics

Actual Photograph during Working of the circuit


Vishwakarma Institute of Technology
Department of Engineering, Sciences and Humanities
FY: 2023-2024: Semester I
ES1053: Robotics

EXPALNATION OF THE RESULT OF EACH TASK


In this Task, a three way traffic light signal model, at a time one green light and two red light glow and it
changes simultaneously with yellow lights turning on when changing from red to green light or vice-versa.

Industrial application:
 This project can be used in traffic signals and vehicle indicator.
Vishwakarma Institute of Technology
Department of Engineering, Sciences and Humanities
FY: 2023-2024: Semester I
ES1053: Robotics
 In day to day life, in festival lightings, road safety boards, etc.

Conclusion:

Through this Lab/Assignment, I learnt how to connect LEDs to Arduino Uno board. I learnt how to
delay function properly in order to create certain light patterns with LEDs like alternate light on,
traffic light.
Vishwakarma Institute of Technology
Department of Engineering, Sciences and Humanities
FY: 2023-2024: Semester I
ES1053: Robotics

Robotics Laboratory Assignment No. 03

Title of the assignment – Interfacing of LDR with Arduino Uno Kit

Name of the student – Sukrut Kokate


Roll No. – 53 Batch – 3 Division – I PRNo. – 12310129

Date of performance – 25/02/2024


Vishwakarma Institute of Technology
Department of Engineering, Sciences and Humanities
FY: 2023-2024: Semester I
ES1053: Robotics

Experiment No.-3

Title: Interfacing of LDR with ARDUINO UNO kit.

Pre-requisites: Assignment number 2 must be performed and Principle of working of LDR.

Tasks: Interface LDR with the UNO kit and write a program.

A) To implement automated street light ON OFF system depending upon at ambient light
intensity. Use at least 3-LESs as street Light.

B) To count number of objects passing through. The system should use light source (LED) and
detector (LDR). Initially count should be. Zero and with every object passing it should be
incremented by '1' Display the count on serial monitor of the serial monitor.

Theory:

Working Principle-The working principle of an LDR is photoconductivity, which is nothing but


an optical phenomenon. When the material absorbs the light then the conductivity of the material
enhances. When the light falls on the LDR, then the electrons in the material's valence bond are
eager to the conduction band. But, the photons in the incident light must have energy superior to
the band gap of the material to make the electrons jump from one band to another band (valence
to conduction).
Hence, when light has ample energy, more electrons are excited to the conduction band which
grades in many change canters. When the effect of this process and the flow of the current starts
flowing more the resistance of the device decreases.

Sensor Specifications -

 Resistance: 400 ohm to 400 kilo ohm.

 Normal resistance variance: 1 kilo ohm to 10 kilo ohm.

 Sensitivity: about 3 msec.

 Voltage rating: - 3-12 V.

For the first problem statement, an automated sheet be implemented. Here, when the light is
falling on the LDR the LEDS will turn off and when the LDR is not receiving no / low light
intensity the LEDS will glow, which depicts that during the day the street lights would be off and
during night times they will turn on.
Vishwakarma Institute of Technology
Department of Engineering, Sciences and Humanities
FY: 2023-2024: Semester I
ES1053: Robotics
For the second problem statement, a counted is to be implemented where in the system would
record the number of objects posted through. Here, an LDR and & light source led would be
placed opposite to each other. When an object passes between both of them it would block the
light source to the LDR due to which the LDR will turn off hence incrementing the count. So,
every time an object passes the count will be incremented and from this, we can get the total
number of objects passed. The final count would be printed on the serial monitor.

Electronic components and materials required:

1) Arduino board (UNO): operating voltage 5V (AT mega 328P)

2) LDR Rating - 250 V

3) Bread board- 5A rated.2 distribution strips.

4) Arduino IDE software.

5) LEDS –lids as per requirement (4) and in different colors.

6) Jumpers - should be male to male.

7) Resistors as per requirement, but 1 kilo ohm recommended.

Interfacing Circuit diagram: (Draw Connections between Arduino Uno and the Sensor as
well as other components)
The first Tasks was connecting the LDR and Arduino Uno on the bread board which was to be
done very carefully to avoid errors. Then, the coding part expected was quite easy and lastly it
was working at.
Vishwakarma Institute of Technology
Department of Engineering, Sciences and Humanities
FY: 2023-2024: Semester I
ES1053: Robotics

ACTUAL CONNECTED CIRCUIT PHOTOS

Task 1

Circuit Connection photo before operation/ Working

Actual Photograph during Working of the circuit

Photograph of Serial Monitor depicting the result


Vishwakarma Institute of Technology
Department of Engineering, Sciences and Humanities
FY: 2023-2024: Semester I
ES1053: Robotics

EXPALNATION OF THE RESULT OF EACH TASK

Application:
Apart from being used in street lights, LDR is used in the:

 Infrared astronomy.

 It is used in light failure alarm circuits and used in light meter.

 LDR is also used in smoke detectors.

Conclusion:

Through this lab, I learnt about Light Dependent Resistor (LDR). LDR is a device which is used to sense
light based on its intensity. It measures the changes in the intensity of light whose values can be seen using
Arduino Uno Board.
Vishwakarma Institute of Technology
Department of Engineering, Sciences and Humanities
FY: 2023-2024: Semester I
ES1053: Robotics

Robotics Laboratory Assignment No. 04

Title of the assignment – Interfacing of Ultrasonic sensor with Arduino

Name of the student – Sukrut Kokate


Roll No. – 53 Batch – 3 Division – I PRNo. – 12310129

Date of performance – 03/03/2024


Vishwakarma Institute of Technology
Department of Engineering, Sciences and Humanities
FY: 2023-2024: Semester I
ES1053: Robotics

Experiment No.-4

Title - Interfacing of ultrasonic sensor with Arduino Uno kit.

Pre-requisite: Principle of working of ultrasonic sensor and Calculation of distance

Tasks: Interface ultrasonic sensor with the UNO kit and write a program.

A) To find distance (in cm) between the sensor and fixed surface like obstacle or wall etc.
Display the distance on Serial monitor. Verity the distance by actual measurement.
B) Ultrasonic distance range finding and turn on Buzzer and LED.
C) Ultrasonic distance between two ranges finding and turn ON appropriate LED

Theory:
Working Principle - Ultrasonic sensors work by sending out a sound wave at a frequency above
the range of human hearing. The transducer of the sensor acts as a microphone to receive and
send the ultrasonic sound.

Sensor Specifications:

 Operating voltage +5v

 Theoretical measuring distance - 2cm to 450 cm

 Practical measuring distance -2 cm to 80 cm

 Accuracy-3mm,measuring angle covered < 15°

 Operating current < 15 mA.

 Operating frequency – 40 Hz.

 Buzzer

Firstly, the sensor and Arduino Uno are connected. Now, as per the problem statement, we have
to measure the distance between the sensor and a fixed surface. Once the power supply is given,
the sensor will send and receive the sound waves and calculate the time taken for the waves to
return. Distance will be calculated by using the formula distance = (speed of sound X time) /2,
and this distance measured will be displayed on the Serial monitor.
Vishwakarma Institute of Technology
Department of Engineering, Sciences and Humanities
FY: 2023-2024: Semester I
ES1053: Robotics

Operating components and materials required:

 Arduino board (und) - operating voltage 5V (At mega 328P)

 Breadboard 1-5A rated, 2-distribution strips.

 Jumpers - set of make to male connectors & a set of male to female connectors.

 Arduino IDE Software - updated to the latest version.

 Ultrasonic Sensor - operating voltage-5x

 Buzzer

ACTUAL CONNECTED CIRCUIT PHOTOS

Task 1

Circuit Connection photo before operation/ Working

Actual Photograph during Working of the circuit

Photograph of Serial Monitor depicting the result


Vishwakarma Institute of Technology
Department of Engineering, Sciences and Humanities
FY: 2023-2024: Semester I
ES1053: Robotics

EXPALNATION OF THE RESULT OF EACH TASK


In this Task, the Ultrasonic sensor is programmed in such a way that it detects range of distance and glows
LEDs accordingly. Using if else loop certain range of values of distances are assigned for each LED to glow
Vishwakarma Institute of Technology
Department of Engineering, Sciences and Humanities
FY: 2023-2024: Semester I
ES1053: Robotics
and based on value Ultrasonic sensor has calculated, either of the LED glow using range of distance provided
in code.

Industrial application: Apart from the distance measurement, ultrasonic sensors are used in
robot sensing, presence detection, tank level detection and many applications on the production
line, etc.

Conclusion:

In this lab, I learnt about the ultrasonic sensor. It works on principle of echo of sound. There is a
transmitter and a receiver present on ultrasonic sensor. The transmitter produces an ultrasonic sound
the sound keeps on travelling until it is reflected back by any object. When the sound gets reflected
back it is received by the receiver, in some time period. This time period between the sound
produced by transmitter till it gets received is calculated by the Ultrasonic Sensor. With help of
Arduino IDE we can detect the distance by formula of distance is speed times time period.

Robotics Laboratory Assignment No. 05

Title of the assignment – 16x2 LCD Interfacing with Arduino Uno Kit

Name of the student – Sukrut Kokate


Roll No. – 53 Batch – 3 Division – I PRNo. – 12310129

Date of performance – 17/03/2024


Vishwakarma Institute of Technology
Department of Engineering, Sciences and Humanities
FY: 2023-2024: Semester I
ES1053: Robotics

Experiment No.5

Title: 16x2 LCD Interfacing with Arduino Uno Kit

Prerequisites: Working Principle and Character formation logic of LCD

Tasks:
A) Write a program to display Hello World! On LCD at desired location
B) Write a program to scroll custom message on Right or Left direction on LCD.
C) Write a program to display custom characters on LCD

Theory:
Liquid Crystal Display (LCD) is the display device that can be interfaced with Arduino. For this,
The LiquidCrystal library (LiquidCrystal.h) allows to control LCD displays. LCDs have a
parallel interface, meaning that the microcontroller has to manipulate several interface pins at
once to control the display. The interface consists of the following pins:
1) A register selects (RS) pin that controls where in the LCD's memory for writing data to.
One can select either the data register, which holds what goes on the screen, or an
instruction register, which is where the LCD's controller looks for instructions on what to
do next.
2) A Read/Write (R/W) pin that selects reading mode or writing mode
3) An Enable pin that enables writing to the registers
4) 8 data pins (D0 -D7). The states of these pins (high or low) are the bits that you're writing
to a register when you write, or the values you're reading when you read.

A) Also, the Liquid Crystal library shows how to use the scrollDisplayLeft() and
scrollDisplayRight() methods to reverse the direction the text is flowing.
B) For custom character display,
Create a custom character for use on the LCD. Up to eight characters of 5x8 pixels are
supported (numbered 0 to 7). The appearance of each custom character is specified by an
array of eight bytes, one for each row. The five least significant bits of each byte
determine the pixels in that row. To display a custom character on the screen, write() its
number.

There's also a display contrast pin (Vo), power supply pins (+5V and Gnd) and LED
Backlight (Bklt+ and BKlt-) pins that you can use to power the LCD, control the display
contrast, and turn on and off the LED backlight, respectively.
Vishwakarma Institute of Technology
Department of Engineering, Sciences and Humanities
FY: 2023-2024: Semester I
ES1053: Robotics

LCD functions: 1. LiquidCrystal. Begin(16x2)- Initializes LCD specifying size in number of


columns and rows.
Electronic components and materials required:
 Arduino UNO Development Board,
 USB Cable,
 Breadboard,
 LED, Resistor (1 k ohm),
 10K Potentiometer,
 Connecting Wires,
 16x2 LCD Module.

ACTUAL CONNECTED CIRCUIT PHOTOS

Task 1

Circuit Connection photo before operation/ Working


Vishwakarma Institute of Technology
Department of Engineering, Sciences and Humanities
FY: 2023-2024: Semester I
ES1053: Robotics

Actual Photograph during Working of the circuit

CODE

EXPALNATION OF THE RESULT OF EACH TASK


Through this task I learned to use LCD and connect it with Arduino to display output on the screen.
Vishwakarma Institute of Technology
Department of Engineering, Sciences and Humanities
FY: 2023-2024: Semester I
ES1053: Robotics

Flowchart/ Algorithm: Write detailed steps of algorithm for each Tasks(A,B,C)


Step - 1
Open Arduino IDE. Here use "Liquid Crystal" library. This is an inbuilt library, so no need to
install that library separately.
#include <LiquidCrystal.h>
Step -2
Next initialize the library with the number of the interface pins. With the function "LiquidCrystal
lcd()". The function has six attributes. These are the interface pins in the order of "RS, E, D4, D5,
D6, D7". Here we use pins 12, 11, 5, 4, 3, 2. corresponding to above.
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
Step – 3
Now can call this display by "lcd". Next program the setup part. We need to set the number of
columns and number of rows. Here use the LCD with 16 column and 2 rows. Set the number of
columns and rows by the function "[Link](16, 2)". If you have a display with 16 columns and 4
rows this become "[Link](16, 4)". And set the A0 pin as input.
[Link](16,2); pinMode(A0,INPUT);
Vishwakarma Institute of Technology
Department of Engineering, Sciences and Humanities
FY: 2023-2024: Semester I
ES1053: Robotics

Step - 4
The setup part is over. Next loop partFirst to clear the displayuse the function "lcd. Clear()". This
function will clean the entire [Link]. Clear();
Step - 5
We need a starting point to start printing. So set the cursor to that particular point by the function
"[Link]()". This function has only two attributes. It is that starting points.(The number of
column and number of row). Start from first column first row. The first column is represented as
0, second is 1, and so on and the first raw is represented as 0, second is 1. So, we need to start
from the position (0, 0). You can easily understand if you know about matrix. The piece of code
become,
[Link](0,0);
Step - 6
The instruction to print. to print "Hello World" by the instruction "[Link]()". Alternatively, you
can print anything. Please don, t forgot the double quote marks.
[Link]("Hello World");
Step -7
In the above printing statement, we use total of 14 characters. So, the current position of cursor is
at (14, 0). Now to print on the next line, i.e., the position (0, 1). Set the cursor to that point by the
function "[Link]()".
[Link](0,1);
Step - 8
Now the cursor is at the position of second row and first column(0, 1). Then print another text
"Value" by the function [Link]().
[Link]("Value : ");
Step - 9
Here we use 8 characters in second line. So, the current position of cursor is (8, 1). Next, we need
to read the analog value from the pin A0 and print it to the display. It uses "analogRead()"
function to read the analog value and use the "[Link]()" function to print the value to the
display. And there is no need of double quotes.
[Link](analogRead(A0));
Step - 10
Delay(): we have to add some delay. Otherwise, the text will blinkcontinues. That because of the
first instruction "LCD. Clear()". Every time when see this command the Arduino will clear the
display, This results the blinking of display. But use of delay will decrease this blinking.
delay(500);
Step - 11
Vishwakarma Institute of Technology
Department of Engineering, Sciences and Humanities
FY: 2023-2024: Semester I
ES1053: Robotics
Connection
* LCD RS pin to digital pin 12
* LCD Enable pin to digital pin 11
* LCD D4 pin to digital pin 5
* LCD D5 pin to digital pin 4
* LCD D6 pin to digital pin 3
* LCD D7 pin to digital pin 2
* LCD R/W pin to ground
* LCD VSS pin to ground
* LCD VCC pin to 5V
* 10K POT:
* ends to +5V and ground
* wiper to LCD VO pin (pin 3)

Conclusion:
LCDs are mostly used in portable electronic games, in flat panel televisions, in electronic
billboards, in video- projection system and many more such devices.
Vishwakarma Institute of Technology
Department of Engineering, Sciences and Humanities
FY: 2023-2024: Semester I
ES1053: Robotics

Robotics Laboratory Assignment No. 06

Title of the assignment –Thermistor analog temperature sensor Interfacing


with Arduino

Name of the student – Sukrut Kokate


Roll No. – 53 Batch – 3 Division – I PRNo. – 12310129

Date of performance – 01/04/2024

Experiment No. 6

Title: Thermistor analog temperature sensor interfacing with Arduino


Pre requisite:

Tasks:
A) Take temperature readings from the sensor and display the results on the Serial Monitor.

Theory: A thermistor is a type of resistor whose resistance is dependent on temperature. There are
two opposite types of thermistors:
PTC (Positive Temperature Coefficient): In this type of thermistor the temperature increases with
the decrease of the resistance. The resistance of the negative temperature coefficient thermistor is
very large due to which it detects the small variation in temperature (resistance increases as
temperature rises)
NTC (Negative Temperature Coefficient): The resistance of the thermistor increases with the
increases in temperature. (resistance decreases as temperature rises)

Note that the sensor operates on a voltage range of 4 to 30 V and that the output voltage is
independent of the supply voltage.
Operating components and materials required with specifications:
Vishwakarma Institute of Technology
Department of Engineering, Sciences and Humanities
FY: 2023-2024: Semester I
ES1053: Robotics
 Arduino Development Board,
 USB Cable,
 Breadboard,
 Thermistor analog temperature sensor
 Connecting Wires,

Measure Temperature using a thermistor and Arduino Uno:


Here, an NTC type thermistor of 10kΩ is used. NTC of 10kΩ means that this thermistor has a
resistance of 10kΩ at 25°C. Voltage across the 10kΩ resistor is given to the ADC of UNO board.
The thermistor resistance is found out using simple voltage divider network formula

5∗10 k
Rth +10 k = Vout
Rth is the resistance of thermistor.

10 k
Vout = 5 * 10 k + Rth
Vout is the voltage measured by the ADC
5∗ADC val
Vout = 1023

The temperature can be found out from thermistor resistance using the
Steinhart-Hart equation.

Temperature in Kelvin = 1 / (A + B[ln(R)] + C[ln(R)]^3)

where A = 0.001129148, B = 0.000234125 and C = 8.76741*10^-8 , and R is


the thermistor resistance.

ACTUAL CONNECTED CIRCUIT PHOTOS

Task 1

Circuit Connection photo before operation/ Working


Vishwakarma Institute of Technology
Department of Engineering, Sciences and Humanities
FY: 2023-2024: Semester I
ES1053: Robotics

Actual Photograph during Working of the circuit

Photograph of Serial Monitor depicting the result


Vishwakarma Institute of Technology
Department of Engineering, Sciences and Humanities
FY: 2023-2024: Semester I
ES1053: Robotics

EXPALNATION OF THE RESULT OF EACH TASK

In this experiment we learnt how to use Thermistor analog temperature sensor interfacing with the
Arduino which will help to check the temperature.

Conclusion:
In this lab we learn about the Thermistor analog temperature sensor and how to connect it with
Arduino UNO which will help us to check the temperature and also learnt about different
calculations involved in the process.
Vishwakarma Institute of Technology
Department of Engineering, Sciences and Humanities
FY: 2023-2024: Semester I
ES1053: Robotics

Robotics Laboratory Assignment No. 07

Title of the assignment – Seven Segment Display Interfacing with Arduino

Name of the student – Sukrut Kokate


Roll No. – 53 Batch – 3 Division – I PRNo. – 12310129

Date of performance – 08/04/2024

Experiment No. 7

Title: Seven Segment Display Interfacing with Arduino


Pre-requisite: LED Display Construction and working, Seven seg display code concept,
Counter Operation
Tasks
A) Write a program to turn ON and turn OFF the individual LED.
B) Write a program to implement simple decimal counter (Counting 0 to 9) using a 7 Segment
Display.
C) Form Special Character of Your choice and Display.

Theory:
When Arduino application only needs to display numbers, consider using a seven-segment display.
The seven-segment display has seven LEDs arranged in the shape of number eight. They are easy to
use and cost effective.
Vishwakarma Institute of Technology
Department of Engineering, Sciences and Humanities
FY: 2023-2024: Semester I
ES1053: Robotics

Seven segment displays are of two types: common anode and common cathode. The Internal
structure of both types is nearly the same. The difference is the polarity of the LEDs and
common terminal. In a common cathode seven-segment display (most popularly used), all seven
LEDs plus a dot LED have the cathodes connected to pins 3 and pin 8. To use this display, we need
to connect GROUND to pin 3 and pin 8 and, and connect +5V to the other pins to make the
individual segments light up. The following diagram shows the internal structure of common-
cathode seven-segment display:

The common anode display is the exact opposite. In a common-anode display, the positive terminal
of all the eight LEDs is connected together and then connected to pin 3 and pin 8. To turn on an
individual segment, you ground one of the pins. The following diagram shows the internal structure
of the common-anode seven-segment display.
Vishwakarma Institute of Technology
Department of Engineering, Sciences and Humanities
FY: 2023-2024: Semester I
ES1053: Robotics

Operating components and materials required with specifications:

 Arduino UNO Development Board,


 USB Cable, Breadboard,
 Connecting Wires,
 Push Button (Micro Switch)
 Segment Display (Common Cathode Type)

Interfacing Circuit diagram: (Draw Connections between Arduino Uno and the Sensors as
well as other components)

Code: ( Put Screenshot of code) :


Vishwakarma Institute of Technology
Department of Engineering, Sciences and Humanities
FY: 2023-2024: Semester I
ES1053: Robotics

Result:

Applications:
1) Digital Displays of Testing Machines
Vishwakarma Institute of Technology
Department of Engineering, Sciences and Humanities
FY: 2023-2024: Semester I
ES1053: Robotics
2) Digital Clock

Conclusion:
Through this lab we learnt about segment display and how it used for displaying different characters
on the screen like numbers and letters. It can used in elevators and many other machines.

Robotics Laboratory Assignment No. 08

Title of the assignment – Servo Motor Interfacing with Arduino

Name of the student – Sukrut Kokate


Roll No. – 53 Batch – 3 Division – I PRNo. – 12310129

Date of performance – 15/04/2024

Experiment No. 8

Title: Servo Motor Interfacing with Arduino


Pre-requisite: Difference between servo and DC motor, PWM, Current requirements of a
Servo
Vishwakarma Institute of Technology
Department of Engineering, Sciences and Humanities
FY: 2023-2024: Semester I
ES1053: Robotics
Tasks:
A) Write a program to control the Servo Motor Rotation by one Degree using Arduino Uno
B) Write a program to control Servo Motor Rotation Control using potentiometer

Theory:
A servo motor is an electric device used for precise control of angular rotation. It is used in
applications that demand precise control over motion, like in case of control of a robotic arm, The
rotation angle of the servo motor is controlled by applying a PWM signal to [Link] varying the width
of the PWM signal, we can change the rotation angle and direction of the motor.
Servo motors have three wires: power, ground, and signal. The power wire is typically red, and
should be connected to the 5V pin on the Arduino board. The ground wire is typically black or
brown and should be connected to a ground pin on the board. The signal pin is typically yellow or
orange and should be connected to PWM pin on the board. In these examples, it is pin number 9.

The Servo.h is a great library for controlling servo motors.


Knob Circuit
For the Knob example, wire the potentiometer so that its two outer pins are connected to power
(+5V) and ground, and its middle pin is connected to A0 on the board. Then, connect the servo
motor to +5V, GND and pin 9.

Functions Used

1. Servo my servo

 This creates an object named my servo of the class Servo.

2. [Link](pin)

 This function attaches the servo variable to a pin.


 Pin is the pin number to which the servo is attached.

3. [Link](angle)

 This function writes a value to the servo, thus controlling the position of the shaft.
 Angle can take values between 0 to 180.

4. map (value, fromLow, fromHigh, toLow, toHigh)

 This function is used to map a number from one range to another range.
 This means that “value” having a value between “fromLow” to “fromHigh” gets converted
to equivalent values in the range of “toLow” to “toHigh”. “fromLow” gets mapped to
“toLow” and so on.
Vishwakarma Institute of Technology
Department of Engineering, Sciences and Humanities
FY: 2023-2024: Semester I
ES1053: Robotics

Operating components and materials required with specifications:


 Arduino UNO Development Board,
 USB Cable, Breadboard,
 Connecting Wires,
 10 K Potentiometer
 Servo

Interfacing Circuit diagram: (Draw Connections between Arduino Uno and the Sensors as
well as other components )
Algorithm: Write (Type) detailed steps of algorithm for each Tasks giveni.e., for each of the Aim
A), &B).
A)Program to control the Servo Motor Rotation by one Degree
STEP 1-Start
STEP 2- include servo.h library
STEP 3- define angle
STEP 4- create a new object myservo from the library
STEP 5- in void setup, declare [Link](9)
STEP 6- in void loop, use for loops to rotate the motor
STEP 7-Stop
B) Program to control servo motor with potentiometer.
STEP 1-Start
STEP 2- include servo.h library
STEP 3- create a new object myservo from the class Servo
STEP 4- define a variable val and port pin and initialize it to the analogue pin of the Arduino A0
STEP 5- in void setup, declare [Link](9)
STEP 6- in void loop, initialize the variable val to the value from the analogue input of the
potentiometer
STEP 7- map the value of angle and rotate the motor
STEP 8- Stop

Task 1
Interfacing Circuit diagram:
Vishwakarma Institute of Technology
Department of Engineering, Sciences and Humanities
FY: 2023-2024: Semester I
ES1053: Robotics

Code –

Task 2
Code –
Vishwakarma Institute of Technology
Department of Engineering, Sciences and Humanities
FY: 2023-2024: Semester I
ES1053: Robotics

Applications:
Servo motors are used in DVD and Blu ray disc players. Automobiles also use servo motors. In
modern cars it is used to control its speed. Printers also user servo.

Conclusion:
In this lab be learnt about servo motor and how it can be used for ration at different degrees and is
an important component in the industry sector.
Vishwakarma Institute of Technology
Department of Engineering, Sciences and Humanities
FY: 2023-2024: Semester I
ES1053: Robotics

Robotics Laboratory Assignment No. 09

Title of the assignment – DC Motor Interfacing with Arduino

Name of the student – Sukrut Kokate


Roll No. – 53 Batch – 3 Division – I PRNo. – 12310129

Date of performance – 22/04/2024

Experiment No. 09

Title: DC Motor Interfacing with Arduino


Pre-requisite: PWM , Current requirements of DC Motor , Calculation of required voltage
and Current of a DC motor.
Tasks
A) Write a program to control DC motor clockwise & anti clockwise rotation control using a push
button.
B) Write a program to control Speed of DC Motor Rotation using a potentiometer

Components: Arduino UNO Development Board, USB Cable, Breadboard, LED, Resistor (1 k
ohm), Connecting Wires, Potentiometer 10K, DC Motor etc.

Theory:
DC motor converts electrical energy in the form of Direct Current into mechanical energy in the
form of rotational motion of the motor shaft. The DC motor speed can be controlled by applying
varying DC voltage; whereas the direction of rotation of the motor can be changed by reversing the
direction of current through it. For applying varying voltage, we can make use of PWM technique.
For reversing the current, we can make use of H-Bridge circuit or motor driver ICs that employ the
H-Bridge technique. PWM wave generated on the Arduino UNO is used to provide a variable
Vishwakarma Institute of Technology
Department of Engineering, Sciences and Humanities
FY: 2023-2024: Semester I
ES1053: Robotics
voltage to the motor through L293D. In Arduino, analog. Write function is used to generate PWM
wave.

1. Digital Pin To interrupt (pin)

 This function is used to declare the digital pin as an interrupt pin.


 Example, digital Pin To Interrupt(2) is used to declare digital pin 2 as an interrupt pin.
 On UNO board, only pins 2 and 3 can be configured as interrupt pins. Hence, argument to
this function can only be pin 2 or pin 3.

2. Attach Interrupt (digital Pin To Interrupt(pin), ISR, mode)

 This function is used to configure the mode of interrupt event and declare the ISR for that
interrupt. The interrupt event and ISR is for the interrupt pin declared by the function
digitalPinToInterrupt(pin).
 ISR in this function is the name of the ISR that will be used for this interrupt.
 mode defines when the interrupt will be triggered. There are four modes available to choose
from:
- LOW: trigger the interrupt whenever the pin is low.
- CHANGE: trigger the interrupt whenever the pin changes value.
- RISING: trigger when the pin goes from low to high.
- FALLING: trigger when the pin goes from high to low.
 Example, attachInterrupt(digitalPinToInterrupt(2), motor, FALLING) configures digital pin
2 as an interrupt pin with ISR named motor and which generates interrupt for every falling
edge event on pin 2.
Vishwakarma Institute of Technology
Department of Engineering, Sciences and Humanities
FY: 2023-2024: Semester I
ES1053: Robotics
3. analog Write(pin, value)

 This function is used for generating PWM on PWM digital pins (3,5,6,9,10,11 for Arduino
UNO).
 value can be any number between 0 to 255. 0 being 0% duty cycle and 255 being 100% duty
cycle.

Operating components and materials required with specifications:


 Arduino UNO Development Board,
 USB Cable, Breadboard,
 Connecting Wires,
 10 K Potentiometer
 DC Motor 12V 200 rpm

Interfacing Circuit diagram: (Draw Connections between Arduino Uno and the motor as well
as other components)

Code –
Vishwakarma Institute of Technology
Department of Engineering, Sciences and Humanities
FY: 2023-2024: Semester I
ES1053: Robotics

Conclusion:
Through this lab we learnt about DC motor and how it can be connected with Arduino for rotation
which is required in many appliances.
Vishwakarma Institute of Technology
Department of Engineering, Sciences and Humanities
FY: 2023-2024: Semester I
ES1053: Robotics

Robotics Laboratory Assignment No. 10

Title of the assignment – IR sensor interfacing with Arduino Uno

Name of the student – Niraj Ukare


Roll No. – 53 Batch – 3 Division – I PRNo. – 12310129

Date of performance – 29/04/2024

Experiment No.10

Title: IR sensor interfacing with Arduino Uno.

Prerequisites: Various Sensors, and its usage in applications, Sensitivity Control of Sensor.

Problem statement
a) Write a program to interface IR sensor so as to display the presence of obstacle on serial
monitor

Theory:
An IR sensor, also known as an Infrared sensor, is an electronic device that detects and measures
infrared radiation. Infrared radiation is a type of electromagnetic radiation with a wavelength
longer than visible light. IR sensors work by emitting an infrared beam and then measuring the
amount of reflected light. They are widely used in various applications such as remote-control
devices, security systems, obstacle detection, and industrial automation. The IR sensor consists
of two main parts: an infrared emitter and an infrared detector. The emitter emits an infrared
beam, which bounces back to the detector if it encounters an object. The detector measures the
reflected light and converts it into an electrical signal, which is then processed by the sensor’s
circuit. Based on the electrical signal, the IR sensor can determine the distance, speed, or
presence of an object. IR sensors are also available in both analog and digital forms, with
different specifications for sensitivity, accuracy, and response time.
Vishwakarma Institute of Technology
Department of Engineering, Sciences and Humanities
FY: 2023-2024: Semester I
ES1053: Robotics

IR Sensor Module
IR sensor module hardware mainly includes IR LED/IR Tx, Photodiode/IR Rx, LM393 comparator
IC, signal LED, power LED, Trim pot, and pins like VCC, GND & Output

Operating components and materials required with specifications:

 Arduino Development Board,


 USB Cable,
 Breadboard,
 Connecting Wires,
 IRModule

Interfacing Circuit diagram: (Draw Connections between Arduino Uno and the IR Sensor as
well as other components)
Vishwakarma Institute of Technology
Department of Engineering, Sciences and Humanities
FY: 2023-2024: Semester I
ES1053: Robotics

Code : ( Put screenshot here )

Result:(Put screenshot of serial monitor for each problem statement given i.e., for each of the Aim
A) and B).
Vishwakarma Institute of Technology
Department of Engineering, Sciences and Humanities
FY: 2023-2024: Semester I
ES1053: Robotics

Applications of IR Sensor:
Proximity Sensing: IR sensors are commonly used for proximity sensing applications, such as
detecting the presence of an object or person in close proximity to the sensor for e.g., in Automatic
Hand Sanitizer.
Motion Detection: IR sensors can be used as motion detectors to sense movement in an area. They
are often used in security systems, automatic lighting controls, and burglar alarms. PIR motion
sensor is used in these types of Application.
Remote Control Systems: IR sensors are extensively used in remote control devices, such as TVs,
air conditioners, and home entertainment systems. They receive infrared signals from remote
controllers and convert them into electrical signals for device control.
Ambient Light Sensing: IR sensors can measure ambient light levels and adjust the brightness of
displays or lighting systems accordingly. They are commonly found in smartphones, tablets, and
automatic lighting systems.
Object Counting: IR sensors can be used to count the number of objects passing through a specific
area, such as people entering or exiting a building or items on a conveyor belt.

Conclusion:
Utilizing an IR sensor with Arduino provides a cost-effective and efficient solution for motion
detection and proximity sensing projects. With its ability to detect infrared radiation, the sensor
enables precise control and interaction in various applications such as robotics, home automation,
and security systems.

You might also like