APM 2.52 Flight Controller Board

From Geeetech Wiki
Revision as of 06:42, 30 August 2014 by Admin (talk | contribs) (Documents)

Jump to: navigation, search

Introduction

10.jpg

APM is a open source flight control system, it is a multifunction system that can support quadrocopter, as well as aircrafts of fixed -wing, three-axis, 6-axis,8 –axis etc. APM flight control is a rather mature technique with formidable capabilities: it supports GPS designated cruise and automatic return; supports data transmission to realize the remote receiving of real-time data from the aircraft; supports pan-tilt control technique of professional cameras to ensure anti-vibration aerial photograph; supports peripheral interfaces as airspeed meter and galvanometer to ensure stable flight and low voltage protection of voltage detection in real time.

The APM2.52 Control Board is used for make UAV. This version is ready to use, with no assembly required. It allows the user to turn any fixed, rotary wing or multirotor vehicle (even cars and boats) into a fully autonomous vehicle, capable of performing programmed GPS missions with waypoint.

Features

1. Adapts PPM decoder chip- Atmega32U2 to take charge of the surveillance and controlling of PWM signal of mode channel so as to switch between manual mode and other modes, thus improving the security of the whole system.

2. The directional data provided by the inertial measurement unit (two-axis gyro and single-axis gyro) and triaxial accelerometer (to measure the speed of three axes and accelerate the speed), cooperating with the three axis magnetometer or GPS can be corrected to realize directional cosine algorithm and calculate the attitude of aircraft.

3. Integrated with MPU6000 (three-axis gyroscope + triaxial accelerometer), MS5611 berometer and HMC5883L three axis electronic compass.

4. Supports data transmission to realize the remote receiving of real-time data from the aircraft.

5. Supports pan-tilt control technique of professional cameras to ensure anti-vibration aerial photograph.

6. Supports airspeedometer to measure the airspeed of aircraft.

7. Supports airspeedometer to ensure stable flight and low voltage protection of voltage detection in real time.

8. Integrated with 12-bite high-precision AD chip which can convert the analog voltage output by airspeedometer and the temperature output by three-axis gyroscope, triaxial accelerometer and dual-axis gyroscope into digital value.

Overview and Hardware Resources

10.jpg APM 2.52 FRONT.jpg

1. ATMEHA2560 chip, MEGA32U2 PPM decoder,16M FLASH memory.

2. MPU6000 three-axis gyroscope + triaxial accelerometer, MS5611 highly sensitive berometer, HMC5883L Three axis electronic compass

3. 8 channels of signal input

4. 8 channels output of steering-engine and electronic speed controller

5. Multiple interfaces:

--I2C,

--PM,

--Voltage transducer

--Current transducer

--GPS interface that supports MTK Protocol

--Air Radio data transmission and OSD image transmission

--ACM ultrasound waves and APM airspeedometer

6. pan-tilt output channel

Size: 64mmx40mm

Weight: 18.8g

Software Resources

Compiling environment:Media:Arduino-1.5.6-r2-windows.zip

Firmware:Media:MissionPlanner-1.2.59.rar

PC soft ware:Media:MissionPlanner-1.2.59.rar

Component:Media:DotNetFx40 Full x86.rar

Interfaces

Interface Layout and specifications

APM interfaces.jpg

LED indicators details:

1. Light Alive, on the bottom right corner of the board, beside the GPS module interface, is normally on in energized state (dynamic electricity or power supplied by USB).

2. Light TX and RX, in parallel with light alive will blink during data transmission, for example, when the board is connected with the computer or when the data transfer radio is under communication.

3. Parallel LED A, B, C on the bottom left corner of the board, under the output header.

4. Light A is the most critical one; its blink indicates the flight controller is under Disarm status; the operation of the throttle on the remote control will not activate the motor. Only when you steer the rudder to the right-most and keep at least 4 seconds can the motor be activated, the light will be normally on then, and it is ready for flight now. Note that, do make sure the light is blinking when debugging and moving it on the ground to avoid unnecessary dander.

5. Light B is hardly used, you can ignore it; it is blue, indicating the status of GPS. If GPS has searched satellite positioning, the light is normally on; if not, it will blink. If there is no GPS, the light is off. Your aircraft should not take off until the blue light is on, or it will see the positioning as waypoint.

Jumper Instruction

APM jumper.jpg

JP1: plug in the jumper cap, the controller board can be powered by ESC.

