[go: up one dir, main page]

0% found this document useful (0 votes)
43 views34 pages

Foundation Lab-1 Robotics Manual

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)
43 views34 pages

Foundation Lab-1 Robotics Manual

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/ 34

KONGU ENGINEERING COLLEGE

(Autonomous)
PERUNDURAI, ERODE– 638 060

DEPARTMENT OF MECHATRONICS ENGINEERING

ROBOTICS LABORATORY

22GCL11 – FOUNDATION LAB-MANUFACTURING, DESIGN AND


ROBOTICS

ROBOTICS MANUAL
(2022 Regulation)

Name of the Student :

Roll Number :

Programme / Branch :

Year / Semester :
INDEX

Implementation
Development of

Verification of

Viva-voce (10)
Programming

Results (10)

Marks (50)
Circuits &

Hardware

Signature
Exp.

(10)
(20)
Title of the Experiment
No.

1. Design of electronic circuit and its debugging

Interfacing of sensors, actuators and wireless


2.
communication modules with Arduino UNO

3. Assembly of Tracker Robot with accessories

Development of embedded programming and


4. interfacing for motion control and obstacle
avoidance

Demonstration and testing of Robot in static


5.
environment

Average

Assessment Pattern for Foundation Engineering-Robotics Laboratory

Criterion Mark Split-Up Marks Obtained

Development of Electronic circuits &


30
Programming

Hardware Implementation & Record 20

Prototype Demonstration (Final Practical


50
Examination)

Total 100

Course Faculty HOD/MTS


22GCL11 – FOUNDATION ENGINEERING LABORATORY I
(Common to All BE/BTech branches)
Programme&
All BE/BTech branches Sem. Category L T P Credit
Branch
Prerequisites Nil 1/2 ES 0 0 6 3

This course is designed to provide foundational knowledge on engineering with hands-on experience on
Preamble developing a prototype model with the basic knowledge of Computer-aided Design, Manufacturing
Processes, 3D Printing Technology, Robotics and Embedded Control.

LIST OF EXPERIMENTS / EXERCISES:

PART A – Manufacturing (30 Hours)

1. Selection of product, free hand sketching and detailing

2. Construction of model using Arc/TIG/MIG/Gas/Spot welding operations

3. Enhancing the model with sheet metal

4. Creating the parts of the model using lathe

5. Creating the parts of the model using milling and drilling machines

PART B – Product Design and Development (30 Hours)

1. Free hand sketching and detailing of the component

2. 3D part modelling of the component using CAD software

3. Engineering Analysis of the component model

4. Generate the component using 3D printer

5. Value addition to the produced component using CNC milling machine, CNC laser cutting machine and CNC router

PART C – Robotics (30 Hours)

1. Design of electronic circuit and its debugging

2. Interfacing of sensors, actuators and wireless communication modules with Arduino UNO

3. Assembly of Tracker Robot with accessories

4. Development of control strategies for motion control, path planning and obstacle avoidance

5. Demonstration and testing of Robot in static environment


Total:90
REFERENCES/ MANUAL /SOFTWARE:
1. Laboratory Manual
2. AutoCAD 2020 and SOLID WORKS 2018 Software
COURSE OUTCOMES: BT Mapped
On completion of the course, the students will be able to (Highest Level)
develop the prototype model using mechanical operations like welding, forming and Applying (K3),
CO1
machining processes Precision (S3)
sketch 3D model and enhance the prototype using modern machines like 3D printer, CNC Applying (K3),
CO2
milling machine, CNC Laser cutter and CNC Router Precision (S3)

Applying (K3),
CO3 design and develop the autonomous robot for real-time applications
Precision (S3)

Mapping of COs with POs and PSOs


COs/POs PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12 PSO1 PSO2
CO1 3 3 3 2 3 2 2
CO2 3 3 3 3 3 2 2
CO3 3 3 3 2 3 2 2
1 – Slight, 2 – Moderate, 3 – Substantial, BT- Bloom’s Taxonomy
RUBRICS FOR ROBOTICS & CONTROL LABORATORY

