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

Similar documents
Distributed Real- Time Control Systems

ATmega128. Introduction

ARDUINO BOARD LINE UP

Lesson 5 Arduino Prototype Development Platforms. Chapter-8 L05: "Internet of Things ", Raj Kamal, Publs.: McGraw-Hill Education

ARDUINO M0 PRO Code: A000111

ARDUINO YÚN MINI Code: A000108

Basic Components of Digital Computer

ARDUINO MEGA 2560 REV3 Code: A000067

Arduino Uno R3 INTRODUCTION

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

Lesson 6 Intel Galileo and Edison Prototype Development Platforms. Chapter-8 L06: "Internet of Things ", Raj Kamal, Publs.: McGraw-Hill Education

keyestudio Keyestudio MEGA 2560 R3 Board

2011 Pearson Higher Education, Mazidi, Naimi, and Naimi Pearson Higher Education, 2011 Pearson Higher Education,

Arduino Uno. Arduino Uno R3 Front. Arduino Uno R2 Front

ARDUINO LEONARDO ETH Code: A000022

ARDUINO MEGA INTRODUCTION

ARDUINO MEGA ADK REV3 Code: A000069

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

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

Farklı Arduino Boardlar

Alessandra de Vitis. Arduino

AVR Microcontrollers Architecture

Sanguino TSB. Introduction: Features:

ESPino - Specifications

ARDUINO UNO REV3 SMD Code: A The board everybody gets started with, based on the ATmega328 (SMD).

Arduino ADK Rev.3 Board A000069

ARDUINO UNO REV3 Code: A000066

ARDUINO MICRO WITHOUT HEADERS Code: A000093

ARDUINO YÚN Code: A000008

ARDUINO PRIMO. Code: A000135

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

w w w. b a s e t r a i n i n g i n s t i t u t e. c o

MT2 Introduction Embedded Systems. MT2.1 Mechatronic systems

ARDUINO INDUSTRIAL 1 01 Code: A000126

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

AVR XMEGA Product Line Introduction AVR XMEGA TM. Product Introduction.

AVR XMEGA TM. A New Reference for 8/16-bit Microcontrollers. Ingar Fredriksen AVR Product Marketing Director

Introduction to Arduino. Wilson Wingston Sharon

ARDUINO LEONARDO WITH HEADERS Code: A000057

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

Microcontroller: CPU and Memory

Microprocessors And Microcontroller

Low-Cost Microcontrollers

Network Embedded Systems Sensor Networks Fall Hardware. Marcus Chang,

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

Bolt 18F2550 System Hardware Manual

Intel Galileo gen 2 Board

Overview The Microcontroller The Flex Board Expansion boards Multibus board Demo board How to: Compile demo Flash & Run Demos

Digital Circuits Part 2 - Communication

USER GUIDE EDBG. Description

Getting to know the Arduino IDE

IDUINO for maker s life. User Manual. For IDUINO Mega2560 Board(ST1026)

EDBG. Description. Programmers and Debuggers USER GUIDE

How to Use an Arduino

Microprocessors And Microcontrollers (Practical)

COL862 - Low Power Computing

Beetle SKU:DFR0282. Contents. Introduction

Introduction to Microcontrollers

SBAT90USB162 Atmel. SBAT90USB162 Development Board User s Manual

ECE 471 Embedded Systems Lecture 2

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

AVR MICROCONTROLLER PROJECT TUTORIAL E-PUB

Introduction to L.A.P. 1

Digital Circuits 7: MCUs... how do they work?

MICROPROCESSOR BASED SYSTEM DESIGN

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

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

Choosing a Micro for an Embedded System Application

Microcontroller Basics

Arduino Dock 2. The Hardware

ITM-MKR680. User s Guide. Document ITM-MKR680 User s Guide 02/11/2018

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

ECE 1160/2160 Embedded Systems Design. Midterm Review. Wei Gao. ECE 1160/2160 Embedded Systems Design

CONTENTS. dspicpro4 KEY FEATURES 4 CONNECTING THE SYSTEM 5 INTRODUCTION 6

FIFTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLOGY-MARCH 2014 EMBEDDED SYSTEMS (Common for CT,CM) [Time: 3 hours] (Maximum marks : 100)

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

Microcontrollers for Ham Radio

XNUCLEO-F030R8, Improved STM32 NUCLEO Board

MEXLE. International Educational Platform. International Educational Platform. for Informatics based on Embedded Systems

PICado Alpha Development Board V1.0

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

EMBEDDED SYSTEM BASICS AND APPLICATION

Lecture 6: Embedded Systems and Microcontrollers

8:1 Serial Port Expander

Microcontroller basics

Diploma in Embedded Systems

Cookie User Manual. For NuMicro Edition 1.0. Rev. 1.0 Release: forum.coocox.org.

PIC Microcontroller and

Déploiement embarqué et connectivité hardware avec MATLAB et Simulink

