MT2 Introduction Embedded Systems. MT2.1 Mechatronic systems

Similar documents
Embedded Systems Lab Lab 1 Introduction to Microcontrollers Eng. Dalia A. Awad

MicroProcessor. MicroProcessor. MicroProcessor. MicroProcessor

Microprocessors/Microcontrollers

Basic Components of Digital Computer

EMBEDDED SYSTEM BASICS AND APPLICATION

Figure 1.1: Some embedded device. In this course we shall learn microcontroller and FPGA based embedded system.

Computer Hardware Requirements for ERTSs: Microprocessors & Microcontrollers

Introduction to L.A.P. 1

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

Bolt 18F2550 System Hardware Manual

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

Z8 Encore! XP F1680 Series 8-Bit Flash Solution with Extended Peripherals

Computer Hardware Requirements for Real-Time Applications

ARDUINO MEGA INTRODUCTION

ELCT708 MicroLab Session #1 Introduction to Embedded Systems and Microcontrollers. Eng. Salma Hesham

Manual of Board ET-PIC STAMP 18F8722-K22 ET-PIC STAMP 18F8722-K22

Lab Course Microcontroller Programming

MB95260H/MB95270H. MB95280H Series. MB95260H Series/MB95270H Series/

DEV-1 HamStack Development Board

Introduction to Microcontroller Apps for Amateur Radio Projects Using the HamStack Platform.

Getting to know the Arduino IDE

DEVBOARD3 DATASHEET. 10Mbits Ethernet & SD card Development Board PIC18F67J60 MICROCHIP

ATHENA32 PIC32 Evaluation Board ATHENA32. Product Datasheet. Francesco Ficili Date 13/01/2019. Pag. 1

Introduction to 8051 microcontrollers

8051 Microcontroller

COMP2121: Microprocessors and Interfacing. Introduction to Microprocessors

32 bit Micro Experimenter Board Description and Assembly manual

VLSI Design Lab., Konkuk Univ. Yong Beom Cho LSI Design Lab

AKKON USB CONTROLLER BOARD

TDSDB Features. Description

Mechatronics and Measurement. Lecturer:Dung-An Wang Lecture 6

User Manual For CP-JR ARM7 USB-LPC2148 / EXP

Goal: We want to build an autonomous vehicle (robot)

Embedded Systems. Read pages

Lab 1 Introduction to Microcontroller

Embedded World Television, Radio, CD player, Washing Machine Microwave Oven Card readers, Palm devices

Microcontrollers. Principles and Applications. Ajit Pal +5 V 2K 8. 8 bit dip switch. P2 8 Reset switch Microcontroller AT89S52 100E +5 V. 2.

PIC Microcontroller Introduction

Lecture (01) Introducing Embedded Systems and the Microcontrollers By: Dr. Ahmed ElShafee

Embedded Systems Design (630414) Lecture 1 Introduction to Embedded Systems Prof. Kasim M. Al-Aubidy Computer Eng. Dept.

PIC-32MX development board Users Manual

Mercury System SB310

AT89S8252 Development Board V1.0. Manual

About the Presentations

Mega128-DEVelopment Board Progressive Resources LLC 4105 Vincennes Road Indianapolis, IN (317) (317) FAX

ATmega128. Introduction

PVK40. User's manual. Feature Rich Development and Educational Kit for 40-pin Microchip PIC microcontrollers

eip-24/100 Embedded TCP/IP 10/100-BaseT Network Module Features Description Applications

Laboratory: Introduction to Mechatronics. Instructor TA: Edgar Martinez Soberanes Lab 1.

AVR Training Board-I. VLSI Design Lab., Konkuk Univ. LSI Design Lab

Arduino Uno R3 INTRODUCTION

A+ Guide to Hardware: Managing, Maintaining, and Troubleshooting, 5e. Chapter 1 Introducing Hardware

MICROPROCESSORS B (17.384) Spring Lecture Outline

Introduction to Mechatronics and the Mechatronic Design Center Microchip Technology Incorporated. All Rights Reserved. 1

Display Real Time Clock (RTC) On LCD. Version 1.2. Aug Cytron Technologies Sdn. Bhd.

Product Overview -A 16 bit Micro Experimenter for Solderless Breadboards

Overview of Microcontroller and Embedded Systems

Lecture (02) PIC16F84 (I)

Programming in the MAXQ environment

eip-10 Embedded TCP/IP 10-BaseT Network Module Features Description Applications

Introduction to Microcontrollers

Approximately half the power consumption of earlier Renesas Technology products and multiple functions in a 14-pin package

