Robotic Systems ECE 401RB Fall 2007

Similar documents
Robotic Systems ECE 401RB Fall 2006

Robotic Systems ECE 401RB Fall 2006

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

Computer Hardware Requirements for Real-Time Applications

MicroProcessor. MicroProcessor. MicroProcessor. MicroProcessor

Lecture Objectives. Introduction to Computing Chapter 0. Topics. Numbering Systems 04/09/2017

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

Lecture 1. Course Overview and The 8051 Architecture

Computer Hardware Requirements for ERTSs: Microprocessors & Microcontrollers

Microcontrollers. Microcontroller

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

Module 1. Introduction. Version 2 EE IIT, Kharagpur 1

MICROCONTROLLER BASED SMART FAN SYSTEM

About the Presentations

Growing Together Globally Serial Communication Design In Embedded System

Microprocessors/Microcontrollers

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

EE4390 Microprocessors. Lessons 2, 3 68HC12 Hardware Overview, Subsystems, and memory System

Microcontroller basics

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

To be familiar with the USART (RS-232) protocol. To be familiar with one type of internal storage system in PIC (EEPROM).

Computer Systems. Communication (networks, radio links) Meatware (people, users don t forget them)

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

Introduction to Microcontrollers

Computers Are Your Future

EMBEDDED SYSTEMS COURSE CURRICULUM

Programmable Control. Name Class Teacher. Ellon Academy Technical Faculty

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

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

Computers Are Your Future

Overview of Microcontroller and Embedded Systems

PROGRAMMING AND CUSTOMIZING

MT2 Introduction Embedded Systems. MT2.1 Mechatronic systems

Chapter 4 The Components of the System Unit

Infineon C167CR microcontroller, 256 kb external. RAM and 256 kb external (Flash) EEPROM. - Small single-board computer (SBC) with an

Introduction to 8051 microcontrollers

Chapter One. Introduction to Computer System

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

MSc-IT 1st Semester Fall 2016, Course Instructor M. Imran khalil 1

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

ECE 471 Embedded Systems Lecture 2

HARDWARE OF SUPERVISORY CONTROL & DATA ACQUISITION SYSTEM

Amarjeet Singh. January 30, 2012

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

EMBEDDED SYSTEMS WITH ROBOTICS AND SENSORS USING ERLANG

Memory Study Material

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

Components of a personal computer

Discovering Computers 2012

Basic Components of Digital Computer

ELCT 912: Advanced Embedded Systems

Robotics Training Module ABLab Solutions

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

Diploma in Embedded Systems

CREATED BY M BILAL & Arslan Ahmad Shaad Visit:

Unlocking the Potential of Your Microcontroller

SANKALCHAND PATEL COLLEGE OF ENGINEERING, VISNAGAR. ELECTRONICS & COMMUNICATION DEPARTMENT Question Bank- 1

THE MICROCOMPUTER SYSTEM CHAPTER - 2

CS 101, Mock Computer Architecture

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

Microprocessors and Microcontrollers Prof. Santanu Chattopadhyay Department of E & EC Engineering Indian Institute of Technology, Kharagpur

Introduction the Serial Communications Parallel Communications Parallel Communications with Handshaking Serial Communications

Architecture of Computers and Parallel Systems Part 6: Microcomputers

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

PIC Microcontroller Introduction

AC : INFRARED COMMUNICATIONS FOR CONTROLLING A ROBOT

PART B UNIT II PART A

SECOND EDITION. Arduino Cookbook. Michael Margolis O'REILLY- Tokyo. Farnham Koln Sebastopol. Cambridge. Beijing

Microcontrollers for Ham Radio

Group 10 Programmable Sensor Output Simulator Progress Report #2

Segment 1A. Introduction to Microcomputer and Microprocessor

Somes French translations :

Acknowledgments About the Author

Fredrick M. Cady. Assembly and С Programming forthefreescalehcs12 Microcontroller. шт.

Microprocessor (COM 9323)

