![](/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
Diff: main.cpp
- Revision:
- 1:a54c4a4f3b30
- Parent:
- 0:ab51d784ef36
- Child:
- 2:6698a2433bfd
diff -r ab51d784ef36 -r a54c4a4f3b30 main.cpp --- a/main.cpp Sun Dec 15 22:21:21 2013 +0000 +++ b/main.cpp Tue Dec 17 05:03:01 2013 +0000 @@ -21,21 +21,25 @@ */ /* OVERVIEW - Displays on USB serial (9600 bps) LSM303 ident 0x48 0x34 0x33 + Displays on USB serial (9600 bps) + MPL3115A2 ident 0xC4 + LSM303 ident 0x48 0x34 0x33 then collects 10 seconds of data from accelerometer and magnetometer Filename on Local: OUTxx.csv (csv format allows easy import into spreadsheets) Format: microseconds,record type, variable length data\r\n + Rec type 1= altimeter data altitude (meters) and semiconductor temperature (deg C) Rec type 2= accelerometer data x, y, and z in g's Rec type 3= magnetometer data x, y, and z - altimeter, gyro, and MOSFET switch software coming soon (under development)... + gyro, and MOSFET switch software coming soon (under development)... */ #include "mbed.h" #include "math.h" #include "SCIboard_I2C.h" +#include "SCIboard_MPL3115A2.h" #include "SCIboard_LSM303DLHC.h" #include "SCIboard_DataLogger.h" @@ -88,6 +92,14 @@ SCIboard_I2C i2cBus(sdaPin, sdcPin); +// Altimeter +SCIboard_MPL3115A2 alt(&i2cBus); +InterruptIn MPL3115A2_INT1(p5); +void MPL3115A2_INT1_INTERRUPT(void); +//InterruptIn MPL3115A2_INT2(); + +const int accAltDecimate=5; +int accCnt=0; // Accelerometer and magnetometer SCIboard_LSM303DLHC lsm303(&i2cBus); @@ -106,12 +118,19 @@ int currentTime; int lastTime=0; + MPL3115A2_INT1.fall(NULL); + LSM303DLHC_DRDY.fall(NULL); // LSM303DLHC_INT1.rise(NULL); // DataLogger nextFilename(); + // Get I2C device IDs + sprintf(str, "MPL3115A2 Ident 0x%X\r\n", alt.getDeviceID()); + pc.printf(str); + log_write(str); + lsm303.getDeviceID(data); sprintf(str, "LSM303DLHC Ident 0x%X 0x%X 0x%X\r\n", data[0], data[1], data[2]); pc.printf(str); @@ -122,6 +141,11 @@ lsm303.setAccMode(ACC_4G, ACC_50HZ); lsm303.setMagMode(MAG_1p3G, MAG_75HZ); + // Setup altimeter + alt.setMode(ALT_MODE, OS4); + alt.OST(); // initiate first conversion + MPL3115A2_INT1.fall(MPL3115A2_INT1_INTERRUPT); + t.start(); // start timer LSM303DLHC_DRDY.fall(LSM303DLHC_DRDY_INTERRUPT); // Magnetometer @@ -144,6 +168,10 @@ lsm303.getAccData(f); sprintf(str,"%u,2,%.3f,%.3f,%.3f\r\n", time_ms, f[0], f[1], f[2]); log_write(str); + if(++accCnt >= accAltDecimate) { + accCnt = 0; + alt.OST(); + } } @@ -161,6 +189,7 @@ } + MPL3115A2_INT1.fall(NULL); LSM303DLHC_DRDY.fall(NULL); // LSM303DLHC_INT1.rise(NULL); wait(.1); @@ -178,6 +207,21 @@ } +// Altimeter interrupt service ---------------------------------------- +void MPL3115A2_INT1_INTERRUPT(void) +{ + float f[3]; + char str[80]; + + __disable_irq(); + + alt.getData(f); + sprintf(str, "%u,1,%.1f,%.1f\r\n", time_ms, f[0], f[1]); + log_write(str); + + __enable_irq(); +} + // Magnetometer interrupt service ------------------------------------- void LSM303DLHC_DRDY_INTERRUPT(void)