<?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=Balazs</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=Balazs"/>
	<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/wiki/Special:Contributions/Balazs"/>
	<updated>2026-04-27T09:41:38Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Papers&amp;diff=14659</id>
		<title>Papers</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Papers&amp;diff=14659"/>
		<updated>2013-03-19T19:26:14Z</updated>

		<summary type="html">&lt;p&gt;Balazs: new publications&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&lt;br /&gt;
Some publications about Paparazzi.&lt;br /&gt;
&lt;br /&gt;
===2013===&lt;br /&gt;
&lt;br /&gt;
* ''Multi-Lifting-Device UAV Autonomous Flight at Any Transition Percentage'', Christophe De Wagter, Dirk Dokter, Guido de Croon, Bart Remes. Accepted for publication. EuroGNC2013  &lt;br /&gt;
* ''Unmanned aircraft system measurements of the atmospheric boundary layer over Terra Nova Bay, Antarctica'', Knuth, S. L., J.J. Cassano, J.A. Maslanik, P.D. Herrmann, P.A. Kernebone, R.I. Crocker, and N.J. Logan; 2013Earth Sys. Sci. Data, accepted, pending revisions&lt;br /&gt;
* ''Open Source Autopilot for Academic Research – The Paparazzi System'', Paparazzi Community, Balazs Gati; Proceeding of the American Control Conference 2013, 17-19. Juni 2013, Washington, USA; accepted, under publication&lt;br /&gt;
&lt;br /&gt;
===2012===&lt;br /&gt;
&lt;br /&gt;
* ''Multi-point optimization of a propulsion set as applied to a multi-tasking MAV'', Murat Bronz, Jean-Marc Moschetta, and Gautier Hattenberger. In proceedings of the International Micro Aerial Vehicle Conference and Competition, Germany, July 2012&lt;br /&gt;
* ''A &amp;quot;no-flow-sensor&amp;quot; wind estimation algorithm for unmanned aerial systems'', Mayer, Hattenberger, Brisset, Jonassen and Reuder. In International Journal of Micro Air Vehicles, Volume 4, N°1, March 2012&lt;br /&gt;
* ''Sub-sampling: Real-time vision for micro air vehicles, Robotics and Autonomous Systems'', G.C.H.E. de Croon, C. De Wagter, B.D.W. Remes, R. Ruijsink; Volume 60, Issue 2, February 2012, Pages 167-181, ISSN 0921-8890&lt;br /&gt;
&lt;br /&gt;
===2011===&lt;br /&gt;
&lt;br /&gt;
* ''Compact helical ring antenna for iridium communication on UAV'',Morlaas, Chabory, Souny and Hattenberger. In proceedings of ETTC 2011, European Test and Telemetry Conference, 14-16 June 2011, Toulouse, France&lt;br /&gt;
* ''Seven-Sensor Fast-Response Probe for Full-Scale Wind Turbine Flowfield Measurements'', M. Mansour, G. Kocer, C. Lenherr, N. Chokani and R. S. Abhari,J.; Eng. Gas Turbines Power 133(8), 081601 (Apr 05, 2011)&lt;br /&gt;
* ''Differential Flatness and Control of Nonlinear Systems'', Antoine Drouin, Sebastião Simões Cunha, Alexandre C. Brandão Ramos, Felix Mora-Camino; Proceedings of the 30th Chinese Control Conference, July 22-24, 2011, Yantai, China&lt;br /&gt;
&lt;br /&gt;
===2010===&lt;br /&gt;
&lt;br /&gt;
* ''Flying Autonomously to Corsica : A long Endurance Mini-UAV System'', Murat Bronz, Jean-Marc Moschetta and Pascal Brisset. In proceedings of the International Micro Air Vehicle Conference and Flight Competition (IMAV2010) Braunschweig, Germany, 2010&lt;br /&gt;
* ''Flight Autonomy of Micro-drone in indoor Environments using LIDAR Flash Camera'', Bertrand Vandeportaele, Aaron Montoya, Simon Lacroix and Gautier Hattenberger. In proccedings of the International Micro Air Vehicle Conference and Flight Competition (IMAV2010) Braunschweig, Germany, 2010&lt;br /&gt;
* ''Wintertime observations of an Antarctic polynya with unmanned aerial systems'', Cassano, J.J., J.A. Maslanik, C.J. Zappa, A.L. Gordon, R.I. Cullather, and S.L. Knuth; 2010, EOS, 91, 245-246.&lt;br /&gt;
* ''Roll-channel fractional order controller design for a small fixed-wing unmanned aerial vehicle'', Haiyang Chao, Ying Luo, Long Di, Yang Quan Chen; Control Engineering Practice, Volume 18, Issue 7, July 2010, Pages 761-772, ISSN 0967-0661&lt;br /&gt;
* ''A 'no-flow-sensor' wind estimation algorithm for Unmanned Aerial Systems'', Mayer, S., G. Hattenenberger, P. Brisset, M. Jonassen, and J. Reuder; 2010, International Journal of Micro Air Vehicles, 4, 1, 19-25.&lt;br /&gt;
&lt;br /&gt;
===2009===&lt;br /&gt;
&lt;br /&gt;
* ''Towards a Long Endurance MAV'', Murat Bronz, Jean-Marc Moschetta, Pascal Brisset and Michel Gorraz. IJMAV Volume 1 – Number4, 2009&lt;br /&gt;
* ''Planification de mission pour une patrouille de micro-drones'', P.S. Huard. Phd Thesis. Institut supérieur de l'aéronautique et de l'espace. Toulouse, France, 18 décembre 2009&lt;br /&gt;
* ''Planification de mission pour une patrouille de micro-drones'', P.S. Huard, N. Barnier, P.Brisset, and G. Verfaillie. In Proceedings Journées Francophones Planification Décision Apprentissage (JFPDA 2009), Paris, France, 2009&lt;br /&gt;
* ''Online mission planning for a swarm of fixed-wing MAV'', P.S. Huard, N. Barnier, P.Brisset, and G. Verfaillie. In Proceedings of the 4rd US-European Competition and Workshop on Micro Air Vehicle (IMAV09), Floride, 2009&lt;br /&gt;
&lt;br /&gt;
===2008===&lt;br /&gt;
&lt;br /&gt;
* ''Multi-UAV control with the Paparazzi system'', P. Brisset and G. Hattenberger. In proceedings of the Conference on Human Operating Unmanned Systems (HUMOUS'08), Brest (France), 2008&lt;br /&gt;
* ''SUMO: A Small Unmanned Meteorological Observer for atmospheric boundary layer research'',J. Reuder, P. Brisset, M. Jonassen, M. Müller, and S. Mayer;2008 IOP Conf. Ser.: Earth Environ. Sci. 1 012014&lt;br /&gt;
* ''Waypoint Navigation, Stabilization and Sensor Drift'', Antoine Drouin, Andreas Kleinert, Heinrich Warmers; EMAV2008, Braunschweig, Germany&lt;br /&gt;
&lt;br /&gt;
===2007===&lt;br /&gt;
&lt;br /&gt;
* ''Automated mission planning for a fleet of micro air vehicle'', P.S. Huard, N. Barnier, and C. Pralet. In Proc. of the 3rd US-European Competition and Workshop on Micro Air Vehicle and 7th European Micro Air Vehicle Conference and Flight Competition (MAV07), Toulouse, France, 2007&lt;br /&gt;
* ''Paparazzi - The Free Autopilot. Build your own UAV'', Antoine Drouin, Martin Muller. In the 24th Chaos Communication Congress, Berlin, 27-30 december 2007&lt;br /&gt;
* ''Reengineering the Paparazzi autopilot navigation system'', Brisset, Drouin, Jestin. In proceedings of IAV 2007, Toulouse, 3-5 september 2007&lt;br /&gt;
* ''Rotorcraft trajectory tracking by non linear inverse control'', Drouin, Mora Camino, Branda Ramos. In 6th brazilian conference on dynamics, control and their applications, Campus de Sao José do Rio, avril 2007&lt;br /&gt;
&lt;br /&gt;
===2006===&lt;br /&gt;
&lt;br /&gt;
* ''The Paparazzi Solution'', Brisset, Drouin, Gorraz, Huard et Tyler, MAV06, 2006. [http://www.recherche.enac.fr/paparazzi/papers_2006/mav06_paparazzi.pdf Article], [http://www.recherche.enac.fr/paparazzi/papers_2006/mav06_paparazzi_slides.pdf Slides]&lt;br /&gt;
&lt;br /&gt;
===2005===&lt;br /&gt;
&lt;br /&gt;
* ''Systèmes interactifs du drone Paparazzi'', Doscot, Masouri et Poupart, ENAC, 2005. [http://www.recherche.enac.fr/paparazzi/papers_2005/rapport_co_ihm.pdf Report (french)]&lt;br /&gt;
* ''Drones'', Brisset et Drouin, journées portes ouvertes ENAC, 2005. [http://www.recherche.enac.fr/paparazzi/papers_2005/jpo_2005.pdf Slides (french)]&lt;br /&gt;
&lt;br /&gt;
===2004===&lt;br /&gt;
&lt;br /&gt;
* ''Création d'une photo aérienne large à partir d'un flux vidéo enregistré par un mini-drone'' M. Tobie, ENAC, 2004. [http://www.recherche.enac.fr/paparazzi/papers_2004/rapport_a_matthieu.pdf Report (french)]&lt;br /&gt;
* ''PaparaDzIY : do-it-yourself UAV'' Brisset et Drouin, Journées Micro Drones, Toulouse, 2004. [http://www.recherche.enac.fr/paparazzi/papers_2004/paparadziy.pdf Slides]&lt;br /&gt;
* ''Drones et micro-drones'' Brisset et Drouin, CENA, 2004. [http://www.recherche.enac.fr/paparazzi/papers_2004/drones_et_micro_drones.pdf Slides (french)]&lt;br /&gt;
&lt;br /&gt;
===2003===&lt;br /&gt;
&lt;br /&gt;
* ''Calibration d’un capteur IR pour micro drone'' Binas, Deplanche, Hadida, ENAC, 2003. [http://www.recherche.enac.fr/paparazzi/papers_2003/infrared_calib_paper.doc Report (french)] [http://www.recherche.enac.fr/paparazzi/papers_2003/infrared_calib_slides.ppt Slides (french)]&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer_Documentation]] [[Category:Community]]&lt;/div&gt;</summary>
		<author><name>Balazs</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Failsafe&amp;diff=12431</id>
		<title>Failsafe</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Failsafe&amp;diff=12431"/>
		<updated>2012-06-07T06:16:56Z</updated>

		<summary type="html">&lt;p&gt;Balazs: Receiver own failsafe modes and paparazzi&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Paparazzi has several built-in failsafe features ranging from lowlevel to highlevel and from implied to optional.&lt;br /&gt;
&lt;br /&gt;
On the lowest level, precise timing of the transmitter pulses creates safety that goes beyond traditional switches enabling safer use of old RC equipment.&lt;br /&gt;
On the highest level, the [[Flight_Plans#Exceptions|exceptions]] feature of the flight-plans allow for very flexible custom built failsafe features.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== FBW (Fly By Wire) ==&lt;br /&gt;
&lt;br /&gt;
=== 'Failsafe Switch' ===&lt;br /&gt;
&lt;br /&gt;
The lowest level of paparazzi is the FBW (Fly By Wire) controller that reads the RC, reads the autopilot commands and drives the servo's based on the lowlevel failsafe options.&lt;br /&gt;
&lt;br /&gt;
This is the 'switch' between '''manual''' or '''automatic''' modes. Therefor there is no need for an other failsafe board. Indeed, the paparazzi FBW has evolved with so much intelligence that it is certainly safer than some and probably at least as safe as any other failsafe switches. This is amongst others (besides the highlevel validated code, separated process, ...) because paparazzi FBW unlike generic switches is given precise remote control information in it's RC.xml. If you use a wrong type of transmitter (e.g. not the right amount of channels, or not the correct interval or sync pulse length) than even when on the same frequency the FBW will not listen to the commands. Also, when 2 transmitters should be on the same frequency, then the chance of both signals together still being read as valid is very small. (This does NOT mean you can fly with 2 planes on the same frequency however. This only means that in this catastrophic scenario paparazzi does a pretty good job in delaying disaster from happening. )&lt;br /&gt;
&lt;br /&gt;
  * be aware that there exist many failsafe switches that use a pulse of the RC (e.g. channel 5) to switch &lt;br /&gt;
    between autopilot or RC. When using analog RC equipment or any equipment that does not have correctly &lt;br /&gt;
    programmed failsafe servo values this is very unsafe as whenever the RC is out of range the switch will &lt;br /&gt;
    start switching back and forth putting the UAV out of control even if the autpilot is perfectly OK.&lt;br /&gt;
&lt;br /&gt;
CAUTION! Common receivers today (especially 2.4GHz receivers) has own failsafe mode(s). Three mode are used in most cases: &lt;br /&gt;
   1. No failsafe: the receiver will switch off servo sinals in case of RC connection lost. &lt;br /&gt;
      Paparazzi own failsafe will be activated in case of RC connection lost.&lt;br /&gt;
   2. Last position: the receiver will keep the last valid servo positions in case of RC connection lost. &lt;br /&gt;
      Paparazzi own failsafe will NOT be activated. (The autopilot will not have information on RC signal lost.)&lt;br /&gt;
   3. Preset servo positions: the receiver will switch servo sinals to a preset value in case of RC connection lost. &lt;br /&gt;
      This values should be set directly in the receiver. (Read manual.) Paparazzi own failsafe will not be activated. &lt;br /&gt;
      BUT! If you set the failsafe value of the channel used for Mode control(Manual/Auto1/Auto2) to the value which commands Auto2, &lt;br /&gt;
      then paparazzi will switch automaticaly to Auto2 mode in case of RC connection lost.&lt;br /&gt;
&lt;br /&gt;
=== FBW logic ===&lt;br /&gt;
&lt;br /&gt;
 -RC GOOD: listen to the MODE switch on the Transmitter  &lt;br /&gt;
  (this means whenever the remote control is close enough the pilot has the final word)&lt;br /&gt;
 -RC BAD: go to automatic mode (see further on for handling of automatic modes)&lt;br /&gt;
 -RC BAD AND AUTOPILOT DATA TIMEOUT: failsafe command values from airframe configuration XML &lt;br /&gt;
  (do not omit to fill in useful failsafe values in the command section; usually slight pitch up for minimal speed, &lt;br /&gt;
  ailerons neutral in order not to roll inverted and of course throttle down: it is not recommended to try to make &lt;br /&gt;
  turns here with aileron deflections. A small rudder deflection on the other hand is recommended when available  )&lt;br /&gt;
&lt;br /&gt;
== AP (AutoPilot) ==&lt;br /&gt;
&lt;br /&gt;
=== Home mode ===&lt;br /&gt;
&lt;br /&gt;
The HOME mode is a failsafe mode where the standard navigation (own flightplan) is suspended and the aircraft &lt;br /&gt;
flies a circle around the HOME waypoint at a safe altitude (''security_height'' attribute in your flight-plan). This mode is triggered on different events. &lt;br /&gt;
Leaving this mode is done by clicking on the red HOME text in the GCS.&lt;br /&gt;
&lt;br /&gt;
==== Too far from HOME ====&lt;br /&gt;
&lt;br /&gt;
Home mode is triggered if the distance to the HOME waypoint is greater than a threshold ('''max_dist_from_home''' attribute) set in the &lt;br /&gt;
fight-plan (displayed as a circle on the GCS map).&lt;br /&gt;
&lt;br /&gt;
==== RC link failure while manual or AUTO1 ====&lt;br /&gt;
&lt;br /&gt;
Home mode is triggered if RC uplink is lost in '''MANUAL''' or '''AUTO 1''' modes.&lt;br /&gt;
&lt;br /&gt;
* When '''MANUAL''' the manual mode is restored as soon as RC link is restored as expected.&lt;br /&gt;
* However: In '''AUTO 1''' mode, one must manually leave the HOME mode using the GCS&lt;br /&gt;
&lt;br /&gt;
! Word of caution with respect to '''AUTO1''': &lt;br /&gt;
When flying auto1 with a lot of RC interference (which is not recommended anyway), be prepared that the plane might enter HOME mode.&lt;br /&gt;
Also, do not be tempted to fly far away in auto1 mode (possibly out of RC range) without a fully tuned auto2 autopilot or sufficient visual contact to allow manual control. As soon as you are so far that RC packets get lost, paparazzi will switch to HOME and will stay in HOME until you choose MANUAL of re-enable AUTO1 on the GCS !&lt;br /&gt;
&lt;br /&gt;
===== Setting RC lost mode =====&lt;br /&gt;
&lt;br /&gt;
By default when RC is lost (in Manual or Auto1) HOME mode is triggered, you can change this behaviour by setting the RC_LOST_MODE:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;define name=&amp;quot;RC_LOST_MODE&amp;quot; value=&amp;quot;PPRZ_MODE_AUTO2&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example RC_LOST_MODE is set to AUTO2, which can be useful if you experience glitches on your RC on the mode channel and want the aircraft to continue the mission instead of triggering HOME mode. '''BUT''' only use this if you have AUTO2 navigation set up properly and everything is initialized correctly! An other scenario to set this value if you will fly out of your RC range in a long range mission.&lt;br /&gt;
&lt;br /&gt;
You can disable HOME mode locking by adding the following line in your airframe file:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;define name=&amp;quot;UNLOCKED_HOME_MODE&amp;quot; value=&amp;quot;TRUE&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you can restore from HOME mode using the RC and do not need to do this on the GCS if in AUTO1.&lt;br /&gt;
&lt;br /&gt;
'''Caution:''' Use these two settings with care, as they might deteriorate the failsafe security of your aircraft.&lt;br /&gt;
&lt;br /&gt;
=== Kill mode ===&lt;br /&gt;
&lt;br /&gt;
In this mode the throttle is killed (this is the default mode when switching on the autopilot). You can enter this mode manually with the kill button (with confirmation). Kill mode is also triggered in the following cases:&lt;br /&gt;
&lt;br /&gt;
==== Catastrophic battery level ====&lt;br /&gt;
&lt;br /&gt;
If the battery level goes under the catastrophic low level (defined in the airframe file)&lt;br /&gt;
&lt;br /&gt;
==== Way too far from HOME ====&lt;br /&gt;
&lt;br /&gt;
The plane goes into kill mode if it is too far away from the HOME waypoint. You can configure this '''KILL_MODE_DISTANCE''' in your airframe file:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;section name=&amp;quot;MISC&amp;quot;&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    &amp;lt;define name=&amp;quot;KILL_MODE_DISTANCE&amp;quot; value=&amp;quot;(1.5*MAX_DIST_FROM_HOME)&amp;quot;/&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
  &amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example it is set to 1.5 times the '''max_dist_from_home''' (attribute set in your flight plan).&lt;br /&gt;
&lt;br /&gt;
=== GPS signal lost ===&lt;br /&gt;
&lt;br /&gt;
In this mode, the autopilot uses the failsafe roll, pitch and throttle settings defined in the airframe file. It is recommended to disable throttle and make a shallow turn at low flight speed. When barometric information is available and compass heading information, it is recommended to disable this safety mode and train the GCS operator to bring the plane home on heading and altitude only. &lt;br /&gt;
&lt;br /&gt;
Do not mix up the &amp;lt;commands&amp;gt; failsafe_value and the &amp;lt;section name=&amp;quot;FAILSAFE&amp;quot; prefix=&amp;quot;FAILSAFE_&amp;quot;&amp;gt; default values. The first result in fixed servo positions with the plane totally out of control, while the latter still involve the innerloop to stabilize the plane. &lt;br /&gt;
&lt;br /&gt;
=== Lost datalink communication (optional) ===&lt;br /&gt;
&lt;br /&gt;
This can be done via the a flight-plan exception, e.g. go to the Standby block after 30 seconds:&lt;br /&gt;
  &amp;lt;exceptions&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    &amp;lt;exception cond=&amp;quot;datalink_time &amp;gt; 30&amp;quot;  deroute=&amp;quot;Standby&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/exceptions&amp;gt;&lt;br /&gt;
You also need to include the ''datalink.h'' header file in the header section of your flight plan.&lt;br /&gt;
&lt;br /&gt;
=== Outside mission boundary (optional) ===&lt;br /&gt;
&lt;br /&gt;
Also use exceptions and/or [[Flight_Plans#Call|function calls]] for this.&lt;br /&gt;
&lt;br /&gt;
For an example see ''EMAV2009_safety.xml'' in the directory ''conf/flight_plans'' is an example of a safety procedure that can be included in other flight-plans.&lt;br /&gt;
It uses two [[Flight_Plans#Sectors|sectors]] defined in ''EMAV2009_data.xml'', a smaller Green &amp;quot;soft boundary&amp;quot; and a hard boundary defined by the Red sector.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;procedure&amp;gt;&lt;br /&gt;
  &amp;lt;exceptions&amp;gt;&lt;br /&gt;
    &amp;lt;exception cond=&amp;quot;Or(! InsideGreen(GetPosX(), GetPosY()), GetPosAlt() &amp;gt; ground_alt + 150)&amp;quot; deroute=&amp;quot;Center&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/exceptions&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;blocks&amp;gt;&lt;br /&gt;
    &amp;lt;block name=&amp;quot;Center&amp;quot; pre_call=&amp;quot;if (!InsideRed(GetPosX(), GetPosY())) NavKillThrottle();&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;circle wp=&amp;quot;_CENTER&amp;quot; radius=&amp;quot;DEFAULT_CIRCLE_RADIUS&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/block&amp;gt;&lt;br /&gt;
  &amp;lt;/blocks&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/procedure&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The first exception deroutes the plane to the Center block below it, if it is outside the Green [[Flight_Plans#Sectors|sector]] or higher than 150m over ground.&lt;br /&gt;
While in the Center block the statement in the pre_call function gets evaluated each time, if the plane is now also outside of the Red sector throttle is killed.&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]] [[Category:User_Documentation]]&lt;/div&gt;</summary>
		<author><name>Balazs</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Sensors/Current&amp;diff=12356</id>
		<title>Sensors/Current</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Sensors/Current&amp;diff=12356"/>
		<updated>2012-05-21T08:04:57Z</updated>

		<summary type="html">&lt;p&gt;Balazs: &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;
__TOC__&lt;br /&gt;
&lt;br /&gt;
It is very easy to get the Paparazzi system working with a current sensor. &lt;br /&gt;
&lt;br /&gt;
Examples are the one from Sparkfun (AttoPilot Voltage and Current Sense Breakout [http://www.sparkfun.com/commerce/product_info.php?products_id=9028 Current sensor]) or a linear hall-effect device such as the Allegro ACS755 or ACS715. The [http://www.teamnovak.com/products/data_logger/2000_sentry/index.html Novak Sentry current sensor] is based on the ACS755LCB-100 hall-effect sensor and has a range of 100A. The smaller and lighter [http://www.pololu.com/catalog/product/1186 Pololu Current Sensor Carrier] is based on the ACS715 with a current of up to 30A.&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
&lt;br /&gt;
[[Image:Example.jpg|thumb|right|float|Current sensor connected to the TWOG v1]]&lt;br /&gt;
Typically, the current sensor is used to measure the current flowing through the main battery (rather than the motor). Connect the + and - pole of the sensor through the battery red lead. The + and - have to be soldered directly. &lt;br /&gt;
&lt;br /&gt;
On the Sparkfun breakout board, a wire is connected to the &amp;quot;VI&amp;quot; pin. It must have a voltage between 0 and 3.3V. On a TWOG v1 or Tiny v2 board, the current sense output wire (&amp;quot;IA&amp;quot; on the Sparkfun sensor) is connected to the ADC_3 (or ADC_4) pin.&lt;br /&gt;
&lt;br /&gt;
On the Novak Sentry current sensor, the red wire is connected to +5 volts. The black wire is ground. The yellow wire is the output (40mV/amp. 0.6v=0amps, 5.0v=110amps) and is connected to the ADC_3 (or ADC_4) pin. [[Image:NovakCurrentSensor.jpg|thumb|right|float|Novak 100A current sensor]]&lt;br /&gt;
&lt;br /&gt;
== Airframe integration ==&lt;br /&gt;
&lt;br /&gt;
In the FIRMWARE section of the airframe file add these lines:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;define name=&amp;quot;USE_ADC&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;USE_ADC_3&amp;quot;/&amp;gt;    &amp;lt;!-- motor current--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the BAT section of the airframe file add these lines:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;define name=&amp;quot;ADC_CHANNEL_CURRENT&amp;quot; value=&amp;quot;ADC_3&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;define name=&amp;quot;MilliAmpereOfAdc(adc)&amp;quot; value=&amp;quot;(88*adc)&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and remove the line:&lt;br /&gt;
  &amp;lt;define name=&amp;quot;MILLIAMP_AT_FULL_THROTTLE&amp;quot; value=&amp;quot;12000&amp;quot; unit=&amp;quot;mA&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The correct multiplier for the raw measurement conversion depends on the current sensor. The Sparkfun sensor returns a linear voltage of 0 V - 3.3 V and at 90.15 A it reaches the maximum of 3.3 V. The TWOG v1 or Tiny v2 have a A/D converter with 10-bit precision (1024 different values) to represent the voltage. So you can calculate the multiplier with the following formula:&lt;br /&gt;
&lt;br /&gt;
'''1000 / precision * A_at_max_voltage'''&lt;br /&gt;
&lt;br /&gt;
For the Sparkfun sensor, the precision is 1024 and A_at_max_voltage is 90.15 =&amp;gt; 1000/1024*90.15 = 88.037&lt;br /&gt;
&lt;br /&gt;
For the ACS755LCB-100 sensor, there is a 0.6 volts offset. At 3.3v, the current is 67.5A. The formula is thus: value=&amp;quot;(80.55*(adc-185))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Display on Ground Control Station (GCS) ==&lt;br /&gt;
&lt;br /&gt;
Use the Messages application to show it.&lt;br /&gt;
&lt;br /&gt;
The total energy consumed during the flight (in mAh) is sent in the &amp;quot;BAT&amp;quot; message. &lt;br /&gt;
&lt;br /&gt;
The actual current flowing through the sensor (in mA) is sent in the &amp;quot;fbw_status&amp;quot; message. &lt;br /&gt;
&lt;br /&gt;
You can display the energy or current on the GCS by just dragging and dropping them on the 2d map.&lt;br /&gt;
&lt;br /&gt;
== Voltage Sensor ==&lt;br /&gt;
&lt;br /&gt;
If you would like to install the autopilot on a bigger airframe, you can face the problem, that the nominal voltage of the accupack is higher then allowed for the autopilot. (i.e. 6 cell LiPo and TWOG ) But if you use a voltage regulator, then the autopilot has no information on the real voltage of the accupack. The GCS will show the autopilot input voltage, which is irrelevant regarding the remaining capacity of the accupack. Fortunately the Sparkfun Attopilot Current Sensor provides a voltage signal scaled down to 3.3V, too. This can be connected to a general analog input of the autopilot (for example ADC_4) similar to the current signal. If you configure the airframe file in the following way, the autopilot will provide all of the warnings (i.e. Battery Low) and calculations (i.e. power consumption) as it does in case of a direct connection between autopilot and accupack. &lt;br /&gt;
&lt;br /&gt;
Firmware section:&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_ADC&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;USE_ADC_4&amp;quot;/&amp;gt;    &amp;lt;!-- accu voltage--&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;ADC_CHANNEL_VSUPPLY&amp;quot; 	value=&amp;quot;ADC_4&amp;quot;/&amp;gt;&lt;br /&gt;
    .&lt;br /&gt;
&lt;br /&gt;
Then in Battery section:&lt;br /&gt;
  &amp;lt;section name=&amp;quot;BAT&amp;quot;&amp;gt;&lt;br /&gt;
    .&lt;br /&gt;
    &amp;lt;define name=&amp;quot;VOLTAGE_ADC_A&amp;quot; value=&amp;quot;0.05&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;VOLTAGE_ADC_B&amp;quot; value=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;VoltageOfAdc(adc)&amp;quot; value =&amp;quot;(VOLTAGE_ADC_A * adc + VOLTAGE_ADC_B)&amp;quot;/&amp;gt;&lt;br /&gt;
    .&lt;br /&gt;
    &lt;br /&gt;
You don't need to load special module for this purpose (i.e. adc_generic )!&lt;br /&gt;
&lt;br /&gt;
(The above method was tested with Sparkfun Attopilot Current Sensor and TWOG.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Sensors]] [[Category:Software]] [[Category:User_Documentation]]&lt;/div&gt;</summary>
		<author><name>Balazs</name></author>
	</entry>
</feed>