MICROPROCESSOR BASED SYSTEM DESIGN

machine cycle, the CPU: (a) Fetches an instruction, (b) Decodes the instruction, (c) Executes the instruction, and (d) Stores the result.

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

FUNCTIONS OF COMPONENTS OF A PERSONAL COMPUTER

Memory Overview. Overview - Memory Types 2/17/16. Curtis Nelson Walla Walla University

Embedded Training MakeICT Workshop

What step should a technician perform first when servicing computer equipment?

Innovation First, Inc Full-Size Robot Controller Reference Guide

LABORATORY USE OF A MICROCOMPUTER (Last Revision: August 27, 2000)

Bolt 18F2550 System Hardware Manual

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

Serial Communications

Full file at

LinkSprite Technologies,.Inc. pcduino V2

BASIC-Tiger Application Note No. 058 Rev Wireless Communication with IrDA. Gunther Zielosko. 1. Basics of infrared communication

Serial Port Complete

Computer Systems A Background Review

INTELLIGENT APPLIANCE CONTROL SYSTEM USING ARM7 AND ZIGBEE

Parallel Data Transfer. Suppose you need to transfer data from one HCS12 to another. How can you do this?

Serial Interfaces Part 1. ECE 153B Sensor & Peripheral Interface Design Winter 2016

Design and Installation of Home Automation and Security System Using Microcontroller and ZigBee Modulation

ECE3120: Computer Systems Hardware & Software Development Tools

The Microcontroller Idea Book

Downloaded from various sources on the NET

CS-424/580A Microcontrollers and Robotics

Transcription:

Robotic Systems ECE 401RB Fall 2007 Lecture 7: Processors Part 1 The following notes are from: Chapter 12, G. McComb, and M. Predko, Robot Builder's Bonanza, Third Edition, Mc- Graw Hill, 2006. I. Introduction Some consider machines to be robots if they are at least remote controlled. But this leaves the intelligence in the hands of the remote controller. These robots may still have sensors. But the sensor information must be sent to the remote controller to make the control decisions. What types of sensors might provide this type of feedback to a remote controller? Touch Vision Chemical Maybe sound But most would say a robot needs to have autonomy. Receive sensor inputs. Process and interpret the sensor inputs. Make decisions. According to some plan or objective. - Carrying out specific, pre-planned actions. In response to sensor inputs. - Adjusting the plan given sensor inputs. - Responding to unexpected sensor inputs. - Like those that indicate danger to the robot. Lecture 7, Page 1 of 21

A computer of one type or another, therefore, needs to be present within a robot. Can consist of a simple assortment of electronic components. Up to an advanced computer. And the computer must be able to interface with all of the other parts of the robot. Sensors Motors Power distribution II. Intelligence from Discrete Components Discrete components can be used by themselves to control a robot. No microprocessor. Using transistors, resistors, etc. Given the knowledge from your lab, how could a light following robot be designed purely from discrete components? Light sensor could be used as a switch. Turn on the motors when the light is in front of the robot. Lecture 7, Page 2 of 21

This makes the robot reverse direction upon seeing bright light. Light shining on the photodetector turns on the circuit. Which turns on a relay to reverse the motor. You can also reverse the polarities to make the robot follow the light instead. No turning is possible for this simple case. How could the robot be improved to turn to follow the light? Two light sensors. One connected with each motor. The designer is the one providing the intelligence here, not much from the robot. - Although sensing the light is a very simple form of intelligence. Lecture 7, Page 3 of 21

Additional simple circuitry could be added. A 555 timer could be used to create time delays. For example, run for 5 seconds then stop. To wait a time delay before moving. Etc. The biggest problem with this type of robot is configurability. Hardware changes are required each time the behavior of the robot is to be changed. New wiring. Using breadboards, but breadboards can have loose connections. III. Line Tracing Example This can be accomplished using a few integrated logic circuits and a small assortment of transistors and resistors. Assume some kind of high contrast line is placed on the floor. White on black or black on white does not matter. Use an LED to illuminate below the robot and a phototransistor to sense the reflected light. These two devices paired together in a package are commonly available. Mount detectors on the bottom for the robot. Two detectors set apart roughly twice the width of the line. Lecture 7, Page 4 of 21