Embedded Systems. Software Development & Education Center. (Design & Development with Various µc)

Usb Universal In-circuit Programmer Pic Avr Arm Msp 8051 Eeprom

acret Ameya Centre for Robotics & Embedded Technology Syllabus for Diploma in Embedded Systems (Total Eight Modules-4 Months -320 Hrs.

Wireless Sensor Networks. FireFly 2.2 Datasheet

Breeze Board. Type A. User Manual.

PIC32&Overview& E155&

PIC-32MX development board Users Manual

Introduction to Microcontrollers

Raspberry Pi - I/O Interfaces

AVR- M16 development board Users Manual

Embedded distributed/parallel computing hardware for high school students

Transcription:

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

General Topology of Real-Time Distributed Control Systems System Management Data Backup Intranet User Interface Coordination Data Logging Control Network Sensing Node Control Node Control Node Driver Node sensor sensor actuator sensor actuator actuator 2

Control Node Requirements Power System Volatile Memory Permanent Memory Watch Dog Sensors Timers/ Counters Signal Acquisition CPU/ALU Interrupts Signal Generation Actuators Communications 3

Microcontroller Units (MCU) Encapsulate all required functions in a single chip. Computer architecture specialized for real-time deterministic and predictible behaviour. 4

Advantages/Disadvantages to General Purpose Computers Advantages: Low cost Small form factor Low energy consumption Reliability Hard Real-Time functions. Very fast boot Disadvantages: Harder to program and debug. Limited functionality (speed, memory, devices). Proprietary software/hardware, difficult support and maintenance. May require some interface electronics. 5

Power Saving Other Features Sleep modes, wake-up on interrupt Security lock bits Reliability Watch-dog, Brown-out detection, Temperature sensing 6

What to do in case of detected failure? Drone Automatic car Segway Coffee Machine Traffic Lights Media Players Power off Hold state Zero Outputs Alarm 7

What to do in case of detected failure? Power off Hold state Zero Outputs Alarm Drone x x Automatic car x x Segway x x Coffee Machine x x x Traffic Lights x x Media Players x 8

Alternative/Complementary Hardware Digital Signal Processors (DSP) : for signal processing applications (vector instructions, floating point units, direct memory access, multiply-add instructions). Field Programmable Gate Arrays (FPGA) and Application Specific Integrated Circuits (ASIC) : for highly optimized and custom purposes. System-on-Chip (SoC), Single- Board-Computers (SBC), Computeron-Modules (COM) : for embedded soft real-time nodes. 9

Applications Ethernet Switches WIFI routers Modems Toys Digital Watches Digital Cameras Multimedia players Traffic lights Factory controllers Robotics Videogame consoles Automatic Sales Machines Electronic Payment Terminals Automotive (ABS,ESC) Microwave Ovens Washing Machines Home Automation (alarm systems, sensors) IP cameras Printers GPS Medical Instruments Musical Instruments Smart Phones and Tablets TV boxes Smart Clothes Aerospace systems (satelites, drones, UAV s) 10

The Lab Project Distributed lighting control system. Cloud Single Board Computer Microcontroller Microcontroller High Power LED Light Sensor High Power LED Light Sensor 11

The Microcontroller Kit Arduino UNO 12

The Embedded Computer Raspberry PI 3B SBC with SoC 13

Project Phases Implementation divided in 2 phases: Real-Time Control Microcontroller Programming. Sensing and Actuation. Digital Controller Implementation. Serial Communications. Distributed Control: Control Networks (I2C). Distributed Optimization. Concurrent Systems. Socket Communications. 14

Microcontroller Architecture ATMEGA328 CPU (20 MIPS) SRAM (2K) Volatile memory. Hold temp variables and stack. FLASH (32K) Store the program to be executed. EEPROM (1K) Permanent data storage. 3 counters/timers I/O ports Digital I/O A/D Analog Inputs USART Serial comms SPI Full-duplex comms interface TWI (I2C) Half-duplex comms interface Watchdog Separate timer to reset the system when it hangs 15

AVR CPU Harvard Architecture Single Level Pipeline 32 8bit Registers 3 16bit address pointers 1 16 bit EEPROM pointer 64 I/O Addresses 16

More Info The Datasheet is the microcontroller s programmer best friend! 17

MCU Selection Criteria Core speed Memory size (RAM, ROM, EPROM) Bus architecture Address/Data bus depth (8, 16, 32, 64 bit) Number of digital I/O ports. Number of analog I/O ports (ADC/DAC) I/O resolution (8, 12, 16, 24 bit) Timer Units Development Tools Interrupt Lines Serial Comms (SPI, I2C, USB, IR, GbE) Product Family Peripheral Interface Controllers Floating Point units DMA controller Power consumption Cost (HW/SW tradeoff) Environmental Conditions 18

Famous MCU Families Intel 8051 Atmel AVR Microchip PIC Microchip dspic Freescale Zilog Z8 Cypress PSoC TI MSP430 Manufacturer sites provide selection tools: 19

ATMEL AVR Family Developed by two students of NTH in 1996. Alf (Egil Bogen) and Vegard (Wollan)'s RISC processor Easy and inexpensive development tools. tinyavr 0.5 8KB Flash, 6-32 pins Up to 20MHz, 1.0 MIPS/MHz megaavr 4-256KB Flash, 28-100-pins Up to 20 MHz, 1.0 MIPS/MHz XMEGA (8-16 bit) 16-384KB Flash, 44-100 pins Up to 32 MHz, 1.0 MIPS/MHz UC3 (32 bit) 16-512KB Flash, 48-144 pins Up to 66 MHZ, 1.5 MIPS/MHz 20

AVR Development Boards Butterfly Demo Board (2003): Self-contained, batterypowered demonstration board with a variety of peripherals and ports. STK500 Starter Kit (2008): Power Supply, Sockets for Chips, RS232 interface to PC, In-System Serial Programming, Push buttons, connectors, etc 21

AVR Third Party Boards Arduino (2005) GPMPU40 Futurlec 2313 Board Olimexino Protostack kits 22

Entry Level Arduino Prototype Boards ARDUINO is a family of ATMEL MCU prototype boards: UNO ATMEGA328 LEONARDO ATMEGA32U4 101 Intel Curie Explora ATMEGA32U4 Micro ATMEGA32U4 Nano ATMEGA328 Mini ATMEGA328 Enhanced MEGA ZERO Cortex M0+ DUE M0 M0 PRO MEGA ADK MKR ZERO power FIO ATMEGA2560 ATSAMD21G18, 32-Bit ARM AT91SAM3X8E ATSAMD21G18, ARM Cortex-M0+ ATSAMD21G18, ARM Cortex-M0+ ATMEGA2560 SAMD21 Cortex-M0+ 32bit low ATMEGA328 23

Arduino Uno V3 24

Arduino Uno V3 Microcontroller Operating Voltage ATmega328 5V Input Voltage (recommended) 7-12V Input Voltage (limits) 6-20V Digital I/O Pins 14 (of which 6 provide PWM output) Analog Input Pins 6 Max DC Current per I/O Pin Max DC Current for 3.3V Pin Max Total DC current Flash Memory SRAM EEPROM Clock Speed 40 ma 50 ma 500 ma 32 KB (ATmega328) of which 0.5 KB used by bootloader 2 KB (ATmega328) 1 KB (ATmega328) 16 MHz 25

Arduino Uno V3 Pins Power VIN, 5V, 3V3, GND Control RESET Analog In A0, A1, A2, A3, A4, A5 Digital I/O 0,1,2,3,4,5,6,7,8,9,10,11,12,13 Reference for Shields AREF, IOREF Programmable LED 13 Serial 0 (RX), 1 (TX) External Interrupts 2, 3 PWM 3,5,6,9,10,11 SPI 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK) TWI (I2S) A4 or SDA, A5 or SCL 26

