Professional Documents
Culture Documents
Robotics Workshop
Hardware…….
• Controlled rotation required
----------
Stepper
Motors are preferred
Stepper Motor
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
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….???
Surprise !!!!
Matlab..??
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
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.
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
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