Then use a sensor circuit that provides an output if the light is detected. R2 determines the sensitivity of the phototransistor and its voltage range. The output is sent to a comparator circuit. Lecture 7, Page 5 of 21

These are integrated into an overall motor control circuit. And finally, relays control the motors. Lecture 7, Page 6 of 21

Here is the list of parts used for this example. Adjustments The robot may waddle it was down the track. - Overcorrecting for errors each time. This depends on the switching speed of the relays. - Faster-acting relays would create smoother movement. Also, the sensors could be placed a different distance apart. - Closer together or farther apart would make the robot jerk back and forth less? Farther apart would mean longer times between switching. Closer would mean faster switching, but less distance each time. Lecture 7, Page 7 of 21

How would a computer controlled approach help here? It could use the history of the readings to know how quickly to respond. It could respond more gradually over time depending on how much correction is needed. IV. Intelligence from Microcontrollers Here software changes are all that is required Not necessarily hardware changes. Options for computer control Microcontroller Personal Digital Assistant, like a Palm Pilot. Single-board computer Personal computer motherboard or laptop. Microcontrollers are a very good option Low cost Simple power requirements Usually 2.5 V to 5 V. Most can be programmed using software. Create the program on a PC. Then download the program to the microcontroller using a simple hardware interface. The microcontroller operates on its own once disconnected from the PC. Lecture 7, Page 8 of 21

There are literally hundreds of choices of microcontrollers. What do you imagine are the differences between them? Cost (as little as $1.00) Available inputs/outputs. Ease of programming. Programming language. Size Power requirements. People will frequently keep using the same controller. Once they have experience with it and its programming procedures. Microcontrollers do not have large, complicated operating systems. Operation is quite simple. Requires a few configuration commands. Otherwise, software is quite straightforward. The programming module can be costly. Much more costly than the microcontroller itself. There are two forms that a program can take. A regular program, compiled down to machine code as in a normal computer. Referred to as stand-alone microcontrollers. Can usually be programmed in a variety of high-level languages. - Like C, BASIC, Java. Lecture 7, Page 9 of 21

A program which makes use of special instructions available from the microcontroller. May have a series of very complex commands that can be used. This simplifies the work of the person writing the program, since important functions are already created. Referred to as a bootloader-equipped microcontroller. - The bootloader adds the special commands. Programmed in a predetermined high-level language. - For example, the BASIC Stamp 2 uses BASIC. Microcontrollers are available at 8, 16, or 32-bit processors. Most robot applications do not require more than eight bits. Complete Computer System on a Chip A key benefit of microcontrollers is that they combine a microprocessor component with various I/O that are typically needed to interface with the real world. Example configuration of the 8051 microcontroller. - CPU - CPU reset and clocking support circuitry. - Hardware interrupts - Built-in timer or counter. - Programmable full-duplex serial port. - 32 I/O lines Some microcontrollers have greater or fewer I/O lines. Not all have hardware interrupt inputs. Some also have analog-to-digital conversion. Some have voltage comparison. A big plus is the CPU reset and clocking support circuitry. The microcontroller, therefore, only needs a power input and decoupling capacitor. Unlike TTL or CMOS which need clocks. Lecture 7, Page 10 of 21

Program and Data Storage A low-cost microcontroller will only have a few thousand bytes of program storage. This may seem small. But this amount of memory is usually more than adequate. Possibly depending on the programming method. Two options for use of memory One common area for all programs and data storage. - With a single data bus. - Called a Princeton or Von Neumann architecture. - This is common also on standard desktop computers. Lecture 7, Page 11 of 21

