You are on page 1of 50

Semi Autonomous

Robotics Workshop

Presented by Sonesh Kumar


Bhusanam Bharat & Abhishek Kumar
Game Play
Introduction to Carotte
PROBLEM STATEMENT
 Build a computer controlled(semi autonomous) robot to collect the
objects and deposit them into there respective boxes
Introduction to Carotte
ARENA SPECIFICATION
 The dimensions of arena are 250cm x 225cm
 It consists of 63 , 25cm x 25cm boxes and 3 , 25cm x 75cm boxes as
shown in the previous image
 An object of maximum volume 250 cubic cm will be placed in the
arena, with 8 empty boxes surrounding the box in which the object is
kept.
 The maximum height limit of the object that will be placed here is 5 cm.
 The 3 large boxes will be colored using red, blue and green colors :
 IN ROUND 1 : ALL THE BOXES WILL BE COLORED EITHER AS RED, BLUE OR GREEN .
 IN ROUND 2 : EACH BOX WILL BE COLORED BY DIFFERENT COLOR AND ALL THREE COLORS EXISTS .

 The objects will also be colored be the same RGB configuration :


 IN ROUND 1 : THE OBJECTS WILL BE COLORED AS PER THE ALRGE BOX.
 IN ROUND 2 : AS THERE ARE 12 OBJECTS , FOUR OBJECTS WILL HAVE SAME COLOR, MAKING THREE SETS OF FOUR
SIMILAR OBJECTS.
Introduction to Carotte
ROBOT SPECIFICATION
 The dimensions of the ROBOT
shouldn’t exceed 18cm x 18cm .
There is no limit on height.

 Try to put a color tag (minimum


8cm x 8cm) on top of the robot so
that you have idea about the
position of the robot.
Introduction to Carotte

ROUND 1
 The arena will have 12 similar objects having same
color .
 The robot has to detect the object, find a shortest path to
the object and put then put it the large box.
 When one object is in hold of the robot , then the robot
shouldn’t interfere with any other object in it’s path.
 The team with maximum objects in the box within a
time interval of 20 min will be qualified for the next
round.
 The arena for round one is shown in the next page.
Introduction to Carotte
6
Introduction to Carotte

ROUND 2
 SIMILAR TO THAT IN ROUND 1, WE WILL HAVE 12 IDENTI
CAL OBJECTS PLACED IN THE ARENA. THE ONLY
DIFFERENCE HERE IS THAT WE WILL HAVE THEM
COLORED IN RBG IN EQUAL NUMBER
 THE ROBOT HERE HAS TO DETECT THE COLOR OF
OBJECT AND THE COLOR OF THE LARGE BOX IN WHICH IT
HAS TO DROP THIS BOX.
 THE MAIN AIM WOULD BE TO :
 MAKE SURE THE ROBOT DETECTS THE COLOR OF OBJECT AND BOX
 FIND SHORTEST PATH, THE SHORTEST FROM THEN POSITION TO
THE OBJECT AND LATER FROM OBJECT TO THE LARGE BOX.
 THE TIME DURATION FOR THIS ROUND WILL BE 20 MIN.
Introduction to Carotte
8
CAROTTE

Hardware…….
• Controlled rotation required
----------

Stepper
Motors are preferred
Stepper Motor

•More precise than DC motor

•Measured rotation and can be held at a


particular position

•Alignation is much better in differential drive


Stepper Motor

•More precise than DC motor

•Measured rotation and can be held at a


particular position

•Alignation is much better in differential drive


Stepper motor continue………
Unipolar Stepper Motor
……………………the current only flows in one direction in the
windings of the coils. i.e. the stator poles can only be polarized
one way.

• This kind of motor has four coils .

• When energized in the correct sequence cause the


permanent magnet attached to the shaft to rotate.

• There are two basic step sequences. After step 4, the


sequence is repeated from step 1 again.

•Reversing the order of the steps in a sequence will reverse


the direction of rotation.
a. Single-Coil
Excitation
a. –
Single-Coil
EachExcitation
successive–coil is
energized
Each in turn.
successive coil is
energized in turn.
Single coil
Single coil
excitation
excitation
continue……
continue……

0010

0100

0001

1000
b. Two-Coil Excitation

b.Each successive
Two-Coil pair
Excitation
– of adjacent
Each coils pair
successive is
energized
of adjacentincoils
turn.is
energized in turn.
0011 0110 1100 1001

Note:
The excitation of Coil 4 is always the inverse of the excitation of Coil 2.
The excitation of Coil 1 is always the inverse of the excitation of Coil 3.
So, with the right circuit, you can generate this sequence with only two
data lines.
The Coil Diagram
1000 1100 0100 0110 0010 0011 0001 1001