Lesson 14. Title of the Experiment: Introduction to Microcontroller (Activity number of the GCE Advanced Level practical Guide 27)

PIC32&Overview& E155&

EasyPIC5 Development System

09/05/2014. Engaging electronics for the new D&T curriculum. Geoff Hampson Managing Director of Kitronik. Presentation overview


CORRIGENDUM ISSUED FOR NATIONAL COMPETITIVE BIDDING UNDER TEQIP PHASE-II

EE4380 Microprocessor Design Project

PIC16F87X. 28/40-pin 8-Bit CMOS FLASH Microcontrollers. Devices Included in this Data Sheet: Pin Diagram PDIP. Microcontroller Core Features:

Linux Kernel Hacking Free Course, 3rd edition. HWMPS: Hardware Monitor & Protection System

MICROPROCESSORS B (17.384) Spring Lecture Outline

Intel Galileo gen 2 Board

ARDUINO BOARD LINE UP

e-pg Pathshala Subject : Computer Science Paper: Embedded System Module: 8051 Architecture Module No: CS/ES/5 Quadrant 1 e-text

Computers Are Your Future

User Guide. for TAHOE 8718

Network Embedded Systems Sensor Networks Fall Hardware. Marcus Chang,

RFID: Read and Display V2010. Version 1.1. Sept Cytron Technologies Sdn. Bhd.

1 Microprocessors 2 Microcontrollers 3 Actuation sensing, process control

AVR Microcontrollers Architecture

CS-424/580A Microcontrollers and Robotics

MICROPROCESSOR BASED SYSTEM DESIGN

3.3V regulator. JA H-bridge. Doc: page 1 of 7

EMBEDDED SYSTEMS COURSE CURRICULUM

IDUINO for maker s life. User Manual. For IDUINO development Board.

The industrial technology is rapidly moving towards ARM based solutions. Keeping this in mind, we are providing a Embedded ARM Training Suite.

ME 515 Mechatronics. A microprocessor

Introduction to ARM LPC2148 Microcontroller

COMPLEX EMBEDDED SYSTEMS

Microcontroller Overview

Components of a personal computer

F 2 MC-8FX Family. 8-bit Microcontroller. MB95200 Series

Distributed Real-Time Control Systems. Module 3 Hardware for Real Time Distributed Control Systems

BIG8051. Development system. User manual

Embedded Systems. PIC16F84A Internal Architecture. Eng. Anis Nazer First Semester

TEVATRON TECHNOLOGIES PVT. LTD Embedded! Robotics! IoT! VLSI Design! Projects! Technical Consultancy! Education! STEM! Software!

PIC Microcontroller and

PIC32MX150F128 Breakout Board

LBAT90USB162 Atmel. LBAT90USB162 Development Board User s Manual

Transcription:

MT2 Introduction Embedded Systems MT2.1 Mechatronic systems Mechatronics is the synergistic integration of mechanical engineering, with electronics and intelligent computer control in the design and manufacturing of industrial products and processes. Mechantronics brings together areas of technology involving sensors and measurement systems, drive and actuation systems, analysis of the behavior of systems, control systems and microprocessor systems. Consider an automatic washing machine. It is good example for a mechatronics system. Its actions are strictly ordered in time or in an event driven sequence. Its operation is controlled by a control unit which comprises of the microcontroller or a microprocessor. In a washing machine sensors are used to estimate the water level, water temperature, drum speed and whether the door is closed etc. These sensors provide data regarding the above mentioned parameters to the control unit. This data is used by the control unit to calculate the next setting of the washing process. In order to control the washing process the control unit sends signals to the correction elements such as pumps, valves, heaters or motors. This process is repeated until the process is complete. A general schematic diagram of a mechatronics system is shown as above. The main components of the system include control unit, correction elements, process and the sensors. The control unit of the system may comprise of a microcontroller, microprocessor or even a computer motherboard. The correction elements may comprise motors, valves, pumps pr

