HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old Oct 07, 2012, 01:18 PM
Done Posting, Gone Flying
JNJO's Avatar
Sweden, Uppsala County, Balsta
Joined Jun 2012
1,246 Posts
@Dave
Me 2. I suspect it's my mag that misbehaving. Se page 10 of this thread, and up a bit on page 11.

/J
JNJO is online now Find More Posts by JNJO
Reply With Quote
Sign up now
to remove ads between posts
Old Oct 07, 2012, 04:14 PM
Done Posting, Gone Flying
JNJO's Avatar
Sweden, Uppsala County, Balsta
Joined Jun 2012
1,246 Posts
MPNG test

So, now I've got MPNG 2.7R4 installed and using APM 1.12.14 mav 1.0.
PWM radio connected just like MW2.1 and motor outputs on my Tri are according to the motorplan for MW2.1, except tail servo which is on D7.
Gyro and acc:s are compensating in the right directions, and I have altitude, attitude and GPS-data corresponding to reality.

Bluetooth on same port as MW2.1 working fine.

Took me a while to figure out how to arm it, but it turned out to be the same as in MW2.1, only with a 2 second delay. Also, there seems to be an auto disarm function when throttle input is low for about 15 seconds.
And, if the throttle pwm goes above 2000, the motors will stop.

Flight test as soon as the weather allows.
Hope it will be as smooth and nice as MW2.1.

/J
JNJO is online now Find More Posts by JNJO
Last edited by JNJO; Oct 07, 2012 at 04:35 PM.
Reply With Quote
Old Oct 07, 2012, 04:30 PM
Too Many Thread Subscriptions
TheFernMan's Avatar
United States, FL, Miami
Joined Jul 2012
2,193 Posts
Quote:
Originally Posted by JNJO View Post
So, now I've got MPNG 2.7R4 installed and using APM 1.12.14 mav 1.0.
PWM radio connected just like MW2.1 and motor outputs on my Tri are according to the motorplan for MW2.1, except tail servo which is on D7.
Gyro and acc:s are compensating in the right directions, and I have altitude, attitude and GPS-data corresponding to reality.

Took me a while to figure out how to arm it, but it turned out to be the same as in MW2.1, only with a 2 second delay. Also, there seems to be an auto disarm function when throttle input is low for about 15 seconds.
And, if the throttle pwm goes above 2000, the motors will stop.

Flight test as soon as the weather allows.
Hope it will be as smooth and nice as MW2.1.

/J
very nice work, i thought MPNG wasnt gonna work with this board
TheFernMan is offline Find More Posts by TheFernMan
Reply With Quote
Old Oct 07, 2012, 04:44 PM
Done Posting, Gone Flying
JNJO's Avatar
Sweden, Uppsala County, Balsta
Joined Jun 2012
1,246 Posts
Hehe, that remains to be seen.
But so far it's looking good, thanks to Jabram who figured out how to do it.
JNJO is online now Find More Posts by JNJO
Reply With Quote
Old Oct 07, 2012, 04:48 PM
Too Many Thread Subscriptions
TheFernMan's Avatar
United States, FL, Miami
Joined Jul 2012
2,193 Posts
Quote:
Originally Posted by jabram View Post
I suspect I have found a way to make MegaPirateNG V2.7 R4 run on the HK Mega board including the supplied MTK GPS

Easiest way to set up the supplied MTK GPS supplied is to run Multiwii_dev_r1143, edit the source to enable it to AUTOMATICALLY setup the GPS

in Multiwii_dev_r1143 config.h make these settings


#define FFIMUv2 // second version of 9DOF+baro board from Jussi, with HMC5883 <- confirmed by Alex

#define GPS_SERIAL 2 // should be 2 for flyduino v2. It's the serial port number on arduino MEGA

#define GPS_BAUD 115200

#define INIT_MTK_GPS // initialize MTK GPS for using selected speed, 5Hz update rate and GGA & RMC sentence

Compile and upload that to the HK Mega board, make sure your GPS is connected so the GPS is in fact setup.

--------------------------------

With GPS set up, edit MegaPirateNG V2.7 R4

in APM_Config.h make these changes

// Select your sensor board
#define PIRATES_SENSOR_BOARD PIRATES_FREEIMU


