Hardware Platforms and Sensors

Similar documents
Embedded Systems Lecture 2: Interfacing with the Environment. Björn Franke University of Edinburgh

Embedded System Hardware

In this lecture, we will look at how different electronic modules communicate with each other. We will consider the following topics:

DASL 120 Introduction to Microcontrollers

Training Schedule. Robotic System Design using Arduino Platform

Unit level 5 Credit value 15. Introduction. Learning Outcomes

32-bit ARM Cortex-M0, Cortex-M3 and Cortex-M4F microcontrollers

Master Thesis Presentation Future Electric Vehicle on Lego By Karan Savant. Guide: Dr. Kai Huang

UNIT III Data Acquisition & Microcontroller System. Mr. Manoj Rajale

Electric Bike BLDC Hub Motor Control Using the Z8FMC1600 MCU

Motor Control using NXP s LPC2900

P a g e 1. Introduction

SNIOT702 Specification. Version number:v 1.0.1

The Development and Application of High Compression Ratio Methanol Engine ECU

ELG3336 Design of Mechatronics System

Analogue Interfacing. What is a signal? Continuous vs. Discrete Time. Continuous time signals

Citrus Circuits Fall Workshop Series. Roborio and Sensors. Paul Ngo and Ellie Hass

RX23T inverter ref. kit

Analog I/O. ECE 153B Sensor & Peripheral Interface Design Winter 2016

ELCT 912: Advanced Embedded Systems

Design and Implementation of AT Mega 328 microcontroller based firing control for a tri-phase thyristor control rectifier

Putting It All Together: Computer Architecture and the Digital Camera

6. HARDWARE PROTOTYPE AND EXPERIMENTAL RESULTS

Embedded Controls Final Project. Tom Hall EE /07/2011

Implementation of Brushless DC motor speed control on STM32F407 Cortex M4

Module 13: Interfacing ADC. Introduction ADC Programming DAC Programming Sensor Interfacing

Analog to Digital Conversion

MAXREFDES73#: WEARABLE, GALVANIC SKIN RESPONSE SYSTEM

FYS3240 PC-based instrumentation and microcontrollers. Signal sampling. Spring 2017 Lecture #5

ZKit-51-RD2, 8051 Development Kit

Prototyping Unit for Modelbased Applications

CHAPTER 4 HARDWARE DEVELOPMENT OF STATCOM

Arbeitskreis Hardware. Prof. Dr. Michael Rohs, Dipl.-Inform. Sven Kratz MHCI Lab, LMU München

PAM & SAM System User s Manual

Embedded Robotics. Software Development & Education Center

Lecture 6: Electronics Beyond the Logic Switches Xufeng Kou School of Information Science and Technology ShanghaiTech University

International Journal of Advances in Science and Technology (IJAST)

THE PERFORMANCE TEST OF THE AD CONVERTERS EMBEDDED ON SOME MICROCONTROLLERS

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

Implementation of Multiquadrant D.C. Drive Using Microcontroller

EEE3410 Microcontroller Applications Department of Electrical Engineering. Lecture 10. Analogue Interfacing. Vocational Training Council, Hong Kong.

Designing with STM32F3x

CHAPTER-5 DESIGN OF DIRECT TORQUE CONTROLLED INDUCTION MOTOR DRIVE

ADVANCED EMBEDDED MONITORING SYSTEM FOR ELECTROMAGNETIC RADIATION

FYS3240 PC-based instrumentation and microcontrollers. Signal sampling. Spring 2015 Lecture #5

Power Factor Correction in Digital World. Abstract. 1 Introduction. 3 Advantages of Digital PFC over traditional Analog PFC.

EEL4914 Senior Design. Final Design Report

CATALOG. ANALOG COMMUNICATION SYSTEMS DIGITAL COMMUNICATION SYSTEMS Microcontroller kits Arm controller kits PLC Trainer KITS Regulated Power supplies

The Datasheet and Interfacing EE3376

Group #17 Arian Garcia Javier Morales Tatsiana Smahliuk Christopher Vendette

AUTOPILOT CONTROL SYSTEM - IV

AERO2705 Space Engineering 1 Week 7 The University of Sydney