Maximum
Level 1 Level 2 Level 3 Level 4
Criterion Marks
Excellent (>45)% Good (40 – 45)% Satisfactory (25 -39) % Below Average <25%
(100)
Significant errors in
All programs are Some segments of programs Programs are not
program writing, lacks
written precisely are written accurately uses written/wrongly written,
comments, uses existing
based on the existing skills to solve the Need assistance to solve the
Development of skills to partially solve the
question uses new approaches to given problem given problem
Electronics given problem
20 solve the given problem
circuits &
Able follow correct Not able follow correct
Programming Able follow some procedure
Able follow correct procedure procedure & improper procedure & need assistance
& improper formatting to
& formatting to execute or formatting to execute or to format and execute or
execute or simulate the
simulate the program simulate the program simulate the program
program a
Student is able to implement Student is unable to
Student is able to implement all
Hardware all design requirements Student is able to implement implement design
10 the design requirements with
Implementation without few of design requirements. requirements and have bugs
optimized Code.
Optimization of the Code. in Code.
Decision control logic, loop Decision control logic, loop
logic in program exhibits logic in program exhibits Able to achieve few results
Verification of Unable to get the desired
10 proper functional behavior and proper functional behavior and the desired
Result results and implementation
Output is obtained for varying and Output is obtained for implementation
sets of input data only few sets of input data
Strongly conveys thorough Conveys some Conveys moderate
Does not communicate
Viva 10 understanding of understanding of understanding of
program requirements
program requirements program requirements program requirements
Ex. No.: 1
Design of Electronic Circuits and its Debugging
Date :

Aim: To understand and design the various electronic components interconnections and its
integration with its debugging techniques

Apparatus Required
Resistors: Resistors are the basic of all electronic components. A resistor is a passive electrical
component to create resistance in the flow of electric current and is measured in Ohms. The
behavior of an ideal resistor is dictated by the relationship specified by Ohm’s law V=IR. Where V
stands for Voltage, I stands for Current and R is a resistor constant of proportionality, whereas
Voltage across a resistor is proportional to the current.

Resistor Colour Code: All leaded resistors with a power rating up to one watt are marked with
colour bands. They are given by several bands and together they specify the resistance value, the
tolerance rate and sometimes the reliability or failure rates. The number of bands present in
a resistor varies from three to six. The first two bands indicate the resistance value and the third
band serves as a multiplier.

Colour Digit Multiplier Tolerance

Black 0 1

Brown 1 10 ± 1%

Red 2 100 ± 2%

Orange 3 1000

Yellow 4 10,000

Green 5 100,000 ± 0.5%

Blue 6 1,00,000 ± 0.25%

Violet 7 10,000,000 ± 0.1%

Grey 8 ± 0.05%

White 9
Gold 0.1 ± 5%

Silver 0.01 ± 10%

How to Read Resistor Colour Code?

• To read them, hold the resistor such that the tolerance band is on your right. The tolerance
band is usually gold or silver in colour and is placed a little further away from the other
bands.
• Starting from your left, note down all the colours of the bands and write them down in
sequence.
• Next, use the table given below to see which digits they represent.
• The band just next to the tolerance band is the multiplier band. So, if the colour of this band
is Red (representing 2), the value given is 102.

Example:
Capacitor: The capacitor has two terminals. It’s a device that stores electric charge and
electric energy in an electric field. The capacitor’s unit is capacitance and is expressed as the
electric charge ratio on each conductor to the potential difference between them. The
capacitance value of a capacitor is measured in farads(F). Capacitors, like resistors, can
combine in parallel or series within a circuit. The capacitor is used in AC to DC conversion,
for coupling and decoupling, in timers, for signal processing and as sensors, etc. Capacitors
have many shapes in sizes but at the core they have two electrically conducting plates
separated by a dielectric insulting material.

