Difference between revisions of "Booz"

From PaparazziUAV
Jump to navigation Jump to search
 
(29 intermediate revisions by 7 users not shown)
Line 1: Line 1:
<div style="float: right; width: 30%"><categorytree style="float:right; clear:right; margin-left:1ex; border: 1px solid gray; padding: 0.7ex;" mode=pages>Autopilots</categorytree></div>
<div style="float: right; width: 40%">[[Image:booz_logo.jpg|480px|right]]</div>
== Overview ==
== Overview ==
<p>Booz is an extension of Paparazzi to VTOLs. At the current stage of the project, the system provides attitude stabilization, vertical guidance and automatic navigation. It is able to use simple Paparazzi flight plans ( only go instructions ) and uses Paparazzi telemetry and datalink, which means all the Paparazzi ground segment applications are available( plotter, settings, gcs, etc...)</p>
<p>Booz is an extension of Paparazzi to VTOLs. At the current stage of the project, the system provides attitude stabilization, vertical and horizontal guidance and automatic navigation. It is able to use Paparazzi flight plans and uses Paparazzi telemetry and datalink, which means all the Paparazzi ground segment applications are available( plotter, settings, gcs, etc...)</p>


<p>The current autopilot consist in 3 boards</p>
<p>The current avionics consist of 3 boards</p>
[[Image:booz2_main.jpg|240px]]
[[Image:booz2_main.jpg|240px]]
[[Image:booz2_imu.jpg|240px]]
[[Image:booz2_imu.jpg|240px]]
Line 8: Line 10:


* The main board, comprising power supply, a LPC2148 and a barometer.
* The main board, comprising power supply, a LPC2148 and a barometer.
* The IMU board, comprising gyroscopes, accelerometers, magnetometers and a 16 bits ADC.
* The IMU board, comprising gyroscopes, accelerometers, magnetometers and a 16-bit ADC.
* The GPS board, using a LEA-5H by ublox.
* The GPS board, using a LEA-5H by ublox.


Line 27: Line 29:
[[Image:booz2_a5.jpg|240px]]
[[Image:booz2_a5.jpg|240px]]


== Program Sources ==
== Simulator ==


Everything is at savannah.  
Paparazzi features the advanced [[NPS]] simulator which can serve many purposes, from learning how to operate a vehicle to evaluating control or estimation algorithms.
-hardware in paparazzi4/trunk/hw/booz
-code in paparazzi3/trunk


== Hardware ==
== Hardware ==
Line 43: Line 43:
The power board allows to switch power on and off on your vehicle as well as to make a clean wiring by avoiding wired Y
The power board allows to switch power on and off on your vehicle as well as to make a clean wiring by avoiding wired Y


[[BoozPowerBoard]]
more info in [[BoozPowerBoard]]
 
=== Booz GPS ===
more info in [[BoozGPSBoard]]


