Blockset described on this wiki is deprecated since 2012.
For Model Based Design (MBD), use the free MPLAB Device Blocks for Simulink, tool from Microchip.
Updated Rapid Control Prototyping (RCP) custom projects are published at: https://lubin.kerhuel.eu.
MEMS based Autopilote on dsPIC for RC model airplane
Contents
The RC model airplane
The airplane is a Delta wing called IXIR II chosen for its good flight performance, simplicity to build , robust to crashes and low cost (based on low cost construction material). The plane was created by ... who gives all instruction to build it on its website: ... (French)
Caracteristics :
- 1m25 wingspan
- 400g weight
- 2 actuated surfaces
Embedded System
The plane is equipped with standard RC components. A sensor board with a calculator are added into the plane. Finally, a solution for telemetry is also placed in the plane to retrieved in flight datas.
Classical RC Material
The classical RC material is made of
- one 6 channel receiver (GWS 610)
- Two servo motor (HPX )
- 4 accumulator NiMh placed in the noise of the plane
- A beeper is also added. The plane can thus emit a sound to provide different indications and after a crash, to help research.
Calculator
The calculator (dsPIC 30f4012) is the brain of the plane. It is connected to all different sensor and actuator embedded in the plane. Thus, it receives all data from both the RC receiver and the sensor board embedded in the plane. Algorithms can use theses data to estimate the plane attitude (IMU) and to control the plane (feedback controller).
Sensors
Micro Electro-Mechanical Sensor (MEMS) are used to estimate the attitude of the plane. Theses sensors have many advantages : They are small, lightweight, low power consumption, robust from the mechanical point of view (i.e. crashproof) and some are precise (rate gyro).
Two different type of MEMS feed the IMU algorithm:
- rate gyro (ADIS 16080 from analog device)
- Accelerometers (MMA7260) from freescale
The rate gyro measures the angular speed of the plane. Each ADIS16080 measure the angular speed on one axis, three of them are used to measure speed rate on the three axes.
The MMA7260 measure the forces due to the acceleration or gravity applied on itself. This component measures the acceleration on the 3 axis. The measure is 0 on the three axes only in 0G condition (free fall without friction). Otherwise, the gravity is measured as acceleration.
From both the rate gyro and the accelerometers, it is possible to compute the attitude of the plane. For more details on the calculation details, see the page dedicated to the Inertial Measurement Unit (IMU). Weight : Servos GWS HPX : 19g (X2) DC DC converter MCP1252-33X50 - MCP1253-33X50 (3.3V) ==> 2.92g DC DC converter (5.0V) ==> 3.73g Beeper : 3.95g SST SST25VF016B 16 Mbit SPI Serial Flash ==> 3.95g Card dsPIC 30f4012 ==> 17.87g Recepteur RS610 ==> 7g Capteurs Inertiels (2 gyro + 1 accelero) ==> 8.29g
boite maxim DALLAS : 9.35g
total : 85.71g
Recording In Flight Data
The plane is an experimental platform to test IMU algorithms and AutoPilote (AP) Flight controller. IMU algorithms tested on the earth provide good results. However, in flight dynamic condition are difficult to mimic by handshaking the Miniature IMU. Thus, Telemetry gives a possibility to get an insight on data in flight conditions. It can be used for both logging raw sensor data and to log the embedded calculation result.
Data logged from raw data are typically used in simulation and allow improving algorithms.
The two methods to log data are
- place a data recorder in the plane (Solutions with SD cards)
- transmit data to a base-station using a wireless transmission system (Telemetry)
Both methods were explored. First a data-logger based on the SST EEPRPOM technology was developed. However, due to difficulties to cope with data recording time constraints, a wireless telemetry system was developed and installed onboard the plane. This wireless technology based on Free2Move Bluetooth card works. In flight data presented were recorded with this system. I will describe the two system developed.
Data Recorder
SST
16 Mbits that is in a more common unit 2Mo. This is already a nice capacity.
Methods based on SD cards have capacity even bigger (up to 4Go) but are more complex to use.
Telemetry
Classical Bluetooth system can transmit/receive data in a small range of 10m (Class 1). However, some Bluetooth system can transmit to up to 100m (Class 3). Free2move developed a Bluetooth receiver that comply with the class 3 specification but the receiver is more sensitive allowing to receive data at 350m and more. (350m tested but not tested farther)
WT11 from Bluegiga
ZigBee solution
Rate gyro and Accelerometers data in flight
Airplane dynamics identification
Model : Two first order system describe respectively the pitch and roll dynamic of the plane.