Uno ATmega Pinout Correspondence 27

Programming MCU s Compilers and interpreters for MCU s C Ada Assembly C++ BASIC Forth PIC Basic Dynamic C Java Python like (Pyastra, PiMite) Programming modes Compile in PC and download to MCU. Some large systems can run compilers or interpreters. Compilers Classically provided by the manufacturers. Several open source versions currently available. 28

Arduino IDE For windows, linux, mac, etc. C/C++ like language 29

Downloading Programs to MCU In Circuit Serial Programmer (ICSP) Plug a cable from the programmer into an header close to the chip in the embedded system. Bootloaders Programs in ROM that manage the downloading process 30

Bootloaders When the MCU powers up, program execution starts at a predefined point in program memory. In development cycle, we may want to change the program very often. To facilitate this, a program called bootloader interfaces with the user to load the kernel. The bootloader is active for a few seconds when the board resets; then it starts whichever program was most recently uploaded to the microcontroller. Disadvantage Occupies (precious) space in Program Memory 31

Debugging MCU s ICE In Circuit Emulator Special processor that emulates the device to debug but allows breakpoints and inspect. Expensive ICD In Circuit Debugger The microcontroller has a small amout of hadware to allow stepping through the code and inspect variables. Increase MCU cost. Simulator A special software emulates the hardware and allows debugging features. Not good for debugging interrupts. Breakpoint and step based approaches are not good for control because they interrupt the control loop. We must use other methods Serial Communication Send debug messages via serial communication to a host device. Very simple and efficient but too slow to use in interrupts. LCD Display debug messages in a display attached to I/O ports. Wastes I/O ports LED Blink to communicate status. PIN debugging Send messages via I/O Pins. Check with oscilloscope Logic Analizer Captures the waveform of attached pins. 32