MSP430F2013 SD16 A Magnetic Sensor Reading
From emboxit
Design
- We have to read a very low voltage at very high resolution
- Avoid a single stage amplifier with high gain (~500 needed).The high-gain-single-stage could create unpredictable stability issues.
- MSP430 Programmable Gain Amplifier PGA with GAIN set x32 combined with external instrumentation amplifier with gain set to ~15 give total gain ~500
- Resolution of MSP430 SD16_A is 16 BITS, higher than usual CPU ADC.
- Resolution can be increased if special (software controlled) filtering is applied. SLAA220
- Programmable gain and programmable filtering provide flexibility and could solve possible problems in the future
Reference Application notes
- MSP430F42x Single Chip Weigh Scale SLAA220 Read a sensor bridge with 6mV Full scale and 0.15uV resolution without external amplifier, using SD16 module
- SLAA220 home
SLAA220 source code is a single .c file total 360 lines for MSP430F427 and Softbaugh board, build with IAR EW version 3.20A at 2004
from slaa220 source code, how to measure with 18 bits accuracy #pragma vector = SD16_VECTOR __interrupt void SD16_ISR(void) { long CurrentResult; GET_RESULT(CurrentResult); // Read SD16 result, clear IFG if (VoltageSettleCtr) // Wait for voltages to settle { VoltageSettleCtr--; // Decrement counter return; // Exit ISR } SD16Temp += CurrentResult; // Sum up results if (++SD16TempCtr >= 256) { SD16Result = SD16Temp >> 8; // Div 256 SD16CCTL0 &= ~SD16SC; // Disable conversions P2OUT &= ~BRIDGE_SUPPLY; // Power down bridge voltage if (ProgramMode == PM_MEASURE) if (Flags & FLAG_UPDATE_DISPL || LastADCValue != SD16Result) { Flags &= ~FLAG_UPDATE_DISPL; // Reset flag LastADCValue = SD16Result; // Store new value Disp_Signed_Long(((long)SD16Result - CalMin) * CAL_MIN_MAX_SPAN / (CalMax - CalMin)); } __bis_SR_register_on_exit(LPM3_bits); // Enter LPM3 on ISR exit }
- Ultra-Low Power Motion Detection Using the MSP430F2013 SLAA283A – December 2005 – Revised March 2009 using SD16_A module
- SLAA283 home
from slau144h page 606 An external voltage reference can be applied to the VREF input when SD16REFON and SD16VMIDON are both reset. //NX from slau144h page 606
<i>Tips on Magnetic sensor C code</i> //NX An external voltage reference can be applied to the VREF input when SD16REFON and SD16VMIDON are both reset. //NX SD16CTL = SD16VMIDON + SD16REFON + SD16SSEL_1;// 1.2V ref, SMCLK SD16CTL = SD16SSEL_1; // NX External Reference, SMCLK
- MSP430F4270 Altimeter Demo with 0.683 uV resolution with SD16_A module ">SLAA254 goto page 2
Source <-----Code last update 2011.09.20.17:28