C = εA/d

Where C is Capacitance; ε is permittivity, a term for how well dielectric material stores an
electric field; and A is the parallel plate area.

Diodes: Diodes are the two-terminal electronic component which allows the flow of
current in one direction only and blocks the current that flows in the opposite direction.
Two terminals of the diode are known as Anode and Cathode. The Diode having 0
resistance in one direction and infinite resistance in the reverse direction is to be an ideal
diode.

Most commonly used diodes types:


Zener Diode: The Zener Diode allows current in a backward direction when the applied
voltage reaches the breakdown voltage called Zener voltage. It acts as the voltage
regulator.
Light Emitting Diode (Led Diode): These diodes are used to convert electrical energy
into light energy. This type of diodes is implemented in street lights and house lighting.
Constant Current Diodes: Used in regulating the voltage at a particular current.
Switches: One of the most basic electrical components are switches and also the most widely
used component in electrical engineering. A switch is used to connect or disconnect the
conducting path in an electrical circuit. The switch needs an external force to make these
changes in electrical signals. When you push down or flick a switch, you allow the current to
flow through to the rest of the circuit.

Types of switches:
Toggle switches – Toggle switch is a type of switch that is operated by moving a lever or
handle back and forth to open or close an electrical circuit. An Example of a toggle switch is
the light system used in household wiring.
Push button switches – A push button switch is a two-position device that when pressed
activates to 0 state otherwise in its natural 1 state. Calculator, push-button telephones are the
example of pushbutton switches.
Selector switches – Selector switch also called rotary switch can be controlled by on or off
of different currents circuits by rotating the handle. It is used when two or more position
options are available.

Potentiometer: The potentiometer is an electric device with three terminals used to control
speed, voltage or frequency. It also has a knob on the top for controlling a variable. The
devices can be controlled based on the resistance that is applied.
A potentiometer works similar to the voltage divider except for the fact that it has variable
outputs.

Inductors

Inductors are called passive components, the same as resistors (R) and capacitors (C), and are
electronic components labeled with an "L". It has the function of keeping the current constant.
The ability of an inductor is expressed by "inductance". The unit is Henry (H). An inductor has
the same structure as a coil, but most inductors called inductors have a single winding (1 roll).
Some are wound only with conductors, while others have a core inside the wound conductors.
The action of an inductor is proportional to the square of the number of turns or radius and
inversely proportional to the length.

Principle-When an electric current flows through a conductor, a magnetic force is generated


around it in the direction of the right-hand thread. When current flows through an inductor with
conductors wrapped around it in the same direction, the magnetic field generated around the
wire is bound together and becomes an electromagnet

V=L・ΔI/Δt

V: Electromotive force (V)

L: Inductance (H)

ΔI /Δt: Rate of change of current (A/s)


Transistor: A transistor is an electronic component that is used in circuits to either amplify
or switch electrical signals or power, allowing it to be used in a wide array of electronic
devices. A transistor consists of two PN diodes connected back to back. It has three terminals
namely emitter, base and collector. The basic idea behind a transistor is that it lets you control
the flow of current through one channel by varying the intensity of a much smaller current
that’s flowing through a second channel.

The base serves as a gate controller device for a larger electric supply. The collector is a
larger electrical supply and the outlet of that supply is the emitter. The current flowing
through the gate from the collector can be regulated by sending varying levels of current from
the base. In this manner, a very small amount of current can be used to control a large amount
of current like in amplifiers. Transistor works as a switch or as an amplifier.

Procedure:

Activity 1: ANALOG SIGNAL

An analog or analogue signal is any continuous signal for which the time varying
feature(variable) of the signal is a representation of some other time varying quantity, i.e.,
analogous to another time varying signal.

Components required:

▪ Potentiometer
▪ DC source (9V battery)
▪ Multimeter
▪ Bread board
▪ Connecting wires, wire stripper.
Circuit:

1. Place the components on the bread board as shown in circuit.