Programs stored in one place and data in another. - Two buses are used. - Most modern microcontrollers use this. - Called the Harvard architecture. The difference between the two is not trivial. - The Harvard architecture can run faster, since it can fetch programs and data simultaneously. - The Von Neumann architecture must switch between programs and data. - But the Von Neumann architecture is superior for real-time operating systems. The Harvard architecture will use EEPROM (electronically erasable programmable ROM) for programs and RAM for data. A version of EEPROM used often is Flash. Two data storage specifications will commonly be seen for microcontrollers. Programming will be different for the two different architectures. At the assembler level. Should be no different when using a high-level language. Chip Programming Programming is now much easier than it used to be. Older microcontrollers used PROM and EEPROM that required tools to erase them before a new program could be burned into them. All microcontrollers have programmers. Not people programmers, but software to program the microcontrollers. Range in price from $25 to several thousand dollars. An important consideration is debugging features and capabilities. And how the hardware accomplishes the debugging. Lecture 7, Page 12 of 21

V. Personal Digital Assistants Palm pilots and other personal digital assistants (PDAs) can be used as a small robot controller. They have many of the advantages of microcontrollers. But what additional advantages do they provide? Power supply LCD display Stylus, and maybe small keyboard input. No need for a separate computer to create programs. Good volatile and non-volatile storage. What do you suppose is the main difficulty with using PDAs? Interfacing with motors and sensors. Two types of PDAs to consider. Palm O/S Has several programming languages and native programming environments that could be considered. - The HotPaw BASIC programming environment is very popular. - Lets a programmer develop, compile, and run BASIC applications on a PDA. Lecture 7, Page 13 of 21

There are lots of older Palm devices that could be used. - And obtained at a low cost. Windows CE Offers essentially the same features as Palm devices. Microsoft offers a number of embedded Visual Tools for CE devices. - Included embedded Visual BASIC. - Which can be written and tested on a PC before downloading to a PDA. Two choices for connecting the PDA to the robot. Serial port Similar to a PC s RS-232 port. - Although it does not implement all handshaking or produce valid RS-232 voltage levels. This is a lower cost option. Infrared IRDA data port. Fairly high speed (9.6 to 115.2 kbps). Uses a complex communications protocol. A number of chips are available that can implement this interface. Only can communicate reliably over ranges less than 1 meter. A direct electrical connection between the PDA and the robot is avoided. - Eliminates possible problems with electrical noise. An intelligent device is still also needed. It uses a serial connection with the PDA. - And interfaces with the sensors and motors. This can be found in a pre-packaged serial interface chip. - Or another small microcontroller could be used. VI. Single-Board Computers An older approach was to use single-board computers (SBCs). Could be programmed like microcontrollers. In assembly language or a higher level language. But also have the I/O interfaces already implemented. Built-in RS-232 or Ethernet interfaces. So application transfer is simple. Lecture 7, Page 14 of 21

The PC/104 form factor was commonly used. Offered tremendous flexibility but at fairly high cost. Most modern single-board computers are really full PCs built into a small circuit board. A very popular form-factor is the mini-itx. A complete PC in 6.7 inches by 6.7 inches. Supports many megabytes of memory. Can run Windows or Linux. - So standard PC development tools can be used. What do think are the downside of using SBCs? Power requirements several voltages and high capacity batteries that heavy. Installing and running a full operating system. I/O operations. Several voltages are needed. - High capacity batteries and several voltage regulator circuits are needed. - Weight and size of these results in SBCs only being used in large robots. Disk drives are unreliable in a robot. Why? Robots vibrate and move. - Disk drives also require a great deal of power. I/O interfacing would usually need to come through USB ports. - Functions can be sophisticated and difficult to program. Despite the downsides, SBCs offer good possibilities. Debugging is quite simple. Could add wireless capabilities with very little work. - Like streaming video. Lecture 7, Page 15 of 21

