paparazzi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

## Re: [Paparazzi-devel] adcs and sensors

 From: Felix Ruess Subject: Re: [Paparazzi-devel] adcs and sensors Date: Mon, 7 Feb 2011 19:24:26 +0100

Hi Ana,

I guess you are talking about some analog_imu when you are mentioning the 10bit ADC? Like the razor IMU directly connected to the ADCs on the LPC?
Did you have a look at the wiki page http://paparazzi.enac.fr/wiki/BoozSensorsCalibration and used the script as described there?
You are basically correct. But you also might need to adjust the signs, to get the correct axis directions according to your mounting position.

The scaled IMU measurements are stored as 32bit integers. So regarding the units after the scaling: they correspond to the physical values in SI units (m/s², rad/sec), BUT since we use an integer representation for efficiency these are encoded as Binary Fixed Point. This means that to get the corresponding floating point value in SI units you divide this value by e.g. 1024 (1<<10) for the accels. You left-shift 1 by 10 places to get the denominator. Left shift by INT32_ACCEL_FRAC = 10 for accels, INT32_RATE_FRAC = 12 for rates (gyros).
This is defined in sw/airborne/math/pprz_algebra_int.h
There you also have the macros to do the scaling, e.g. to get acceleration in m/s² in float from int32:
accel_float = ACCEL_FLOAT_OF_BFP(imu.accel)

But you normally there should be no reason for you to concern yourself with these details! You should be able to just use the calibration script and be done with it.

Hope this clears things up a little.

Cheers, Felix

On Mon, Feb 7, 2011 at 5:11 PM, GARCIA ALVAREZ, ANA wrote:

Hi,

While trying to make my imu run I have realized there are a lot of things I don’t understand well. I hope someone could give me a hint, or somewhere to get this info..

I know paparazzi has a 10bit adc, that means the availability of discerning up to 1024 values-from 0 to 1023.

I know sensors have an operating voltage, a typical reference output and a sensibility. (and lots of parameters more).

For instance, an accelerometer is said to output Vs/2 when sensing 0g. Then, it has a sensibility of 300mV/g and can measure +-3g.

I wonder how to associate the 1023 values of paparazzi with the +-3g extreme measurements. Only via setting a neutral and a sensitivity? I think I should read Vs/2 when 0g, and Vs/2 should be related to a number from 0 to 1023, in this case maybe 512…but is always 0 and 1023 related to 0 and 3.3V(being 3.3V the reference voltage in the mcu? Or it depends in the output range of the sensor?)

And what about the sensibility? Which are the objective units after the operation sensibility*(raw_data-neutral)? In adc values or in physical values? I suppose this sets the sensibility parameter units, for instance g/adc unit, or mv/g, or something else…

I know nothing makes sense, so I really would be pleased if someone could help me a little.

Thanks,

Ana

_______________________________________________
Paparazzi-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/paparazzi-devel

reply via email to

 [Prev in Thread] Current Thread [Next in Thread]