0100 0011

0010
1001

1000 0110

1100 0100
SINGLE COIL MODE
The order of the values to be written to PARALLEL PORT Data pins
STEPPER 1
00000001 – (1st coil is on) = 1
00000010 – (2nd coil is on) = 2
00000100 – (3rd coil is on) = 4
00001000 – (4th coil is on) = 8
STEPPER 2
00010000 – (1st coil is on) = 16
0010000 – (2nd coil is on) = 32
0100000 – (3rd coil is on) = 64
1000000 – (4th coil is on) = 128
DOUBLE COIL MODE
The order of the values to be written to PARALLEL PORT Data pins
STEPPER 1
00000011 – (1st & 2nd coils are on) = 3
00000110 – (2nd & 3rd coils are on) = 6
00001100 – (3rd & 4th coils are on) = 12
00001001 – (4th & 1st coils are on) = 9
STEPPER 2
00110000 – (1st & 2nd coils are on) = 48
01100000 – (2nd & 3rd coils are on) = 96
11000000 – (3rd & 4th coils are on) = 192
10010000 – (4th & 1st coils are on) = 144
HYBRID MODE
The order of the values to be written to PARALLEL PORT Data pins
STEPPER 1
00000001 – (1st coil is on) = 1
00000011 – (1st & 2nd coil is on) = 3
00000010 – (2rd coil is on) = 2
00000110 – (2nd & 3rd coil is on) = 6
00000100 – (3st coil is on) = 4
00001100 – (4th & 3nd coil is on) = 12
00001000 – (4rd coil is on) = 8
00001001 – (1st & 4th coil is on) = 9
Similarly it can be done for the other motor……….
Comparison

Single coil Double coil

 Low torque  High torque

 Consume less energy  Consume double energy


 Settling time is less
 Settling time is more
25-way Female D-Type Connector
PC parallel Port

 The PC's Parallel Printer Port had a total of


12 digital outputs and 5 digital inputs accessed via 3
consecutive 8-bit ports in the processor's I/O space.
 8 output pins accessed via the DATA Port
 5 input pins (one inverted) accessed via the STATUS
Port
 4 output pins (three inverted) accessed via the
CONTROL Port
 The remaining 8 pins are grounded
STEPPER DRIVER BOARD
Circuit Requirements…………………

Decoder : Takes n inputs and gives 2n outputs .


…..…the n inputs from the parallel ports could
be used to generate 2n combination of outputs
to excite the coils of stepper motors.
An introductory talk on Matlab

PR ES E N T E D by S o n e s h
Ku m a r,
A b hi s h e k Ku m a r,
Bhusanam Bharat
Topics of discussions…
What is Matlab….???

Basic commands & operations.

Matlab programs(.m file).

Some known functions in Matlab.

Surprise !!!!
Matlab..??

MATLAB – “The Language Of Technical


Computing”.
MATLAB (MATrix laboratory) is a numerical
computing environment and fourth-generation
programming language.
MATLAB is a interactive environment that
enables you to perform computationally intensive
tasks faster than with traditional programming
languages such as C, C++, and Fortran.
The MATLAB User Interface
Basic commands..

Some points we should remember while start learning matlab……