heaters. In order to control a process the current state of the process has to be estimated. This is done using sensors. Sensors provide distance, angle, pressure, temperature, acceleration etc. MT2.2 Embedded systems An embedded system is a computer based system which is specifically designed to perform one or a several dedicated functions in real-time. It is embedded as part of a complete device often including hardware and mechanical parts. An embedded system comprises of a combination of computer hardware and software and perhaps additional parts, either mechanical or electronic which are designed to perform a dedicated task. An embedded system is usually designed to execute a specific task. In the washing machine example the embedded system in the washer is programmed to perform the task of washing. In contrast, laptops, desktops are designed for performing a wide variety of tasks. Embedded systems are often interfaced with sensors in order to get feedback of process parameters. The sensor feedback is used for controlling the process. Embedded systems often perform real time operations. In such applications, timeliness of the response is critical. For example the cruise control system of a car measures the speed of the car and increases or decreases the throttle in order to control the speed in real time. In some cases, these systems are designed to operate under harsh environments. For example in places where human access is difficult such as nuclear power plants etc. there are robots that perform handling of nuclear waste etc. The operation of these embedded systems should not be affected by high rates of radiation in such environments. Embedded systems comprise of hardware such as a central processing unit (CPU), timers, memory, communication interfaces, input/output ports etc. Usually an embedded system is designed to use a minimum amount of hardware resources. The central processing unit (CPU) of the embedded system is the most important element of the system. The CPU is essentially a processor. Two typical components of a CPU are the arithmetic logic unit (ALU), which performs arithmetic and logical operations, and the control unit (CU), which extracts instructions from memory and decodes and executes them, calling on the ALU when necessary. It executes the instructions that are in a machine code. Embedded systems control many devices in common use today. Consumer electronics items such as mobile phones, mp3 players, videogame consoles, digital cameras, DVD players and GPS receivers use such embedded systems. Many household appliances, such as microwave ovens, washing machines and dishwashers uses embedded systems as they provide flexibility and efficiency. The above are just a few out of many examples.

MT2.3 Microcontrollers A microcontroller is an integration of a CPU, memory and programmable input/output peripherals on a single chip which is designed and manufactured to be employed in embedded system applications. This is basically a small computer on a single integrated circuit chip. A basic schematic diagram of a general microcontroller is shown in figure below. A microcontroller is basically an integration of various components which could comprise of the following. Central processing unit - Ranging from small and simple 4-bit processors to complex 32- or 64-bit processors. In-circuit programming and debugging support. Clock generator - often an oscillator for a quartz timing crystal, resonator or RC circuit. Volatile memory (RAM) for data storage.

Read-only memory (ROM), erasable programmable read only memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM) or Flash memory for program and operating parameter storage. Discrete input and output bits, allowing control or detection of the logic state of an individual package pin. Serial input/output such as serial ports (UARTs). Serial communications interfaces like I²C, Serial Peripheral Interface and Controller Area Network for system interconnect Peripherals such as timers, event counters, Pulse width modulation (PWM) generators, and watchdog timers. Analog-to-digital converters and digital-to-analog converters There are different microcontroller architectures based on the manufacturer. These include Atmel, Microchip (PIC), Intel etc. MT2.4 PIC18F4550 Microcontroller PIC18F4550 is a general purpose 8-bit microcontroller which is developed by Microchip Technology Inc. It uses an 8-bit data bus which makes it possible to access 8 bits of data in a single machine instruction cycle. The speed of a processor is measured in terms of million instruction cycles per second (MIPS). This microcontroller has a speed of 12 MIPS. This microcontroller has 40 pins. A simplified version of the schematic diagram of the PIC18F4550 microcontroller is shown below.

In the above figure only a selected set of pins used for interfacing. Pin 1 (MCLR) is used for clearing the device memory and to reset it. Pin 18 (USB) is used as one of the main pins used to connect the USB cable to power the board, load the compiled code and for data transfer. It is the Internal +3.3V voltage regulator input. In addition to this the USB uses pins 23 (C4) and 24 (C5) for data communication and a ground pin. The power is connected to pins 11 and 32. It uses a voltage of +5V for as the input voltage. This chip is grounded using pins 12 and 31. The rest of the pins are used as either input pins or input/output pins. These chips also require a precise clock input for operation. This is provided by a crystal oscillator. This is an electronic oscillator circuit which uses the mechanical resonance of a vibrating crystal of piezoelectric material (such as quartz) to create an electrical signal with a very precise frequency. This frequency is used for various timing purposes. A crystal oscillator with an input frequency of 20 MHz is connected to pins 13 (CLKI) and 14 (CLKO). This chip uses a Phase Lock Loop (PLL) frequency multiplier boost the operating frequency of the chip to 48 MHz. Microcontrollers could also be used for other applications such as timers, sending PWM signals, and interfacing various digital components, serial communication etc. In this section we will consider only some of the selected applications.

MT2.4.1 Applications of the PIC18F4550 microcontroller 1. Sending and receiving digital signals using PIC18F4550 microcontroller The general digital input/output pins are shown in figure above. These pins could receive a digital signal or output any digital signal. The pins shown in above figure could only be used as digital input pins.

