3/17/2014 Richard Kuo Assistant Professor

Slides:



Advertisements
Similar presentations
I2C bus Inter Integrated Circuits bus by Philips Semiconductors
Advertisements

Using the MPU-6050 Inertia Measurement Systems
SPI Serial Peripheral Interface. SPI Serial Peripheral Interface is communication between two devices, one bit at a time sequential one bit at time over.
SPI on the ATmega SS’ line only used in Slave mode SPDR
Ryan Roberts Gyroscopes.
Peripherals and their Control An overview of industrially available “peripheral devices” Some ideas for Laboratories and Quiz / Exam questions.
Initial Position Orientation Tracking System (IPOTS) Group Members: Keiichi McGuireHenry Pham Marc TakamoriScott Spiro.
1 Advanced Sensors Lecture 6 Sensors Technology AUE 2008 Bo Rohde Pedersen.
Two Wire Interface Another popular serial peripheral interface bus -More flexible than SPI -Master and slave modes supported -7-bit slave address -400khz.
CS378 - Mobile Computing Sensing and Sensors. Sensors "I should have paid more attention in Physics 41" Most devices have built in sensors to measure.
CS378 - Mobile Computing Sensing and Sensors. Sensors "I should have paid more attention in Physics 41" Most devices have built in sensors to measure.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: CL06B Sensors Fundamentals Dragos Bogdan, MCU Application.
Serial Peripheral Interface (SPI) Bus. SPI Bus There is no official specification for the SPI bus. It is necessary to consult the data sheets of the devices.
Department of Electrical Engineering, National Taiwan Ocean University NuMicro Learning Board Introduction 1/29/2015 Richard Kuo Assistant.
Smartphone Overview iPhone 4 By Anthony Poland 6 Nov 2014.
LSU 10/22/2004Serial I/O1 Programming Unit, Lecture 5.
Embedded Bus – i2c David E. Culler Lab 2 Feb 2, 2015
I2C UNIT 23 로봇 SW 교육원 조용수. 학습 목표 I2C I2C Protocol 구조 N051 I2C 동작 I2C Register 2.
Pulse Width Modulation
2/26/2015 Richard Kuo Assistant Professor
7/23 Inter-chip Serial Communication: SPI and I 2 C Computer Science & Engineering Department Arizona State University Tempe, AZ Dr. Yann-Hang Lee.
EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.
Universal Asynchronous RX/TX
iitb.ac.in, ee.iitb.ac.in 1/25 Indicon2013, Mumbai, December 2013, Paper ID 1084 Track 4.1 Signal Processing & VLSI (Biomedical.
Typical Microcontroller Purposes
UART: Universal Asynchronous RX/TX
Department of Electrical Engineering, National Taiwan Ocean University Appendix – NUC140 pin assignment 9/29/2012 Richard Kuo Assistant.
DEVICES AND COMMUNICATION BUSES FOR DEVICES NETWORK
Autonomous Helicopter James LydenEE 496Harris Okazaki.
1 Synchronous Serial IO Send a separate clock line with data –SPI (serial peripheral interface) protocol –I 2 C (or I2C) protocol Encode a clock with data.
3/23/2015 Richard Kuo Assistant Professor
Serial Peripheral Interface
©2008 R. Gupta, UCSD COSMOS Summer 2008 Peripheral Interfaces Rajesh K. Gupta Computer Science and Engineering University of California, San Diego.
Sensors in android. App being more applicable Keeping track of your heart beat while jogging. Pointing the phone camera towards the night sky to know.
© 2009, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction  Purpose:  This course provides an overview of the serial communication.
HMC5883L TYWu.
BMP085 Barometric Digital Pressure Sensor Module TYWu.
Department of Electronic & Electrical Engineering Serial interfaces Serial Interfaces allow communication between devices sending one bit at a time. In.
Serial Peripheral Interface SPI I2C (i-squared cee)
Tiltmeter, Compass,Temperature modules for the PPM.
Microcontroller basics Embedded systems for mortals.
Magic Wand Battle Game Team 53 Shanoon Martin, Jialin Sun, Manfei Wu.
Department of Electrical Engineering, National Taiwan Ocean University I2C Bus 5/16/2013 Richard Kuo Assistant Professor.
1 of 20 How to use the Compass A. Compass. 2 Compass: - Provides heading relative to Magnetic North, not true North HMC5883L V input - I2C (not.
CPE 490/590 – Smartphone Development
Outline Introduction to sensors
Recall Our TWR-K60D100M Primary SW1 Connector SW2 SW3(Reset) Secondary
Instrumented Sensor Technology, Inc
Serial Peripheral Interface
Application Case Study Security Camera Controller
Outline Analog to digital conversion (ADC) of NuMaker TRIO
Pulse Width Modulation
Cortex-M0 MCU Clocks & Pins
Analog-to-Digital Converter (ADC)
CS4101 Introduction to Embedded Systems Lab 11: Sensors
Chapter 11: Inter-Integrated Circuit (I2C) Interface
NuMicro MCU New Project Express Creation
CS4101 Introduction to Embedded Systems Lab 9: NuMaker ADC and LCD
Remote Controlled Smart Socket
I2C PROTOCOL SPECIFICATION
Gyroscopes & Accelerometers Sensor fusion Using MPU-6050
BJ Furman ME 106 Fundamentals of Mechatronics 15NOV2012
Maxbotix Ultrasonic Distance Sensor
EE Embedded Systems Fall 2015
Today’s Smart Sensors January 25, 2013 Randy Frank.
I2C Protocol and RTC Interfacing
Robotics System Lecture 4: Gyro Reading using Arduino
Robotics System Lecture 4: Gyro Sensor
Robotics System Lecture 4: Gyro Sensor
Serial Peripheral Interface Bus
Presentation transcript:

3/17/2014 Richard Kuo Assistant Professor I2C and MEMS sensors 3/17/2014 Richard Kuo Assistant Professor

Outline 10.NuMicro_I2C.ppt I2C Bus Introduction Exercise : 3-axis accelerometer & gyroscope Lab. smpl_I2C_MMA7455 (3-axis accelerometer ) Lab. smpl_I2C_L3G4200 (3-axis gyroscope) Lab. smpl_I2C_MPU6050 (3-axis accelero+3-axis gyro) Lab. smpl_I2C_MPU6050_tilt (tilt angle) Exercise : barometer, temperature, luminance sensors Lab. smpl_I2C_BMP085 (barometric pressure sensor) Lab. smpl_I2C_HMC5883 (E-compass) Lab. smpl_I2C_BH1750 (Light Sensor) Homework : Motion Sensing L3G4200 MMA7455 MPU6050 BMP085 HMC5883 BH1750

I2C pins Based on NUC140 LQFP 100pin I2C0 I2C0SDA/GPA8 : pin 12 I2C0SCL/GPA9 : pin 11 I2C1 I2C1SDA/GPA10 : pin 10 I2C1SCL/GPA11 : pin 9 Based on Nano102 LQFP 64pin I2C0 I2C0SDA/PC0 /PA12 I2C0SCL/PC1 /PA13 I2C1 I2C1SDA/PC2 /PA14 I2C1SCL/PC3 /PA14

I2C Bus Introduction Vdd SDA (Serial Data Line) SCL (Serial Clock Line) SCLKN1 out DATA1 out SCLK in DATA in Device

I2C protocol START or Repeated START signal generation Slave address transfer Data transfer STOP signal generation

I2C Start & Stop Condition

I2C Bit Transfer

I2C Acknowledge

Mater transmits a 7-bit Slave address and 1-bit R/W I2C protocol Data transfer stage Acknowledge STOP Mater transmits a 7-bit Slave address and 1-bit R/W Transmission starts with a START condition

I2C controller Compatible with Philips I2C standard. Support Master/Slave mode Support 7 bit addressing mode Built-in a 14-bit time-out counter to avoid the I2C bus hang-up Multiple address recognition ( Four slave address with mask option)

I2C Functional Registers I2CON : I2C Control Register I2DAT : I2C Data Register I2STATUS : I2C Status Register I2CLK : I2C Clock Rate Register I2ADDRx, x=0~3 : I2C Address Register I2ADRMx, x=0~3 : I2C Address Mask Register I2TOC : I2C Time-out Counter Register

I2CON : I2C Control Register 7 6 5 4 3 2 1 EI ENSI STA STO SI AA Reserved Assert ACK control bit When I2C STATUS state changes, SI is set by HW and cleared by writing ‘1’ to this bit. To transmit a “STOP” in master mode. It is cleared by HW automatically. To transmit a “START” “Repeat START” when bus is free I2C hardware enable I2C interrupt enable

I2C Control Register Usage Slave Address /W A DATA0 DATA1 P SI flag is set by hardware 7-bit slave address with a write bit DATA0 DATA1 [0,0,1,0] [0,0,1,0] [0,0,1,0] [0,1,1,0] [1,0,0,x] To set the [STA,STO,SI,AA] for above list conditions.

I2C_SingleWrite (index, data) void I2C_SingleWrite(uint8_t index, uint8_t data) { I2C_START(I2C_SLAVE_PORT); //Start I2C_WAIT_READY(I2C_SLAVE_PORT); I2C_SLAVE_PORT->INTSTS |= I2C_INTSTS_INTSTS_Msk; //clear flag I2C_SET_DATA(I2C_SLAVE_PORT, I2C_SLAVE_ADDR); //send slave address I2C_SET_CONTROL_REG(I2C_SLAVE_PORT, I2C_SI); I2C_SET_DATA(I2C_SLAVE_PORT, index); //send index I2C_SET_DATA(I2C_SLAVE_PORT, data); //send data I2C_SET_CONTROL_REG(I2C_SLAVE_PORT, I2C_SI|I2C_STO); //Stop }

I2C_SingleRead(index) uint8_t I2C_SingleRead(uint8_t index) { uint8_t tmp; I2C_START(I2C_SLAVE_PORT); //Start I2C_WAIT_READY(I2C_SLAVE_PORT); I2C_SLAVE_PORT->INTSTS |= I2C_INTSTS_INTSTS_Msk; //clear flag I2C_SET_DATA(I2C_SLAVE_PORT, I2C_SLAVE_ADDR); //send slave address (W) I2C_SET_CONTROL_REG(I2C_SLAVE_PORT, I2C_SI); I2C_SLAVE_PORT->INTSTS |= I2C_INTSTS_INTSTS_Msk; //clear flag I2C_SET_DATA(I2C_SLAVE_PORT, index); //send index

I2C_SingleRead(index) I2C_SET_CONTROL_REG(I2C_SLAVE_PORT, I2C_STA | I2C_SI); //Start I2C_WAIT_READY(I2C_SLAVE_PORT); I2C_SLAVE_PORT->INTSTS |= I2C_INTSTS_INTSTS_Msk; //clear flag I2C_SET_DATA(I2C_SLAVE_PORT, (I2C_SLAVE_ADDR+1)); //send slave address+R I2C_SET_CONTROL_REG(I2C_SLAVE_PORT, I2C_SI); tmp = I2C_GET_DATA(I2C_SLAVE_PORT); //read data I2C_SET_CONTROL_REG(I2C_SLAVE_PORT, I2C_SI|I2C_STO);//Stop return tmp; }

I2C_Open (i2c_port, clock) void Init_LM75A(void) { I2C_Open(I2C_SLAVE_PORT,400000); }

3-axis Accelerometer an accelerometer at rest on the surface of the earth will measure an acceleration g= 9.81 m/s2 straight upwards, due to its weight Source: MEMS Trends: Smaller, Cheaper, Everywhere

Freescale MMA7455 Source: Freescale MMA7455L datasheet

Accelerometer sensing direction and its output 2g mode

Accelerameter output per mode

Measuring Tilt with low-g accelerometer Sensing Axis for an accelerometer with X,Y,Z axis Gravity component of tilted X-axis accelerometer Gravity component of tilted Z-axis accelerometer

Smpl_I2C_MMA7455

Smpl_I2C_MMA7455 // // Smpl_I2C_MMA7455 : 3-axis Accelerometer // CS: 0 = SPI, 1 = I2C // MMA7455 pin connections // pin1 VCC :to Vcc5V // pin2 NC : N.C. // pin3 NC : N.C. // pin4 INT1 : N.C. // pin5 INT2 : N.C. // pin6 GND : to Gnd // pin7 GND : to Gnd // pin8 CS : to Vcc5V // pin9 SDO : N.C. // pin10 SDA/SDI : to I2C0_SDA (GPA8) // pin11 SCL : to I2C1_SCL (GPA9) // pin12 VCC : to Vcc5V

MMA7455.c void Init_MMA7455(void) { DrvGPIO_InitFunction(E_FUNC_I2C0); // set I2C0 pins DrvI2C_Open(I2C_PORT0,150000); //set I2C to 150KHz I2C_SingleWrite(MMA7455_MCTL, 0x05); // 0x16 set to 0101 for +-2g mode } int8_t Read_MMA7455_DataX(void) return I2C_SingleRead(MMA7455_XOUT8); int8_t Read_MMA7455_DataY(void) return I2C_SingleRead(MMA7455_YOUT8); int8_t Read_MMA7455_DataZ(void) return I2C_SingleRead(MMA7455_ZOUT8);

main.c #include <stdio.h> #include "SYS.h" #include "GPIO.h" #include "I2C.h" #include "LCD.h" #include "MMA7455.h" int32_t main (void) { char TEXT[16]; int8_t tmp; int8_t accX, accY, accZ; UNLOCKREG(); SYSCLK->PWRCON.XTL12M_EN=1; DrvSYS_Delay(5000);// Waiting for 12M Xtal stable DrvSYS_SelectHCLKSource(0); LOCKREG(); init_LCD(); //Initialize LCD pannel clear_LCD(); print_Line(0,"Smpl_I2C_MMA7455"); Init_MMA7455(); while(1) { // read 3-axis Accelerometer accX = Read_MMA7455_DataX(); // read X value accY = Read_MMA7455_DataY(); // read Y value accZ = Read_MMA7455_DataZ(); // read Z value // display on LCD sprintf(TEXT,"x: %4d", accX); print_Line(1,TEXT); sprintf(TEXT,"y: %4d", accY); print_Line(2,TEXT); sprintf(TEXT,"z: %4d", accZ); print_Line(3,TEXT); }

Gyroscope A gyroscope is a device for measuring or maintaining orientation, based on the principles of angular momentum, it is to measure the rate of changes of the angles (deg/s) Turn Coordinator

Gyroscope Theory Rigidity in space refers to the principle that a wheel with a heavily weighted rim spun rapidly will remain in a fixed position in the plane in which it is spinning. Source: Gyroscopic Flight Instruments

MEMS Gyroscope

Gyroscope Gyroscopes are physical sensors that detect and measure the angular motion of an object relative to an inertial frame of reference, which is the rate of changes of the angles (deg/s) Axz - is the angle between the Rxz (projection of R on XZ plane) and Z axis Ayz - is the angle between the Ryz (projection of R on YZ plane) and Z axis

Smpl_I2C_L3G4200D

Smpl_I2C_L3G4200D // Smpl_I2C_L3G4200 : 3-axis Gyroscope // // CS: 0 = SPI, 1 = I2C // L3G4200D pin connections // pin1 SDO N.C. // pin2 CS to Vcc +5V // pin3 DR N.C. // pin4 INT N.C. // pin5 GND to Gnd // pin6 SDA to I2C0_SDA (GPA8) // pin7 SCL to I2C0_SCL (GPA9) // pin8 Vcc to Vcc5V // I2C_Addr = SAD[6:1] + SDO + R/W // when SDO no connection // I2C slave ADDR = 0xD2 (Write) // I2C slave ADDR = 0xD3 (Read)

L3G4200D.c void Init_L3G4200D(void) { DrvGPIO_InitFunction(E_FUNC_I2C0); // set I2C0 pins DrvI2C_Open(I2C_PORT0,400000); // set I2C to 400KHz I2C_SingleWrite(L3G4200D_CTRL_REG1, 0x0f); // Xen,Yen,Zen,PD I2C_SingleWrite(L3G4200D_CTRL_REG2, 0x00); // HPF I2C_SingleWrite(L3G4200D_CTRL_REG3, 0x08); // I2C_SingleWrite(L3G4200D_CTRL_REG4, 0x30); //+-2000dps I2C_SingleWrite(L3G4200D_CTRL_REG5, 0x00); } iint16_t Read_DataX_L3G4200D(void) { uint8_t LoByte, HiByte; LoByte=I2C_Read(L3G4200D_OUT_X_L); // read X_Low value HiByte=I2C_Read(L3G4200D_OUT_X_H); // read X_High value return((HiByte<<8) | LoByte); } iint16_t Read_DataY_L3G4200D(void) LoByte=I2C_Read(L3G4200D_OUT_Y_L); // read X_Low value HiByte=I2C_Read(L3G4200D_OUT_Y_H); // read X_High value iint16_t Read_DataZ_L3G4200D(void) LoByte=I2C_Read(L3G4200D_OUT_Z_L); // read X_Low value HiByte=I2C_Read(L3G4200D_OUT_Z_H); // read X_High value

Main.c #include <stdio.h> #include <stdint.h> #include "SYS.h" #include "GPIO.h" #include "I2C.h" #include "LCD.h" #include "L3G4200D.h" int32_t main (void) { char TEXT[16]; int16_t tmp; int16_t gyroX, gyroY, gyroZ; UNLOCKREG(); SYSCLK->PWRCON.XTL12M_EN=1; DrvSYS_Delay(5000); // Waiting for 12M Xtal stalble DrvSYS_SelectHCLKSource(0); LOCKREG(); init_LCD(); // Initialize LCD clear_LCD(); print_Line(0,"Smpl_I2C_L3G4200"); Init_L3G4200D(); // Initialize L3G4200D while(1) { gyroX = Read_L3G4200D_DataX(); gyroY = Read_L3G4200D_DataY(); gyroZ = Read_L3G4200D_DataZ(); sprintf(TEXT,"X: %6d", gyroX); print_Line(1,TEXT); sprintf(TEXT,"Y: %6d", gyroY); print_Line(2,TEXT); sprintf(TEXT,"Z: %6d", gyroZ); print_Line(3,TEXT); }

Accelerometer + Gyroscope Source: Teardown Compares Combo Sensors by EETimes

MPU6050

Smpl_I2C_MPU6050

MPU6050.c (read accelerometer) uint16_t Read_AccX_MPU6050(void) { uint8_t LoByte, HiByte; LoByte = I2C_Read(MPU6050_ACCEL_XOUT_L); // read Accelerometer X_Low value HiByte = I2C_Read(MPU6050_ACCEL_XOUT_H); // read Accelerometer X_High value return((HiByte<<8) | LoByte); } uint16_t Read_AccY_MPU6050(void) LoByte = I2C_Read(MPU6050_ACCEL_YOUT_L); // read Accelerometer X_Low value HiByte = I2C_Read(MPU6050_ACCEL_YOUT_H); // read Accelerometer X_High value uint16_t Read_AccZ_MPU6050(void) LoByte = I2C_Read(MPU6050_ACCEL_ZOUT_L); // read Accelerometer X_Low value HiByte = I2C_Read(MPU6050_ACCEL_ZOUT_H); // read Accelerometer X_High value

MPU6050.c (read gryoscope) uint16_t Read_GyroX_MPU6050(void) { uint8_t LoByte, HiByte; LoByte = I2C_Read(MPU6050_GYRO_XOUT_L); // read Accelerometer X_Low value HiByte = I2C_Read(MPU6050_GYRO_XOUT_H); // read Accelerometer X_High value return ((HiByte<<8) | LoByte); } uint16_t Read_GyroY_MPU6050(void) LoByte = I2C_Read(MPU6050_GYRO_YOUT_L); // read Accelerometer X_Low value HiByte = I2C_Read(MPU6050_GYRO_YOUT_H); // read Accelerometer X_High value return((HiByte<<8) | LoByte); uint16_t Read_GyroZ_MPU6050(void) LoByte = I2C_Read(MPU6050_GYRO_ZOUT_L); // read Accelerometer X_Low value HiByte = I2C_Read(MPU6050_GYRO_ZOUT_H); // read Accelerometer X_High value

smpl_I2C_MPU6050 // // smpl_I2C_MPU6050 // Board : NuTiny-EVB-Nano102 // MCU : Nano102SC2AN (LQFP64) // Connections : // MPU6050 - 3-axis accelerometer & 3-axis gyroscope // PC2 /I2C1-SCL : LQFP64-pin9 connected to MPU6050-SCL // PC3 /I2C1-SDA : LQFP64-pin10 connected to MPU6050-SDA #include <stdio.h> #include <math.h> #include <string.h> #include "Nano1X2Series.h" #include "i2c.h" #include "MPU6050.h"

smpl_I2C_MPU6050 int32_t main() { int16_t AccX, AccY, AccZ; int16_t GyroX, GyroY, GyroZ; SYS_Init(); Init_MPU6050(); while(1) { AccX = Read_MPU6050_AccX(); AccY = Read_MPU6050_AccY(); AccZ = Read_MPU6050_AccZ(); printf("Accelerometer: %6d, %6d, %6d\n", AccX, AccY, AccZ); GyroX = Read_MPU6050_GyroX(); GyroY = Read_MPU6050_GyroY(); GyroZ = Read_MPU6050_GyroZ(); printf("Gyroscope : %6d, %6d, %6d\n", GyroX, GyroY, GyroZ); }

Accelerometer Angle : Axr = arccos(Rx/R) Ayr = arccos(Ry/R) Azr = arccos(Rz/R) R^2 = Rx^2 + Ry^2 + Rz^2

3-axis for measuring Tilt Angle

smpl_I2C_MPU6050_tilt #include <stdio.h> #include <stdint.h> #include <math.h> #include "SYS.h" #include "GPIO.h" #include "I2C.h" #include "I2C_setup.h" #include "LCD.h" #include "MPU6050.h" int32_t main (void) { char TEXT1[16], TEXT2[16], TEXT3[16]; int16_t tmp; float accX, accY, accZ; UNLOCKREG(); SYSCLK->PWRCON.XTL12M_EN=1; DrvSYS_Delay(5000); // Waiting for 12M Xtal stalble SYSCLK->CLKSEL0.HCLK_S=0; LOCKREG(); init_LCD(); clear_LCD(); print_Line(0,"MPU6050_Tilt"); init_MPU6050(); // Initialize MPU6050 while(1) { tmp = Read_AccX_MPU6050(); accX = (float) tmp/32768 *2; tmp = Read_AccY_MPU6050(); accY = (float) tmp/32768 *2; tmp = Read_AccZ_MPU6050(); accZ = (float) tmp/32768 *2; // calculate tilt (*57.295 = degree of angle) Axr = 57.295* atan(accX / sqrt(pow(accY,2)+pow(accZ,2))); Ayr = 57.295* atan(accY / sqrt(pow(accX,2)+pow(accZ,2))); Azr = 57.295* atan(sqrt(pow(accX,2)+pow(accY,2))/accZ); sprintf(TEXT1,"Axr: %f", Axr); print_Line(1,TEXT1); sprintf(TEXT2,"Ayr: %f", Ayr); print_Line(2,TEXT2); sprintf(TEXT3,"Azr: %f", Azr); print_Line(3,TEXT3); }

6-axis inertial measurement units (IMUs) STMicroelectronics and Bosch use five die, but InvenSense only uses two – one die for a six-axis accelerometer/gyroscope and one for a three-axis magnetometer STMicro 4x4mm^2 LGA Bosch InvenSense 3x3mm^2 QFN Source: Teardown Compares Combo Sensors by EETimes

STMicro LSM9DS0 six-axis IMU The accelero/gyro sensor in the STMicroelectronics LSM9DS0 nine-axis IMU. (Source: System Plus Consulting report from December 2013) Source: Teardown Compares Combo Sensors by EETimes

Bosch BMX055 six-axis MEMS IMU The three-axis magnetometer in the Bosch Sensortec BMX055 nine-axis MEMS IMU. (Source: System Plus Consulting report from December 2013) Source: Teardown Compares Combo Sensors by EETimes

InvenSense MPU-9250 six-axis IMU The MEMS accelero/gyro sensor in the InvenSense MPU-9250 nine-axis IMU. (Source: System Plus Consulting report from March 2014) Source: Teardown Compares Combo Sensors by EETimes

Barometric Pressure Sensor Bosch BMP085 Vin : 3~5V DC Logic : 3~5V compliant Pressure Sensing Range : 300~1100 hPa (altitude +9000m ~ -500m) Low power: 5uA at 1 sample per second Low noise : 0.06hPa (0.5m) in ultra low power mode 0.03hPa (0.25m) ultra high resolution mode Temperature : +-2 degree accuracy Operating Temperature : -40 ~ 85 °C I2C Interface

smpl_I2C_BMP085

Ambient Light Sensor (ALS) BH1750FVI is an digital Ambient Light Sensor IC For adjusting LCD and Kepad backlight power of mobile phone I2C bus interface, max. freq = 400KHz Spectral responsibility is approximately human eye response Illuminance to Digital Converter Wide range and High resolution (1 ~ 65536 lux) 50/60Hz Light noise reject-function 1.8V logic input interface, Vcc = 3~3.6V Adjustable measurement time for influence of optical window, possible to detect min. 0.11 lux, max. 100000 lux

smpl_I2C_BH1750

E-Compass (電子羅盤) HMC5883L is an digital E-compass IC 3-Axis Magnetoresistive Sensors 12-Bit ADC Coupled with Low Noise AMR Sensors Achieves 5 milli-gauss Resolution in ±8 Gauss Fields a 12-bit ADC that enables 1° to 2° compass heading accuracy Low Voltage Operations (2.16 to 3.6V) and Low Power Consumption (100 μA) 75Hz Continuous or 160 Hz Single measured Maximum Output Rate I2C interface (up to 400KHz) HMC5883L utilizes Honeywell’s Anisotropic Magnetoresistive (AMR) technology that provides advantages over other magnetic sensor technologies

smpl_I2C_HMC5883 HMC5883L

Important Notice ! This educational material are neither intended nor warranted for usage in systems or equipment, any malfunction or failure of which may cause loss of human life, bodily injury or severe property damage. Such applications are deemed, “Insecure Usage”. Insecure usage includes, but is not limited to: equipment for surgical implementation, atomic energy control instruments, airplane or spaceship instruments, the control or operation of dynamic, brake or safety systems designed for vehicular use, traffic signal instruments, all types of safety devices, and other applications intended to support or sustain life. All Insecure Usage shall be made at user’s own risk, and in the event that third parties lay claims to the author as a result of customer’s Insecure Usage, the user shall indemnify the damages and liabilities thus incurred by using this material. Please note that all lecture and sample codes are subject to change without notice. All the trademarks of products and companies mentioned in this material belong to their respective owners.