• No need to define variables data type.
• One Variable can have more then two data types.
• By default matlab create “ans” as Most recent answer if expressions
are not assigned to anything else.
• Variable names can contain up to 63 characters (as of MATLAB 6.5 and
newer) .
• Variable names must start with a letter followed by letters, digits, and
underscores.
• If a statement is terminated with a semicolon ( ; ), no results will be
displayed. Otherwise results will appear before the next prompt.
• By default matlab use 4 digits rounding after decimal.
• Basic operator : “ + ” , ” - ” , ” * ”
>> a = 12
,”/”
a=
• “clc” : Clear command window.
12
CLC clears the command
>> a = 12; window and homes the cursor.
>> a = 23.23424; • “home” :Send the cursor home.
>> a HOME moves the cursor to the
a= upper left corner of the
23.2342 window.
>> a = 'swe' • “who” :List current variables.
a= • “whos”: WHOS is a long form
swe of WHO. It lists all the
>> a variables in the current
=234872387498139732921942; workspace, together with
>> a information about their size,
a=
bytes, class, etc.
• “clear” :Clear variables and
2.3487e+024
functions from memory.
CLEAR delete all the variable
Some special variables….!!!

 
pi : π itself( = 4x.
eps : Minimum spacing b\w 2 floating point numbers.
inf : Infinity.
Nan : Not-a-Number(0.0/0.0 or all the undefined
terms which we have in limit (like inf/inf, 0*inf, inf-inf).
i& j : i = j = square root of (-1)(by default)
realmin : Smallest positive normalized floating point number.
realmax: Largest positive floating point number.
Mathematical and logical Operators

Power : a^b , a.^b


Multiplication : a*b , a.*b
Division : a/b , a./b
\ or .\ are used while calculating solution of the equation A*x = b ; x
= A\b = b/A;
~ : Logical NOT
& : Element-wise logical AND
| : Element-wise logical OR
&& : Short-circuit logical AND
|| : Short-circuit logical OR
>= , <= , == ,~= , > , < these are relational operators.
for more detail : type help ~
.m Files in matlab

There are two kinds of M-files:


Scripts, which do not accept input arguments or
return output arguments. They operate on data in
the workspace.
Functions, which can accept input arguments and
return output arguments. Internal variables are local
to the function.

Click here to create .m file


.m Files in matlab

 Function file : click on “create new .m file”


 function [output] = <function name>(input)
 like function [a,b,c,…..] = multi(A,B,C)
Matrices in matlab

>> a = [1 2 3 4 5] Any floating point number is a


a=
matrix of size(1x1).
1 2 3 4 5
For writing a matrix we have
>> a = [1,2,3,4,5] to use “[“ ”]”.
a=

1 2 3 4 5
A vector is also a matrix , can
>> a = [1;2;3;4;5] be a row matrix or a column
a= matrix.
1
2 We can write a vector in 2
3
4
different ways
5
Matrices in matlab
 Operations and functions for matrices (suppose “a” is a matrix)
1. transpose(a) = a’;
2. identity matrix of size n = eye(n);
3. inverse(a) = inv(a) = eye(n)/a ((solution of a*b = eye(n));
4. size of a matrix = size(a);
5. A matrix with only zeros(of size nxm) = zeros(n,m);
6. A matrix with only ones(of size nxm) = ones(n,m);
7. Determinant of a matrix = det(a);
8. RREF of a matrix = rref(a);
9. Square root of a matrix = sqrtm(a);
10. rank of a matrix = rank(a);
11. If a is a vector then maximum element is = max(a) & minimum element = min(a);
12. Diagonal of a matrix = diag(a);
13. norm of a matrix = norm(a);
14. random matrix = rand(n,m) or randn(n,m);
15. Eigenvalues and eigenvectors of a matrix = [eigval , eigvec] = eig(a);
Some known functions in Matlab.

factorial(n) : factorial of number ‘n’;


diff(f,<order>) : differentiation of a function;
int(f) : integration of a function ‘f’;
magic(n) : Magic square of size nxn;
sort(x) : Sort in ascending or descending order;
power(a,b) : .^ Array power;
trace(a) : Sum of diagonal elements;
gcd(a,b) : Greatest common divisor(lcm(a,b));
roots(c) : Find polynomial roots;
save : save workspace variable to file(.mat format);
Plot/Figure/Surface
Plot/Figure/Surface
plot(X,Y) : plots vector Y versus vector X;

Plot3(X,Y,Z) : Plot lines and points in 3-D space;

zoom(factor) : Zoom in and out on a 2-D plot;

surf(A) : 3-D colored surface;

ezplot(FUN) : plots the function FUN(X) over the default domain -2*PI <

X < 2*PI;
ezplot3(fx,fy,fz) : plots the spatial curve fx(T), fy(T), and fz(T) over the

default domain 0 < T < 2*PI;


ezsurf(f) : plots a graph of the function f(x,y) using surf;
Solving
solve(eq1,eq2,..) : Symbolic solution of algebraic
equations.
dsolve(eq1,eq2,..) : Symbolic solution of ordinary
differential equations.
And much more………….
For any help type
help<space><function name>

like help rref


For finding the functions related to some
keyword type
lookfor<space><functions properties >
like lookfor plot
For more info.

Contacts :- +919706636971
Sonesh ●
Department of mathematics
Email id :- sonesh@iitg.ernet.in,
Kumar

sonesh.iitg@gmail.com

Contacts :- +919678554657
Abhishek


Department of Electronic & Electrical Engineering
Email id :- ak.kumar@iitg.ernet.in,
Kumar

abhi600912@yahoo.com

Contacts :- +919678738211
Bhusanam


Department of Mechanical Engineering
Email id :-
Bharat

b.bharat@iitg.ernet.in, bharath.bhushanam@gmail.com
QUESTIONS….????
Thank you

You might also like