See also: NaviCtrl, MKGPS, MK3MagAufbau
Contents
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.
Instruction for MK3Mag for self assembly (Green PCB’s)... see here MK3MagAufbau
General Points
For use of the MK3Mag it is essential that the Buzzer is removed from the FlightCtrl and mounted as remote as possible. It is best to use an extension to mount it on the outer end of one of the frame arms!.
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°.
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:
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.
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.
- 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.
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.
If everything worked fine, the LED on the compass will turn off for 2 seconds – if not: Repeat the above procedure.
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.
(to do: What does MK3MagCalState=0 kalibriert mean? What other values can the variable receive?)
A Digital Compass value is also available in the LC-Display under [2] (See Picture)
Circuit Diagram
Assembly Scheme
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
On preassembled (red) boards, the bootloader is already programmed.
You may only need to install a newer Firmware if the current one is outdated.
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:
Flashing Bootloader
- The MK3Mag must be connected from SV1 via 10pole ribbon to ISP-/serial cable (ISP1) on the Sercon.
- The MK3Mag needs to be provided with power (5V)
Select 'Controller flashen & Terminal' in MK-Tool
- Set the Jumper on the Sercon
- Click on 'FLASH' and select the Bootloader-Hexfile.
- … The Bootloader is now being programmed – this can take a few moments … following successful programming, the bootloader will display the following message:
Flashing Firmware
- The MK3Mag must be connected from SV1 via 10pole ribbon to ISP-/serial cable (ISP1) on the Sercon.
- Remove jumper on Sercon.
- The MK3Mag needs to be be provided with power (5V).
- Click on 'Update' and choose the latest Hex-File of the MK3Mag.
- Programming will now take place – in some cases you may have to reset manually (Simply turn power off and on). If everything worked fine, the MK3Mag will display the following message detailing its current version.
Firmware (SVN)
Sources and Hex Files can be found here:
Seite in
page en