2. Measuring analog voltages using the PIC18F4550 microcontroller This chip has four pins which could be used to measure analog voltages. Pins 2,3,4,5 and 7 can be used to measure analog voltages between 0 and +5 V. It is done by using the analog to digital converters (A/D) in these pins. It measures these analog voltages and displays them as a 10-bit digital number. This means that a voltage of 0 V will correspond to a digital number of 0 and a voltage of +5 V will correspond to a full 10-bit digital value of 1023. Analog voltages could be measured in real time using the microcontroller. 3. Sending a PWM signal using the PIC18F4550 microcontroller The pin 16 (C1) could be used to send a PWM signals for driving DC motors. Pin C1 could be used to send a PWM signal to drive DC motors. The PWM signal send by PIC has a resolution of 10-bit (0-1023 in decimal). The frequency of the PWM signal is 2.44 khz.

Some of the important features of the PIC18F4550 microcontroller is given in table below.

Table: Selected Features of a PIC18F4550 microcontroller Parameter Name Value Operating frequency 48 MHz Program Memory (KB) 32 CPU Speed (MIPS) 12 RAM Bytes 2,048 Data EEPROM (bytes) 256 Digital Communication Peripherals Serial(RS232), USB, SPI, I2C Capture/Compare/PWM Peripherals 1 (10-bit, 2.44 khz) Timers 1 x 8-bit, 3 x 16-bit ADC 4, 10-bit Comparators 2 USB (channels, speed, compliance) 1, Full Speed, USB 2.0 Temperature Range ( o C) -40 to 85 Operating Voltage Range (V) 2 to 5.5 Pin Count 40 MT2.5 Microcontroller development tools MT2.5.1 Hardware A printed circuit Board (PCB) should be used to mechanically support and electrically connect electronic components using conductive pathways, tracks or signal traces etched from copper sheets laminated onto a non-conductive substrate. Usually the printed circuit boards are made out of FR4. FR-4 is a composite material composed of woven fiberglass cloth with an epoxy resin binder that is flame resistant. If this microcontroller is used for various real life applications it should be mounted on to a PCB which is specifically designed for the purpose. The MUNDer board is a custom designed printed circuit board that could be used for various mechatronics applications.

A MUNDer board is shown above. The parts of the MUNDer board are: 1. PIC18F4550 microcontroller. 2. Push buttons 3. Serial communication port (Bluetooth, RS232 etc) 4. USB connector 5. Power jack 6. Indicator LEDs 7. Port A 8. Port E 9. Port B 10. Port D

11. Port C 12. +5 V Port 13. Ground Port 14. LED display port The main component of the MUNDer board is the PIC18F4550 microcontroller. In the MUNDer board the PIC18F4550 is hard wired using the copper traces. It is powered using pins 11 & 32 and grounded using 12 & 31. It also has 20 MHz which is needed for the microcontroller. It has input output ports A to E, +5 V power port and a ground port. There is a terminal to connect a bluetooth communication device for data transfer. The MUNder board could be powered off the USB or an external power supply. It s built in power jack could be connected to voltages between +5 V and +18 V. It has a port for fixing a LCD display. This could be used to display data and messages. The USB connector in board is hardwired. This could be used to power this board from an external computer. It can also be sued for sending and receiving data from a computer. In addition it could also be used to load the compiled programs in to the PIC. It also has two push buttons. These are used to bring the MUNDer board to the boatload mode and running various programs. In the boot load mode, existing memory of the PIC microcontroller is cleared and the new program is loaded. The red LED lights are used as indicators to show when a PIC is brought to a bootload mode. These LEDs could also be programmed for blinking. MT2.5.2 Software A set of specific instructions have to be given to the microcontroller to perform various tasks. This requires a software in order to write a set of instructions. An Integrated Development Environment (IDE) is a software application that facilitates all aspects developing of embedded software. Such an IDE has a source code editor, a compiler and a debugger.

MPLab IDE version 8 is used in this course. Using this development environment instructions are written in human friendly C language. It uses C18 complier to convert this c code into a machine friendly hex code. This hex code could be loaded to the microcontroller using a bootloader program. References: Michael Barr & Anthony J. Massa, 2006, Programming embedded systems: with C and GNU development tools (Second Edition), O'Reilly Media, California. F. Harshama, M. Tomizuka, & T. Fukuda, Mechatronics What is it, why, and how? an editorial, IEEE/ASME Transactions on Mechatronics, Vol. 1, No. 1, 1996, pp. 1 4. W. Bolton, 2008, Mechatronics: A Multidisciplinary Approach (4th Edition), Pearson Education Canada. Microchip Technology Inc. (www.microchip.com)