// Select your baro sensor
#define CONFIG_BARO AP_BARO_BMP085_PIRATES

// For BlackVortex, just set PIRATES_SENSOR_BOARD as PIRATES_BLACKVORTEX, GPS will be selected automatically
#define GPS_PROTOCOL GPS_PROTOCOL_NMEA


#define SERIAL0_BAUD 115200 // Console port
#define SERIAL2_BAUD 115200 // GPS port
#define SERIAL3_BAUD 57600 // Telemetry (MAVLINK) port

AND a last one to correct mag, I know we should not edit config.h, but this was the easiest way

in config.h make these changes

#else
#define CONFIG_IMU_TYPE CONFIG_IMU_PIRATES
//#define MAG_ORIENTATION ROTATION_YAW_180
#define MAG_ORIENTATION ROTATION_YAW_270
#endif

I have only bench tested this, I have not flow it, all sensors seem to work and the MTK GPS is working in Mission Planner 1.2.14 mav 1.0

Joe
Thanks for this!
TheFernMan is offline Find More Posts by TheFernMan
Reply With Quote
Old Oct 07, 2012, 05:09 PM
Registered User
Joined May 2010
75 Posts
Quote:
Originally Posted by zagifly View Post
Having a problem with GPS if anyone could help????
The board is set up on a TRi copter and everything connected, as you can see from the screen shot of the GUI the number of sattelites is shown and the GPS location. when I switch position hold in the Tricopter becomes very unstable and with return home it shoots off the wrong way.

Dave H
Did you calibrate the magnetometer and does Heading Hold work? This function seems to be related to GPS PH and RTH. Did you input your magnetic declination in the GPS config.h section? Without this information, your board will try to compensate and make very wide fast circles ... could even crash.