2. Provide input supply using 9V battery.
3. Vary the potentiometer resistance and measure the corresponding output
voltageusing a multimeter.

Activity 2: DIGITAL SIGNAL

A digital signal is a physical signal that is a representation of a sequence of discrete


values. The term digital signal can refer to a continuous-time waveform signal. It will
represent only two forms of output high level (5V) or low level (0V). A digital signal
waveform consists of (1) low level, (2) high level, (3) rising edge, and (4) falling edge.

Components required:

▪ DC source (9V battery)


▪ “NO” type contact switch
▪ Multimeter

Circuit:

1. Connect a 9V battery source across the ‘NO’ contact switch.


2. Check the output across the switch by operating it.
3. If the switch is pressed it will represent the logic high.
4. If the switch is released it denotes the logic low.
ACTIVITY FOR PASSIVE COMPONENTS:

Activity 3: RESISTOR

A resister is a device which is used to limit the current flow. Its operation is
similar to acontrol valve in a pipe line which limits the water flow.

Components Required:

▪ DC source (9V battery)


▪ Resistor (1k Ω)/potentiometer
▪ LED, bread board

Circuit:

Steps:

1. Connect +ve terminal of a 9V battery to (left) pin1 of the potentiometer.


2. Connect the –ve terminal to the (right) pin3.
3. Output of potentiometer is connected across a LED.
4. Vary the resistance using potentiometer to control the intensity of LED.

Activity 4: CAPACITOR:

A capacitor (originally known as condenser) is a passive two-terminal electrical


component used to store energy in an electric field contains at least two electrical
conductors separated by a dielectric (insulator); for example, one common construction consists
of metal foils separated by a thin layer of insulating film.

Components required:

▪ DC source (9V battery),


▪ No contact switch (2 no),
▪ Capacitor (10 µF),
▪ Resistor (1k Ω),
▪ LED
▪ Bread board.
Circuit:

Steps:

1. Connect the 9 Volt battery supply across the capacitor through NO switch and Resistor.
2. Similarly connect a LED through NO switch2 parallel to the capacitor.
3. Press NO Switch1 to charge the capacitor.
4. Press the switch2 to discharge the capacitor to glow the LED
5. View the output across the LED.

ACTIVITY FOR ACTIVE COMPONENTS

Activity 5: DIODE

Diode is a two-terminal semiconducting device with asymmetric transfer


