Instrumentation & Control Engg. Section Electrical Engineering Department Ahmedabad - 382481, Gujarat.

Slides:



Advertisements
Similar presentations
MICROPROCESSORS AND MICROCONTROLLERS
Advertisements

Interfacing of 8051 UNIT 4.
EET 2261 Unit 13 Controlling Stepper Motors and Servos  Read Almy, Chapter 21.  Lab #13 due next week.  Final Exam next week.
Tony Yi 5/2/2015 CENG4480 TUTORIAL 3. ABOUT ME I am “the other” tutor of CENG4480 You can find me at Rm116 in SHB
1 EECS 373 Design of Microprocessor-Based Systems Student Presentations Tianhua Zheng and Jason Shintani Motor control November 27 th, 2012.
L.
Eastern Mediterranean University PIR SENSOR for controlling stepper motor. by Falah Al Hassan Ammar T.Najeeb Supervisor: Reza Abrishambaf.
SERVO MOTORS Tech Topic By Ryan Bidlack. Background A servo motor is composed of a DC, AC, or an AC induction motor and a feedback control. A servo motor.
Stepper Motors. Motors coils of conductive wire magnetic fields rotational motion –except for linear induction motor everywhere from the very large (LRT)
Stepper Motors A stepper motor is a “pulse-driven” motor that changes the angular position of the rotor in “steps” Define –β = the step angle (per input.
Actuators Instructor: Shuvra Das Mechanical Engineering Dept. University of Detroit Mercy.
Engineering H191 - Drafting / CAD Gateway Engineering Education Coalition Lab 3P. 1Autumn Quarter DC Motors Lab 3.
Coordinate Based Tracking System
SENIOR DESIGN 10/16.
Stepper Motors Jason Wells. Background Brushless, synchronous electric motor Brushless, synchronous electric motor No feedback necessary (open loop) No.
Embedded Control Applications IIMP10-1 weeklecturetopics 10Embedded Control Applications II - Servo-motor control - Stepper motor control.
ECGR-6185 Advanced Embedded Systems University Of North Carolina at Charlotte A. Srinivas Reddy Stepper/Servo/DC Motors.
Introduction to Motors
ASPPRATECH.
1 Institute of Mechatronics and Information Systems Control and Driving Systems.
1 Motors & Motor Controllers ECE AC or DC Motors AC –Few robots use AC except in factories –Most of those that use AC first convert to DC DC –Dominates.
Applied Control Systems Robotics & Robotic Control
Microcontroller Hands-on Workshop #3 Ahmad Manshad New Mexico State University Institute of Electrical and Electronics Engineers November 7, 2009.
1  Actuators are used in order to produce mechanical movement in robots.
Programmable Robotic Painting Arm Presented by: Chincholkar Apoorv R. Joshi Sanket S. Gore Rigved B. Project Guide: Mr.M.D.Patil.
Department of Electrical Engineering, National Taiwan Ocean University Motor Control 5/2/2013 Richard Kuo Assistant Professor.
Other Chapters From the text by Valvano: Introduction to Embedded Systems: Interfacing to the Freescale 9S12.
Interfacing Stepper motor to 8051 microcontroller A stepper motor is a special type of electric motor that moves in increments, or steps, rather than turning.
University of Tehran 1 Microprocessor System Design IO Applications Omid Fatemi
HL Sample Question Applied Control Systems Underlying Principles.
THE MECHANICAL ASPECTS OF ROBOTICS
Microprocessor and Microcontroller Based Systems Instructor: Eng.Moayed N. EL Mobaied The Islamic University of Gaza Faculty of Engineering Electrical.
Motors & Motor Drivers ECE 450.
Electrical Actuation System Lecture 9 (Chapter 9).
STEPPER MOTORS Name: Mr.R.Anandaraj Designation: Associate. Professor Department: Electrical and Electronics Engineering Subject code :EC 6252 Year: II.
Servos The material presented is taken from a variety of sources including:
Stepping motors Jari Kostamo.
MOTORS. Definition Of Motor That powered by electricity or internal combustion, that supplies motive power for a vehicle or for some other device. A device.
Stepper motor. Stepper Motor Interfacing Stepper motor is a widely used device that translates electrical pulses into mechanical movement. Stepper motor.
I/O Devices Switches, LED, LCD
BLDC Motor Speed Control with RPM Display. Introduction BLDC Motor Speed Control with RPM Display  The main objective of this.
Microcontroller and Interfacing ( ) TOPIC: STEPPER MOTOR INTERFACING WITH MICROCONTROLLER PREPARED BY: GUIDED BY: ARJUN GUPTA ( ) PROF.
MICROCONTROLLER INTERFACING WITH STEPPER MOTOR MADE BY: Pruthvirajsinh Jadeja ( ) COLLEGE:DIET BRANCH:EC.
INTRODUCTION TO ROBOTICS Part 3: Propulsion System Robotics and Automation Copyright © Texas Education Agency, All rights reserved. 1.
Sitarambhai Naranjibhai Patel Institute Of Technology & R.C.
INTERNET OF EVERYTHING SDU 2016 Week 9. Physical Output  Make things move by controlling motors with Arduino  Servo-motors  Rotary actuator that allows.
DC motor principles Speed control Direction Stepper motor principles
WHY PARALLEL PORT? The simplest computer controlled robot Requires only basic programming skills in C to start off with Can take inputs from your robot.
Microcontroller basics Embedded systems for mortals.
A PRESENTATION ON RELAY, OPTOISOLATOR AND STEPPER MOTOR INTERFACING WITH AVR Prepared By:- Katariya Prakash[ ] Kathiriya Shalin[ ]
Sitarambhai Naranjibhai Patel Institute of Technology and Research Centre, Umrakh, Bardoli. A Presentation On “ 16x2 LCD Interfacing with AVR atmega32.
INTERFACING HARDWARE WITH MICROCONTROLLER GUIDED BY: Prof. ASIF SIR 1. AKSHAY KIRAN 2. DEEP PARIKH 3. JIGAR PATEL 4. TILAK PATEL ,05,D2D06,09.
ME 440: Numerically Controlled Machine Tools
Motors & Motor Controllers
Introduction to Motors, servos and steppers
MOTORS.
Interfacing circuit of Unipolar Stepper with 8051
UNIVERSAL COLLEGE OF ENGINEERING & TECHNOLOGY
Parallel Port Interfacing
Literature Survey on Sensors and Actuators Topic: Stepper Motor
Electric Motors.
MC3479P Stepper Motor and Stepper Motor IC
Stepper Motors By Brian Tomiuk, Jack Good, Matthew Edwards, Isaac Snellgrove November 14th, 2018.
Applied Control Systems Underlying Principles
EET 2261 Unit 12 Controlling Stepper Motors and Servos
Assist. Prof. Rassim Suliyev - SDU 2018
Sensors and actuators Sensors Resistive sensors
Introduction to Motors
UNIT 11: RC-SERVOMOTOR CONTROL
-Shweta Dubey.
Presentation transcript:

Instrumentation & Control Engg. Section Electrical Engineering Department Ahmedabad , Gujarat

 Arithmetic Operations  Logic Operations  Conditions  Loops  Both Assembly language and C language

Input Devices  Switch  Push-button, POT  Sensors (temperature, strain gauge, level) (mV)  Touchscreen  Keypad matrix  Infrared (PIR motion sensor)  Camera  PING Sensor  RPM Measurement IR sensor  LM35  Etc….

Output Devices  LED  Seven Segment  LED Matrix  LCD  Motor (DC, AC, Servo, Stepper)  Relay  Solenoid Valve  Etc…

 RFID Tag and Reader  GSM Module  GPS module  Motor Driver

 MOV P0,#83H // Initializing push button switches and initializing LED in OFF state. READSW: MOV A,P0 // Moving the port value to Accumulator. RRC A // Checking the vale of Port 0 to know if switch 1 is ON or not JC NXT // If switch 1 is OFF then jump to NXT to check if switch 2 is ON CLR P0.7 // Turn ON LED because Switch 1 is ON SJMP READSW // Read switch status again. NXT: RRC A // Checking the value of Port 0 to know if switch 2 is ON or not JC READSW // Jumping to READSW to check status of switch 1 again (provided switch 2 is OFF) SETB P0.7 // Turning OFF LED because Switch 2 is ON SJMP READSW // Jumping to READSW to read status of switch 1 again. END

 #include //including sfr registers for ports of the controller  #include //Can be download from bottom of this article  //LCD Module Connections  sbit RS = P0^0;  sbit EN = P0^1;  sbit D4 = P2^4;  sbit D5 = P2^5;  sbit D6 = P2^6;  sbit D7 = P2^7;  //End LCD Module Connections  void Delay(int a)  {  int j;  int i;   for(i=0;i<a;i++)  {  for(j=0;j<100;j++)  {  }  void main()  {  int i;  Lcd4_Init();  while(1)  {  Lcd4_Set_Cursor(1,1);  Lcd4_Write_String("electroSome LCD Hello World");

 for(i=0;i<15;i++)  {  Delay(1000);  Lcd4_Shift_Left();  }  for(i=0;i<15;i++)  {  Delay(1000);  Lcd4_Shift_Right();  }  Lcd4_Clear();  Lcd4_Set_Cursor(2,1);  Lcd4_Write_Char('e');  Lcd4_Write_Char('S');  Delay(2000);  }

 #include //including sfr registers for ports of the controller  #include  //LCD Module Connections  sbit RS = P0^0;  sbit EN = P0^1;  sbit D0 = P2^0;  sbit D1 = P2^1;  sbit D2 = P2^2;  sbit D3 = P2^3;  sbit D4 = P2^4;  sbit D5 = P2^5;  sbit D6 = P2^6;  sbit D7 = P2^7;  //End LCD Module Connections  //Keypad Connections  sbit R1 = P1^0;  sbit R2 = P1^1;  sbit R3 = P1^2;  sbit R4 = P1^3;  sbit C1 = P1^4;  sbit C2 = P1^5;  sbit C3 = P1^6;  sbit C4 = P1^7;  //End Keypad Connections  void Delay(int a)  {  int j;  int i; 

 for(i=0;i<a;i++)  {  for(j=0;j<100;j++)  {  }  char Read_Keypad()  {  C1=1;  C2=1;  C3=1;  C4=1;  R1=0;  R2=1;  R3=1;  R4=1;   if(C1==0){Delay(100);while(C1==0);retu rn '7';}  if(C2==0){Delay(100);while(C2==0);retu rn '8';}  if(C3==0){Delay(100);while(C3==0);retu rn '9';}  if(C4==0){Delay(100);while(C4==0);retu rn '/';}  R1=1;  R2=0;  R3=1;  R4=1;  if(C1==0){Delay(100);while(C1==0);retu rn '4';}  if(C2==0){Delay(100);while(C2==0);retu rn '5';} 

 if(C3==0){Delay(100);while(C3==0);retur n '6';}  if(C4==0){Delay(100);while(C4==0);retur n 'X';}  R1=1;  R2=1;  R3=0;  R4=1;  if(C1==0){Delay(100);while(C1==0);retur n '1';}  if(C2==0){Delay(100);while(C2==0);retur n '2';}  if(C3==0){Delay(100);while(C3==0);retur n '3';}  if(C4==0){Delay(100);while(C4==0);retur n '-';}  R1=1;  R2=1;  R3=1;  R4=0;  if(C1==0){Delay(100);while(C1==0);retu rn 'C';}  if(C2==0){Delay(100);while(C2==0);retu rn '0';}  if(C3==0){Delay(100);while(C3==0);retu rn '=';}  if(C4==0){Delay(100);while(C4==0);retu rn '+';}  return 0;  }

 void main()  {  int i=0;  char c,p;  Lcd8_Init();  while(1)  {  Lcd8_Set_Cursor(1,1);  Lcd8_Write_String("Keys Pressed:");  Lcd8_Set_Cursor(2,1);  Lcd8_Write_String("Times:");  while(!(c = Read_Keypad()));  p=c;  while(p==c)  {  i++;  Lcd8_Set_Cursor(1,14);   Lcd8_Write_Char(c);  Lcd8_Set_Cursor(2,7);  Lcd8_Write_Char(i+48);  Delay(100);  while(!(c = Read_Keypad()));  }  i=0;  Lcd8_Clear();  }

 #include  sbit relay_pin = P2^0;  void Delay_ms(int);  void main()  {  do  {  relay_pin = 1; //Relay ON  Delay_ms(1000);  relay_pin = 0; //Relay OFF  Delay_ms(1000);  }while(1);  }  void Delay_ms(int k)  {  int j;  int i;  for(i=0;i<k;i++)  {  for(j=0;j<100;j++)  {  }

 #include  #define relayport P2  void Delay_ms(int);  void main()  {  do  {  relayport = 0xFF; //All relays On  Delay_ms(1000);  relayport = 0x00; //All relays Off   Delay_ms(1000);  }while(1);  }  void Delay_ms(int k)  {  int j;  int i;  for(i=0;i<k;i++)  {  for(j=0;j<100;j++)  {  }

 A Stepper Motor is a brushless, synchronous DC Motor. It has many applications in the field of robotics and mechatronics. The total rotation of the motor is divided into steps. The angle of a single step is known as the stepper angle of the motor. There are two types of stepper motors Unipolar and Bipolar. Due to the ease of operation unipolar stepper motor is commonly used by electronics hobbyists. Stepper Motors can be easily interfaced with a microcontroller using driver ICs such as L293D or ULN2003.stepper motors L293DULN2003  Unipolar stepper motors can be used in three modes namely the Wave Drive, Full Drive and Half Drive mode. Each drive have its own advantages and disadvantages, thus we should choose the required drive according to the application and power consumption.

 In this mode only one electromagnet is energized at a time. Generated torque will be less when compared to full drive in which two electromagnets are energized at a time but power consumption is reduced. It has same number of steps as in the full drive. This drive is preferred when power consumption is more important than torque. It is rarely used. Wave Drive Stepping Sequence StepABCD

 In this mode two electromagnets are energized at a time, so the torque generated will be larger when compared to Wave Drive. This drive is commonly used than others. Power consumption will be higher than other modes. Full Drive Stepping Sequence StepABCD

 Half Drive  In this mode alternatively one and two electromagnets are energized, so it is a combination of Wave and Full drives. This mode is commonly used to increase the angular resolution of the motor but the torque will be less, about 70% at its half step position. We can see that the angular resolution doubles when using Half Drive. Half Drive Stepping Sequence StepABCD

 #include  void delay(int);  void main()  {  do  {  P2=0x01; //0001  delay(1000);  P2=0x02; //0010  delay(1000);  P2=0x04; //0100  delay(1000);   P2=0x08; //1000  delay(1000);  }  while(1);  }  void delay(int k)  {  int i,j;  for(i=0;i<k;i++)  {  for(j=0;j<100;j++)  {}  }

 #include  void delay(int);  void main()  {  do  {  P2 = 0x03; //0011  delay(1000);  P2 = 0x06; //0110  delay(1000);  P2 = 0x0C; //1100  delay(1000);   P2 = 0x09; //1001  delay(1000);  }  while(1);  }  void delay(int k)  {  int i,j;  for(i=0;i<k;i++)  {  for(j=0;j<100;j++)  {}  }

 #include  void delay(int);  void main()  {  do  {  P2=0x01; //0001  delay(1000);  P2=0x03; //0011  delay(1000);  P2=0x02; //0010  delay(1000);  P2=0x06; //0110  delay(1000);  P2=0x04; //0100  delay(1000);  P2=0x0C; //1100  delay(1000);  P2=0x08; //1000  delay(1000);  P2=0x09; //1001  delay(1000);  } while(1);  }  void delay(int k)  {  int i,j;  for(i=0;i<k;i++)  {  for(j=0;j<100;j++)  {}  }

 #include  void delay(int);  void main()  {  do  {  P2=0x01; //0001  delay(1000);  P2=0x04; //0100  delay(1000);  P2=0x02; //0010  delay(1000);   P2=0x08; //1000  delay(1000);  }while(1);  }  void delay(int k)  {  int i,j;  for(i=0;i<k;i++)  {  for(j=0;j<100;j++)  {}  }

 Control Signals and Motor Status P2.0/IN1P2.1/IN2Motor Status LOW Stops LOWHIGHClockwise HIGHLOWAnti-Clockwise HIGH Stops

 #include  void delay(void);  sbit motor_pin_1 = P2^0;  sbit motor_pin_2 = P2^1;  void main()  {  do  {  motor_pin_1 = 1;  motor_pin_2 = 0; //Rotates Motor Anit Clockwise  delay();  motor_pin_1 = 1;  motor_pin_2 = 1; //Stops Motor  delay();  motor_pin_1 = 0;   motor_pin_2 = 1; //Rotates Motor Clockwise  delay();  motor_pin_1 = 0;  motor_pin_2 = 0; //Stops Motor  delay();  }while(1);  }  void delay()  {  int i,j;  for(i=0;i<1000;i++)  {  for(j=0;j<1000;j++)  {  }

 A servo motor uses servo mechanism, which is a closed loop mechanism that uses position feedback to control the precise angular position of the shaft. Stepper Motors, which is an open loop system can also be used for precise angular control. But Servo Motors are preferred in angular motion applications such as robotic arm. Moreover controlling of servo motors are very simple, easy and needs no extra hardware like stepper motor.servo motorStepper Motorsstepper motor  It uses Pulse Width Modulated (PWM) waves as control signals. The angle of rotation is determined by the width of the pulse at the control pin. The servo motor used here is having angle of rotation from 0 to 180 degrees. We can control the exact angular position by varying the pulse between 1ms to 2msPulse Width ModulatedPWM

 #include  sbit motor_pin = P2^0;  void Delay(unsigned int);  void Delay_servo(unsigned int);  void main()  {  motor_pin = 0;  do  {  //Turn to 0 degree  motor_pin = 1;  Delay_servo(50);  motor_pin = 0;  Delay(1000);  //Turn to 90 degree  motor_pin=1;  Delay_servo(82);  motor_pin=0;  Delay(1000);  //Turn to 180 degree  motor_pin=1;  Delay_servo(110);  motor_pin=0;  Delay(1000);  }while(1);  }  void Delay(unsigned int ms)  {  unsigned long int us = ms*1000;   while(us--)  {  _nop_();  }  void Delay_servo(unsigned int us)  {  while(us--)  {  _nop_();  }

THANK YOU