=== IMU ===
=== IMU ===
Booz has support for its custom designed IMU as well as for [http://www.cloudcaptech.com/ Cloudcap] Crista IMU
Booz has support for its custom designed IMU as well as for [http://www.cloudcaptech.com/ Cloudcap] Crista IMU


[[BoozIMU]]
more info in [[BoozIMU]]


=== Autopilot ===
=== Autopilot ===
[[BoozAutopilot]]
Current version of Booz autopilot is based on a lpc2148
[[Lisa]]
 
=== Airframes ===
[[BoozAirframes]]


===Purchasing Hardware===
more info in [[BoozAutopilot]]
<p>There are now vendors offering Booz hardware, Please see the [http://paparazzi.enac.fr/wiki/Get_Hardware Get Hardware] page for details.</p>


===Building Tips===
A new version of the autopilot, based on a STM32 is in development
<p>Since the Booz uses the same LPC2148 as the Tiny and TWOG autopilots and runs the same core code the documented steps are nearly the same for booz. Below more Booz specific tests are given. However after assembly you load the bootloader in the same way to enable programming via the USB interface.</p>
====Assembly Tips====
* BOM


more info in [[Lisa]]


=== Airframes ===


* Assembly Notes
One nice thing about quadrotors is that the mechanics being extremely simple, they can be build with very few tools.
* Expected voltages for newly created boards
Booz mounting holes are compatible with popular of the shelf frames.


====Loading the USB Boot Loader====
more info in [[BoozAirframes]]
<p>This is virtually the same steps as for all other LPC2148 based Paparazzi autopilots. Just the cable is different. Using UART0/serial to load the image.</p>
<p>Create an adapter cable that has Tx/Rx and Ground along with the ability to hold P0.14 low (i.e. grounded). My cable has P0.14 pin connected to ground as I have found P0.14 should be held low during the entire upload process. See the Eagle Schematic for the pinouts on the GPS connector you will use to upload (same connector as the Tiny/TWOG). NOTE: You can not use the same cable as the Tiny/TWOG.</p>
<p>
Steps:
<ol>
<li>Connect the "USB to FTDI cable" (#1 above) TTL ends to 8-pin Picoblade to FTDI board cable
<li>Connect the USB end to your Linux laptop (/var/log/messages should show a new device on /dev/ttyUSB0).
<li>Connect 8-pin adapter cable to "GPS" 8-pin Pico-Female on Booz Main "GPS" labeled connector
<li>Using common ground" set BOOT (P0.14) "low" and keep it held low (on GPS connector)
<li>Power on (~5v to 12v current limited power supply suggested)
<li>Enter this command in a terminal:
<pre>make upload_bl PROC=GENERIC</pre>
</ol>


NOTE: Success will mean you see this at the end in the terminal:
===Purchasing Hardware===
<pre>
<p>There are now vendors offering Booz hardware, Please see the [http://paparazzi.enac.fr/wiki/Get_Hardware Get Hardware] page for details.</p>
Synchronizing. OK
Read bootcode version: 2.12.0
Read part ID: LPC2148, 512 kiB ROM / 40 kiB SRAM (67305253)
Sector 0: .................................................. .............................................
Sector 1: .................................................. .........................
Download Finished... taking 6 seconds
Now launching the brand new code
ioctl get failed
ioctl set ok, status = 0
ioctl get ok, status = 2
ioctl get ok, status = 2
ioctl set ok, status = 2
ioctl set ok, status = 0
ioctl set ok, status = 0
</pre>
</p>
<p>What you need to see is the "Download Finished" message. Now you can remove Jumper and FTDI cable. From now on all programming is loaded using USB Adapter cable</p>
====USB Programming====
<p>Once the USB boot code is loaded (see above) you now program the autopilot via USB. To enable the LPC2148 to wait for programming on the USB interface you must power the board while the USB is connected to the ground station computer. When properly wired P0.21 will be fed 5v from the USB interface and at boot time that tells the LPC2148 to wait for programming over USB. Once programmed the board will rest itself and run the programming (even if you leave the cable attached).
</p>
<p>Steps
<ol>
<li>Connect the USB cable from the computer to the Booz Main USB connector</li>
<li>Power on the Booz Main board</li>
<li>On the Linux (computer) side dmesg should show you a new detected USB device</li>
<li>In Paparazzi Center click "Upload" and wait for the ####### message to show the code is being uploaded.
</ol>
That's it.
</p>
 
== Running a simulator ==
 
[[BoozSimulator]]


== Hardware Test ==
== Hardware Test ==


Booz comes with a number of simple test programs that you can use to validate a newly assembled board or learn how booz code works in case you want to extend it.
Booz comes with a number of simple test programs that you can use to validate a newly assembled board or learn how booz code works in case you want to extend it.
The ''Makefile'' for those is in ''conf/autopilot/booz2_test_progs.makefile''
=== test_downlink ===
Paparazzi's Makefile allow you to build different ''TARGETS'' (aka programs) using a doted notation. The begining of the ''Makefile'' reads
<syntaxhighlight lang="make">
#
# test downlink
#
test_downlink.ARCHDIR = $(ARCHI)
test_downlink.ARCH = arm7tdmi
test_downlink.TARGET = test_downlink
test_downlink.TARGETDIR = test_downlink
#
test_downlink.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) $(BOOZ_CFLAGS)
test_downlink.CFLAGS += -DPERIPHERALS_AUTO_INIT
test_downlink.srcs  += $(SRC_BOOZ_TEST)/booz2_test_downlink.c
test_downlink.CFLAGS += -DUSE_LED
test_downlink.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./10.))' -DTIME_LED=1
test_downlink.srcs  += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c
#
test_downlink.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600
test_downlink.srcs  += $(SRC_ARCH)/uart_hw.c
#
test_downlink.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart1
test_downlink.srcs  += downlink.c pprz_transport.c
</syntaxhighlight>
FIXME: More on this when syntax highlighting/line numbering works
The command line to compile the "test_downlink" target for the BOOZ2_A1 aircraft would be
make AIRCRAFT=BOOZ2_A1 test_downlink.compile
and to upload this program to your board ( you don't really need to type the previous command, make is smart and will compile your program if needed when you ask him to upload it )


make AIRCRAFT=BOOZ2_A1 test_downlink.upload
more info in [[BoozHardwareTest]]


== Software ==


=== test_max1168 ===
=== Peripheral support ===


the ''max1168'' is the 16 bits analog to digital converter chip used on the IMU to sample gyros and accels.
{|border="1"  cellspacing="0" style="text-align:center" cellpadding="6"
!''Type #''!!''Model''!!''Booz''!!''Lisa/L''
|-
|IMU       ||Boozv1  ||yes||yes
|-
|          ||crista  ||yes||yes
|-
|          ||mti      || ? ||no
|-
|          ||vn100    ||?  ||no
|-
|RC        ||PPM      ||yes||no
|-
|          ||spektrum ||yes||yes
|-
|Actuators ||asctec  ||yes||yes
|-
|          ||mkk      ||yes||yes
|-
|          ||servospwm|| 2 || 6
|-
|          ||CAN      ||no || in progress
|-
|}


make AIRCRAFT=BOOZ2_A1 test_max1168.upload




== Sensors Calibration ==
== Sensors Calibration ==


All our sensors needs to be calibrated in order to provide useful informations.  
All the sensors needs to be calibrated in order to provide useful informations. The calibration process needs to be performed after the assembly of the vehicle is complete.
 
Accelerometers and Magnetometers calibration is critical for AHRS performances and can be performed using no special hardware. For the magnetometer, it is even very important that the calibration be performed in the fully assembled vehicle, with all systems powered. This is the so-called hard-iron calibration and will allow us to compensate for any constant parasitic magnetic field generated by the vehicle.
The calibration process consist in finding a set of neutrals and scale factors for each sensor, such as
 
 
<math>
\begin{pmatrix}physical\_value_x\\physical\_value_y\\physical\_value_z\end{pmatrix} = \begin{pmatrix}sf_x&0&0\\0&sf_y&0\\0&0&sf_z\end{pmatrix} * (\begin{pmatrix}sensor_x\\sensor_y\\sensor_z\end{pmatrix}-\begin{pmatrix}n_x\\n_y\\n_z\end{pmatrix})
</math>
 
 
The principle of the calibration is the following : An accelerometer, on a vehicle at rest measures a constant vector ( the opposite of gravity ) in the earth frame, expressed in the vehicle frame. 
 
<math>
DCM * \begin{pmatrix}0\\0\\-9.81\end{pmatrix} =
\begin{pmatrix}sf_x&0&0\\0&sf_y&0\\0&0&sf_z\end{pmatrix} * (\begin{pmatrix}sensor_x\\sensor_y\\sensor_z\end{pmatrix}-\begin{pmatrix}n_x\\n_y\\n_z\end{pmatrix})
</math>
 
 
DCM is a rotation matrix that converts between earth frame and body frame. It will change when we change the orientation of the vehicle. Nevertheless, a rotation conserves the norm of a vector. We can thus obtain the following scalar equation that doesn't depend on the vehicle orientation :
 
 
<math>
9.81^2 = ( sf_x(sensor_x-n_x) )^2 +  (sf_y(sensor_y-n_y) )^2 +  (sf_z(sensor_z-n_z) )^2
</math>
 
We can then record an important number of measurements in different orientations and find the set of scale factor and neutral giving the norm closest to 9.81
 
Booz comes with a ( very unfriendly ) scilab script to perform this operation ( sw/tools/calibration/calib_accel_mag.sce ). Here is the way to use it
 
Switch to the "raw sensors" telemetry mode and launch "server" to record a log.  


Move the quad in different orientations ( upright, inverted, on nose, on tail, on right side, on left side ) . You can also take some measurememts banking 45 degres.  
**Note:  The barometer on the Booz Main board is designed to work between -300 to 928 meters MSL.  In this range it will create a zero offset, and then give 10cm resolution for 100 meters of altitude.  BEWARE! if you fly above 100m the ADC will saturate.  In addition, if you are someplace that is above 928 meters MSL the baro will not calibrate on boot, and will not output values.  If you look at the RAW messages you will see that the BARO_RAW message reads 0 for both values.  To fix the latter issue, the Value of R20 on the Main board can be changed to change the range.  An example: If R20 is changes from a 560ohm to a 100ohm resistor, the new measurable range would be from -300 to 1800 meters.  Because this changes the gain on the sensor it will also change the amount of altitude you can read from the ADC. For this case we reduce the amount to ~90 meters.


Try to get an homogeneous distribution of your measurements. I find it better to let the quad rest while measuring. You can then run the scilab script to get your calibration coefficients.  It first makes an initial guess using min and max, ie for each axis
more info in [[BoozSensorsCalibration]]


neutral = 0.5 * (max + min)
== GCS notes ==
* If you set your ground modems for an interface rate different than 9600bps you need to add a flag to the "link" program on startup. In GCS if you use "Execute" you will see "link" is the first. You can click stop, then modify the command line by clicking in the text area. Add the -s flag with the baud rate you use. In my case 57600. So I use: -s 57600. Then click "Redo" and link will be restarted with the new flag and value (and you will start seeing messages and GCS wil populate). So you don't have to repeat this each time do "Save Session" and this will save the changes.


sensitivity = 0.5*(max-min)
== Airframe settings and Flight testing ==
* [[BoozAirframe]]


It then uses scilab's "datafit" algorithm to optimise the initial guess
== User Gallery ==


[[Image:calibAccel.png|240px]]
This page holds a list of current Booz users


[[BoozUserList]]


Note for magnetometer:
[[Category:Autopilots]] [[Category:Booz]]

Latest revision as of 15:53, 20 June 2012

Booz logo.jpg

Overview

Booz is an extension of Paparazzi to VTOLs. At the current stage of the project, the system provides attitude stabilization, vertical and horizontal guidance and automatic navigation. It is able to use Paparazzi flight plans and uses Paparazzi telemetry and datalink, which means all the Paparazzi ground segment applications are available( plotter, settings, gcs, etc...)

The current avionics consist of 3 boards

Booz2 main.jpg Booz2 imu.jpg Boozassy2.jpg

  • The main board, comprising power supply, a LPC2148 and a barometer.
  • The IMU board, comprising gyroscopes, accelerometers, magnetometers and a 16-bit ADC.
  • The GPS board, using a LEA-5H by ublox.

Additional Booz boards:

Med BoozPower03.jpg

  • The "power" board.

It flies on a variety of Quad-rotor platforms

Small quad.jpg Booz2 a2.jpg Booz2 a1.jpg

and less common vehicles

Booz2 a4.jpg Booz2 a4 2.jpg Booz2 a5.jpg

Simulator

Paparazzi features the advanced NPS simulator which can serve many purposes, from learning how to operate a vehicle to evaluating control or estimation algorithms.

Hardware

Motor controllers

Booz is able to handle a number of quadrotor specific brushless motor controllers.

more info in BoozMotorControllers

Power board

The power board allows to switch power on and off on your vehicle as well as to make a clean wiring by avoiding wired Y

more info in BoozPowerBoard

Booz GPS

more info in BoozGPSBoard

IMU

Booz has support for its custom designed IMU as well as for Cloudcap Crista IMU

more info in BoozIMU

Autopilot

Current version of Booz autopilot is based on a lpc2148

more info in BoozAutopilot

A new version of the autopilot, based on a STM32 is in development

more info in Lisa

Airframes

One nice thing about quadrotors is that the mechanics being extremely simple, they can be build with very few tools. Booz mounting holes are compatible with popular of the shelf frames.

more info in BoozAirframes

Purchasing Hardware

There are now vendors offering Booz hardware, Please see the Get Hardware page for details.

Hardware Test

Booz comes with a number of simple test programs that you can use to validate a newly assembled board or learn how booz code works in case you want to extend it.

more info in BoozHardwareTest

Software

Peripheral support

Type # Model Booz Lisa/L
IMU Boozv1 yes yes
crista yes yes
mti ? no
vn100 ? no
RC PPM yes no
spektrum yes yes
Actuators asctec yes yes
mkk yes yes
servospwm 2 6
CAN no in progress


Sensors Calibration

All the sensors needs to be calibrated in order to provide useful informations. The calibration process needs to be performed after the assembly of the vehicle is complete.

    • Note: The barometer on the Booz Main board is designed to work between -300 to 928 meters MSL. In this range it will create a zero offset, and then give 10cm resolution for 100 meters of altitude. BEWARE! if you fly above 100m the ADC will saturate. In addition, if you are someplace that is above 928 meters MSL the baro will not calibrate on boot, and will not output values. If you look at the RAW messages you will see that the BARO_RAW message reads 0 for both values. To fix the latter issue, the Value of R20 on the Main board can be changed to change the range. An example: If R20 is changes from a 560ohm to a 100ohm resistor, the new measurable range would be from -300 to 1800 meters. Because this changes the gain on the sensor it will also change the amount of altitude you can read from the ADC. For this case we reduce the amount to ~90 meters.

more info in BoozSensorsCalibration

GCS notes

  • If you set your ground modems for an interface rate different than 9600bps you need to add a flag to the "link" program on startup. In GCS if you use "Execute" you will see "link" is the first. You can click stop, then modify the command line by clicking in the text area. Add the -s flag with the baud rate you use. In my case 57600. So I use: -s 57600. Then click "Redo" and link will be restarted with the new flag and value (and you will start seeing messages and GCS wil populate). So you don't have to repeat this each time do "Save Session" and this will save the changes.

Airframe settings and Flight testing

User Gallery

This page holds a list of current Booz users

BoozUserList