Hi Nick,

1) There is an easy way to get the battery level (voltage). See section
2.4.4 of the Shimmer User Manual (rev. 2Rc), but note that there is a typo
in this section, the reference to ADC channel 6 should in fact be ADC
channel 0. In short to read the battery voltage you need to add the AnEx_A7
channel, and also set the PMUX bit (using the SET_PMUX_COMMAND). You will
then receive the battery voltage over this channel. Also note that this is a
shimmer2r only feature.

Another important point to note is that there can be significant cross talk
between the between the accelerometer ADC channel (for the z-axis) and the
VBatt/Anex7 line. There are two ways of dealing with this cross talk. The
first is to sample the accelerometer channels and the AnEx/Battery channels
at different times. Then when you want to sample the AnEx/Battery channels
you need to reconfigure the accel ADC pins on the MSP430 to be GIO (general
purpose IO) and drive them low. This will eliminate any cross talk and if
anything, act as a shield trace. However, currently BoilerPlate is cannot do
this, so would need to be mofified appropriately.

The other option, if you need to sample both the accel and the battery
constantly (and simultaneously) you can just filter the crosstalk out of the
battery readings. In that case the formula you will need to use is:
VsenseBatt - n * (Zaccel) = VsenseBatt_correct

You are measuring VSenseBatt and Zaccel so you’ll know those values. You
will need to calculate ‘n’, but as this value will not change (as the layout
of the wires is fixed) you will only need to do so once (for each shimmer
rev and each channel combination). So to do this you will need to measure
VSenseBatt when the accel ADC lines are driven low in GIO mode, and then
again when the accel is actively sampling.

There are also two other options for detecting low battery on the shimmer,
but neither are implemented in BoilerPlate (as of yet at least). One is to
use the MSP430's built in supply voltage supervisor. See chapter 6 of the
MSP430's user guide for details (
http://focus.ti.com/lit/ug/slau049f/slau049f.pdf). And for example code take
a look at JustFATLogging (the PowerSupplyMonitor and PSMStdControl
interfaces are the ones of interest).

The other option is to sample ADC channel 11, which gives (AVcc - AVss)/2.
AVss is tied to ground and AVcc is the regulator voltage that supplies the
MSP430. So this value will only start to change when the battery voltage has
dropped so low that the regulator cannot supply a constant 3V. And this is
probably exactly the point where you want to charge the battery (for
measurement consistency as the ADC Vref in BoilerPlate is set to AVcc.


2) I don't think this has been very well documented (yet), so let me explain
how these calibration values work. The idea is to calibrate the sensors and
store the calibration values on the Shimmer. This storage is persistent (as
long as the shimmer is not reprogrammed). Then when a host side device (PC
or whatever) connects to the Shimmer it will read the calibration values off
the Shimmer (in much the same way the current configuration is read now).
The data will then be calibrated on the host side (as the required floating
point operations would be a struggle for the shimmer's processor, at higher
sampling rates at least).

The 21 bytes are broken down as 3 x 16bit sensitivity values (one for each
axis), 3 x 16bit offset values. The remaining 9 bytes consist of the scaling
factor/alignment matrix.

In early June we will be releasing an application that calibrates the
accelerometer and stores the values on the shimmer. It will also be able to
read back these values and apply them to the streamed data. There will be
the option of manually entering the calibration values for the gyro and mag
and saving them to the shimmer (the method of calibration these sensors will
be up to the user for now).


3) Some of the sensors have a bandwidth response of less than 50Hz, but most
are higher. For example the accelerometer has a response of 400Hz for the X
and Y channels and 300Hz for the Z channel. Also over sampling gives valid
extra data up to the Nyquist rate.

Mike



On Wed, May 25, 2011 at 8:28 PM, Nicholas Hosein <[email protected]>wrote:

> 1) I was just wondering if there was an easy way to get the battery level
> from the boiler plate app. My guess is it would involve creating an
> additional command and then reading off the voltage etc. This would be very
> helpful because I use the sensors on test subjects and need to know if a
> mote needs to be swapped out before it dies.
>
> 2) Im not quite sure how to use the calibration commands. From my
> understanding each sensor has 3 channels x 2 bytes = 6 bytes of calibration
> data. BPCommandParser says 21 arguments are required for the calibration.
>
> 3) Is there any benefit to sampling over 50Hz. I thought the sensors
> saturated at 50Hz?
>
> Thanks guys,
>
> Nick
>
> _______________________________________________
> Shimmer-users mailing list
> [email protected]
> https://lists.eecs.harvard.edu/mailman/listinfo/shimmer-users
>
>
_______________________________________________
Shimmer-users mailing list
[email protected]
https://lists.eecs.harvard.edu/mailman/listinfo/shimmer-users

Reply via email to