Logistics. Kinetic Art. Embedded Systems. Embedded Systems and Kinetic Art. Jim Campbell s Algorithm

Embedded Systems and Kinetic Art. CS5968: Erik Brunvand School of Computing. Art4455: Paul Stout Department of Art and Art History.

CHAPTER 4 CONTROL ALGORITHM FOR PROPOSED H-BRIDGE MULTILEVEL INVERTER

Data acquisition and instrumentation. Data acquisition

Enhancing Analog Signal Generation by Digital Channel Using Pulse-Width Modulation

WifiBotics. An Arduino Based Robotics Workshop

Activity 4: Due before the lab during the week of Feb

combine regular DC-motors with a gear-box and an encoder/potentiometer to form a position control loop can only assume a limited range of angular

Wireless Sensor Networks (aka, Active RFID)

Multiple Instrument Station Module

ELG3336: Converters Analog to Digital Converters (ADCs) Digital to Analog Converters (DACs)

Microcontroller: Timers, ADC

IT.MLD900 SENSORS AND TRANSDUCERS TRAINER. Signal Conditioning

System on a Chip. Prof. Dr. Michael Kraft

Analog-Digital Interface

POWER- SWITCHING CONVERTERS Medium and High Power

DSP Project. Reminder: Project proposal is due Friday, October 19, 2012 by 5pm in my office (Small 239).

Draw the symbol and state the applications of : 1) Push button switch 2) 3) Solenoid valve 4) Limit switch ( 1m each) Ans: 1) Push Button

Analog/Digital and Sampling

Characteristic Sym Notes Minimum Typical Maximum Units Operating Frequency Range MHz Operating Frequency Tolerance khz

Modeling, Simulation and Implementation of Speed Control of DC Motor Using PIC 16F877A

International Journal of Advanced Research in Electrical, Electronics and Instrumentation Engineering. (An ISO 3297: 2007 Certified Organization)

Copyright by Syed Ashad Mustufa Younus Copyright by Syed Ashad Mustufa Younus

Lecture #4 Outline. Announcements Project Proposal. AVR Processor Resources

MECE 3320 Measurements & Instrumentation. Data Acquisition

PLC-K506 Series FEATURES DESCRIPTION FEATURES

Cortex-M3 based Prepaid System with Electricity Theft Control

Hello, and welcome to this presentation of the STM32L4 comparators. It covers the main features of the ultra-lowpower comparators and some

Design and Fabrication of High Frequency Linear Function Generator with Digital Frequency Counter using MAX038 and a PIC microcontroller

DESCRIPTION DOCUMENT FOR WIFI / BT HEAVY DUTY RELAY BOARD HARDWARE REVISION 0.1

Sensor Network Platforms and Tools

16 Channels LED Driver

Lab 1.2 Joystick Interface

Characteristic Sym Notes Minimum Typical Maximum Units Operating Frequency Range MHz Operating Frequency Tolerance khz

EE152 Final Project Report

Embedded systems. Exercise session 1. Introduction and project presentation

Electronics A/D and D/A converters

Real Time Implementation of Power Electronics System

TMS320F241 DSP Boards for Power-electronics Applications

Dr. Cahit Karakuş ANALOG SİNYALLER

CHAPTER 7 HARDWARE IMPLEMENTATION

Phys Lecture 3. Power circuits how to control your motors Noise and Shielding

DESIGN CONSTRAINTS ANALYSIS

Exercise 3: Sound volume robot

Sensorless Vector Control with RL78G14

KNC-PLC-K506 Series FEATURES DESCRIPTION FEATURES

Hello, and welcome to this presentation of the STM32 Infrared Timer. Features of this interface allowing the generation of various IR remote control

The University of Texas at Arlington Lecture 10 ADC and DAC

Transcription:

Hardware Platforms and Sensors Tom Spink Including material adapted from Bjoern Franke and Michael O Boyle

Hardware Platform A hardware platform describes the physical components that go to make up a particular device. CPU GPU Bluetooth Interface Microcontroller Memory Temperature Sensor DSP Microprocessor Radio Memory

