12-16-2013 11:02 AM
Please post questions and concerns with the LIFA LSM303DLM library here.
12-16-2013 11:38 AM
Well. I've seen you crossed input of Joint Numbers for accelerometer, not for magnetometer. Why did you make it? The conversion in unit of "g" can be done multiplying for the FullScale and dividing the result for 2^15?
12-16-2013 05:53 PM
Well. I've seen you crossed input of Joint Numbers for accelerometer, not for magnetometer. Why did you make it?
Because that is how the data is sent from the sensor. See pages 21 and 22 of the datasheet. Notice that the low byte for the accelerometer comes first while for the magnetometer it comes second.
The conversion in unit of "g" can be done multiplying for the FullScale and dividing the result for 2^15?
I believe you simply multipy the output by the linear acceleration sensitivity found in Table 3. You can check for ballpark correctness or calibrate with gravity. If I needed g's back when I used this sensor, I believe I probably calibrated it based on gravity.
12-17-2013 03:13 AM
Thank you. I'm trying to implement roll, pitch and heading for this sensor, moving a 3D scene. Is there a method to initialize or calibrate it? my cube rotate but there is a "noise" in its rotation and it is inclined without movement of the LSM303. I tried with an empty value at Property Node ---> History for the waveform chart, but I didn't solve the problem. Is it an environmental disturbance?
12-17-2013 09:45 AM
Noise and drift are common sources of error that you need to account for when using most any sensor. For calibration and filtering I suggest searching online since this is a very common necessity (for which I am not an expert).
12-18-2013 11:29 AM
Nathan I filtered the output data with a digital Butterworth filter, with a low cut-frequency of 0.1 Hz: the result is excellent. Thank you for all the answers, they were very helpful.
Best regards.
02-02-2014 04:21 AM
I've uploaded the LIFA sketch on my Arduino MEGA 2560 board, but while trying to use the Accelerometer Read Axis.vi and Graph.vi I keep receiving the following error (code 5003):
A timeout occured while trying to read from the Arduino.
What am I doing wrong?
I've selected the right resource port and selected "Mega 2560" as Board Type.
My accelerometer is the LSM303DLH.
02-02-2014 03:12 PM
Where does the error occur? Are you able to run some other examples?
Also, a common mistake when using an Arduino Mega 2560 is that you need to set the baudrate on Init.vi to 9600. Other possible issues/fixes can be found in the error's documentation.
02-03-2014 10:14 AM
I've found that my problem was the USB serial. Once I've changed the name of the serial, everything worked. I think that my error was to abort the vi and because of this the USB was considered still busy while it wasn't at all.
I have one last question: if I want take samples at higher frequency for a chosen period of time and send the whole data to LabView, how should I procede? If that's not possible, is there a way to improve the sample rate?
02-03-2014 11:49 AM
AndreasSchnaas wrote:
I have one last question: if I want take samples at higher frequency for a chosen period of time and send the whole data to LabView, how should I procede? If that's not possible, is there a way to improve the sample rate?
That would require major modifications to the LIFA firmware. You would need to move all I2C communication to the Arduino (meaning my Library would be useless) and write special functions to do all of what you are asking. It would probably be similar to the finit acquisition that exists for analog input in LIFA. However, the Arduino will not be able to store all that much data so the length of time will be relatively short.
Sorry I can't help you with that.