Home is defined as the point where you armed your board. I let my quad sit and get a good sat fix before I even arm the board (you can see the tiny LED's blinking to indicate GPS activity). Fly the model, activate PH then Heading Hold and Alt Hold (you want to at maintain a "safe" height). Your model should make slow circles around your "home" target area. It could take several PH tries to make sure you have a fix and PH is working correctly. Keep you hands ready to make corrections (you probably already know about this!)

Do not attempt RTH until you are certain your model can maintain it's PH "home" position. To try RTH, release Atl Hold and Heading Hold, move the model forward, activate RTH, then Heading Hold and Alt Hold. Your model should travel back up to the "home" position, overshoot a little then slowly make adjustments. Sometimes it makes slow circles, sometimes it stays put.

Do not try PH or RTH in very windy conditions - can be done but could result to your model making very wide arcs as it tries to compensate the result of being blown by the wind. With RTH - try to maintain a straight line and the same heading to your home position - otherwise the frame will "twist" to get to its original heading. This RTH behavior can be changed in the GPS section of config.h if in you want.
majik01 is offline Find More Posts by majik01
Reply With Quote
Old Oct 07, 2012, 08:20 PM
Registered User
jabram's Avatar
Australia, NSW, Kendall
Joined Jul 2012
5,476 Posts
Quote:
Originally Posted by JNJO View Post
So, now I've got MPNG 2.7R4 installed and using APM 1.12.14 mav 1.0.
PWM radio connected just like MW2.1 and motor outputs on my Tri are according to the motorplan for MW2.1, except tail servo which is on D7.
Gyro and acc:s are compensating in the right directions, and I have altitude, attitude and GPS-data corresponding to reality.

Bluetooth on same port as MW2.1 working fine.

Took me a while to figure out how to arm it, but it turned out to be the same as in MW2.1, only with a 2 second delay. Also, there seems to be an auto disarm function when throttle input is low for about 15 seconds.
And, if the throttle pwm goes above 2000, the motors will stop.

Flight test as soon as the weather allows.
Hope it will be as smooth and nice as MW2.1.

/J
Looking forward to your test flight, my forecast for next few days strong winds and rain.
Joe
jabram is offline Find More Posts by jabram
RCG Plus Member
Old Oct 07, 2012, 08:20 PM
Registered User
Joined May 2010
75 Posts
Quote:
Originally Posted by JNJO View Post
Hi all,

Now I've tried for a few hours to get my mag calibrated with modest success.
It points to true north and follows nicely when I rotate through 360 degrees.
But, only when the board is flat.

As soon as I roll the board, I get a deviation of +/- 10 degrees heading in Multiwii_conf. Right roll -, and left roll +.

Pitch movement does not affect heading.
In IMU.ino, starting at line 261, I can see that the heading is compensated for roll and pitch movement.

I've tried various combinations on the mag orientation in config.h, and that only makes the problem worse.
Also tried the mag low-pass filter setting.
I realize that there is a limit to how large roll angels that can be compensated, but this happens as soon as I roll pass 2-3 degrees.

Does anybody else see this? Or might it be I have a bad sensor?

I'll work a bit more on my mag calibration, and try to shield the sensor better, but it would be interesting to know how your compasses are behaving when you are rolling and pitching.

Fly safe,
/J
JN ... I've had issues with the mag on this board as well (had an earlier post here mentioning that). If you look carefully at the orientation of the mag component (while dot), it lines up to the Y-axis and not the x-axis as most boards I have looked at. While flying and having heading hold, the board looses the "hold" and starts to yaw by itself - worst than not even having HH activated. I have not tried to do real time monitoring via APC220 (got it working with my AIO Pro) to see if the magnetic compass actually drifts vs the physical board orientation at this point - I suspected it does and you confirmed it. I have tried to use the other Y-axis oriented boards config.h settings - but got even worst results. That said .. I do not have Carefree working for me at all - maybe for some but not for me.

To get it as stable as possible at least to get PH and RTH working, I found that the Rabbit FC magnetic compass calibration process to work the best over BlueTooth and WinGUI - so there is complete freedom of movement. Calibrating the board on "all" the potential axis around the imaginary line within the one minute window - flat, rear motors up, front motors up, side motors up, arm up, inverted. This not not cure the eventual drift but does allow enough hold for short term PH and RTH .

Not for nothing ... maybe tweaking the IMU.h (within Arduino) in MWC 2.1 specifically for this "weird" mag oriented board is the key (to get it pass the 2-3 degree limit) but that is unfortunately passing over my head at 200 mph .....
majik01 is offline Find More Posts by majik01
Reply With Quote
Old Oct 07, 2012, 08:28 PM
Registered User
Joined May 2010
75 Posts
Quote:
Originally Posted by jabram View Post
Looking forward to your test flight, my forecast for next few days strong winds and rain.
Joe
Awesome news! We have at least three pilots here who have been able to load and confirm MPNG works looking at the board's behavior via GUI. Looks very promising and the very important flight tests will confirm expectations. Keep up the good work guys ....
majik01 is offline Find More Posts by majik01
Reply With Quote
Old Oct 07, 2012, 08:38 PM
Registered User
jabram's Avatar
Australia, NSW, Kendall
Joined Jul 2012
5,476 Posts
I have the HK Mega board as well as the CRIUS AIOP V1

I have been comparing the 2 boards. mainly bench tests, free time and weather have not been kind to me lately.

So far I like the HK board better and my reasons are;

The 0.1" connectors are much easier to work with.
The HK board works fine if a 3DR radio or Bluetooth or FTDI cable is connected.
The CRIUS AIOP if I connect Bluetooth or 3DR Radio or FTDI, it doesn't want to boot unless I disconnect that until it boots first then connect which is impractical.

The MTK GPS once setup is very accurate and I think it works better than the UBLOX LEA 6H that came with the CRIUS AIOP

You can significantly improve the GPS by placing a small square piece of aluminum or unetched single sided PCB under the GPS, it should be electrically connected to GND but even without any electrical connection it makes a lot of difference to the GPS ability to pick up satellites and also the position accuracy, a couple of photos.





You can easily test the difference this makes to the GPS [any GPS] by running Mission Planner and watching the number of satellites, how much quicker they are found and the drift with and without the small metal plate under the GPS.

The BMP085 Baro - I am seeing more variation when running MPNG as compared to running MWII on the HK board, this has to be something in the code rather than the Baro itself me thinks.
Joe
jabram is offline Find More Posts by jabram
RCG Plus Member
Old Oct 08, 2012, 03:59 AM
Done Posting, Gone Flying
JNJO's Avatar
Sweden, Uppsala County, Balsta
Joined Jun 2012
1,246 Posts
@Jabram
+1 on the groundplane under GPS-antenna. All professional installations have one.
That 3DR I see on your picture; Any hassle setting it up?

On MPNG; I couldn't wait, so I took it for a short flight under a street-lamp.
Flew like a pig compared to MW2.1, with way too much response on my stick movements. Fairly stable once I got it level.
I have a strong feeling that the default PID:s I used are for a small quad.
A structured tuning will fix that, I'm sure.

Anyway, it flew.

/J
JNJO is online now Find More Posts by JNJO
Reply With Quote
Old Oct 08, 2012, 04:55 AM
Registered User
jabram's Avatar
Australia, NSW, Kendall
Joined Jul 2012
5,476 Posts
@J

Congrats, well, it flew, which frame did you try it on ?

Is vibration OK on that frame?

Yes that is a 3DR Radio 433mhz version, it works fine NOW, it took me a very long time to figure it out, as usual instructions are rather vague, once I took care of crossing RX TX and either having RTS and CTS correctly wired or disconnected and then dealt with the settings, #of channels 5, Air Speed 192, Baud either 57600 or 115200, Mavlink enabled, ECC disabled, Op Resend disabled. At one stage I was ready to crush it. Have to watch various cables and board pin out names, TX and RX need to be crossed usually so do CTS RTS. On the HK board J2 connector I am only connecting GND, 5V with RX0 and TX0 crossed.
jabram is offline Find More Posts by jabram
RCG Plus Member
Old Oct 08, 2012, 07:32 AM
Registered User
United Kingdom, England, Hailsham
Joined Aug 2007
73 Posts
When the compass is calibrated what indication do you get in the GUI????
Mine is staying grey and pulsing slowly, I have read in this forum that someone had the green donut?? I am getting a reading that changes in the graphics and it is pretty much correct and this has been repeated a couple of times.
Will reconfig with magnetic declination in and try heading hold first, costs too much in props to try RTH.

Dave H
zagifly is offline Find More Posts by zagifly
Reply With Quote
Old Oct 08, 2012, 07:57 AM
Registered User
United Kingdom, England, Hailsham
Joined Aug 2007
73 Posts
Help please
My magnetic declination is negative 1degree 8seconds, how do I get that to a number I put into the config??
It seems pretty much like -0.29 to me so maybe I should have been ok with the config 0.00 as installed.
Looks like Im back to my original question above.

Dave H
zagifly is offline Find More Posts by zagifly
Reply With Quote
Old Oct 08, 2012, 08:45 AM
Done Posting, Gone Flying
JNJO's Avatar
Sweden, Uppsala County, Balsta
Joined Jun 2012
1,246 Posts
@Joe
"At one stage I was ready to crush it."
Hehe, I know the feeling.
Thanks for the info on 3DR. One of those and a sonar is next on my list after I've gotten MPNG decent in the air.

My frame is heavily based on RCExplorer Tri 2.5 with 48cm wood arms, and fibreglass centre. CD-jewel cases for Lipo and electronics.
Motors are Turnigy D2217/17 11KV driving 1047 props. Simonized HK Blue 12A.

Very little vibration around the controller.

/J
JNJO is online now Find More Posts by JNJO
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Discussion Hobbyking KK board VS MultiWii for a simple quad? carl1864 Multirotor Talk 7 Jan 03, 2014 02:47 PM
For Sale X250 MWC Quadcopter new MWC Mega with gps, diy kit terriwang Aircraft - Electric - Multirotor (FS/W) 32 Jan 02, 2013 04:17 PM
Discussion Crius NEO-6M Ublox GPS+Nano Mini Board+ Multiwii Control Board I2C GPS Kit godwisper Multirotor Electronics 5 Aug 25, 2012 05:03 AM
Sold Ardupilot mega with compass, GPS and Disto board!!!! tc3wins Aircraft - Electric - Multirotor (FS/W) 4 Jan 02, 2012 04:22 PM
Mini-HowTo Straight USB Connect to MTK 3329 GPS larry baraniuk UAV - Unmanned Aerial Vehicles 8 Apr 17, 2011 11:29 PM