Development Environment setting

Development Environment setting

APM connecting.jpg

File Burning

All our products have been tested rigorously before shipping, bootloader and firmware for quadrocopter ( X-model) have been burned, if you need to burn firmware for aircrafts with fixed –wing or other multi-axis aircrafts, you can refer to the following steps: 1. Select the COM port and Baud rate. Before uploading firmware, you should connect your APM 2.52 flight controller board to the PC with a matching USB cable, make sure the PC has recognized the COM port of APM, open Mission Planner (hereinafter referred to as MP), the select of COM port is in drop-down box on the upper right corner of the home page of MP, choose Arduino Mega 2560, then set the Baud rate as 115200.

Note:

①Do not click connect button, it will be connected automatically during the process of firmware installation; if you have connected it with APM, please do to click Disconnect here or you will receive an error during the installation.

②Do not use wireless data transmission to install firmware, though it has the same communication function with USB, it has no reset signal, which means Arduino Mega 2560 can’t be reset in firmware upgrading, leading to the failure of installation.

APM connect.jpg

2. Click INSTAL SETUP-Install Firmware

APM firmware install.jpg

3.choose the firmware you want to install.

APMfirmware choose.jpg

4. Click Install Firmware, the latest firmware downloaded automatically from the internet will appear on the right side of the interface in form of images corresponding to the model of the aircraft and the name of the firmware. You just need to click the image, MP will finish the following automatically, no need for manual intervene, including downloading the firmware, connecting it to APM, writing and verifying the program and disconnecting it. If you want to use a history version, please click Beta firmware pick previous Firmware on the bottom right corner. Choose the firmware you need in the drop-down box.

Firmware that is after the 3.1 will give a warning box after the installation:

Warning1.jpg

It is reminding you that: after the unlocking of this firmware, your motor will operate at idle speed. If you want to close or configure this function, please configure the MOT_SPIN_ARMED parameter. (Detailed instruction will be given in the part of parameter configuration.) When it shoes Done, you can click the connect button to connect it to APM, and check its operating status and real-time data.

Software Setting

The installation of earth station debugging software—Mission Planner

To install Mission Planner, you need the assistance of the plug-in, Net Framework 4. Please download the Net Framework 4.0 and install it first. After the installation of Net Framework 4.0, you can download the Mission Planner Installation Package. (The latest version is recommended) Note: two different versions, MSI and ZIP are provided on the download page. MSI is an application installation package, APM USB driver will be installed together with the Mission Planner, and you can use it with an APM USB cable directly. ZIP is Green Software package, no need for installation. You can use it after unzip. However, you need to install the APM USB driver manually; the driver program is in the Driver folder. It is up to you to choose your preferred version. But if it is the first time you use it, MSI version is recommended. Let’s take MSI version as example: Note: do not connect the APM USB cable. Double click the MSI file, then click Next step by step till the Device driver instauation wizard prompts up, click next-continue, or the system will skip the installation of driver.

Notice to read first

When the board is powered with USB, and USB is under connection, APM will cut off the communication function of data transmission interface, so please don’t connect data transmission and USB to APM simultaneously to test APM. USB interface is prior than data transmission interface. (USB cable for power supply only is not included here) As to first-time users of APM autopilot, you are advised to get started step by step: 1. Install the ground station controlling software and driver first and get familiar with the menu features on the interface.

2. Learn to download firmware with a USB cable only.

3. Connect the receiver to the APM 2.52 board with USB cable to complete the calibrad of remote control, accelerometer and compass.

4. Complete the configuration of all kinds of parameters.

5. Assemble the aircraft and complete the safety inspection, then you can try your first flight.

6. Adjust the PID parameters.

7. Try advanced applications of APM.

Instructions on how to use the board

1) Before uploading firmware, you should connect your APM 2.52 flight controller board to the PC with a matching USB cable, make sure the PC has recognized the COM port of APM, open Mission Planner (hereinafter referred to as MP), the select of COM port is in drop-down box on the upper right corner of the home page of MP, choose Arduino Mega 2560, then set the Baud rate as 115200.

Note:

① Do not click connect button, it will be connected automatically during the process of firmware installation; if you have connected it with APM, please do to click Disconnect here or you will receive an error during the installation.

②Do not use wireless data transmission to install firmware, though it has the same communication function with USB, it has no reset signal, which means Arduino Mega 2560 can’t be reset in firmware upgrading, leading to the failure of installation.

