Just purchased and received an ADISUSBZ and ADIS16362 module. Utilizing IMU_6DOF (Ver 3.0) I do not see any changes on the Gyro plot display. All plot axis, for the Gyro, are enabled. The accelerometer plot display, with similar settings, works great. Any suggestions?
ADISUSBZ with ADIS16362 Gyro Data??
Early termination of SPI using burst mode reads in an ADIS16364
I am starting into the interface integration from a PIC processor to an ADIS16364 sensor. I plan to use the SPI burst mode read function but do not need the entire list of parameters available. Can I simply terminate the SPI cycle after receiving the last desired parameter by raising CS* back high or is it necessary to read the entire list available for burst mode. This is a processor scheduling issue and if I can save some time (SPI reads are sloooow) I can cut off the process. From reading in other posts it would appear that taking CS* back high clears and resets the SPI interface for the next cycle. Does it have any negative affect on the data if some of the parameters are never read or is this a reasonable approach? I need only the 3 accel and 3 gyro data values. I know that I have to read the SUPPLY_OUT first, but I can just toss that away, then stop reading after ZACCL_OUT.
How to receive data continuously from ADIS16223
Hi, everyone.
The question is same with the title.
There are three parts in my code: capturing, receiving and transmitting.
[CAPTURE]: Start to capture data
[RECEIVE]: Read data from ADIS16223 SPI buffer
[TRANSMIT]: Sending data to Android devices
How can I make sure that CAPTURE EVENT still working during RECEIVE and TRANSMIT ? please help!
-Jason
How to use the ADXL362 to eliminate a power switch and control system power
Similar to the ADXL345 and adxl346, the ADXL362 has “activity” and “inactivity” functions which can be used to control system power and detect user activity. A simple circuit and C code for a pic was shown for the ADXL345 in: http://ez.analog.com/thread/2420
The ADXL362 improves on this circuit and example in several ways:
- 1) The ADXL362 uses about 2ua of current, less than 1/10 of the current used by the ADXL345.
- 2) The ADXL362 allows for a 12 bit value to be used for the activity and inactivity thresholds, coupled with the 2 Gee range on the xl362, this allows for a much more sensitive motion detecting switch.
- 3) The ADXL362 can cut down on false motion triggers that are seen by the ADXL345. It does this in two ways:
- The Activity, tilt or “above threshold” function works after the low pass filter which can be set as low as 6.25hz bandwidth.
- The Activity, tilt or “above threshold” function can be set for a number of samples above threshold not just a default of one sample above threshold as in the adxl345.
- 4) The ADXL362 introduces a new output which is the direct “awake” status bit which can be used to directly control the output load.
- 5) The ADXL362 introduces a new “loop” mode which does not require any processor interaction to clear interrupts.
The demo circuit as shown in the attached PDF is quite similar to the circuit shown for the ADXL362 in the referenced article. Note however that the LED controlling FET is connected to the int2 pin of the ADXL362 and not to a GPIO of the processor. This is because of point (4) above, the ADXL362 has a direct output map able to either interrupt pin and active either high or low that control the LED. In this example on power up the processor only configures the adxl362 and then permanently sleeps.
As an indication of the low power of the ADXL362, when the LED is on, the circuit is using about 10,000 times more power than when only the ADXL 362 is active.
The attached file includes all files to reproduce this demo as built with MPLABIDE8.66. The fundamental part of the “main” C code is below for easy reference.
void main(){
OPTION_REG = 0x40 /*INTEDG*/;
/* power up timer */
buffer[7] = 255;
while(buffer[7]--);
/* soft reset for safety */
buffer[0] = XL362_SOFT_RESET_KEY;
xl362Write(1,XL362_SOFT_RESET,buffer);
/* wait for soft reset to pass */
buffer[7] = 255;
while(buffer[7]--);
/* set up a buffer with all the initialization for activity and inactivity */
buffer[0] = 105; /* XL362_THRESH_ACTL about 15 degrees*/
buffer[1] = 0 ; /* THRESH_ACTH */
buffer[2] = 3 ; /* TIME_ACT */
buffer[3] = 105; /* THRESH_INACTL*/
buffer[4] = 0 ; /* THRESH_INACTH */
buffer[5] = 37 ; /* TIME_INACTL 3 seconds at 12.5 hz*/
buffer[6] = 0 ; /* TIME_INACTH */
buffer[7] = /* ACT_INACT_CTL */
XL362_ACT_ENABLE | XL362_ACT_AC | XL362_INACT_ENABLE
| XL362_INACT_AC | XL362_ACT_INACT_LINK | XL362_ACT_INACT_LOOP;
xl362Write(8,XL362_THRESH_ACTL,buffer);
/* set up a buffer with all the initization for intmaps fitler and power*/
buffer[0] = 0 ; /* INTMAP1 */
buffer[1] = XL362_INT_AWAKE ; /* INTMAP2 */
buffer[2] = /* FILTER_CTL */
XL362_RATE_12_5 | XL362_RANGE_2G;
buffer[3] = /* POWER_CTL */
XL362_MEASURE_3D | XL362_LOW_POWER;
xl362Write(4,XL362_INTMAP1,buffer);
/* No interrupts INTCON = 0x90; */
while(1){ /* we only resume here after a wakeup interupt */
asm("sleep"); /* go into low power mode */
} /* while */
} /* main */
Message was edited by: Nitzan Gadish. Corrected reference to a (nonexistent) ADXL352, to say ADXL345.
ADXL362 : Wrong activity detection (interrupt)
Hi,
I am sending this message because I am facing a problem with the adxl362 device.
At first here is a quick description on how I want to use the device :
I want to use the device for an activity detection :
-I use the device in reference mode
-if an activity exceeded 1g (the value could be different) an interruption occurs on INT1 in active low.
Problem :
At first I set the register as wanted then I put accelerometer in measurement mode to start the activity detection.
It appears that in the first 100ms an interruption is set (pin goes from high ot low) and status act bit is set, but no activity really happens.
I got the same problem if I use an acivity time (for example more than 2s) (I've already checked that the wakeup mode is OFF), in the first 100ms an activty occurs (that should not be possible because the activty time is not reached).
Here is how the registers are set :
//Soft reset :
REG 0x1F VALUE : 0x52
//I put a wait of 10ms here to be sure that reset is correctly done
//INTMAP 1 for activity + INT_LOW (active low interrupt)
REG 0x2A VALUE : 0x90
//SET ODR
REG 0x2C VALUE : 0x40
//SET TIME ACT
REG 0x22 VALUE : 0x00
//Act ref + enable act
REG 0x27 VAlUE : 0x03
//Set measurement mode on
REG 0x2D VALUE : 0x02
==> Here appears an activity interrupt in the first 100ms.
Note : If I use TIME act > 0 (even a big value) the problem stays the same.
More information:
Dump of the register after the configuration (and measurement set to on) :
REG 0x00 = 0xad
REG 0x01 = 0x1d
REG 0x02 = 0xf2
REG 0x03 = 0x02
REG 0x08 = 0x09
REG 0x09 = 0xfb
REG 0x0a = 0x42
REG 0x0b = 0x50
REG 0x0c = 0x00
REG 0x0d = 0x00
REG 0x0e = 0x9a
REG 0x0f = 0x00
REG 0x10 = 0xbb
REG 0x11 = 0xff
REG 0x12 = 0x29
REG 0x13 = 0x04
REG 0x14 = 0x28
REG 0x15 = 0x00
REG 0x16 = 0x00
REG 0x17 = 0x00
REG 0x1f = 0x00
REG 0x20 = 0xf4
REG 0x21 = 0x01
REG 0x22 = 0x00
REG 0x23 = 0x00
REG 0x24 = 0x00
REG 0x25 = 0x00
REG 0x26 = 0x00
REG 0x27 = 0x03
REG 0x28 = 0x00
REG 0x29 = 0x80
REG 0x2a = 0x90
REG 0x2b = 0x00
REG 0x2c = 0x04
REG 0x2d = 0x02
Do you have any ideas what can cause this issue ?
Thank you by advance for your help.
Joseph
ADXL375 & MEMS capacitive sensor.
Hi every one....
We are new to using the Accelerometer & Accelerometer technology. In one of our applications older versions people were using pizoelectric / piezo resitive based accelerometers. However we understand Mems based capacitive accelerometers is the latest & cost effective technology and want to provide them in the newer versions of the application. So our question is as follows.
1. Why are MEMS capacitve accelerometers better than piezoelectirc/piezoresistive or mems based piezoelectic /piezoresistive accelerometer. If there is any comparision statment by ADI pl. kindly provide. I have google'd it but unable to find a convincing answer.
Thanks
Agni Teja
ADIS16210 Interface
Do you have any reference code for managing the SPI interface on the ADIS16210?
ADXL345 Interrupt problem
Hello everyone,
I need some help in configuring an ADXL345 accelerometer. I work with board which has a NXP lp1114F/301 processor and I need to use the accelerometer to wake up the processor on tap and double tap. I have managed to catch the tap and double tap actions but only if I read continuously the INT_SOURCE register. I think I'm missing something in the device configuration because the data_ready and overrun are always on. I also tried to clear the bits by reading the data register but still no effect. In my application, the accelerometer "should" generate a interrupt on int1 ONLY IF the device is tapped or double tapped. As far as I see, the accelerometer, in my case, generates a an interrupt on the int1 pin only once (no matter which event generated the interrupt) and doesn't put the pin low until the interrupt is cleared, no matter where is the interrupt mapped (int1 or int2). Is this a normal behaviour or I'm missing something? How can I configure it to generate an interrupt on int1 everytime this event occurs without being influenced bu the other interrupt events? Is it possible to configure the accelerometer to have interrupts on tap or double tap, (without measuring and storing data to data registers)
Basically I need only the tap and double tap interrupts, which should wake up the processor.
Next is the code I use for accelerometer initialization:
ADXL345_Write(ADXL345_DATA_FORMAT,0x01);
ADXL345_Write(ADXL345_TAP_AXES,0x01);
ADXL345_Write(ADXL345_THRESH_TAP,0x38);
ADXL345_Write(ADXL345_DUR,0x10);
ADXL345_Write(ADXL345_LATENT,0x50);
ADXL345_Write(ADXL345_WINDOW,0xFF);
ADXL345_Write(ADXL345_INT_MAP,0x9F);
ADXL345_Write(ADXL345_INT_ENABLE,0x60);
ADXL345_Write(ADXL345_POWER_CTL,0x08);
Any help would be appreciated.
Thank you
Cosmin
ADIS16355 temperature calculation
Dear Sir/Madam
Please help me please with temperature calculation of ADIS16355.
Real temperature according to external sensor is about 26 °C.
XTEMP_OUT = 0x6d,
YTEMP_OUT = 0x6e
ZTEMP_OUT = 0x58
From datasheet sensor parameters are Output at 25°C 0 LSB, Scale Factor 6.88 LSB/°C
So temperature must be 25°C + (0x6d/6.88) = 40.8°C
Tell me where I'm wrong?
All other registers are read correctly and have the correct data (SUPPLY_OUT, XACCL etc.).
no response from SPI read test sequence - ADIS16448
Details:
Micro: TI MSP430 (CC430 package)
Setup: custom PCB, scoping a fly-wired header which includes all four SPI pins, VCC, and GND.
Scope: Agilent MSO-X 3014A Mixed signal O-scope, digital probe
I'm just trying to get the SPI test read sequence to return the product ID: 0x4040.
For all figures:
D0 - nCS
D1 - SCK
D2 - MOSI
D3 - MISO
The first problem I've encountered is that, at least for the MSP430, the SPI mode 3 (CLKPOL = 1, CLKPHA = 1) yields a waveform which does not coincide with the ADIS16448 datasheet's indication (page 11, section SPI Read Test Sequence). This is detailed in the first two figues (same capture, different zoom). Notice that the first positive edge on the data line comes at the first positive edge on the clock, rather than the subsequent negative edge (most evident in scope_2.png)
Then, if I set CLKPHA to 0, I get the waveform exactly as indicated in the datasheet (page 11), but I still get no 0x4040 from the MISO line. Please consult the second pair of figures (3rd and 4th) to confirm.
I have tried at 32kHz and 500kHz, with hopes that the 32kHz was simply too slow to register successfully (despite the specifications in the datasheet which allow for .01MHz/10kHz clock speed). Notice the (now) correctly delayed positive edge on the MOSI line (see scope_4.png)
Is there something obvious for which I have failed to account?
ADXL103CE to amplifier
I would like to use the ADXL103CE to connect to an amplifier which receives 5-pole DIN connectors and, I believe, 1.5 mm DIN touch-proof safety connectors. Would this be possible and if so, could someone explain how to a non-engineer type? The purpose is to measure hand tremor. Thanks for your time.
DOUTS IN ADXL375 - REG.
Hi All I have the following douts with reference to ADXL375
Conditions Vs & Vdd io= 3.3Volts
1. OUTPUT DATA RATES : As per the data sheet the output data rates is mentioned as 3200Hz = 3.2KHz = 0.312ms is the time duration.
Does the ODR rate means the following. ..
a. for every 0.312ms, 1 out of 32 FIFO blocks gets updated? (Each Block has 2 bytes registers for each axis )
b. The entire 32 FIFO block are updated @ 0.312ms?
2. HOW SHOULD I CALCULATE THE MAXIMUM POWER CONSUMPTION OF ADXL375: The input supply is 3.3V common to Vs & Vdd io. The output data rate is 3200Hz. Number of Samples is 32.
Max Power Consumed = (Power for Sampling 3 axis data & filling in the 32 FIFO@3200Hz ODR Power for transmitting the data Through SPI @2MHZ Miscellaneous power for providing triggers). ?
In Specifications it is given That for ODR > 100Hz, the typ. current consumption is 145uA. Does the current consumption increase
if the ODR is increased to 3200Hz?If so How Much?
3. AS PER THE APPLICATION NOTE NO.1266, PAGE 5 FIGURE 8 IN CAPTURING SHOCK PROFILE: There have been three wave forms
shown in which Pre Trigger Samples are Shown. What is the difference between the 3 wave forms?. As per my understanding the last wave form captures the Shock Event Profile. What does the above 2 Wave forms Indicate.?
As per the statment in application notes "Figure 8 shows the samples stored in the FIFO when set to different pre-trigger sample lengths." does that mean is there a possibility to set pre - trigger sample length apart for regular sample length present in register FIFO CNTRL Register?
4. Is it possible to capture the shock curve profile for the above shock wave. If so how can we do that.?
Pl. bear with me if my questions tend to be silly.
Thanking You
Looking Forward for you reply
AGNI
Arduino UNO & ADXL362 problem
Me and a fellow classmate found a library for the ADXL362 on Github. It looks fabulous, but some issues occured during working with the Arduino UNO and the ADXL362. The code looked good en we searched the Internet for solutions. The problem we had with the Arduino was that we couldn't get any 'normal' test results. Where other users got different numbers for XDATA, YDATA, ZDATA and the temperature we only got the numbers -1, 0 and 1. Do you know how we could fix this problem?
Thank you
ADIS16480 problems
Hello,
I've been working for a while with an ADIS16480 integrated in an ARM cortex processor.
It was working perfectly, but recently I tried to calibrate the magnetometer in order to get a more stable yaw.
I started changing the Body Frame/Local Navigation Frame Bit (EKF_CNFG[3]) and updating the flash (waiting 1100ms) to get the correct readings from the magnetometer. This step worked fine, but after a few minutes reading values, the IMU stopped working.
Now I can only change the register page correctly and read his value, because no matter which other one I try to change or read, I don't receive any correct value, I only get 0xFFFF.
I've executed the factory calibration restore function without any change.
Has anyone had this problem before? How it has been solved?
Any help would be welcome.
Thanks.
ADIS16480 X_DELTVEL_OUT Linear Velocity measurements
I am trying to read the linear velocity measurements from the ADIS16480 which are internally derived from the accelerometer values. My ADIS16480 is connected through a custom built interface board to a BeagleBone Black (running Angström) and I am using the SPIDEV driver to control the SPI bus.
I can read the product_id, attitude and accelerometer values fine, but when I read the line X_DELTVEL_OUT register (and its y,z neighbours) the values seem to be 'stuck' in between 0xffff to 0x0009. After converting to m/s I get values around the -0.006m/s (0xffff). The graph shows the output after letting it sit for a while and then moving it up and down once quickly. There is basically no change in velocity for small movements.
I am using the following code to convert the 2's complement into a float:
<code>
if(x_vel_raw & BITMASK_TEST_2s_NEG){ //if number is negative
x_vel_raw = ~x_vel_raw;
x_vel_raw = x_vel_raw + 1;
*x_vel = (-1)* ((double) x_vel_raw) * LINEAR_VEL_COUNT_TO_mpsec; //convert it to m/s
}else{
*x_vel = (double) x_vel_raw * LINEAR_VEL_COUNT_TO_mpsec; //convert it to m/s
}
</code>
My raw data output from a similar test as the figure above can be found in the attached file.
----
Are there any prerequisites to using the delta_vel data? Do I need to set a value >0x0000 for the decremention rate (DEC_RATE)?
How do I get proper values out of these registers?
Thanks a lot,
Rapha
ADXL345 provide activity after free fall
Hello,
I am using ADXL345 through SPI 4-wire mode and I trying to get activity, inactivity and free fall interrupts.
I've got some weird problem. After the first free fall interrupt the component does not provide activity interrupt anymore.
It is important to note that I working on ACT dc coupled mode.
Thanks.
ADXL362 power consumption
I am having problems with the ADXL362 and getting it into a low power mode. I am using an Arduino Uno, modified to give 3.3V rather than 5 (I changed the voltage regulator on the Uno - a digital high is now 3.3V)
I'm using the Sparkfun breakout board.
The current readings I get are erratic and seem to depend to some extent on the orientation, but they never go lower than 4uA and are usually around 30uA. This is true even in standby mode.
Here is the code I am using:
#include <Arduino.h>
#include <SPI.h>
const int slaveSelectPin = 10;
void setup(){
Serial.begin(9600);
pinMode(slaveSelectPin, OUTPUT);
SPI.begin();
SPI.setDataMode(SPI_MODE0); //CPHA = CPOL = 0 MODE = 0
delay(1000);
//soft reset
digitalWrite(slaveSelectPin, LOW);
SPI.transfer(0x0A); // write instruction
SPI.transfer(0x1F);
SPI.transfer(0x52);
digitalWrite(slaveSelectPin, HIGH);
// read Reg 2D before modifying for measure mode
digitalWrite(slaveSelectPin, LOW);
SPI.transfer(0x0B); // read instruction
SPI.transfer(0x2D);
digitalWrite(slaveSelectPin, HIGH);
// turn on measurement mode
digitalWrite(slaveSelectPin, LOW);
SPI.transfer(0x0A); // write
SPI.transfer(0x2D); // Reg 2D
SPI.transfer(0x02); // begin measure
digitalWrite(slaveSelectPin, HIGH);
delay(100);
}
void loop(){
// Read X Value
int twoRegValue = 0;
digitalWrite(slaveSelectPin, LOW);
SPI.transfer(0x0B); // read instruction
SPI.transfer(0x0E);
twoRegValue = SPI.transfer(0x00);
int XValue = twoRegValue + (SPI.transfer(0x00) << 8);
digitalWrite(slaveSelectPin, HIGH);
// Read Y Value
twoRegValue = 0;
digitalWrite(slaveSelectPin, LOW);
SPI.transfer(0x0B); // read instruction
SPI.transfer(0x10);
twoRegValue = SPI.transfer(0x00);
int YValue = twoRegValue + (SPI.transfer(0x00) << 8);
digitalWrite(slaveSelectPin, HIGH);
// Read Z Value
twoRegValue = 0;
digitalWrite(slaveSelectPin, LOW);
SPI.transfer(0x0B); // read instruction
SPI.transfer(0x12);
twoRegValue = SPI.transfer(0x00);
int ZValue = twoRegValue + (SPI.transfer(0x00) << 8);
digitalWrite(slaveSelectPin, HIGH);
delay (1000);
Serial.print("XVALUE=");
Serial.print(XValue);
Serial.print("\tYVALUE=");
Serial.print(YValue);
Serial.print("\tZVALUE=");
Serial.println(ZValue);
}
I believe that this following code should put it in standby, but it doesn't reduce the current.
#include <Arduino.h>
#include <SPI.h>
const int slaveSelectPin = 10;
void setup(){
Serial.begin(9600);
pinMode(slaveSelectPin, OUTPUT);
SPI.begin();
SPI.setDataMode(SPI_MODE0); //CPHA = CPOL = 0 MODE = 0
// read Reg 2D
digitalWrite(slaveSelectPin, LOW);
SPI.transfer(0x0B); // read instruction
SPI.transfer(0x2D);
digitalWrite(slaveSelectPin, HIGH);
delay (100);
// turn on standby mode
digitalWrite(slaveSelectPin, LOW);
SPI.transfer(0x0A); // write
SPI.transfer(0x2D); // Reg 2D
SPI.transfer(0x00); // standby
digitalWrite(slaveSelectPin, HIGH);
}
void loop(){
}
Prior to using these sketches, I was using the Arduino library written by Anne Mahaffey and was getting similar results. But by playing around with the timings, and inserting small delays in her code (a few ms) I could make sure the current was about 4uA. With some values of delay(), I could get the current to visibly cycle up and down over a couple of seconds, which makes me think that the ADXL and the Arduino were somehow going in and out of sync. I have never been able to get it into sleep mode.
I am very baffled and would appreciate help.
ADXL362 - SPI communication issues
Hi,
I'm trying to make an ADXL362 talk to a microcontroller (the nRF51822-Eval borad). I am trying to read the 0x00 register, therefore I send 0x0B and then 0x00.
As you can see in the attached, ADXL362 doesn't respond with 0xAD. It seems that at the end of the second clock burst, ADXL362 rises the MISO but it doesn't keep it up until the following clock burst.
MOSI appears to work OK.
SPI is set to mode 0 at 1Mbps.
Any ideas?
Thanks
ADXL362 interrupts
I am using the ADXL362 with an ATTINY85
I want to run the script for a certain period then a) put the ADXL362 into wakeup mode and next b) put the ATTINY85 into power down sleep mode.
I would then like the ADXL362 to wake up the ATTINY85 if it detects motion over a certain threshhold. Because I have no spare pins on the ATTINY85 I would like to use its reset pin, so I need the 362 interrupt1 pin to be held high while it's asleep then go momentarily low when the 362 wakes up. Is this possible? Here is what I have so far:
//Set the ACT_INACT_CTL bit 1
SPIwriteOneRegister(0x27, 0x01);
//Set the threshhold and time
SPIwriteTwoRegisters(0x20, 300);//300 is the threshhold
SPIwriteOneRegister(0x22, 10); //10 is the time
// Map awake status to interrupt 1
SPIwriteOneRegister(0x2A, 0x40);
// set autosleep bit
SPIwriteOneRegister(0x2D, 0x02);
//put in wakeup mode
SPIwriteOneRegister(0x2D, 0x04);
It doesn't work: Interrupt 1 on the ADXL362 goes high as it powers down, but subsequent motion has no effect. What am I doing wrong?
Thanks
High Accuracy Angle Sensor
Looking for a high accuracy angle sensor.
Accuracy : 0.01 deg
Range : +/- 30 deg
On single axis.
Need advice from the community here.
Look forward to some nice discussion/advise.