Single-board computer kits There are several popular SBCs available as kits. BotBoard Miniboard HandyBoard - Designed by instructors at MIT. VII. Personal Computers A personal computer can be used to control a robot. Constantly tethered to the computer, since the computer gives the commands. By cable. Or by wireless. But the computer can go with the robot. Computer would be on board the robot, so it would need to be small size. But still only feasible for large robots. Power supply requirements would be hard to meet. Several supply voltages. Lots of power. Need to be able to access I/O. I/O cards designed for USB ports are available. Must be able to program the computer to control the robot. Must adapt the mass storage capability. Disk drives are not practical. Should be able to boot and run completely from a USB flash drive. Need detailed technical information about the computer. Lecture 7, Page 16 of 21

A PC may seem an unlikely option for robot control. Why might there still be advantages to using a PC? Expansion slots. Large software base. Readily available technical information. Easy to obtain at a low cost. Used, old machines can be obtained at thrift stores or on-line auctions. - As long as an older machine still has software support. - Operating system, applications, drivers, etc. Do not install the entire PC. Only use the motherboard. - Will require tight voltage regulation. - Newer motherboards are much more efficient regarding power consumption. Or use a laptop. - Do not try to use the laptop batteries to power other parts of the robot. - Some batteries will automatically shut off, others will run down faster and could be damaged. Make sure BIOS can be adjusted. - To run without a keyboard. - To run without a display. Lecture 7, Page 17 of 21

Operating system choice is very important. Determine what features are needed. See what can be loaded or not loaded. The graphical user interface (GUI) is a big use of resources and memory. Without the GUI, the operating system might take up a fairly small amount of space on a USB drive. See what tools are available with that operating system. There are a variety of open source tools available. There are several Linux robotic communities. VIII. Inputs and Outputs Microcontrollers provide a basic, two-state input and output of 0 or +5 volts. These need to be translated to outputs for sensors and motors. And allow for inputs from a variety of sensors. They also provide serial communications. This is the most common form of computer interfacing. Multiple bits are sent in a stream over time on a single wire. Several formats are used. - Depending on how the communication is to occur - Depending on the need to have regularly occurring edges for clock synchronization. Lecture 7, Page 18 of 21

Synchronous serial communications are the most likely to be used. Three most common types of synchronous serial communications. Inter-integrated circuit (I2C) - Created by Phillips. - Two or more microcontrollers can communicate. - One is a master, the others are slaves. - Slaves can be special devices for interrogating sensors or operating motors. Microwire - By National Semiconductor - Used for interfacing a microcontroller with electronics. - Such as memory and analog-to-digital convertors. Serial peripheral interface (SPI) - By Motorola Lecture 7, Page 19 of 21

Asynchronous serial communications The beginning of a transmission is indicated by a start bit. An error control bit can be placed at the end of the data bits. Like the parity bit we saw in an earlier lecture. But this is rarely used. - Since cables are not usually very noisy. Would be different if using wireless. Most popular approach is RS-232 (more accurately EIA-232). Uses +12 V and 12 V instead of TTL 0 and +5 V. Data Conversion Analog-to-Digital converters (ADCs) And conversely DACs. Transform analog voltages to digital, binary values. Could be on a separate circuit. Could be included in the microcontroller. Lecture 7, Page 20 of 21

Comparators Can compare a voltage against some setpoint. Then the output is high or low to indicate above or below the setpoint. Other inputs and output Timers to determine the frequency of an incoming digital signal. PWM outputs Can be used with a capacitor and resistor to create a rudimentary form of digital-to-analog conversion. Can create a sound output. What other use have we seen of this? Speed control of a DC motor. Pulse accumulators Automatic counters. Usually can be doing counting when the rest of the microcontroller is doing something else. Hardware interrupts Special inputs to get the attention of the microcontroller. Microcontroller temporarily suspends normal program execution to run an interrupt handling subroutine. External reset To reset the microcontroller. Switch debouncer To ignore the temporary noise when a switch is closing. Input pull-up Resistors to keep from seeming like there is a signal when the microcontroller is not generating one. Lecture 7, Page 21 of 21