sensori inerziali di stmicroelectronics per controllo di ... labombarda.pdfsensori inerziali di...
TRANSCRIPT
Sensori inerziali di STMicroelectronics
per controllo di posizione ed assetto
utilizzando avanzati algoritmi di sensor
fusion
Andrea Labombarda
STMicroelectronics: Motion Mems Division
10/04/2013
1
5/15/2013 Presentation Title
Motion Tracking System
• A smart motion tracking system is an interesting
instrument for a wide range of applications:
• Gaming
• Augmented reality
• Telemedicine
• Rehabilitation
• Robotics (Industrial Robots, Automatic karts navigation)
• Uses one or more IMUs to estimate:
• Robot movement
• Orientation in the 3D space
• Direction
2
5/15/2013 Presentation Title
IMU: Inertial Measurement Unit
• Modular architecture to develop a system for real-time motion capture
• IMU module is composed at least by:
• A microcontroller (MCU)
• 3-axis accelerometer
• 3-axis gyroscope
• 3-axis magnetometer
• The IMU MCU collects measurements from the sensors and
implements the sensor fusion algorithm
• The design of the proposed IMU aims at improving the performance
and at reducing size and weight
• Keep cost low
• Easily placement on a machine without impacting in its movements
3
5/15/2013 Presentation Title
IMU: MOCAP system
• There are different kind of MOCAP system can be used for Robot
Motion Capture:
• Acoustic System
• Optics System
• Magnetics System
• Some of these methods can be very precise but expensive and they
need a structured environment thus are not easily scalable.
4
5/15/2013 Presentation Title
• IMU system based on motion
sensors are cheap, small in size
and a good compromise in terms of
precision
IMU: HW System Architecture
• The design has to be taken into account for both HW and SW
characteristics because the system has to be as much transparent as
possible
• Should be small and light enough
• The MCU selection must be a good trade off in terms of power computation and
power consumption
5
5/15/2013 Presentation Title
MCU 3 Axis Accelerometer
3 Axis Magnetometer
3 Axis Gyroscope
I2C/SPI
communication
Interface
I2C/SPI
I2C/SPI
• One IMU on each robot joint could be enough to track the robot movements
IMU: SW System Architecture 7
3xA
3xA 3xG
3xA 3xM 3xG
3xA 3xM
Delay for filtering
Unwanted acceleration sensitivity
No Orientation
Delay for filtering
Magnetic disturbances
Gyro drift
Accumulated error
Relative position issue
No latency
No drift
Absolute position
No singularity
How does the 9-axis system work?
The 9-axis system creates a more accurate orientation solution. The
proper combination of the gyroscope with the magnetometer and
accelerometer provides all the benefits of each of the three types of
sensors, while eliminating their respective weaknesses:
– The gyro tracks heading, pitch and roll on an instantaneous and short term basis
+ Not influenced by lateral acceleration, vibration, or changing magnetic fields
- Does not have absolute reference and also drifts over time
– The accelerometer tracks the direction of gravity while the magnetometer tracks the direction of the Earth’s magnetic field
+ These have absolute long-term reference
- These are highly susceptible to all the things that the Gyro is not:
acceleration, vibration, and changing magnetic field
8
iNemoTM Engine – API Specifications
• Outputs
• Quaternions
• Heading, Pitch, & Roll
• Linear Acceleration
• Gravity
9
• OS Support • Windows, Linux, Android,
Chrome
• Supported Platforms • x86, OMAP, Cortex-Mx, ARMx
• Output Rate: 100Hz
• iNEMO engine is written in C
code thus can be compiled for
any platform
STMicroeolectronics iNEMO Engine solutions
10
• Availability of iNEMO software libraries, based on the Kalman’s filter theory
• INEMO Engine Lite, a free source code software library for motion-detection
system evaluation. The library is compatible with all the STM32 hardware
platforms
http://www.st.com/web/catalog/tools/FM147/CL1818/SC1528/PF252510
• INEMO Engine Pro, a compiled software library with high performance and
high precision data-fusion algorithms for multiple sensors . The iNEMOEngine
Pro is a precompiled library for STM32F103 microcontrollers and with API
example code for algorithm setup and tuning.
http://www.st.com/web/catalog/tools/FM147/CL1818/SC1528/PF252509
STEVAL MKI109V2: eMotion Board 11
• eMotion is an open architecture:
• Ready to support any device on standard adapter board
• Ready for any wireless extension
• Ready to be battery powered
9x
3x acc
3x gyro
3x mag
INEMO-M1: Overview
L3GD20 3-Axis
Digital Gyroscope
LSM303DLHC6-Axis
eCompass
STM32F103 32-bit
Microcontroller
• The INEMO-M1 is the smallest sensor fusion
system on board (SoB) of the iNEMO family.
• It integrates multiple ST`s sensors
(accelerometers, gyroscopes and
magnetometer) with a powerful 32-bit
computational core.
• Is an advanced motion-based platforms,
perfect for several application segments, such
as augmented reality, navigation, human
machine interfaces, robotics industrial
automated systems and body motion
reconstruction.
• A complete set of communication interfaces in
a very small size form factor (13x13x2 mm)
make the INEMO-M1 system on board a
flexible solution for effortless orientation
estimation embedded applications.
12
13
• Powerful microcontroller from the STM32F103 family
MCU with ARM CORTEX M3 core @72Mhz (90 DMIPS) / 512 Kbytes Flash / 64 Kbytes SRAM
• MEMS sensors for up to 9-axis (acc + gyro + mag)
Accelerometer: FS= ±2g ÷ ±16g
Magnetometer: FS = ±1.3 ÷ ±8.1 gauss
Gyroscope: FS = ±250 ÷ ±2000 dps
• on-board voltage regulator and ceramic resonator
What’s inside INEMO-M1
just 13x13x2 mm2
- SPI (18Mbps), I2C, CAN
- USB 2.0 full-speed
- 8 x ADC channel
- 2 x USART (4.5 Mbps)
- 2 x DAC
- 15 x Timer channel
- 19 x GPIO
I2C
SPI
INEMO-M1: flexibility and configurability
14
• Programming/Debugging i/f:
• ARM’s Serial wire debug (SWD) i/f
• In Application Programming:
• Bootloader via UART
• Communication Interfaces with DMA capability* :
• 1xSPI up to 18 Mb/s – master/slave
• 2xUSART up to 4.5 Mb/s
• CAN v2.0 A/B spec – up to 1Mb/s
• USB 2.0 Full Speed 12Mb/s
• I2C – standard/fast mode - master/slave
• Additional interfaces * :
• Up to 15 I/Os connected to 6 Timer (for input capture/output compare func, PWM …)
• Up to 8 analog input connected to 2 ADC – 12Bit – 1us – DMA enabled
• 2 output driven by two 12-bit DAC – DMA enabled
• Up to 19 GPIO: output (push-pull or open-drain) or input (with or without pull-up or pull-
down)2
Through the STM32 alternate function and pin remapping the INEMO-M1 pin-out can be
configured to support different communication interfaces and functionalities.
* Some limitations could be present due to the pin-out and or reconfigurability constraints
PIN 1
LIS331EB
Smart Sensor With Embedded uP
LIS331EB 16
Cortex M0
32 bit microcontroller LIS3DSH
3axis digital accelerometer
3x3x1 LGA-16
LIS3DSH Low-power mode down to 10 µA
±2g/±4g/ 6g /8g / 16g full-scale
Data rate; 3Hz to 1.6kHz
16 bit data output
Embedded FIFO and State Machine
10000 g high shock survivability
BRAIN Cortex-M0 core - 72MIPS@80Mhz
80 MHz / 32 KHz RC / External
crystal oscillator
128KB Flash Memory
128KB RAM memory
2x I2C (1 Master, 1 Slave)
SPI Master/Slave
JTAG/SWD
7 Programmable GPIOs
Embedded WDG (32Khz)
Embedded Timers/Event Counters
Low power features
LIS331EB Features – Cortex M0 17
Core 72MIPS max down to 2MIPS
from RAM for power
optimization (12 clock speeds)
18 DMIPs from Flash
128Kbytes NVM Flash,
128Kbytes RAM program or
data.
10 mA maximum peak current
and 1μA leakage
Peripherals I²C master port
I²C slave port
SPI master/slave
4 wires UART
7 GPIO Interrupt capability
4 x 32 bits timers, Watchdog
timer
Standard 4 wires JTAG and 2
wire SWD
80 MHz / 32 KHz RC / External
crystal oscillator
LIS331EB Pinout
• 3x3x1 16 lead
2 pins Vdd (1.8V and 1.8÷3.6V)
2 pins Gnd
1 pin Global Reset (@1.8V)
7 pins GPIO
2 pins I2C Master (@ Vdda)
2 pins I2C Slave (@1.8V)
18
Vdda
Vdd1.8
V
GP
IO
GP
IO
GPIO
SD
A
GP
IO
GP
IO
Global RST
SCL RES (GND)
GPIO
GPIO
MCL
MDA
GND
Development Tools
• Customized development tool based on Keil µVision 4
• Libraries
• LIS3DSH driver
• Sensor HUB
• iNemo Engine PRO
• 3D Pointer
• Gesture
19
• ST “standard” peripherals drivers for
easy portability from STM32
• I2C
• SPI
• UART
• Timers
• I2C/SPI/UART flash loader
LIS331EB - Development Boards /1
• p-iNemo
• LIS331EB (3mm x 3mm µController + 3x
accelerometer)
• LIS3MDL (2mm x 2mm 3x magnetometer)
• L3GD20H (3mm x 3mm 3x gyroscope)
• JTAG connector
20
LIS3GD20H LIS331EB
LIS3MDL