Phillip Stanley-Marbell
Foundations of Embedded Systems
Department of Engineering, University of Cambridge
http://physcomp.eng.cam.ac.uk
Topic 11: Designing New Embedded Systems: A Case Study
(~60 minutes)
Version 0.2020
Pre-Recorded
Video
45
Department Teaching Survey
2
http://to.eng.cam.ac.uk/teaching/surveys/4B25_Mich.html
(link)
45
Intended Learning Outcomes for This Topic
3
Identify the tradeoffs in selecting components for a given hardware design
By the end of this topic, you should be able to:
Enumerate the hardware components in an embedded sensor hardware platform
Evaluate schematics to infer a system’s functionality
Propose an embedded hardware design to address a given engineering application
45
4
[1] P. Stanley-Marbell and M. Rinard. “Warp: A Hardware Platform for Efficient Multi-Modal Sensing with Adaptive Approximation”, IEEE Micro, 2020.
[2] P. Stanley-Marbell and M. Rinard. “A Hardware Platform for Efficient Multi-Modal Sensing with Adaptive Approximation”, arXiv:1804.09241, 2018.
[3] P. Stanley-Marbell, P.-A. Francese, and M. Rinard. “Encoder Logic for Reducing Serial I/O Power in Sensors and Sensor Hubs”, HotChips’16, 2016.
[4] P. Stanley-Marbell and M. Rinard. “Lax: Driver Interfaces for Approximate Sensor Device Accesses”, In USENIX HotOS XV, 2015.
New: 2nd Generation of Warp
: A Research Multi-Sensor Platform
Warp
45
5
Size reference:
2nd Generation of Warp Research Platform
Warp
45
6
Programmable I/O Pullups
(TI TS5A1066 CMOS switch)
Sensors
Photodiodes
(Vishay TEMD5080)
CPU
ARM Cortex-M0+
Analog
Power
Mux
(TI
TS5A3154)
Charge
Monitoring
(ADC Built
into KL03)
(Freescale KL03)
GPIO
SPI
I2C
Sensor 1
Sensor 21
4
4
Power Conditioning
(TI TPS61070)
Supercapacitors
(Panasonic XH-HG)
Regulator #2
(TI TPS8267x)
Programmable Regulator #1
(TI TPS82740)
Block Diagram for 1st Generation of Warp (revA)
Warp
45
Step 0: Design Goals
7
The Idea
▶︎ Sensor accuracy (vs. measurand) varies with supply voltage
▶︎ Sensor power dissipation also varies with supply voltage
▶︎ Sensor precision (vs. measurand) varies with settings / part
▶︎ Sensors for one physical phenomenon (e.g., acceleration) may be
substituted with sensors for another (e.g., angular rate)
Goals
Platform that let’s us investigate the above, across a dozen or so dierent state-of-the-art sensors
Support for dynamically varying the supply voltage of sensors
Support for energy scavenging
Exploit all the above in a system able to run of scavenged energy
Design in a form factor small enough to use for wearable applications
A self-powered sensor platform for research
Why?
45
Step 1: System Architecture
8
Programmable Regulator #2
(TI TPS82671)
7mm
2
area
Programmable Regulator #1
(TI TPS82740)
7mm
2
area
Programmable I/O Pullups
(TI TS5A1066 CMOS switch)
2mm
2
area
Approximation Hardware
SensorsEnergy Scavenging
Photodiodes
(Vishay TEMD5080)
9×23mm
2
area
Power Conditioning
(TI TPS61070)
10mm
2
area
CPUs
CPU #1
(Freescale KL03)
16mm
2
area
CPU #2
(Freescale KL03)
16mm
2
area
Bluetooth LE
Radio Module
(Panasonic
PAN1326)
90mm
2
area
Radio
Analog
Power
Mux
(TI
TS5A3154)
2mm
2
area
Supercapacitors
(Panasonic XH-HG)
9×24mm
2
area
Charge
Monitoring
(ADC Built
into KL03)
0mm
2
area
Accelerometer
(Freescale MMA8451Q)
9mm
2
area
IR Photometer
(TI TMP006B)
3mm
2
area
Hygrometer,
Thermometer
(SiLabs Si7021)
9mm
2
area
Barometer
(ST LPS25H)
7mm
2
area
Accelerometer,
Gyroscope,
Magnetometer
(Bosch BMX055)
14mm
2
area
RGB Photometer
(TAOS TCS3772)
5mm
2
area
Barometer
(Bosch BMP180)
14mm
2
area
Gyroscope
(ST L3GD20H)
9mm
2
area
Magnetometer
(Freescale MAG3110)
4mm
2
area
Accelerometer
(ADI ADXL362)
10mm
2
area
Hygrometer
(TI HDC1000)
4mm
2
area
45
Step 1: System Architecture
9
Programmable Regulator #2
(TI TPS82671)
7mm
2
area
Programmable Regulator #1
(TI TPS82740)
7mm
2
area
Programmable I/O Pullups
(TI TS5A1066 CMOS switch)
2mm
2
area
Approximation Hardware
SensorsEnergy Scavenging
Photodiodes
(Vishay TEMD5080)
9×23mm
2
area
Power Conditioning
(TI TPS61070)
10mm
2
area
CPUs
CPU #1
(Freescale KL03)
16mm
2
area
CPU #2
(Freescale KL03)
16mm
2
area
Bluetooth LE
Radio Module
(Panasonic
PAN1326)
90mm
2
area
Radio
Analog
Power
Mux
(TI
TS5A3154)
2mm
2
area
Supercapacitors
(Panasonic XH-HG)
9×24mm
2
area
Charge
Monitoring
(ADC Built
into KL03)
0mm
2
area
Accelerometer
(Freescale MMA8451Q)
9mm
2
area
IR Photometer
(TI TMP006B)
3mm
2
area
Hygrometer,
Thermometer
(SiLabs Si7021)
9mm
2
area
Barometer
(ST LPS25H)
7mm
2
area
Accelerometer,
Gyroscope,
Magnetometer
(Bosch BMX055)
14mm
2
area
RGB Photometer
(TAOS TCS3772)
5mm
2
area
Barometer
(Bosch BMP180)
14mm
2
area
Gyroscope
(ST L3GD20H)
9mm
2
area
Magnetometer
(Freescale MAG3110)
4mm
2
area
Accelerometer
(ADI ADXL362)
10mm
2
area
Hygrometer
(TI HDC1000)
4mm
2
area
(the eventual result)
45
Step 2: Before Anything Else, Check Part Availability
10
Where to go:
▶︎ Digikey (wider range, but more expensive)
▶︎ Mouser
▶︎ In the UK/Europe, also: Farnell, RS, etc.
45
Step 3: Prototype with a Breakout Board / Dev. Board
11
TI TMP006
IR Temperature
Sensor
ST L3G4200D
Gyroscope
Sensor
45
Step 4: Implement the Software on Dev. Boards
12
You need to do this before you finalize the schematics
You need to do this before you finalize the schematics!
You need to do this before you finalize the schematics!!
45
Step 4: Implement the Software on Dev. Boards
13
You’ve had practice with this in Coursework #2 and #3
The custom platform in today’s lecture uses the same tools setup
Things to take into account
▶︎ How much memory does the μC have?
▶︎ How much memory does your code use (look at map file)
▶︎ Based on available memory, decide on size of stack and heap
Change
in
KSDK_1.1.0/demos/<xxx>/master/armgcc/frdmkl03z/CMakeLists.txt
… --defsym=__stack_size__=0x300 -Xlinker --defsym=__heap_size__=0x200
45
Step 5: Schematics
14
Programmable Regulator #2
(TI TPS82671)
7mm
2
area
Programmable Regulator #1
(TI TPS82740)
7mm
2
area
Programmable I/O Pullups
(TI TS5A1066 CMOS switch)
2mm
2
area
Approximation Hardware
Analog
Power
Mux
(TI
TS5A3154)
2mm
2
area
45
Step 5: Schematics for Programmable Power Supply
15
1.8V to 2.5V
1.2V
Vout:
Vout:
TPS8267x Switching Regulator
TPS82740 Switching Regulator
45
Step 5: Schematics for Programmable Power Supply
16
1.8V to 2.5V
1.2V
TS5A3154 SPDT Switch
45
Step 5: Schematics for Sensor Subsystems
17
Sensors
Accelerometer
(Freescale MMA8451Q)
9mm
2
area
IR Photometer
(TI TMP006B)
3mm
2
area
Hygrometer,
Thermometer
(SiLabs Si7021)
9mm
2
area
Barometer
(ST LPS25H)
7mm
2
area
Accelerometer,
Gyroscope,
Magnetometer
(Bosch BMX055)
14mm
2
area
RGB Photometer
(TAOS TCS3772)
5mm
2
area
Barometer
(Bosch BMP180)
14mm
2
area
Gyroscope
(ST L3GD20H)
9mm
2
area
Magnetometer
(Freescale MAG3110)
4mm
2
area
Accelerometer
(ADI ADXL362)
10mm
2
area
Hygrometer
(TI HDC1000)
4mm
2
area
11 Sensor ICs
6 Physical Phenomena
21 Individual Sensors
45
Step 5: Schematics for HDC1000 Humidity + Temperature
18
Connected over I2C
I2C Address 0x43
Note: Several pins used
for multiple purposes
45
Step 5: Schematics for BMX055 (Accelerometer 1)
19
Connected over I2C
Responds to three I2C Address 0x18, 0x68, and 0x10 (for the accelerometer, magnetometer, gyro)
45
Step 5: Schematics for MMA8451Q (Accelerometer #2)
20
Connected over I2C
I2C Address 0x1C
45
Step 5: Schematics for ADXL362 (Accelerometer #3)
21
Connected over SPI
45
Step 5: Schematics for Bluetooth LE Radio Subsystem
22
Bluetooth LE
Radio Module
(Panasonic
PAN1326)
90mm
2
area
Radio
45
Step 5: Schematics for Bluetooth LE Radio Subsystem
23
PAN1326 Radio Module (based on TI CC2564)
45
Step 5: Schematics for KL03 Microcontroller Subsystem
24
CPUs
CPU #1
(Freescale KL03)
16mm
2
area
CPU #2
(Freescale KL03)
16mm
2
area
45
Step 5: Schematics for KL03 Microcontroller Subsystem
25
Freescale KL03 ARM Cortex-M0+ microcontroller
45
Step 6: Consider Manufacturing Options (Before Layout!)
26
You need to do this before you do the board layout
Board manufacturer will provide you with the design rules
▶︎ Design rules specify minimum spacing between traces (wires), smallest drills (vias) etc.
▶︎ Ideally, get a design rule file for your CAD software to automatically check your design
You need to do this before you do the board layout
You need to do this before you do the board layout
45
Step 7: Layout
27
Before you route your signals, you will need to decide
▶︎ How many layers
▶︎ What signals go on what layers
Layer 1: Signal
Layer 2: Ground (plane layer)
Layer 3: Signal
Layer 4: Signal
Layer 5: Sensor Supply (plane layer)
Layer 6: Ground (plane layer)
Layer 7: Signal
Layer 8: Vbatt (plane layer)
Layer 9: Ground (plane layer)
Layer 10: Signal
45
Brief Example: Starting a New Design in Eagle
28
New project: Simple system comprising KL03 MCU and BME680 gas sensor
This brief example was only intended to reify the steps from previous slides
▶︎ Not intended to be a tutorial; you can find many tutorials for Eagle online
▶︎ More links and resources at the end of the lecture
New schematic: Connect BME680 to KL03 over I2C
New layout from schematic: Placement of components and routing of traces
What we will do in the brief demo:
45
29
Next, Printed Circuit Board Manufacture
45
Bare Board (after sending Gerber files for PCB fabrication)
31
45
Option A: Send Bare Board to a Board Assembly Facility
33
45
Parts Kit (to send for PCB assembly)
34
Put it all in a box with parts list (“kit”)
+
45
Option B: Assemble Bare Board Yourself
35
45
36
Next, Printed Circuit Board Assembly
45
The Finished Product (fully-populated PCB)
38
3.6 cm
3.2 cm
Bottom ViewTop View
45
Further Reading
41
Eagle CAD tutorial:
https://knowledge.autodesk.com/support/eagle?sort=score
A good collection of resources on Eagle from Autodesk (the makers of Eagle)
▶︎ See the supplementary brief demo from the previous slide
(This course is not about PCB design. You can find many real Eagle PCB tutorials online)
Best next step:
▶︎ Like learning to swim, you can’t learn all you need from a textbook
▶︎ Create your own hardware design and get a printed circuit board manufactured
Test your understanding:
▶︎ Complete these online self-assessments on https://f-of-e.org/
https://f-of-e.org/chapter-11/#exercises
45
Things to Do
42
Complete a “muddiest point” 2-question survey using this link
CUED Teaching Survey: http://to.eng.cam.ac.uk/teaching/surveys/4B25_Mich.html
(link)