http://mikrocontroller.cco-ev.de/images/deu.gif Seite in deutsch

http://mikrocontroller.cco-ev.de/images/fra.gif page en français

See also: NaviCtrl, MKGPS, MK3MagAufbau

MK3Mag

Here we are dealing with a 3-axis magnetic field sensor. Utilising current attitude data it forms a tilt compensated Compass. The MK3Mag can be used on its own together with the Flight Ctrl to stabilise rudder control or in combination with the NaviCtrl. The MK3Mag is supported by the FlightCtrl from software version 0.69K upwards.

Top side

Lower side

http://gallery.mikrokopter.de/main.php/v/tech/MK3mag_oben.jpg.html

http://gallery.mikrokopter.de/main.php/v/tech/MK3mag_unten.jpg.html


{i} Instruction for MK3Mag for self assembly (Green PCB’s)... see here MK3MagAufbau

General Points

The highest Interfering Magnetic field is generated by: Buzzer, Motors, Power Cables and Metal Parts (In approx. this order).

If problems with the MK3Mag are only noticable at higher throttle, it is likely that the interfering magnetic field is generated by power lines. Ideally the individual DC-lines should have very few bends and Plus/Minus should be routed parallel as their magnetic fields are then compensated by each other (Tips and Video).

http://www.mikrokopter.com/files/KompassDreht.wmv

Connection to the FlightCtrl

Attach (solder) the 10 pole pin row onto the SIDE of the MK3Mag and connect to the FlightCtrl using a 1:1 Ribbon Cable. To see the FC and Compass together on the Kopter tool, press a Pin Header (PFL10SK) onto the cable.

Instalment direction: Processor pointing up and outer pin row pointing towards the 10 pole pin row on the FlightCtrl

Special attention should be taken to ensure that the MK3Mag is Level (i.e.: parallel towards the FC). An angle of 5° for example would have the effect of an error of >5°.

http://gallery.mikrokopter.de/main.php/v/uploads/MK3mag_verkabelung.jpg.html

Set transmitter trim to 0

/!\ Important: The Trim (Rudder) must be set to 0 (zero) on the transmitter!

Use the MikroKopter Tool "Display" to check that the rudder (Gier) is set to 0 and adjust using transmitter as appropriate – There may be a small discrepancy between the transmitter and kopter tool rudder value – ensure that the kopter tool one is at 0!.

Reason: From a Stick-Value of +/- 16 the Mikrokopter assumes an "intended" control and no longer actively holds the current rudder position! The Gyro drift would then occur as if no compass was activated.

Calibration

/!\ Important: When first operated, the MK3Mag needs to be correctly calibrated!

A useful help for this can be a box onto which the MK can be mounted or placed into while the box is rotated for calibrating the MK3Mag.

Calibration is carried out as follows:

  1. Pull back elevator (down) and Full Throttle whilst Rudder left, as if you wanted to choose setting 7 (There will be One Beep and the LED on the Compass will flash once every 2 seconds.

  2. Now take the MK, ensure that it is perfectly horizontal and pull back on the elevator stick (there will be two beeps, the LED will flash 2 times every 2 seconds). Now turn the MK several times horizontally around its z axis. Following this pull back on the elevator. If the first axis has been successfully calibrated, there will be three beeps and the LED will flash 3 times every 2 seconds.

  3. Now hold the MK at motor #1 (front) and let the MK drop down vertically. Try to get the axis between motor #1 and #2 as vertical as possible.
  4. For Calibration, pull again on the elevator stick (there will be Four beeps and the LED will flash 4 times every 2 seconds), and rotate the MK in its hanging position a few times around its vertical axis. Finish the procedure by pulling back on the elevator stick (there will be one beep).

/!\ During the calibration it is important that movements are exclusively only present on the calibrated axis.


MK3Mag/kompass_kalibrierung.png

Quick video instruction:

MK3Mag and MK-Tool

To activate the Compass use the Kopter tool (connected to FC) and under Settings->Configuration place a tick on Kompass (Compass).

The KopterTool can also be used to verify the Calibration. To do this set the scope to display the values: KompassValue, Ersatzkompass and MK3MagCalState and turn the Kopter slowly. The angle change should be displayed proportional to the rotation of the Mikrokopter.

MK3Mag/MK3Mag_MKTool.jpg

(to do: What does MK3MagCalState=0 kalibriert mean? What other values can the variable receive?)

{i} A Digital Compass value is also available in the LC-Display under [2] (See Picture)

Circuit Diagram

http://gallery.mikrokopter.de/main.php/v/tech/MK3MAG_V1_1_SCH.jpg.html

Assembly Scheme

TOP

BOTTOM

http://gallery.mikrokopter.de/main.php/v/tech/MK3MAG_V1_1_TOP.jpg.html

http://gallery.mikrokopter.de/main.php/v/tech/MK3MAG_V1_1_BOT.jpg.html

{i} A detailed assemebly instruction (currently in German) can be found here hier.

Italic displayed parts are on the lower side, yellow sections are components that are included with the self assembly version

Quantity

Component

Notes

Part

Name

1

Atmega168-20AU

note markings, Use Flux!

Controller

IC1

3

KMZ51

note markings, Use Flux

Hall sensor

IC3, IC5, IC7

1

LM324D

note markings

Quad OP Amp

IC2

1

FMMT617

NPN-SOT23

Transistor

T1

1

FMMT717

PNP-SOT23

Transistor

T3

1

SMD-LED Grün

note direction

CHIPLED

LED1

1

1k SMD-0805

Resistor

R33

1

18k SMD-0805

Resistor

R10

3

X7R-G0805 22pF

Resistor

C8, C9, C12

2

47R SMD-0805

Resistor

R7, R32

3

270k SMD-0805

Resistor

R1, R3, R5

6

X7R-G0805 100nF

Capacitor

C3, C5, C6, C7, C11, C15

7

X7R-G0805 1µF

(available as 1000nF at Farnell)

Capacitor

C2, C16, C18, C19, C20, C21, C22

2

SMD Tantal 10µF/10V

Type B, note direction!

Capacitor

C1, C17

Optional (not required for use with MK)

1

LIS344AHL

noe poles

ACC-Sensor

IC4

1

MCP1700T-3002E/TT

Voltage Regulator

IC8

1

X7R-G0805 1 µF

Capacitor

C23

4

X7R-G0805 100nF

Capacitor

C4, C10, C13, C14

Loading Software

{i} On preassembled (red) boards, the bootloader is already programmed.


/!\ Important: For Flashing of the Bootloader and the Firmware, the MK-Tool V1.52 or greater is required!



The Fuses for avrdude should be set as follows: lfuse:0xe2 , hfuse:0xdd , efuse:0x00
The Fuses in Ponyprog should be set as follows:
http://gallery.mikrokopter.de/main.php/v/tech/fuse.gif.html

Flashing Bootloader

http://gallery.mikrokopter.de/main.php/v/tech/boot.gif.html

Flashing Firmware

http://gallery.mikrokopter.de/main.php/v/tech/flash.gif.html

Firmware (SVN)

Sources and Hex Files can be found here:

Link to SVN



KategorieEnglish

en/MK3Mag (last edited 30.08.2010 18:04 by Brunweil)