<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.paparazziuav.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Niko</id>
	<title>PaparazziUAV - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.paparazziuav.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Niko"/>
	<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/wiki/Special:Contributions/Niko"/>
	<updated>2026-04-08T10:48:07Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Sensors/AMSYS&amp;diff=19953</id>
		<title>Sensors/AMSYS</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Sensors/AMSYS&amp;diff=19953"/>
		<updated>2015-06-30T15:18:35Z</updated>

		<summary type="html">&lt;p&gt;Niko: 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.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;categorytree style=&amp;quot;float:right; clear:right; margin-left:1ex; border: 1px solid gray; padding: 0.7ex;&amp;quot; mode=pages&amp;gt;Sensors&amp;lt;/categorytree&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This site will explain a way, how to use a Analog Microelectronics pressure sensor - AMS 5812 Series, distributed by Amsys.&lt;br /&gt;
&lt;br /&gt;
==Addressing==&lt;br /&gt;
At first you have to be sure, you've programmed the right I2C address on the sensor chip. &amp;lt;br&amp;gt;&lt;br /&gt;
To do this, you can use a programmer device named “AMS 5812 starter kit“ which comes with all the software you need.&lt;br /&gt;
http://www.analogmicro.de/_pages/sens/ams5812/ams5812_usersguide_starterkit.pdf&lt;br /&gt;
&lt;br /&gt;
===Paparazzi addresses===&lt;br /&gt;
I2C Addresses:&lt;br /&gt;
The default address of every AMS chip is F0 and it is always reachable, even if you've programmed a other one.&lt;br /&gt;
&lt;br /&gt;
The default addresses defined in the paparazzi driver are:&lt;br /&gt;
*Baro: 0xE4&lt;br /&gt;
*Airspeed: 0xE8&lt;br /&gt;
&lt;br /&gt;
You can change them and many othe sensor specific data in the files:&lt;br /&gt;
*/sw/airborne/modules/sensors/baro_amsys.c&lt;br /&gt;
*sw/airborne/modules/sensors/airspeed_amsys.c&lt;br /&gt;
&lt;br /&gt;
===AMSYS addresses===&lt;br /&gt;
The „AMS 5812 starter kit“ software does not use the first bit of the address. &amp;lt;br&amp;gt;&lt;br /&gt;
If you want to know more see:&amp;lt;br&amp;gt;&lt;br /&gt;
http://www.analogmicro.de/_pages/sens/ams5812/ams5812_data_sheet.pdf&amp;lt;br&amp;gt;&lt;br /&gt;
Because of this you have to program the sensor chips with this addresses:&lt;br /&gt;
*Baro: 0x72&lt;br /&gt;
*Airspeed: 0x74&lt;br /&gt;
&lt;br /&gt;
==Airframe==&lt;br /&gt;
This is an expample to define the module in the airframe.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;firmware name=&amp;quot;fixedwing&amp;quot;&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  &amp;lt;define name=&amp;quot;USE_I2C0&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;define name=&amp;quot;USE_AIRSPEED&amp;quot;/&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
&amp;lt;/firmware&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;modules&amp;gt;&lt;br /&gt;
  &amp;lt;load name=&amp;quot;airspeed_amsys.xml&amp;quot;&amp;gt;  &lt;br /&gt;
    &amp;lt;define name=&amp;quot;AIRSPEED_SCALE&amp;quot; value=&amp;quot;1.&amp;quot;/&amp;gt;   &lt;br /&gt;
    &amp;lt;define name=&amp;quot;AIRSPEED_FILTER&amp;quot; value=&amp;quot;0.902000010014&amp;quot;/&amp;gt;   &lt;br /&gt;
  &amp;lt;/load&amp;gt; &lt;br /&gt;
  &amp;lt;load name=&amp;quot;baro_amsys.xml&amp;quot;&amp;gt;	&lt;br /&gt;
    &amp;lt;define name=&amp;quot;BARO_FILTER&amp;quot; value=&amp;quot;0.&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/load&amp;gt; &lt;br /&gt;
&amp;lt;/modules&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
USE_AIRSPEED is only needed if you want to control your plane's speed by true airspeed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is the calculation which should explain the usage of AIRSPEED_SCALE &amp;lt;br&amp;gt;&lt;br /&gt;
sqrtf(2*(pressure_amsys)*airspeed_scale/1.2041);&lt;br /&gt;
&lt;br /&gt;
1.2041 is the value of the air density.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
AIRSPEED_FILTER and BARO_FILTER are values of an TP1 filter:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
airspeed_amsys = airspeed_filter * airspeed_old + (1 - airspeed_filter) * airspeed_tmp;&lt;br /&gt;
airspeed_old = airspeed_amsys;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The AMSYS Baro driver is only written to measure the height not to use it as an flight variable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Sensors]] [[Category:Modules]]&lt;/div&gt;</summary>
		<author><name>Niko</name></author>
	</entry>
</feed>