2) Upon uploading a firmware of new version to APM 2.52 board, there are three things you need to do first:① calibrate the Radio Calibrad ② calibrate the accelerometer ③ calibrate the compass, the calibration which will affect the unlock process, and red prompts will appear continually on the interface of MP:

RC not calibrated.jpg

Radio Calibrad 1)First, connect your receiver to the APM control board,(refer to the pictures below, 3-4,3-5,3-6).Then connect them to PC with a USB cable, (you can also connect through data transmission). Then, turn on the transmitting terminal of your remote controller, run MP, and you can select the COM port and Baud rate according to the following steps. Last, click connect --Install setup——Mandatory Hardware——Radio Calibrated.

RC STEP.jpg

APM RC 1.jpg

APMRC2.jpg

RC3.jpg

2)Click the calibration button, you will receive the following two prompt massages,( That is very important, you are advised to connect USB and receiver to the APM board only in this step)

Warning2.jpg

3)Click OK and move all RC sticks and switches to their extreme positions, so the red bars can hit the limits.

Warning3.jpg

4)When the red bar hits the limits, click Click when done to save the calibration. The RC calibration completes after two OK windows popped up.

Note: if the red bar is not changed when you move the sticks, check if you have connected the receiver rightly and if every channel is corresponded.

APMRC 4.jpg


Compass Calibrad

COMPASS NOT CALLIBRATED.jpg

The calibration of compass and accelerometer are under the same menu. Click Mandatory Hardware--Install setup-- Compass, check the corresponding configuration and then click Live Calibrad.

APMcompass 1.jpg


The massage box will prompt up; reminding you to move you APM board around all axes in 60s.you can refer to the following directions.

Warning4.jpg

APM+ó+-¦µ-+9.jpg

Data will be collected during the rotate, and the system will record the data collected, the Samples data will accumulate constantly. If the data is not changed, please check if you have connected it correctly. A massage box to confirm the data will pop up 60s later; click OK to save the calibration.

Data collect.jpg

Click Done to save the calibration.

Accel Calibrad

INS NOT COLIBTATED.jpg


Connect APM to PC; open MP and connect. Click Mandatory Hardware-Install setup-Accel Calibrad-START.

APM+ó+-¦µ-+19.jpg

1)The following box pops up, reminding you to place you APM board at horizontal level and then press any key to calibrate.

Warning5.jpg

APM level.jpg

You are going to do the following calibration in the same way according to the instructions.

APMside .jpg

2)place APM on its left side.

Warning 6.jpg

APM left.jpg

3) place APM on its right side.

Warning7.jpg

APMright.jpg

4)place APM NOSE down.

Warning8.jpg

APM+ó+-¦µ-+13.jpg

5)place APM NOSE up.

Warning9.jpg

APM+ó+-¦µ-+14.jpg

6)place APM on its back.

Warning 10.jpg

APM+ó+-¦µ-+16.jpg

Done the 6 directions, the calibration is successful.

Warning11.jpg

PS: In case of danger, do not assemble the propellers during testing and calibration.

Tips for unlocking

After the calibration, you can try to unlock the APM board. (Motors don’t have to be connected; you can just connect it to the MP or check if the LEDs are unlocked.) The unlock of the APM board is based on the minimum value of the third channel and the maximum value of the fourth channel, that is when the throttle is at the lowest and the rudder is at the right-most.( PWM value is at the maximum),reaching these value, the APM board will be unlocked. When APM board receives the unlock signal, it will inspects itself and the red light will begin blinking. If the self-inspection passes, the unlock process succeeds, and the red light will be normally on. Meanwhile, the red DISARMED will turn into AMED in the ground station interface. The unlock process will takes 5s. Make sure your operation lasts at least 5s.

Note: APM will locks automatically if you did not take any action in 15s.


Lock Manually

the throttle is at the lowest and the rudder is at the left-most. (PWM value is at the minimum).

Close the unclock-idle speed function:

If you have connected motor and battery to unlock and the version of firmware you uploaded is the one after 3.1, the motor will operate at idle speed after unlocking to remind you that APM is under working now. Attention please, this function is very critical, if you don’t want to use it, you can close it in the following way: connect APM to MP, click Config/Tuning menu, choose Full Parameter List, find MOT_SPIN_ARMED, change its value into 0, (the default value is 70), now the idle speed function is closed. Don’t forget to click write parameter to save.

