![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
SCIboard(TM): mbed base board data logger - Altimeter: MPL3115A2 - Accelerometer: LSM303DLHC - Gyro: L3G4200D - 4 High Current MOSFET switches
Product Description
SCIboard will take your model rocketry, science, or engineering project to new heights with a complete 10-Degree-Of-Freedom (10-DOF) Inertial Measurement Unit (IMU), 4 high current MOSFET switches, PWM interface (RC servos), USB (memory sticks or BlueTooth) and interfaces for GPS and an XBee® RF module. The SCIboard is an mbed base board ideal for use in college and high school science labs, science fair projects, high power model rocketry, model airplanes, and near space balloon projects. SCIboard is also designed for Open Source software so you can customize the application. Example applications include high power model rocketry, near space balloon projects, and R/C airplanes/quadcopters. While SCIboard requires some basic electronics and software knowledge, it combines multiple breakout boards into a single base board which improves reliability, especially in high g environments such as in model rocketry. Available on Amazon. Search on "SCIboard".
- Dimensions: 1.5 x 3.8 inches (3.8 x 9.7 cm)
- Weight: 0.8 ounces (24 g)
10-DOF Inertial Measurement Unit
Going beyond just the 6 degrees of freedom afforded by a 3-axis accelerometer and 3-axis gyro, SCIboard includes an additional 3-axis magnetometer, and highly accurate altimeter / atmospheric pressure sensor. Sensors provide digital measurements over an I2C shared bus (p27 and p28).
Precision Altimeter
(Freescale Semiconductor – MPL3115A2) MEMS pressure sensor with 24-bit Analog-to-Digital Converter (ADC) employs temperature compensation resulting in fully compensated 20-bit pressure/altitude measurements (resolution down to 1 foot).
- Pressure range: 50 – 110 kPa.
- Pressure reading noise: 1.5 Pa RMS over -10 to +70° C. Conversion rate: up to 100 Hz.
- 12-bit temperature sensor measurement range: -40 to +85° C.
3-Axis MEMS Accelerometer
(STMicroelectronics – LSM303DLHC) The sensor measures linear acceleration. Pointing any axis to the earth will apply 1 g in that axis when stationary.
- Selectable full scale range: +/-2 g to +/-16 g.
- Sensitivity: 1 – 12 mg/LSB depending on full scale range.
- Zero-g level offset: +/-60 mg.
- Acceleration noise density: 220 micro-g/sqrt(Hz).
- Operating temp range: -40 to +85° C.
- Conversion rate up to 400 Hz.
3-Axis Ultra-Stable MEMS Gyroscope
(STMicroelectronics – L3G4200D) A gyroscope is an angular rate sensor.
- Selectable full scale ranges: 250/500/2000 degrees per second (DPS).
- Resolution: 16-bit.
- Bandwidth: user selectable.
- Sensitivity: 8.75/17.50/70 milli-degrees per second/LSB.
- Nonlinearity: 0.2% full scale
- Rate noise density: 0.03 DPS/sqrt(Hz).
- Operating temp range: -40 to +85°C.
Digital I/O
4 MOSFET switches are included. They provide 6-amperes momentary current sinking. Example uses include high power strobes, and lights for night launches or buzzers for location. Switches can be activated at apogee or prior to landing for model rocketry. A continuity check through an analog to digital converter allows verification of circuit continuity before launch. A piezoelectric buzzer provides software control for audible alert and low battery voltage measurement.
Host USB Type-A with 5.0 Vdc regulator
USB Type-A connector wired as a host controller provides regulated 5 volt power from a battery. A variety of USB devices from memory sticks, Bluetooth, and Wi-Fi can be used with multiple software projects from the mbed web site.
XBee® and XBee-PRO® Modules
The XBee-PRO® interface supports multiple different XBee and XBee-PRO modules such as Wi-Fi, ZigBee, 802.15.4, Bluetooth, and longer range 900 MHz RF Modules. Compatible modules are Roving Networks and Digi-International. SCIboard provides dual 10 pin headers with regulated 3.3 volt power (from p40) and serial UART (Tx=p9/Rx=p10). Alternatively if the headers are not installed, the serial port may be connected to a SMS cell phone evaluation module. Since the 3.3 volt provided to XBee modules is from the mbed regulator, the user is responsible for power calculations. Testing was done with RN-XV and a 9-volt battery but higher battery voltages or higher current XBee modules could overheat the 3.3 volt regulator on the mbed. When using XBee modules, the user may need to perform hard/soft iron calibration if using the magnetometer.
Interface for GPS
SCIboard provides a serial UART interface for GPS receivers. It also provides 3.3 and 5.0 Vdc for power and Vbat (battery not included). PCB has 0.1” holes for soldered cable or header of your choice. This provides flexibility to use a variety of GPS modules.
Interface for Ethernet Cable
PCB has 0.1” interface for an Ethernet cable of your choice of Ethernet magnetics interface with LEDs. For Ethernet direct wire, use RD-, RD+, TD+, and TD-. For magnetics, several 3.3 Vdc and Grounds are provided allowing easy interfacing. For both LEDs a 160 ohm resistor is provided. Both LEDs share the 2 PWMs out.
Interface for PWM RC Servos
SCIboard provides a Pulse Width Modulation (PWM) header for RC servo motors. Up to 6 PWM servos can be controlled. Terminal block is provided for separate servo power source if desired. If the user chooses to not install the headers, the PCB has 0.1” spacing thru-holes for 3-pin R/C servos. (Pins 21 – 26)
Applications
A 10-Degree-Of-Freedom Inertial Measurement Unit (IMU) can be used to measure distance traveled, velocity, acceleration, attitude (yaw, pitch, and roll), and attitude rate. When combined with a GPS, SCIboard will provide a GPS aided inertial navigation solutions. The PWM can be used to control a camera attached to a servo motor. This enables near space projects to point the camera up at the weather balloon, horizontally at the earth’s horizon, and down directly at the earth.
- College and high school science labs
- Science Fairs
- High Power Model Rocketry
- Near Space Balloons
- Quadcopters
- R/C Airplanes
- R/C Helicopter
Processor Board Support (Direct Pin-Out compatible)
- mbed LPC1768
- mbed LPC11U24
- Embedded Artists LPCexpresso LPC1769
SCIboard_LSM303DLHC.h@0:ab51d784ef36, 2013-12-15 (annotated)
- Committer:
- AstrodyneSystems
- Date:
- Sun Dec 15 22:21:21 2013 +0000
- Revision:
- 0:ab51d784ef36
Initial build
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
AstrodyneSystems | 0:ab51d784ef36 | 1 | /* SCIboard(TM) LSM303DLHC.h |
AstrodyneSystems | 0:ab51d784ef36 | 2 | Copyright (c) 2013 K. Andres |
AstrodyneSystems | 0:ab51d784ef36 | 3 | |
AstrodyneSystems | 0:ab51d784ef36 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy |
AstrodyneSystems | 0:ab51d784ef36 | 5 | of this software and associated documentation files (the "Software"), to deal |
AstrodyneSystems | 0:ab51d784ef36 | 6 | in the Software without restriction, including without limitation the rights |
AstrodyneSystems | 0:ab51d784ef36 | 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
AstrodyneSystems | 0:ab51d784ef36 | 8 | copies of the Software, and to permit persons to whom the Software is |
AstrodyneSystems | 0:ab51d784ef36 | 9 | furnished to do so, subject to the following conditions: |
AstrodyneSystems | 0:ab51d784ef36 | 10 | |
AstrodyneSystems | 0:ab51d784ef36 | 11 | The above copyright notice and this permission notice shall be included in |
AstrodyneSystems | 0:ab51d784ef36 | 12 | all copies or substantial portions of the Software. |
AstrodyneSystems | 0:ab51d784ef36 | 13 | |
AstrodyneSystems | 0:ab51d784ef36 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
AstrodyneSystems | 0:ab51d784ef36 | 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
AstrodyneSystems | 0:ab51d784ef36 | 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
AstrodyneSystems | 0:ab51d784ef36 | 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
AstrodyneSystems | 0:ab51d784ef36 | 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
AstrodyneSystems | 0:ab51d784ef36 | 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
AstrodyneSystems | 0:ab51d784ef36 | 20 | THE SOFTWARE. |
AstrodyneSystems | 0:ab51d784ef36 | 21 | */ |
AstrodyneSystems | 0:ab51d784ef36 | 22 | |
AstrodyneSystems | 0:ab51d784ef36 | 23 | #ifndef SCIboard_LSM303DLHC_H |
AstrodyneSystems | 0:ab51d784ef36 | 24 | #define SCIboard_LSM303DLHC_H |
AstrodyneSystems | 0:ab51d784ef36 | 25 | |
AstrodyneSystems | 0:ab51d784ef36 | 26 | #include "mbed.h" |
AstrodyneSystems | 0:ab51d784ef36 | 27 | #include "SCIboard_I2C.h" |
AstrodyneSystems | 0:ab51d784ef36 | 28 | |
AstrodyneSystems | 0:ab51d784ef36 | 29 | // STMicroelectronics www.st.com - Ultra compact high performance |
AstrodyneSystems | 0:ab51d784ef36 | 30 | // e-compass, 3D accelerometer, and 3D magnetometer module |
AstrodyneSystems | 0:ab51d784ef36 | 31 | // Data sheet - Preliminary data - Rev 1 |
AstrodyneSystems | 0:ab51d784ef36 | 32 | #define ACC_I2C_ADDR (0x19<<1) |
AstrodyneSystems | 0:ab51d784ef36 | 33 | #define MAG_I2C_ADDR (0x1E<<1) |
AstrodyneSystems | 0:ab51d784ef36 | 34 | |
AstrodyneSystems | 0:ab51d784ef36 | 35 | // Acc Registers |
AstrodyneSystems | 0:ab51d784ef36 | 36 | #define ACCREG_CTRL_REG1 0x20 |
AstrodyneSystems | 0:ab51d784ef36 | 37 | #define ACCREG_CTRL_REG2 0x21 |
AstrodyneSystems | 0:ab51d784ef36 | 38 | #define ACCREG_CTRL_REG3 0x22 |
AstrodyneSystems | 0:ab51d784ef36 | 39 | #define ACCREG_CTRL_REG4 0x23 |
AstrodyneSystems | 0:ab51d784ef36 | 40 | #define ACCREG_CTRL_REG5 0x24 |
AstrodyneSystems | 0:ab51d784ef36 | 41 | #define ACCREG_CTRL_REG6 0x25 |
AstrodyneSystems | 0:ab51d784ef36 | 42 | #define ACCREG_REFERENCE 0x26 |
AstrodyneSystems | 0:ab51d784ef36 | 43 | #define ACCREG_STATUS 0x27 |
AstrodyneSystems | 0:ab51d784ef36 | 44 | #define ACCREG_OUT_X_L 0x28 |
AstrodyneSystems | 0:ab51d784ef36 | 45 | #define ACCREG_OUT_Y_L 0x2A |
AstrodyneSystems | 0:ab51d784ef36 | 46 | #define ACCREG_OUT_Z_L 0x2C |
AstrodyneSystems | 0:ab51d784ef36 | 47 | |
AstrodyneSystems | 0:ab51d784ef36 | 48 | #define ACCREG_INT1_CFG 0x30 |
AstrodyneSystems | 0:ab51d784ef36 | 49 | #define ACCREG_INT1_SOURCE 0x31 |
AstrodyneSystems | 0:ab51d784ef36 | 50 | #define ACCREG_INT1_THS 0x32 |
AstrodyneSystems | 0:ab51d784ef36 | 51 | #define ACCREG_INT1_DURATION 0x33 |
AstrodyneSystems | 0:ab51d784ef36 | 52 | |
AstrodyneSystems | 0:ab51d784ef36 | 53 | #define ACCREG_INT2_CFG 0x34 |
AstrodyneSystems | 0:ab51d784ef36 | 54 | #define ACCREG_INT2_SOURCE 0x35 |
AstrodyneSystems | 0:ab51d784ef36 | 55 | #define ACCREG_INT2_THS 0x36 |
AstrodyneSystems | 0:ab51d784ef36 | 56 | #define ACCREG_INT2_DURATION 0x37 |
AstrodyneSystems | 0:ab51d784ef36 | 57 | |
AstrodyneSystems | 0:ab51d784ef36 | 58 | // Mag Resisters |
AstrodyneSystems | 0:ab51d784ef36 | 59 | #define MAGREG_CRA_REG 0x00 |
AstrodyneSystems | 0:ab51d784ef36 | 60 | #define MAGREG_CRB_REG 0x01 |
AstrodyneSystems | 0:ab51d784ef36 | 61 | #define MAGREG_MR_REG 0X02 |
AstrodyneSystems | 0:ab51d784ef36 | 62 | #define MAGREG_OUT_X_H 0x03 |
AstrodyneSystems | 0:ab51d784ef36 | 63 | #define MAGREG_OUT_Z_H 0x05 // Note Z out of order |
AstrodyneSystems | 0:ab51d784ef36 | 64 | #define MAGREG_OUT_Y_H 0x07 |
AstrodyneSystems | 0:ab51d784ef36 | 65 | #define MAGREG_SR_REG 0x09 |
AstrodyneSystems | 0:ab51d784ef36 | 66 | |
AstrodyneSystems | 0:ab51d784ef36 | 67 | #define MAGREG_IRA_REG 0x0A |
AstrodyneSystems | 0:ab51d784ef36 | 68 | |
AstrodyneSystems | 0:ab51d784ef36 | 69 | #define MAGREG_TEMP_OUT_H 0x31 |
AstrodyneSystems | 0:ab51d784ef36 | 70 | |
AstrodyneSystems | 0:ab51d784ef36 | 71 | |
AstrodyneSystems | 0:ab51d784ef36 | 72 | // Status Register |
AstrodyneSystems | 0:ab51d784ef36 | 73 | #define STATUS_REG_ZYXDA 0x08 |
AstrodyneSystems | 0:ab51d784ef36 | 74 | |
AstrodyneSystems | 0:ab51d784ef36 | 75 | // ACCREG_CTRL_REG1 Output Data Rate (ODR) |
AstrodyneSystems | 0:ab51d784ef36 | 76 | #define ACC_1HZ 1 |
AstrodyneSystems | 0:ab51d784ef36 | 77 | #define ACC_10HZ 2 |
AstrodyneSystems | 0:ab51d784ef36 | 78 | #define ACC_25HZ 3 |
AstrodyneSystems | 0:ab51d784ef36 | 79 | #define ACC_50HZ 4 |
AstrodyneSystems | 0:ab51d784ef36 | 80 | #define ACC_100HZ 5 |
AstrodyneSystems | 0:ab51d784ef36 | 81 | #define ACC_200HZ 6 |
AstrodyneSystems | 0:ab51d784ef36 | 82 | #define ACC_400HZ 7 |
AstrodyneSystems | 0:ab51d784ef36 | 83 | #define ACC_1620HZ 8 // Low power mode |
AstrodyneSystems | 0:ab51d784ef36 | 84 | #define ACC_5376HZ 9 // Low power mode / Normal 1344Hz |
AstrodyneSystems | 0:ab51d784ef36 | 85 | |
AstrodyneSystems | 0:ab51d784ef36 | 86 | // ACCREG_CTRL_REG4 Full-scale selection +/-g |
AstrodyneSystems | 0:ab51d784ef36 | 87 | #define ACC_2G 0 |
AstrodyneSystems | 0:ab51d784ef36 | 88 | #define ACC_4G 1 |
AstrodyneSystems | 0:ab51d784ef36 | 89 | #define ACC_8G 2 |
AstrodyneSystems | 0:ab51d784ef36 | 90 | #define ACC_16G 3 |
AstrodyneSystems | 0:ab51d784ef36 | 91 | |
AstrodyneSystems | 0:ab51d784ef36 | 92 | // MAGREG_CRA_REG |
AstrodyneSystems | 0:ab51d784ef36 | 93 | #define MAG_TEMP_EN 0x80 |
AstrodyneSystems | 0:ab51d784ef36 | 94 | #define MAG_0p75HZ 0 |
AstrodyneSystems | 0:ab51d784ef36 | 95 | #define MAG_1p5HZ 1 |
AstrodyneSystems | 0:ab51d784ef36 | 96 | #define MAG_3p0HZ 2 |
AstrodyneSystems | 0:ab51d784ef36 | 97 | #define MAG_7p5HZ 3 |
AstrodyneSystems | 0:ab51d784ef36 | 98 | #define MAG_15HZ 4 // Default |
AstrodyneSystems | 0:ab51d784ef36 | 99 | #define MAG_30HZ 5 |
AstrodyneSystems | 0:ab51d784ef36 | 100 | #define MAG_75HZ 6 |
AstrodyneSystems | 0:ab51d784ef36 | 101 | #define MAG_220HZ 7 |
AstrodyneSystems | 0:ab51d784ef36 | 102 | |
AstrodyneSystems | 0:ab51d784ef36 | 103 | // MAGREG_CRB_REG Gain setting [Gauss] |
AstrodyneSystems | 0:ab51d784ef36 | 104 | #define MAG_1p3G 1 |
AstrodyneSystems | 0:ab51d784ef36 | 105 | #define MAG_1p9G 2 |
AstrodyneSystems | 0:ab51d784ef36 | 106 | #define MAG_2p5G 3 |
AstrodyneSystems | 0:ab51d784ef36 | 107 | #define MAG_4p0G 4 |
AstrodyneSystems | 0:ab51d784ef36 | 108 | #define MAG_4p7G 5 |
AstrodyneSystems | 0:ab51d784ef36 | 109 | #define MAG_5p6G 6 |
AstrodyneSystems | 0:ab51d784ef36 | 110 | #define MAG_8p1G 7 |
AstrodyneSystems | 0:ab51d784ef36 | 111 | |
AstrodyneSystems | 0:ab51d784ef36 | 112 | // MAGREG_MR_REG Mode select bits |
AstrodyneSystems | 0:ab51d784ef36 | 113 | #define MAG_Continuous_Conv 0 |
AstrodyneSystems | 0:ab51d784ef36 | 114 | #define MAG_Single_Conv 1 |
AstrodyneSystems | 0:ab51d784ef36 | 115 | #define MAG_Sleep_Mode 2 |
AstrodyneSystems | 0:ab51d784ef36 | 116 | |
AstrodyneSystems | 0:ab51d784ef36 | 117 | // MAGREG_SR_REG |
AstrodyneSystems | 0:ab51d784ef36 | 118 | #define MAG_DRDY 1 |
AstrodyneSystems | 0:ab51d784ef36 | 119 | #define MAG_LOCK 2 |
AstrodyneSystems | 0:ab51d784ef36 | 120 | |
AstrodyneSystems | 0:ab51d784ef36 | 121 | |
AstrodyneSystems | 0:ab51d784ef36 | 122 | class SCIboard_LSM303DLHC |
AstrodyneSystems | 0:ab51d784ef36 | 123 | { |
AstrodyneSystems | 0:ab51d784ef36 | 124 | public: |
AstrodyneSystems | 0:ab51d784ef36 | 125 | SCIboard_LSM303DLHC(SCIboard_I2C *ptr_I2C); |
AstrodyneSystems | 0:ab51d784ef36 | 126 | void getDeviceID(unsigned char *id); |
AstrodyneSystems | 0:ab51d784ef36 | 127 | |
AstrodyneSystems | 0:ab51d784ef36 | 128 | void setAccMode(unsigned char AccFs, unsigned char AccRate); |
AstrodyneSystems | 0:ab51d784ef36 | 129 | unsigned char getAccStatus(void); |
AstrodyneSystems | 0:ab51d784ef36 | 130 | bool bAccDataAvailable(void); |
AstrodyneSystems | 0:ab51d784ef36 | 131 | void getAccData(float *fData); |
AstrodyneSystems | 0:ab51d784ef36 | 132 | unsigned char getInt1Src(void); |
AstrodyneSystems | 0:ab51d784ef36 | 133 | void writeCtrlReg(unsigned char reg, unsigned char value); |
AstrodyneSystems | 0:ab51d784ef36 | 134 | |
AstrodyneSystems | 0:ab51d784ef36 | 135 | void setMagMode(unsigned char MagFs, unsigned char MagRate); |
AstrodyneSystems | 0:ab51d784ef36 | 136 | unsigned char getMagStatus(void); |
AstrodyneSystems | 0:ab51d784ef36 | 137 | bool bMagDataAvailable(void); |
AstrodyneSystems | 0:ab51d784ef36 | 138 | void getMagData(float *fData); |
AstrodyneSystems | 0:ab51d784ef36 | 139 | void getMagData(char *cData); |
AstrodyneSystems | 0:ab51d784ef36 | 140 | float getTemp(void); |
AstrodyneSystems | 0:ab51d784ef36 | 141 | void getTemp(char *cData); |
AstrodyneSystems | 0:ab51d784ef36 | 142 | |
AstrodyneSystems | 0:ab51d784ef36 | 143 | private: |
AstrodyneSystems | 0:ab51d784ef36 | 144 | SCIboard_I2C *pI2C; |
AstrodyneSystems | 0:ab51d784ef36 | 145 | float accSF; |
AstrodyneSystems | 0:ab51d784ef36 | 146 | float accRate; |
AstrodyneSystems | 0:ab51d784ef36 | 147 | float magSF[3]; |
AstrodyneSystems | 0:ab51d784ef36 | 148 | float magRate; |
AstrodyneSystems | 0:ab51d784ef36 | 149 | }; |
AstrodyneSystems | 0:ab51d784ef36 | 150 | |
AstrodyneSystems | 0:ab51d784ef36 | 151 | #endif |