Designing a hardware platform Application size/complexity I/O Type of microcontroller Clock speed Additional processors GPUs or DSPs? GPIO Serial (I 2 C, SPI, etc) Connectivity Wired/Wireless Power/energy constraints Battery powered Solar powered Grid connected - reliable/unreliable

Microcontrollers A microcontroller is an integrated circuit, containing one or more processing units, various memories, and a number of functional units for computation and I/O. Typical microcontrollers implement the Harvard architecture. Instruction Memory Data Memory Control Unit ALU I/O

Types of Memory The embedded memories present in microcontrollers come in different flavours, and are used for different purposes. In the Harvard architecture, systems have separate program and data memories, usually backed by different technologies, and with different capacities. Program Memory Volatile Data Memory Non-volatile Data Memory Volatile Data Memory Flash SRAM EEPROM DRAM

Memory Constraints Program Flash Data SRAM Data EEPROM Microcontrollers are memory constrained devices, e.g. the AVR ATmega328 has: 2KB 1KB 32k flash, 1k EEPROM and 2k SRAM Because of small program memory, it is important to try to reduce code size. 32KB Software techniques (and the use of -Os) help, but architectural techniques can also help (e.g. CISC, or compressed instruction sets (Thumb))

Power and Energy Power and energy are first-class issues in embedded systems: Battery Life Energy Density Environment A processor that uses more power, but takes less time may use less energy: Important to decide what to optimise for.

Power and Energy Amps A = Cs -1 Volts V = JC -1 Watts W = Js -1 (Ohms Ω = JsC -2 ) V = I R P = I V 3.5V (nominal) battery with 3Ah of storage = 3 Cs -1 h * 3.5 JC -1 = 37.8kJ Processor running continually at 1W => 37.8kJ / 1 Js -1 = 10.5 hours

Power Saving Techniques Dynamic adjustment of Voltage/Frequency: Dynamic Voltage and Frequency Scaling Usage of sleep modes for microcontroller: Turn off internal functional units when not required. Power down external peripherals: Turn off radio when not required. Software optimisation!

Dynamic Voltage and Frequency Scaling Power Consumption for CMOS circuits Delay for CMOS circuits P: Power α: Switching activity C L : Load capacitance V dd : Supply voltage f: Clock frequency : Delay time (upper limit of 1/f) V t : Threshold voltage (< V dd ) Decreasing voltage slows down linearly, but quadratic power saving. Processors offer valid pairs of valid voltage/frequency choices, e.g. Intel Speedstep has 6 choices, ARM big.little has 18!

Sleep Modes Microcontrollers may provide a way to manage power by enabling different sleep modes, with different wake-up sources, and quiescent power usage.

Sensors A sensor captures a physical quantity, and converts it to an electrical quantity. Many physical effects are used for constructing sensors: Law of induction (generation of voltages in a magnetic field) Mechanical properties leading to varying electrical resistances Photo-electric effects

Types of sensors Push-button/switch Acceleration Gyroscope Magnetometer Temperature Pressure Image/Optical Rain Proximity Hall-effect All deliver an electrical representation of a physical quantity

Input/Output I/O is how the device interacts with, and senses, the real world. I/O can be as simple as an on/off electrical signal (GPIO), or a more complicated signalling protocol for data transfer, such as I 2 C, SPI or CAN. I/O is required for interfacing with sensors. ADC GPIO USB Microcontroller SPI UART I2C

General Purpose Input/Output (GPIO) GPIO are simple on/off voltage signals, that can drive outputs, or signal inputs to the microcontroller. They appear as physical pins on the microcontroller. Microcontrollers generally have current sinking and sourcing limitations (e.g. in the range of 50mA), meaning that GPIOs are limited to low-current applications. They can be used to drive higher current loads through transistors and relays. Input pins can be configured to signal interrupts - important for waking up from sleep modes, and real-time applications.

Pulse-width Modulation If you switch a GPIO on and off fast enough, you can generate a pulse-width modulation (PWM) signal, to approximate varying output voltages. Microcontrollers typically have dedicated configurable PWM drivers. Commonly used technique for varying power to inertial loads. The choice of switching frequency varies depending on the target load. The greater the duty cycle, the more power is transferred to the load. Made practical by modern electrically controlled (solid-state) power switches, e.g. MOSFETs. Very efficient power transfer, as typically zero current flows when the switch is open, and very little voltage drop (R DS,ON is low) when switch is closed.

