58
Signals, Instruments, and Systems W7 Introduction to Hardware in Introduction to Hardware in Embedded Systems General Concepts and th k E l the e-puc k Example

Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

Signals, Instruments, and Systems – W7

Introduction to Hardware in Introduction to Hardware in Embedded Systems –General Concepts and th k E lthe e-puck Example

Page 2: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

Outline• General concepts: autonomy,

perception, action, computation, p p , , p ,communication

• Examples of embedded systemsExamples of embedded systems• The e-puck miniature robot

G l hit t• General architecture• Perception (Sensors)

i ( )• Action (Actuators)• Computation (Microcontroller)• Communication (Transceivers)

Page 3: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

G l C t f General Concepts for Embedded SystemsEmbedded Systems

Page 4: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

What is an Embedded System?

From Wikipedia: An embedded system is a special-purpose computer y p p p psystem designed to perform one or a few dedicated functions often with real-time computing constraints. It is usually embedded as part of a complete device including hardware and mechanical parts. In contrast a general purpose computer such as acontrast, a general-purpose computer, such as a personal computer, can do many different tasks depending on programming.depending on programming.

Page 5: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

What is Challenging in DesigningWhat is Challenging in Designing Embedded Systems?

• Computation is subject to physical and resource constraintssuch as timing, deadlines, memory restrictions, and power consumption requirements.consumption requirements.

• The traditional abstraction of separating software from the hardware is more difficult. Hardware and software are integrally intertwinedintegrally intertwined.

• But: hardware components are becoming more and more flexible, cheap, small, and standardized. The design complexity is shifting to software!

• Your role as Environmental Engineers: get enough background to contribute to the software side with your domain knowledgeto contribute to the software side with your domain knowledge and collaborate with electrical and computer engineers.

Page 6: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

AutonomyAutonomy

• Different levels/degrees of autonomyDifferent levels/degrees of autonomy– Energetic level– Sensory motor and computational level– Sensory, motor, and computational level– Decisional level

• Needed degree of autonomy depends on task/environment in which the unit has to operate

i l di bili i i l b• Environmental unpredictability is crucial: robot manipulator vs. mobile robot vs. sensor node

Page 7: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

Autonomy –The Impact of Controllable Mobility

Task ComplexityHuman-Guided

Robotics

State of the Art in Di t ib t d A tMobile Robotics

Research

Distributed Autonomous Robotics

?

Autonomy

IndustryAutonomous

Robotics

y

Page 8: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

Perception-to-Action Loop

sensors actuators

Computation

rcep

tion

Act

ion

Per A

Environment

Note: real-time aspect emphasized!

Page 9: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

Perception - Sensors• Propioceptive (“body”) vs. exteroceptive

(“environment”)( environment )– Ex. proprioceptive: motor speed/robot arm joint angle,

battery voltage– Ex. exteroceptive: distance measurement, light

intensity, sound amplitude

• Passive (“measure ambient energy”) vs. active (“emit energy in the environment and measure the en ironmental reaction”)environmental reaction”)– Ex. passive: temperature probes, microphones, cameras

Ex active: laser rangfinder IR proximity sensors– Ex. active: laser rangfinder, IR proximity sensors, ultrasound sonars

[Adapted from Introduction to Autonomous Mobile Robots, Siegwart R. and Nourbakhsh I. R.]

Page 10: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

4a - Perception - Sensors4a10 Classification of Typical SensorsClassification of Typical Sensors

[From Introduction to Autonomous Mobile Robots, Siegwart R. and Nourbakhsh I. R.]

Page 11: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

4a - Perception - Sensors4a11 Classification of Typical Sensorsyp

[From Introduction to Autonomous Mobile Robots, Siegwart R. and Nourbakhsh I. R.]

Page 12: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

4a - Perception - Sensors4a12 General Sensor Performance

– Range• Upper limit

– Dynamic range• ratio between lower and upper limits, usually in decibels

(dB for power and amplitude)• e.g. voltage measurement from 1 mV to 20 V

Note: similar to the acoustic amplitude (see lecture on signal processing)

• e.g. power measurement from 1 mW to 20 W21 UIUP =⋅=

Note: similar to the acoustic amplitude (see lecture on signal processing)

R

Note: 20 instead of 10 because square of voltage is equal to power!![Adapted from Introduction to Autonomous Mobile Robots, Siegwart R. and Nourbakhsh I. R.]

Page 13: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

4a - Perception - Sensors4a13 General Sensor Performance

– Resolution• minimum difference between two values

General Sensor Performance

• minimum difference between two values• usually: lower limit of dynamic range = resolution• for digital sensors it is usually the A/D resolution.for digital sensors it is usually the A/D resolution.

– e.g. 5V / 255 (8 bit)

– Linearity• variation of output signal as function of the input signal• linearity is less important when signal is treated with a

