1 / 43

Industrial automation Using Microcontroller By: Engr. M. Rizwan Anjum Department of Electronic Engineering UCET, IUB.

Industrial automation Using Microcontroller By: Engr. M. Rizwan Anjum Department of Electronic Engineering UCET, IUB. . Contents. Introduction Parameters consideration for Automation Selecting microcontroller Internal architecture of Microcontroller Applications. Introduction.

inge
Download Presentation

Industrial automation Using Microcontroller By: Engr. M. Rizwan Anjum Department of Electronic Engineering UCET, IUB.

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Industrial automation Using MicrocontrollerBy: Engr. M.RizwanAnjumDepartment of Electronic EngineeringUCET, IUB.

  2. Contents • Introduction • Parameters consideration for Automation • Selecting microcontroller • Internal architecture of Microcontroller • Applications

  3. Introduction Automation • The control of an industrial process (e.g manufacturing, production etc) by automatic rather that manual means is often called automation • Automation can be defined as a technology that uses programmed commands to operate a given process

  4. Transducer Processing/ control Processing/ control Output/ Display Set point Appliances Basic building block diagram of Automation

  5. Sensors/ Transducers • Level • Flow • Pressure • Temperature • Humidity

  6. Controllable applications • Motors • Solenoid valves • Control valves

  7. Display • Input Parameters • Set point • Indication for Output (alarm)

  8. Controller • Takes Input • Verifies the conditions • Controls the equipment & • Displays the output

  9. Microcontrollers The prime use of a microcontroller : • To control the operation of a machine using a fixed program that is stored in ROM and that does not change over the lifetime of the system

  10. Typical Microcontrollers • The most common microcontrollers are 8-bit. • 4-bit are used in high volume very low cost applications • 16 & 32 bit are used in high-end applications.  • Typical clock frequencies are 12 - 24 MHz

  11. Different manufacturers of microcontroller • Intel • Atmel • Philips • Dallas Semiconductors • Microchip • Motorola

  12. Criteria for Selecting microcontroller • meeting the computing needs of the task efficiently and cost effectively • speed, the amount of ROM and RAM, the number of I/O ports and timers, size, packaging, power consumption • easy to upgrade • cost per unit • availability of software development tools • assemblers, debuggers, C compilers, emulator, simulator, technical support • wide availability and reliable sources of the microcontrollers.

  13. Different aspects of a microcontroller • Hardware: Interface to the real world • Software: order how to deal with inputs

  14. CPU RAM ROM A single chip Serial COM Port I/O Port Timer Test case: 8051 • A smaller computer • On-chip RAM, ROM, I/O ports...

  15. History of 8051 • 1981, Intel MCS-51 • The 8051 became popular after Intel allowed other manufacturers to make and market an flavor of the 8051. • different speed, amount of on-chip ROM • code-compatible with the original 8051 • form a 8051 family

  16. External interrupts On-chip ROM for program code Timer/Counter Interrupt Control Timer 1 On-chip RAM Timer 0 CPU Serial Port Bus Control 4 I/O Ports OSC P0 P2 P1 P3 TxD RxD Address/Data Block Diagram Counter Inputs

  17. Vcc P1.0 1 40 P0.0(AD0) P1.1 2 39 P0.1(AD1) P1.2 3 38 P0.2(AD2) P1.3 4 37 8051 (8031) P0.3(AD3) P1.4 5 36 P0.4(AD4) P1.5 6 35 P0.5(AD5) P1.6 7 34 P0.6(AD6) P1.7 8 33 P0.7(AD7) RST 9 32 (RXD)P3.0 EA/VPP 10 31 (TXD)P3.1 ALE/PROG 11 30 PSEN (INT0)P3.2 12 29 P2.7(A15) 13 28 (INT1)P3.3 (T0)P3.4 P2.6(A14) 14 27 (T1)P3.5 P2.5(A13) 15 26 P2.4(A12) (WR)P3.6 16 25 P2.3(A11) (RD)P3.7 17 24 P2.2(A10) XTAL2 18 23 P2.1(A9) XTAL1 19 22 P2.0(A8) GND 20 21 Pin Description of the 8051

  18. P3 Bit Function Pin P3.0 RxD 10 P3.1 TxD 11 P3.2 INT0 12 P3.3 INT1 13 P3.4 T0 14 P3.5 T1 15 P3.6 WR 16 P3.7 RD 17 Port 3 Alternate Functions

  19. MICROCONTROLLER I/O pins I/O pins are very useful for the following : • reading Inputs/ reading keypads • Displaying output • controlling Motors (PWM) etc.

  20. Readlatch Vcc TB2 Load(L1) P1.X pin Internal CPU bus DQ ClkQ P1.X M1 Write to latch TB1 Read pin A Pin of Port 1 P0.x 8051 IC

  21. Read latch Vcc Load(L1) P1.X pin Internal CPU bus DQ ClkQ P1.X M1 Write to latch Read pin Writing “1” to Output Pin P1.X Setb p1.x TB2 2. output pin isVcc 1. write a 1 to the pin 1 output 1 0 TB1 8051 IC

  22. Read latch Vcc Load(L1) P1.X pin Internal CPU bus DQ ClkQ P1.X M1 Write to latch Read pin Writing “0” to Output Pin P1.X TB2 2. output pin is ground 1. write a 0 to the pin 0 output 0 1 TB1 8051 IC

  23. Read latch Vcc Load(L1) P1.X pin Internal CPU bus DQ ClkQ P1.X M1 Write to latch Read pin Reading “High” at Input Pin 2. MOV A,P1 external pin=High TB2 1 1 0 TB1 3.Read pin=1 Read latch=0 Write to latch=1 8051 IC

  24. Read latch Vcc Load(L1) P1.X pin Internal CPU bus DQ ClkQ P1.X M1 Write to latch Read pin Reading “Low” at Input Pin 2. MOV A,P1 external pin=Low TB2 0 0 1 TB1 3. Read pin=1 Read latch=0 Write to latch=1 8051 IC

  25. 8051 Family • Mask programmable • factory fitted Programs • OTP one time programmable • User Programmable • Reprogrammable • User Reprogrammable

  26. Comparison of the 8051 Family Members • ROM type • 8031 no ROM ; requires external Rom • 80xx mask ROM • 87xx EPROM • 89xx Flash EEPROM • 89xx • 8951 • 8952 • 8953 • 8955 • 898252 • 891051 • 892051 • Example (AT89C51,AT89LV51) • AT= ATMEL(Manufacture) • C = CMOS technology • LV= Low Power(3.0v)

  27. A B R0 DPTR DPH DPL R1 R2 PC PC R3 Some 8051 16-bit Register R4 R5 R6 R7 Some 8-bitt Registers of the 8051 Registers

  28. Memory mapping in 8051 • ROM memory map in 8051 family

  29. 7FH General RAM 30H 2FH Bit-Addressable RAM 20H 1FH Register Bank 3 18H 17H Register Bank 2 10H 0FH Register Bank 1 08H 07H Register Bank 0 00H RAM memory space allocation in the 8051

  30. Development Cycle of microcontroller based project

  31. How to interface Devices • Inputs and Outputs • Compatibility of I/Os • Impedance matching • Selecting right microcontroller

  32. General diagram of Automation Sensor input/Analog Set point Analog to Digital converter 8051uc D0~D7 Display Actuator Control Signals

  33. Tens Units Thousands hundreds Decoder Decoder Decoder Decoder Counter Counter Counter Counter Clk input Why Microcontroller Less complex Cheaper Example

  34. Controller • Fixed • Universal controllers Universal controllers • Input in form of 0 ~5v • 4 ~ 20mA • 0 ~20mA Conversion using Transmitter Exp. Temperature transmitter, pressure transmitter. etc

  35. Applications of microcontroller • Personal information products: Cell phone, pager, watch, pocket recorder, calculator • Laptop components: mouse, keyboard, modem, fax card, sound card, battery charger • Home appliances: door lock, alarm clock, thermostat, air conditioner, TV remote, VCR, small refrigerator, exercise equipment, washer/dryer, microwave oven • Industrial equipment: Temperature/pressure controllers, Counters, timers, RPM Controllers • Toys: video games, cars, dolls, etc.

  36. Microcontroller Applications

  37. Microcontroller Application Area

  38. Sample projects Car parking gate control

  39. Car parking gate control program org 0 mov p0, #00 mov p1, #00 mov p2, #00 mov p3, #00 wait: jnb p1.0, wait1 ; wait for enter into parking acall here ; if inside goto here subroutine wait1: jnb p1.2, wait ; wait for leave parking acall here1 ; if leave parking goto here1 here: setb p2.0 ; start motor1 for open d gate limit1: jnb p3.0, limit1 ; start motor1 until it strikes to limit switch clr p2.0 ; after defined time stop d motor switch: jnb p1.1, switch ; wait for input when the car cross the entering door setb p2.1 ; when gate crossed start motor1 in revese direction to close d gate limit2: jnb p3.1, limit2 ; start motor1 in reverse direction until it strikes to the other limit clr p2.1 ; after closing the door now stop motor1 inc a ; start counter to count number of cars on seven segment display mov p0, a ; display result on port 0 'use decoder' ret ; return from subroutine here1: setb p2.2 ; start motor2 for open d gate limit3: jnb p3.2, limit3 ; start motor2 until it strikes to the other limit clr p2.2 ; after defined time stop d motor switch1:jnb p1.3, switch1 ;wait for input when the car cross the exit door setb p2.3 ; when gate crossed start motor2 in revese direction to close d gate limit4: jnb p3.3, limit4 ; start motor2 until it strikes to the other limit clr p2.3 ; after closing the door now stop motor2 dec a ; count down mov p0, a ; display result on port 0 sjmp wait ; restart end

  40. ?

  41. Thanks

More Related