signals, instruments, and systems – w7 introduction to hardware … · 2010-06-08 · what is an...

Post on 24-Apr-2020

2 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

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

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)

G l C t f General Concepts for Embedded SystemsEmbedded Systems

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.

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.

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

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

Perception-to-Action Loop

sensors actuators

Computation

rcep

tion

Act

ion

Per A

Environment

Note: real-time aspect emphasized!

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.]

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

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

4a - Perception - Sensors4a11 Classification of Typical Sensorsyp

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

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.]

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.]

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.]

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.]

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

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.

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”)

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.

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)

Overview of Main Wireless C i i S d dCommunication Standards

AvailableAvailable for e-puck

Examples of Embedded Systems

Consumer Market Devices

Digital Watch

Digital cameraWeather station

Digital video camera

Niche Market – Scientific Equipment Commercially Available

e-puck

Mica-Z

Handheld Airborne Mapping SystemSensorscope station

The e-puck miniature robot

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

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)

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.

Mechatronic Hardware Mechatronic Hardware OverviewOverview

e-puck Block SchemaComputation and memory

Actuators

and memoryCommunicationActuatorsSensors

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

e-puck Mechanical Structuree puck Mechanical Structure

e-puck Mechanical Structuree puck Mechanical Structure

e-puck Mechanical Structuree puck Mechanical Structure

e-puck Mechanical Structuree puck Mechanical Structure

e-puck Mechanical Structuree puck Mechanical Structure

e-puck Mechanical Structuree puck Mechanical Structure

e-puck Mechanical Structuree puck Mechanical Structure

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

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

e-puck Electronics: Placement of Components

bottom top

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

mask masktop bottom

inside

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

On Board Computational On-Board Computational Capabilities Capabilities

PIC/dsPIC Familyfrom www.microchip.com

Microcontroller h kon the e-puck

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)

dsPIC Family VariantsdsPIC Family Variants

e-pucke puckmicrocontroller

dsPIC Family VariantsdsPIC Family Variants

dsPIC Architecture

dsPIC Architecture

Microcontroller core

dsPIC Architecture

Memory and memory yaddressing

dsPIC ArchitecturePeripheral device control

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

Analog-to-Digital Converter (ADC)

16 channels, 12 bits12 bits

dsPIC ArchitecturePinout

Conclusion

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).

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/

top related