computer

)()(

fxfx →

)()()(?

yfxfyxfyx ⋅+⋅=⋅+⋅→⋅+⋅ βαβαβα)(yfy → )()()( yfxfyxfyx +=+→+ βαβαβα

[From Introduction to Autonomous Mobile Robots, Siegwart R. and Nourbakhsh I. R.]

Page 14: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

4a - Perception - Sensors4a14 General Sensor Performance

– Bandwidth or Frequency

General Sensor Performance

• the speed with which a sensor can provide a stream of readings

ll th i li it d di th• usually there is an upper limit depending on the sensor and the sampling rate

• lower limit is also possible, e.g. acceleration sensorp , g• frequency response (see signal processing lecture):

phase (delay) of the signal and amplitude might be i fl dinfluenced

[Adapted from Introduction to Autonomous Mobile Robots, Siegwart R. and Nourbakhsh I. R.]

Page 15: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

4a - Perception - Sensors4a15 In Situ Sensor PerformanceIn Situ Sensor Performance

Characteristics that are especially relevant for real world environments

• Sensitivityy– ratio of output change to input change– however, in real world environment, the sensor has very often high

sensitivity to other environmental changes, e.g. illuminationy g , g

• Cross-sensitivity (and cross-talk)– sensitivity to other environmental parameters

i fl f h i– influence of other active sensors

• Error / Accuracy– difference between the sensor’s output and the true valuep

m = measured value

error

v = true value

[Adapted from Introduction to Autonomous Mobile Robots, Siegwart R. and Nourbakhsh I. R.]

Page 16: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

4a - Perception - Sensors4a16 In Situ Sensor Performance

Characteristics that are especially relevant for real world environments

S t ti > d t i i ti• Systematic error -> deterministic errors– caused by factors that can (in theory) be modeled -> prediction– e.g. calibration of a laser sensor or of the distortion cause by the optic g y p

of a camera

• Random error -> non-deterministicd i i i di i ibl– no deterministic prediction possible

– however, they can be described probabilistically – e.g. gaussian noise on a distance sensor, black level noise of camera g g ,

• Precision (different from accuracy!)– reproducibility of sensor results

[From Introduction to Autonomous Mobile Robots, Siegwart R. and Nourbakhsh I. R.]

σ = standard dev of the sensor noise

Page 17: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

Action - Actuators

• For different purposes: locomotion, control a part of the body (e.g., arm), heating, sound p y ( g , ), g,producing, etc.

• Examples of electrical-to-mechanicalExamples of electrical to mechanical actuators: DC motors, stepper motors, servos loudspeakers etcservos, loudspeakers, etc.

Page 18: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

ComputationComputation• Usually microcontroller-based; memory y y

internal and potentially external to the microcontroller

• “Discretization” (analog-to-digital for values, continuous-to-discrete for time) andvalues, continuous to discrete for time) and “continuization” (digital-to-analog for values, discrete-to-continuous for time)values, discrete to continuous for time)

• Different types of control architectures: e.g., reactive (‘reflex based”) vs deliberativereactive ( reflex-based ) vs. deliberative (“planning”)

Page 19: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

Microprocessors vs. Microcontrollers

• Microprocessors – These chips contain a processing core, and occasionally

a few integrated peripherals. In a broader sense, microprocessors are simply CPUs found in desktops.

Mi t ll• Microcontrollers – These chips are all-in-one computer chips. They contain

a processing core, memory, and integrated peripheralsa processing core, memory, and integrated peripherals (e.g., ADC, motor control PWM generator, bus controller). In a broader sense, a microcontroller is a CPU that is sed in an embedded s stemCPU that is used in an embedded system.

Page 20: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

Communication• Different physical channels: wired (e.g., RS232, USB)

and wireless (e g radio infrared ultrasound sound)and wireless (e.g., radio, infrared, ultrasound, sound)• Internal or external to the device: buses connecting

different components (wired communication); external p ( );(node to base-station, node-to-node in a network)

• Asymmetric (one way) or symmetric (bidirectrional) link• Direct (explicit) or indirect (implicit): direct implies

dedicated hardware and software components for intentional targeted information sharing; indirect impliesintentional, targeted information sharing; indirect, implies anonymous, broadcasting forms which are temporary (e.g., visual signs) or persist, perhaps with some volatility, in the environment (e.g., chemical signs such as pheromones)

Page 21: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

Overview of Main Wireless C i i S d dCommunication Standards

AvailableAvailable for e-puck

Page 22: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

Examples of Embedded Systems

Page 23: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

Consumer Market Devices

Digital Watch

Digital cameraWeather station

Digital video camera

Page 24: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

Niche Market – Scientific Equipment Commercially Available

e-puck

Mica-Z

Handheld Airborne Mapping SystemSensorscope station

Page 25: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

The e-puck miniature robot

Page 26: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

S l t d d l b t d lid f

Microinformatique

Selected and re-elaborated slides from:

q

I t d ti t th k b tIntroduction to the e-puck robot

Francesco MondadaRobotics Systems Laboratory

IMT - STI - EPFL

Page 27: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

The e-puck Mobile RobotMain features

The e puck Mobile Robot

• Cylindrical, Ø 70mm• dsPIC processor

T o stepper motors• Two stepper motors• Ring of LEDs• Many sensors:

CameraSoundIR proximityIR proximity3D accelerometer

