Difference between revisions of "Sensors/AMSYS"

From PaparazziUAV
Jump to navigation Jump to search
m (The links to the user guide were changed to the manufacturer's website, so that the most recent version of the datasheet and the user guide can be obtained. Amsys is a distributor of AMS 5812.)
 
Line 1: Line 1:
<categorytree style="float:right; clear:right; margin-left:1ex; border: 1px solid gray; padding: 0.7ex;" mode=pages>Sensors</categorytree>
<categorytree style="float:right; clear:right; margin-left:1ex; border: 1px solid gray; padding: 0.7ex;" mode=pages>Sensors</categorytree>


This site will explain a way, how to use a AMSYS pressure sensor - AMS 5812 Series.
This site will explain a way, how to use a Analog Microelectronics pressure sensor - AMS 5812 Series, distributed by Amsys.


==Addressing==
==Addressing==
At first you have to be sure, you've programmed the right I2C address on the sensor chip. <br>
At first you have to be sure, you've programmed the right I2C address on the sensor chip. <br>
To do this, you can use a programmer device named “AMS 5812 starter kit“ which comes with all the software you need.
To do this, you can use a programmer device named “AMS 5812 starter kit“ which comes with all the software you need.
http://www.amsys.info/sheets/usersguide_I2C_AMG_rev1.GB.pdf
http://www.analogmicro.de/_pages/sens/ams5812/ams5812_usersguide_starterkit.pdf


===Paparazzi addresses===
===Paparazzi addresses===
I2C Addresses:
I2C Addresses:
The default address of every AMSYS chip is F0 and it is always reachable, even if you've programmed a other one.
The default address of every AMS chip is F0 and it is always reachable, even if you've programmed a other one.


The default addresses defined in the paparazzi driver are:
The default addresses defined in the paparazzi driver are:
Line 23: Line 23:
The „AMS 5812 starter kit“ software does not use the first bit of the address. <br>
The „AMS 5812 starter kit“ software does not use the first bit of the address. <br>
If you want to know more see:<br>
If you want to know more see:<br>
http://www.amsys.info/sheets/amsys.en.ams5812_e.pdf<br>
http://www.analogmicro.de/_pages/sens/ams5812/ams5812_data_sheet.pdf<br>
Because of this you have to program the sensor chips with this addresses:
Because of this you have to program the sensor chips with this addresses:
*Baro: 0x72
*Baro: 0x72

Latest revision as of 08:18, 30 June 2015

This site will explain a way, how to use a Analog Microelectronics pressure sensor - AMS 5812 Series, distributed by Amsys.

Addressing

At first you have to be sure, you've programmed the right I2C address on the sensor chip.
To do this, you can use a programmer device named “AMS 5812 starter kit“ which comes with all the software you need. http://www.analogmicro.de/_pages/sens/ams5812/ams5812_usersguide_starterkit.pdf

Paparazzi addresses

I2C Addresses: The default address of every AMS chip is F0 and it is always reachable, even if you've programmed a other one.

The default addresses defined in the paparazzi driver are:

  • Baro: 0xE4
  • Airspeed: 0xE8

You can change them and many othe sensor specific data in the files:

  • /sw/airborne/modules/sensors/baro_amsys.c
  • sw/airborne/modules/sensors/airspeed_amsys.c

AMSYS addresses

The „AMS 5812 starter kit“ software does not use the first bit of the address.
If you want to know more see:
http://www.analogmicro.de/_pages/sens/ams5812/ams5812_data_sheet.pdf
Because of this you have to program the sensor chips with this addresses:

  • Baro: 0x72
  • Airspeed: 0x74

Airframe

This is an expample to define the module in the airframe.

<firmware name="fixedwing">
  ...
  <define name="USE_I2C0"/>
  <define name="USE_AIRSPEED"/>
  ...
</firmware>

<modules>
  <load name="airspeed_amsys.xml">  
    <define name="AIRSPEED_SCALE" value="1."/>   
    <define name="AIRSPEED_FILTER" value="0.902000010014"/>   
  </load> 
  <load name="baro_amsys.xml">	
    <define name="BARO_FILTER" value="0."/>
  </load> 
</modules>


USE_AIRSPEED is only needed if you want to control your plane's speed by true airspeed.


This is the calculation which should explain the usage of AIRSPEED_SCALE
sqrtf(2*(pressure_amsys)*airspeed_scale/1.2041);

1.2041 is the value of the air density.


AIRSPEED_FILTER and BARO_FILTER are values of an TP1 filter:

airspeed_amsys = airspeed_filter * airspeed_old + (1 - airspeed_filter) * airspeed_tmp;
airspeed_old = airspeed_amsys;


The AMSYS Baro driver is only written to measure the height not to use it as an flight variable.