Semi-Autonomous - CAROTTE

Embed Size (px)

Citation preview

  • 8/7/2019 Semi-Autonomous - CAROTTE

    1/50

    Semi AutonomousSemi AutonomousRRoboticsobotics WWorkshoporkshop

    Presented by Sonesh Kumar

    Bhusanam Bharat & Abhishek Kumar

  • 8/7/2019 Semi-Autonomous - CAROTTE

    2/50

    Game PlayGame Play

  • 8/7/2019 Semi-Autonomous - CAROTTE

    3/50

    Introduction to Carotte

    y PROBLEM STATEMENT

    Build a computer controlled(semi autonomous) robot to collect the

    objects and deposit them into there respective boxes

  • 8/7/2019 Semi-Autonomous - CAROTTE

    4/50

    Introduction to Carotte

    y ARENA SPECIFICATION

    The dimensions of arena are 250cm x 225cm

    It consists of 63 , 25cm x 25cm boxes and 3 , 25cm x 75cm boxes asshown in the previous image

    An object of maximum volume 250 cubic cm will be placed in thearena, with 8 empty boxes surrounding the box in which the object iskept.

    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.

  • 8/7/2019 Semi-Autonomous - CAROTTE

    5/50

    y The dimensions of the ROBOTshouldnt exceed 18cm x 18cm .

    There is no limit on height.

    y Try to put a color tag (minimum8cm x 8cm) on top of the robot sothat you have idea about the

    position of the robot.

    Introduction to Carotte

    ROBOT SPECIFICATION

  • 8/7/2019 Semi-Autonomous - CAROTTE

    6/50

    Introduction to Carotte

    ROUND1

    The arena will have 12 similar objects having samecolor .

    The robot has to detect the object, find a shortest path tothe object and put then put it the large box.

    When one object is in hold of the robot , then the robotshouldnt interfere with any other object in its path.

    The team with maximum objects in the box within atime interval of 20 min will be qualified for the nextround.

    The arena for round one is shown in the next page.

  • 8/7/2019 Semi-Autonomous - CAROTTE

    7/50

    Introduction to Carotte6

  • 8/7/2019 Semi-Autonomous - CAROTTE

    8/50

    Introduction to Carotte

    ROUND2

    SIMILAR TO THAT IN ROUND 1, WE WILL HAVE 12 IDENTICAL OBJECTS PLACED IN THE ARENA. THE ONLYDIFFERENCEHERE ISTHAT WE WILL HAVE THEMCOLORED IN RBG IN EQUAL NUMBER

    THE ROBOTHERE HASTO DETECT THE COLOR OFOBJECT AND THE COLOR OF THE LARGE BOX IN WHICHITHASTO DROP THIS BOX.

    THE MAIN AIM WOULD BE TO : MAKE SURE THE ROBOT DETECTSTHE COLOR OF OBJECT AND

    BOX FIND SHORTEST PATH, THE SHORTEST FROM THEN POSITIONTO THE OBJECT AND LATER FROM OBJECTTO THE LARGE BOX.

    THE TIME DURATION FORTHIS ROUND WILL BE 20 MIN.

  • 8/7/2019 Semi-Autonomous - CAROTTE

    9/50

    Introduction to Carotte8

  • 8/7/2019 Semi-Autonomous - CAROTTE

    10/50

  • 8/7/2019 Semi-Autonomous - CAROTTE

    11/50

    Hardware.

  • 8/7/2019 Semi-Autonomous - CAROTTE

    12/50

    Controlled rotation required --

    --------

    StepperMotors are preferred

  • 8/7/2019 Semi-Autonomous - CAROTTE

    13/50

    Stepper Motor

    More precise than DC motor

    Measured rotation and can be held at aparticular position

    Alignation is much

    better in differential drive

  • 8/7/2019 Semi-Autonomous - CAROTTE

    14/50

    Stepper Motor

    More precise than DC motor

    Measured rotation and can be held at aparticular position

    Alignation is much

    better in differential drive

  • 8/7/2019 Semi-Autonomous - CAROTTE

    15/50

    Stepper motor

    continue

  • 8/7/2019 Semi-Autonomous - CAROTTE

    16/50

    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.

  • 8/7/2019 Semi-Autonomous - CAROTTE

    17/50

    a. Single-Coil Excitation Each successive coil is energized in turn.

  • 8/7/2019 Semi-Autonomous - CAROTTE

    18/50

    Single coil excitation continue

    0010

    0100

    1000

    0001

  • 8/7/2019 Semi-Autonomous - CAROTTE

    19/50

    b. Two-Coil Excitation Each successivepair of adjacent coils is energized in turn.

  • 8/7/2019 Semi-Autonomous - CAROTTE

    20/50

    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.

  • 8/7/2019 Semi-Autonomous - CAROTTE

    21/50

    The Coil Diagram

  • 8/7/2019 Semi-Autonomous - CAROTTE

    22/50

  • 8/7/2019 Semi-Autonomous - CAROTTE

    23/50

    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

  • 8/7/2019 Semi-Autonomous - CAROTTE

    24/50

    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

  • 8/7/2019 Semi-Autonomous - CAROTTE

    25/50

    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) = 300000010 (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.

  • 8/7/2019 Semi-Autonomous - CAROTTE

    26/50

    Comparison

    y Single coil

    y Low torque

    y Consume less energy

    y Settling time is more

    y Double coil

    y High torque

    y Consume double energy

    y Settling time is less

  • 8/7/2019 Semi-Autonomous - CAROTTE

    27/50

    25-way Female D-Type Connector

  • 8/7/2019 Semi-Autonomous - CAROTTE

    28/50

    PC parallel Port

    y The PC's Parallel Printer Port had a total of12 digital outputs and 5 digital inputs accessed via 3

    consecutive 8-bit ports in the processor's I/O space.y 8 output pins accessed via the DATAPort

    y 5 input pins (one inverted) accessed via the STATUSPort

    y 4 output pins (three inverted) accessed via theCONTROL Port

    y The remaining 8 pins are grounded

  • 8/7/2019 Semi-Autonomous - CAROTTE

    29/50

    STEPPER DRIVER BOARD

  • 8/7/2019 Semi-Autonomous - CAROTTE

    30/50

    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 outputsto excite the coils of stepper motors.

  • 8/7/2019 Semi-Autonomous - CAROTTE

    31/50

    An introductory talk on Matlab

    PRESENTED by Sonesh

    Kumar,

    Abhishe k Kumar,

    Bhusanam Bharat

  • 8/7/2019 Semi-Autonomous - CAROTTE

    32/50

    Topics of discussions

    y What is Matlab.???

    y Basic commands & operations.

    y Matlab programs(.m file).

    y Some known functions in Matlab.

    ySurprise !!!!

  • 8/7/2019 Semi-Autonomous - CAROTTE

    33/50

    Matlab..??

    yMATLAB The Language Of Technical

    Computing.

    y

    MATLAB (MATrix laboratory) is a numericalcomputing environment and fourth-generation

    programming language.

    yMATLAB is a interactive environment that enables

    you to perform computationally intensive tasks

    faster than with traditional programming

    languages such as C, C++, and Fortran.

  • 8/7/2019 Semi-Autonomous - CAROTTE

    34/50

    The MATLAB User Interface

  • 8/7/2019 Semi-Autonomous - CAROTTE

    35/50

    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 ansans 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 andnewer) . 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.

  • 8/7/2019 Semi-Autonomous - CAROTTE

    36/50

    >> a = 12

    a =

    12

    >> a = 12;>> a = 23.23424;

    >> a

    a =

    23.2342

    >> a = 'swe'

    a =

    swe

    >> a

    =234872387498139732921942;>> a

    a =

    2.3487e+024

    Basic operator : + , - , * , /

    clc : Clear command window.

    CLC clears th

    e commandwindow and homes the cursor. home :Send the cursor home.HOME moves the cursor to theupper left corner of the

    window. who :List current variables. whos: WHOS is a long form

    of WHO. It lists all thevariables in the current

    workspace, together withinformation about their size,bytes, class, etc.

    clear :Clear variables andfunctions from memory.

    CLEAR delete all the variable

  • 8/7/2019 Semi-Autonomous - CAROTTE

    37/50

  • 8/7/2019 Semi-Autonomous - CAROTTE

    38/50

    Mathematical and logical Operators

    y Power : a^b , a.^by Multiplication : a*b , a.*by Division : a/b , a./by \ or .\ are used while calculating solution of the equation

    A*x = b ; x = A\b = b/A;y ~ : Logical NOTy & : Element-wise logical ANDy | : Element-wise logical ORy && : Short-circuit logical AND

    y || : Short-circuit logical ORy >= , , < these are relational operators.for more detail : type help ~

  • 8/7/2019 Semi-Autonomous - CAROTTE

    39/50

    .m Files in matlab

    There are two kinds of M-files:

    y Scripts, which do not accept input arguments orreturn output arguments. They operate on data in

    the workspace.y Functions, which can accept input arguments and

    return output arguments. Internal variables are localto the function.

    Click here to create .m file

  • 8/7/2019 Semi-Autonomous - CAROTTE

    40/50

    .m Files in matlab

    y Function file : click on create new .m file

    y function [output] = (input)

    y like function [a,b,c,..] = multi(A,B,C)

  • 8/7/2019 Semi-Autonomous - CAROTTE

    41/50

    Matrices in matlab

    >> a = [1 2 3 4 5]

    a =

    1 2 3 4 5

    >> a = [1,2,3,4,5]

    a =

    1 2 3 4 5>> a = [1;2;3;4;5]

    a =

    123

    4

    Any floating point number is amatrix of size(1x1).

    For writing a matrix weh

    aveto use [ ].

    A vector is also a matrix , canbe a row matrix or a columnmatrix.

    We can write a vector in 2different ways

  • 8/7/2019 Semi-Autonomous - CAROTTE

    42/50

    Matrices in matlab

    y 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);

  • 8/7/2019 Semi-Autonomous - CAROTTE

    43/50

    Some known functions in Matlab.

    y factorial(n) : factorial of number n;

    y diff(f,) : differentiation of a function;

    y

    int(f) : integration of a function f;y magic(n) : Magic square of size nxn;

    y sort(x) : Sort in ascending or descending order;

    y power(a,b) : .^ Array power;

    y trace(a) : Sum of diagonal elements;

    y gcd(a,b) : Greatest common divisor(lcm(a,b));

    y roots(c) : Find polynomial roots;

    y

    save : save workspace variable to file(.mat format);

  • 8/7/2019 Semi-Autonomous - CAROTTE

    44/50

    Plot/Figure/Surface

  • 8/7/2019 Semi-Autonomous - CAROTTE

    45/50

    Plot/Figure/Surface

    y plot(X,Y) : plots vector Y versus vector X;

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

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

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

    y ezplot(FUN) : plots the function FUN(X) over the default

    domain -2*PI < X < 2*PI;

    y ezplot3(fx,fy,fz) : plots the spatial curve fx(T), fy(T), and

    fz(T) over the default domain 0 < T < 2*PI;

    y

    ezsurf(f) : plots a graph of the function f(x,y) using surf;

  • 8/7/2019 Semi-Autonomous - CAROTTE

    46/50

    Solving

    y solve(eq1,eq2,..) : Symbolic solution of algebraicequations.

    y dsolve(eq1,eq2,..) : Symbolic solution of ordinary

    differential equations.y And muchmore.

  • 8/7/2019 Semi-Autonomous - CAROTTE

    47/50

  • 8/7/2019 Semi-Autonomous - CAROTTE

    48/50

    For more info. Contacts :- +919706636971

    Department of mathematics

    Email id :- [email protected], [email protected]

    SoneshSoneshKumarKumar

    Contacts :- +919678554657

    Department of Electronic & Electrical Engineering

    Email id :- [email protected], [email protected]

    AbhishekAbhishekKumarKumar

    Contacts :- +919678738211

    Department of Mechanical Engineering

    Email id :- [email protected], [email protected]

    BhusanamBhusanamBharatBharat

  • 8/7/2019 Semi-Autonomous - CAROTTE

    49/50

    QUESTIONS.????

  • 8/7/2019 Semi-Autonomous - CAROTTE

    50/50