• Li-ion accumulator• Bluetooth wireless communication• Bluetooth wireless communication• Open hardware (and software)

Page 28: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

The e puck Open Hardware LicenseThe specifications of the e-puck mobile robot are "open source hardware".

The e-puck Open Hardware License

You can redistribute them and/or modify them under the terms of the e-puck Robot Open Source Hardware License as published by EPFL. You should have received a copy of the EPFL e-puck Robot Open Source Hardware Li l ith th ifi ti if t it t th E lLicense along with these specifications; if not, write to the Ecole Polytechnique Fédérale de Lausanne (EPFL), Industrial Relations Office, Station 10, 1015 Lausanne, Switzerland.

These specifications are distributed in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For more details, see the EPFL e-puck Robot Open Source Hardware License.

Page 29: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

Mechatronic Hardware Mechatronic Hardware OverviewOverview

Page 30: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

e-puck Block SchemaComputation and memory

Actuators

and memoryCommunicationActuatorsSensors

Page 31: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

e-puck Overview

IR receiver(remote control)

Speaker

RS232

Accelerometer( )

Mode selector

Reset

RS232

Ring of LEDs

IR i i

Programming anddebug connector

ON-OFFIR proximity sensors

CMOSmicrophones

Wheels with stepper motor Li-Ion accumulator

CMOS camerap

Page 32: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

e-puck Mechanical Structuree puck Mechanical Structure

Page 33: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

e-puck Mechanical Structuree puck Mechanical Structure

Page 34: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

e-puck Mechanical Structuree puck Mechanical Structure

Page 35: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

e-puck Mechanical Structuree puck Mechanical Structure

Page 36: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

e-puck Mechanical Structuree puck Mechanical Structure

Page 37: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

e-puck Mechanical Structuree puck Mechanical Structure

Page 38: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

e-puck Mechanical Structuree puck Mechanical Structure

Page 39: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

e-puck Electronics(typical routing report produced by the EPFL PCB workshop)(typical routing report produced by the EPFL PCB workshop)

Page 40: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

k El t i S l S h tie-puck Electronics: Sample Schematics

Page 41: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

e-puck Electronics: Placement of Components

bottom top

Page 42: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

e-puck Electronics: Layout (4 Layers PCB)e-puck Electronics: Layout (4 Layers PCB)

mask masktop bottom

inside

Page 43: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

e-puck Electronics: e-jumpere puck Electronics: e jumper

Page 44: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

On Board Computational On-Board Computational Capabilities Capabilities

Page 45: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

PIC/dsPIC Familyfrom www.microchip.com

Microcontroller h kon the e-puck

Page 46: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

DSP and Specialized Variants• dsPIC is a family of chips combining microcontroller and Digital

DSP and Specialized VariantsdsPIC is a family of chips combining microcontroller and Digital Signal Processor (DSP) structure and features

• For each dsPIC family member there are three variants:• General purpose (codec interface)• Motor control and power conversion (Pulse Width

Modulation generator and encoder reading)• Sensor processor (minimal variant)Sensor processor (minimal variant)

Page 47: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

dsPIC Family VariantsdsPIC Family Variants

e-pucke puckmicrocontroller

Page 48: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

dsPIC Family VariantsdsPIC Family Variants

Page 49: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

dsPIC Architecture

Page 50: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

dsPIC Architecture

Microcontroller core

Page 51: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

dsPIC Architecture

Memory and memory yaddressing

Page 52: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

dsPIC ArchitecturePeripheral device control

Page 53: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

Peripheral Device Control

ADC: Analog-to-Digital ConverterSPI S i l P i h l I t fSPI: Serial Peripheral InterfaceI2C: Inter-Integrated CircuitUART: Universal Asynchronous Receiver TransmitterCAN: Controller Area NetworkDCI: Data Converter Interface

Page 54: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

Analog-to-Digital Converter (ADC)

16 channels, 12 bits12 bits

Page 55: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

dsPIC ArchitecturePinout

Page 56: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

Conclusion

Page 57: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

Take Home Messages1. Embedded system: specific purpose, equipped for

interfacing discrete/digital and continuous/analog world, g g g ,microcontroller-based design, often real-time constraints

2. Main modules of an embedded system: perception, action, computation, communication

3. e-puck use dsPIC as computational unit (programmable in C) has a reach sensory set actuation capabilities andC), has a reach sensory set, actuation capabilities, and bidirectional wireless and wired links

4 The hardware of an embedded device such an e-puck4. The hardware of an embedded device such an e puck consists of a customized mechanical chassis and off-the-shelf components (e.g., dsPIC, sensors, other logic chips, connectors, motors) assembled on one or several printed circuit boards (PCBs).

Page 58: Signals, Instruments, and Systems – W7 Introduction to Hardware … · 2010-06-08 · What is an Embedded System? From Wikipedia: An embedded system is a special-pppurpose computer

Additional Literature – Week 7Manuals and technical documentation• MPLAB C30 C Compiler User’s Guide• dsPIC datasheet• dsPIC30F Programmer’s Reference Manual• dsPIC30F Programmer s Reference Manual• e-puck website: http://www.e-puck.org/