characteristic, withlow (ideally zero) resistance to current in one direction, and high (ideally
infinite) resistance in the other. The most common function of a diode is to allow an electric
charge to flow in one direction (called the diode's forward direction), while blocking such
flow in the opposite direction (the reverse direction). Thus, the diode can be viewed as an
electronic version of a check valve.

Components:

▪ DC source(9v battery)
▪ Potentiometer
▪ Diode(1N 4007)
▪ Led
▪ Bread board

Circuit:
Steps:

1. Connect a 9V battery across led through potentiometer, diode (1N4007) & multimeter.
2. Adjust the potentiometer to vary the input voltage up to the operating voltage of diode.
3. When the input voltage exceeds the forward breakdown voltage of the diode, it will
begin toconduct and the output can be observed using the multimeter.

INTRODUCTION TO INTEGRATED CIRCUITS

VOLTAGE REGULATOR (IC 7805): A voltage regulator is designed to maintain a


constant voltage level. A voltage regulator may be a simple "feed-forward" design or may
include negative feedback control loops. It is used toregulate both AC and DC voltages.

Applications:

▪ Computer power supplies


▪ Power distribution system

Activity 6: POWER CIRCUIT CONSTRUCTION:

Components required:

▪ IC 7805-Voltage regulator
▪ Capacitor (10µF), Resistor (1kΩ), Led
▪ 9V battery

Circuit:

Steps:

1. Connect a 9V battery, 10µF capacitor C1 across v1 and common ground terminal.


2. Connect another 10µF capacitor C2 across terminal v0 and common ground terminal.
3. Connect the Led across output terminals through 1kΩ resistor.
4. This can be used as a regulated power supply for all upcoming circuits.
INTEGRATED CIRCUITS:

Activity 7: NOT GATEComponents required:

▪ 9V battery
▪ Led
▪ Power circuit
▪ IC 7404

Circuit:

Steps:

1. Place the IC7404 on the bread board.


2. Connect 9V battery across voltage regulator and regulate the voltage to 5V using
voltageregulator.
3. Connect the supply and ground pins for IC
4. Place an NO switch on the bread board and connect its one terminal to 5V supply
and theother terminal to pin 1 of IC7404.
5. Connect positive terminal of the led to the output pin 2 of the IC7404 and negative
terminalto ground.

Activity 8: AND GATEComponents required:

▪ 9V battery
▪ Power circuit
▪ IC 7408
▪ Led, Bread board
Circuit:

Steps:

1. Place the components on the bread board


2. Connect the 9v battery across voltage regulator and regulate the output voltage to 5V.
3. Connect the operating voltage for IC 7408.
4. Connect 5V supply to the pins1&2 of the IC7408 through two NO switches.
5. Connect the led across output pin 3 of IC7408.

Activity 9: OR GATEComponents required:

▪ 9V battery
▪ Power circuit
▪ IC 7432
▪ Bread board, Led

Circuit:
Steps:

1. Place the components on the bread board


2. Connect 9v battery supply across voltage regulator and regulate to 5v
3. Provide the operating voltage for IC 7432
4. Connect the input across pin1 and pin2
5. Connect the across output pin 3

Observations:

Result:

Foundation Engineering - Robotics Lab


Interfacing & Programming (20)
Hardware Verification (10)
Verification of Result (10)
Viva-voce (10)
Total (50)
Ex. No.: 2 Interfacing of sensors, actuators and wireless communication
Date : modules with Arduino UNO

Aim: To interface sensors and actuators with Arduino UNO and analyze its wireless communication
using Raspberry-Pi or Node MCU

Apparatus Required

1. 8051 Arduino UNO


2. Development Board for 8051 Arduino UNO (preferred)
3. Raspberry -Pi /Node-MCU
4. Motor driver Module (L298N)
5. Sensors and Actuators

Procedure:
Task 1: Raspberry pi-based LED Glowing and OFF using push button

• Hardware Lists:
– Raspberry Pi
– Breadboard
– LED, Push Button
– Resistor (220Ω)
– Jumper wires
– Power supply cable

Circuit Connection:

Program:

Task 2: Raspberry pi-based Distance measuring using ultrasonic sensor

• Hardware Lists:
– Raspberry Pi
– Breadboard
– Ultrasonic Sensor
– Resistor (330Ω, 470Ω)
– Jumper wires
– Power supply cable
Circuit Connection:

Program:
Task 3 - Raspberry pi based led light on off using motion sensor

• Hardware Lists:
– Motion sensor
– Resistor (220Ω)

Circuit Connection:

Program:
Observations:

Result:

Foundation Engineering - Robotics Lab


Interfacing & Programming (20)
Hardware Verification (10)
Verification of Result (10)
Viva-voce (10)
Total (50)
Ex. No.: 3
Assembly of Tracker Bot with Accessories
Date :

Aim: To assemble and program the tracker bot with IR sensors and motors with Arduino UNO

Apparatus Required

1. Arduino UNO
2. Development Board for 8051 Arduino UNO (preferred)
3. 10KΩ Resistors X 2
4. 10µF Capacitor
5. 11.0592MHz Crystal
6. 33pF Capacitors X 2
7. Push Button
8. Motor driver Module (L298N)
9. Robot Chassis with Motors
10. IR Sensors x 2

Working Principle

The basic operations of line follower robot are as follow:

• The line follower robot will sense or detect the line position with optical sensors and the optical
sensors are usually placed at the front end of the robot.
• The robot will have steering mechanism in order for the robot to move straight, turn left or turn
right.
• The speed of the robot will be controlled according to the lane condition. It means that for curvy
lane, the speed of the robot is decrease in order to obtain smooth turn.

Flow Chart:
Procedure:

• The circuit consists of 8051 Arduino UNO, IR Sensors (with IR transmitter and IR Receiver),
L298N Motor Driver Module, Robot Chassis with 4 wheels and 4 motors, battery holder.
• 8051 Arduino UNO is the main component of the project. It is an 8 bit Arduino UNO with 32
programmable I/O pins. This has many peripheral features like programmable UART, two 8-
bit timer/counter, two interrupts, external memory access etc.
• The DC motors of the robot are connected to the controller using a motor driver IC. As the
output of the controller is maximum 5V with very small current, it cannot drive the motors. So,
to amplify this voltage motor driver IC is used. L298N can drive motors up to 36v and can
provide a drive current of 3A.
• The driver IC has 15 pins and is usually available in multiwatt15 Package. These ICs are easily
available in the market as Modules. The inputs to the Motor Driver Module are connected to
PORT2 pins P2.0, P2.1, P2.2 and P2.3.
• The two IR sensors are connected to P2.6 and P2.7 pins of the Arduino UNO. Arrange the
chassis and connect the four wheels of the robotic vehicle to the motors which are in turn
connected to the Arduino UNO.

Tracker Bot Vehicle Circuit Working:

➢ Initially draw the path on a light-coloured surface with black colour tape.
➢ Place the robot on the floor.
➢ Now power on the circuit.
➢ Robot moves in the specified path.
➢ When it moves out of path, sensors check it and automatically adjust the robot
Program:
Observations:

Result:

Foundation Engineering-Robotics Lab


Interfacing & Programming (20)
Hardware Verification (10)
Verification of Result (10)
Viva-voce (10)
Total (50)
Ex. No.: 4 Development of embedded programming and interfacing for
Date : motion control and obstacle avoidance

Aim: To develop embedded programming and interfacing for motion control and obstacle avoidance

Apparatus Required
1. Tracker Bot
2. Battery Charger / Adapter
3. IR Sensor
4. Bluetooth Module
5. Arena

Precautions

• Direction control pins: PORTA0 to PORTA3


• Velocity control by PWM on pins PL3 and PL4 using OC5A and OC5B of timer 5. In this
experiment for the simplicity PL3 and PL4 are kept at logic 1. Pins for PWM are kept at logic 1.
• Make sure that in the configuration options following settings are done for proper operation of the
code
Arduino UNO : atmega2560
Frequency : 14745600
Optimization : -O0
• Auxiliary power can supply current up to 1 Ampere while Battery can supply current up to 2
Ampere when both motors of the robot changes direction suddenly without stopping
• It produces large current surge. When robot is powered by Auxiliary power, which can supply only
1 Ampere of current, sudden direction change in both the motors will cause current surge which
can reset the Arduino UNO because of sudden fall in voltage
• It is a good practice to stop the motors for at least 0.5 seconds before changing the direction. This
will also increase the useable time of the fully charged battery.

Procedure:

1. Open AVR Studio. If any project is running it can be closed by clicking on Project in the menu bar
and select Close Project.
2. To create a new project, click on Project in the menu bar and select “New Project”.
3. Select Project Type as “AVR GCC”. Type project name in the “Project name” window. In this case,
it is “motion control”. Also check on Create initial file and Create folder check box. This will create
all the files inside the new folder. In the Location window, select the place where would like to
store your project folder and then click “Next”.
4. Select debug platform and Device. In this case, select “AVR simulator”, “ATMEGA2560” Arduino
UNO and click finish.
5. Open Project menu and click on the Configuration option.
6. In the Project Option “General” tab will open. Select device as “ATMEGA2560” and frequency
(Crystal Frequency) as 14.7456MHz i.e. 14745600Hz. Set the optimization level be at “-O0”.
7. Make sure that in the External Tools, proper path for avr-gcc.exe and make.exe are given and press
ok.
8. After completing the above steps program can be typed.

Program:
Observations:

Result:

Foundation Engineering - Robotics Lab


Interfacing & Programming (20)
Hardware Verification (10)
Verification of Result (10)
Viva-voce (10)
Total (50)
Ex. No.: 5
Demonstration and testing of Robot in static environment
Date :

Aim: To demonstrate and testing of tracker bot in static environments using path planning

Apparatus Required
1. Tracker Bot
2. Battery Charger / Adapter
3. Arena

Precautions

This experiment demonstrates the application of a simple line follower robot. The robot follows
a white line over a black background. For this experiment ADC, LCD interfacing and motion control
are based on sensor data.
• The following connections are to be given:

LCD Connections
LCD Arduino UNO Pins
RS PC0
RW PC1
EN PC2
DB7 PC7
DB6 PC6
DB5 PC5
DB4 PC4

ADC Connections
ADC CH. PORT Sensor
0 PF0 Battery Voltage
1 PF1 White line sensor 3
2 PF2 White line sensor 2
3 PF3 White line sensor 1
4 PF4 IR Proximity analog sensor
5 PF5 IR Proximity analog sensor
6 PF6 IR Proximity analog sensor
7 PF7 IR Proximity analog sensor
8 PK0 IR Proximity analog sensor
9 PK1 Sharp IR range sensor 1
10 PK2 Sharp IR range sensor 2
11 PK3 Sharp IR range sensor 3
12 PK4 Sharp IR range sensor 4
13 PK5 Sharp IR range sensor 5
14 PK6 Servo Pod 1
15 PK7 Servo Pod 2

• Motion control Connection: L-1---->PA0; L-2---->PA1;


R-1---->PA2; R-2---->PA3;
PL3 (OC5A) ----> PWM left;
PL4 (OC5B) ----> PWM right;
• Make sure that in the configuration options following settings are done for proper operation of the
code
Arduino UNO : atmega2560
Frequency : 14745600
Optimization : -O0
• Auxiliary power can supply current up to 1 Ampere while Battery can supply current up to 2
Ampere when both motors of the robot changes direction suddenly without stopping
• It produces large current surge. When robot is powered by Auxiliary power, which can supply only
1 Ampere of current, sudden direction change in both the motors will cause current surge which
can reset the Arduino UNO because of sudden fall in voltage
• It is a good practice to stop the motors for at least 0.5 seconds before changing the direction. This
will also increase the useable time of the fully charged battery.
• Make sure that you copy the lcd.c file in your folder
• Distance calculation is for Sharp GP2D12 (10cm-80cm) IR Range sensor

Procedure:

1. Open AVR Studio. If any project is running it can be closed by clicking on Project in the menu bar
and select Close Project.
2. To create a new project, click on Project in the menu bar and select “New Project”.
3. Select Project Type as “AVR GCC”. Type project name in the “Project name” window. In this case,
it is “motion control”. Also check on Create initial file and Create folder check box. This will create
all the files inside the new folder. In the Location window, select the place where would like to
store your project folder and then click “Next”.
4. Select debug platform and Device. In this case, select “AVR simulator”, “ATMEGA2560” Arduino
UNO and click finish.
5. Open Project menu and click on the Configuration option.
6. In the Project Option “General” tab will open. Select device as “ATMEGA2560” and frequency
(Crystal Frequency) as 14.7456MHz i.e. 14745600Hz. Set the optimization level be at “-O0”.
7. Make sure that in the External Tools, proper path for avr-gcc.exe and make.exe are given and press
ok.
8. After completing the above steps program can be typed.

Program:
Observations:

Result:

Foundation Engineering - Robotics Lab


Interfacing & Programming (20)
Hardware Verification (10)
Verification of Result (10)
Viva-voce (10)
Total (50)

You might also like