Pulse-width Modulation Duty Cycle (%): Percentage of time on during a period Frequency (Hz): Rate of periods Period (s): 1/f Amplitude (v): Output voltage

Analogue-to-Digital Another form of simple I/O are analogue-to-digital inputs. These inputs read a voltage level (usually between ground and some reference voltage), and report back a discrete number indicating the level of this voltage. Digital computers require a discrete mapping from the time domain, to the value domain. Taking a reading at a particular point in time is called sampling. The sampling rate relates to how fast the input can read a (stable) voltage level. Regular sampling allows recording incoming waveforms.

Analogue-to-Digital (Sampling) Sample-and-hold: clocked transistor and capacitor; the capacitor holds the sequence values

Analogue-to-Digital (Sampling) h(t) V ref ¾ V ref ½ V ref ¼ V ref + - + - + - w(t) GND

Aliasing IoTSSC - Lecture 3

Sampling Theorem Reconstruction is impossible, if not sampling frequently enough How frequently do we have to sample? Nyquist criterion (sampling theory): Aliasing can be avoided if we restrict the frequencies of the incoming signal to less than half of the sampling rate. p s < ½ p n f s > 2 f n : where p n is the period of the fastest sine wave : where f n is the frequency of the fastest sine wave f n is the Nyquist Frequency, f s is the sample rate.

Analogue-to-Digital (Resolution) The resolution determines how precise the reading can be for a given voltage range. The resolution of an ADC converter is typically stated in bits. Q V FSR n = resolution in volts-per-step = difference between largest and smallest voltage = number of voltage intervals For example, 10-bit resolution means 2 10 = 1024 discrete voltage levels. With a voltage range of 0-5V, this means Q = 5/1024 = 0.0049V per step

Resolution Example (3-bit) 5V 5V / 2 3 steps = 0.625 Vstep -1 Voltage 0V 000 001 010 011 100 101 110 111 0.000 0.625 1.250 1.875 2.500 3.125 3.75 4.375

Signal-to-noise Ratio Typically expressed in db e.g. SNR for ideal n-bit converter is: e.g. 10-bit converter:

Digital-to-analogue The reverse of analogue-to-digital is digital-to-analogue. In this case, you tell the driver what voltage to produce, and it will generate the requested voltage, or even a (possibly complex) waveform. Some applications for digital-to-analogue conversion can be approximated with PWM, e.g. dimming an LED. Quality of DAC (frequency, resolution) important for application, e.g. audio.

Interfacing with other sensors Non-trivial sensors may have a dedicated communications interface, or it may simply be convenient to use a communications bus if using many sensors. Retrieving a value from the sensor requires interrogating the sensor s internal registers, by using communication channels such as: I 2 C, SPI, One-wire-bus, 4-20ma+HART, CAN, UART. Example: MCP9808 I 2 C Temperature Sensor: send a command to retrieve current temperature reading. Benefit: Sensor does all the heavy-lifting for A-to-D conversion (+ ability to easily multiplex sensors)

Actuators Actuators turn a digital signal into a physical effect. Indicators (LEDs, bulbs, LCDs) Motors Relays Speakers/Buzzers Heaters Embedded systems typically can t drive high-power loads directly, so must use power switches (MOSFETs, IGBTs, relays, contactors, etc) to operate them.

Application: Heating System Sensors: Temperature, Up/Down Buttons Actuators: Heating Element (via relay), LCD Microcontroller: 1 analogue input, 2 digital inputs, 1 digital output, SPI interface for LCD Implementation: PID control loop Temperature Sensor Up Dn C Relay LCD Heater

Application: Heating System Sensors: Temperature, Up/Down Buttons Actuators: Heating Element (via relay), LCD Microcontroller: 1 analogue input, 2 digital inputs, 1 digital output, SPI interface for LCD WiFi Temperature Sensor Up Dn C Relay LCD Heater