Skip the self-inspection unlock

There is a security mechanism for the unlock of APM, it will inspect the data of gyroscope, the Radio Calibrad, the pressure and the compass. If there is any problem with any of which, such as the gyroscope tilts excessively (the frame is not at flat level), or the pressure data anomaly, the APM board will not unlock, and the red light will blink quickly to show warning. If you don’t want to use this function, you can skip it. Connect APM to MP, click Config/Tuning menu, choose Full Parameter List, find ARMING_Check, change its value into 0, (the default value is 1), self-inspection is closed. In general, you’d better not close it.

Note: APM can only be unlocked under the following models: Stabilize,Acro,AltHold,Loiter. If it cannot be unlocked, please check if the flight model is right. You are advised to unlock APM under Stabilize model.

Flight model configuration

In the practical flight, the switch of function of APM is realized through the switch of flight model. There are many models for APM, but only 6 of them are allowed to be set. Plus the assist of CH7,CH8, there are 8 at most. That way, you need a Radio Calibrad that supports 6 channel PWM outputs that are switchable. Generally, the fifth channel is used to switch the model. (For fixed-wing aircraft, it is the eighth channel).when the PWM value of the fifth input channel is in the 6 intervals of 0-1230,1231-1360,1361-1490,1491-1620,1621-1749,1750+, the value of each interval can turn on a corresponding model, the recommended PWM values are 1165,1295,1425,1555,1685,1815nS.If you controller has this function, congratulations, you can configure the flight model according to the following instructions, if not, please refer to the enclosure document about how to transform your controller into one that can support 6 channels input. Or you can only configure 2 or 3 flight models.

Connect your APM board to MP before configuration, click Config/Tuning--Flight Modes, you can see the following interface:

Apm flight model.jpg

In the configuration interface, you can see clearly the corresponding PWM value of 6 models, whether to open easy model and super simile model. Choose the model you want in the drop-down box. For the sake of safety, you are advised to configure 0-1230 as RTL. Others can be configured according to your usual practice. But you should make sure the model switch can be switched to Stabilize model. Choose the 6 models, and click Save. After you finish the whole configuration, you can assemble the vehicle.

Assamble 1.jpg

APMassamlbe2.jpg

APMwiring.jpg

Flying

Flight Test Process

! Warning ! Read This Safety Section Before Flying - [1]Bold text

To Test Loiter and Altitude Hold:

1.Set up your APM so that Stabilize mode is at one extreme of your three-position mode select switch on your RC transmitter, Alt Hold mode is in the middle and Loiter mode is in the third position.

2.First, it´s important that Stabilize Mode is working OK. Set the Mode switch to Stabilize, turn on the transmitter and connect your battery. Wait until the GPS gets a lock. (Both the Blue GPS LED and the Blue C LED on the APM should be on and solid before arming and taking off). (It is even better to wait a bit longer to allow the GPS acquire additional satellites.) Note! the UBLOX GPS works differently On the UBLOX GPS the LED on the GPS module is off during satellite acquistion and on blinking when the satellite is acquired.

3.Start flying in Stabilize mode. Make sure you can take off, fly comfortably, and land. If you find it tilting, land and run the "Level" command in the Mission Planner. Fly through a whole battery like this, getting a feel for the controls (this will also calibrate your compass).

4.Now change batteries and try the auto modes. First, try Alt Hold at an altitude of about 20 meters. Your actual current throttle position is recorded as the "hovering point" when you switch to an altitude holding mode so it is important that you are not ascending or descending when you switch to Alt Hold. You should be able to fly around with the copter maintaining the same altitude, plus or minus a meter or so.

5.If that's working well, try Loiter. Just fly to a safe spot with lots of room around it and an altitude of about 20 meters and switch into Loiter. It should try to stay in that position, plus or minus about five meters.

6.When you have finished flying in Loiter or Alt Hold modes (or if anything unexpected or undesirable happens)switch back to Stabilize mode and land. (You cannot land and turn the motors off in Loiter or Alt Hold mode.)

APM Mission Planner GCS

Hud.jpg

The APM Mission Planner that we use for most APM setup and mission scripting also includes an excellent built-in ground station.

Details on how to use it are [2].

Documents

3-axis Gyro

3-axis Accelerometer

3-axis Digital Compass

High Resolution Altimeter


How to buy

Click here to buy: http://www.geeetech.com/apm252-flight-controller-board-p-858.html