Harakiri aka multiwii port to stm32

Mr-Fiero
Posts: 216
Joined: Sat Apr 05, 2014 3:26 am

Re: Harakiri aka multiwii port to stm32

Post by Mr-Fiero »

Glad to share.
Here is my settings, I have tried increasing the acc_lpf to 20 for my last few flights with no complications.

this is on a X600 frame with 1000kv cheapo motors, and rctimer with simonk ESC. My other unit is same but it has whitespy - readytoflyquad ESC's on it. AUW is 1400 due to having cam on one unit. 11x5 CF props

https://drive.google.com/file/d/0B3z3Y8 ... sp=sharing

I'll do a read on my GPS for a Ucenter backup to get my current settings, maybe time permitting tonight.

User avatar
Crashpilot1000
Posts: 631
Joined: Tue Apr 03, 2012 7:38 pm

Re: Harakiri aka multiwii port to stm32

Post by Crashpilot1000 »

Hi!
@Mr_Fiero: Seems you are having a blast with your copters :) . The credit for flightstability must go to the multiwii project - sturdy controller and not over engineered. I disable Althold when copter is upside down - that's why it didn't nail into the ground during flip. However if upsidedown (for more than 20ms) is detected during Autoland, a severe problem is assumed (flip on the ground, tumbling in a tree - etc you name it) and the poor thing is disarmed / shuts down.
Concerning the mag you are right. Fresh calibration at the field is the best thing. During powerup fresh mag gains are calculated (so have your complete video gear running before calibration), the calibration gathers offsets. I always calibrate with stick command, because even the usb plug can be magnetic. I farted around with normalization of mag values but actually got adverse effects (was worse) but I think that could actually work better if the normalized magvalues are also used during calibration (I didn't do that) - by doing this it may be possible to be more independent of the actual strength of the magnetic field in the flying place (since we don't want to measure some tesla).
Yep the ride back is slow on stock parameters (also @strips). I wouldn't change nav_speed_min and nav_speed_max but you can increase the nav P - however I find the "nav_tiltcomp = 30 (default)" is the most powerful parameter in this regard and would only change that and see what happens. nav_tiltcomp = 50 did a RTH on steroids on my recent setup - but didn't test it with testcode3.
The speed that is used during approach of the target position is defined by "nav_approachdiv = 3 (default)". The logic behind that is fubar simple: WantedSpeed = distance in cm / nav_approachdiv. So 6m distance = 600cm/3 that means the speed would be 200cm/s - the predefined limits can not be exceeded/undershot.
@Colorado CJ: Concerning MinimOSD you have several choices.
Use Mavlink software (like minimosd extra - that is probably preinstalled?) or use one of the multiwii osd projects.
The preinstalled soft on your minimosd defaults to 57600 baud (aka 57k) so on stock harakiri there is no way of communicating (default 115k) so you see "mavlink waiting for heartbeats". Since your gui and the osd share the same serial port you can choose the behavior of that port when your copter arms with:
tele_prot = X
X = 0 is default that means it keeps 115K (suitable for mwii osd software)
X = 1 Frsky telemetry @9600Baud
x = 2 Mavlink @CurrentUSB Baud that means you will have to change the minimosd code to default at 115k since that is the predefined Baudrate in mwii.
x = 3 Mavlink @57KBaud (like stock minimOSD wants it)
So you should set tele_prot = 3 and your osd should jump to life, when you arm the copter.
The stock minimosd software has the ability to just listen to the datastream and pick the needed values - that is supported in Harakiri, meaning it will send (unrequested) a datastream with osd relevant data. That means for you, you don't need to wire up the naza rx pad, since no datarequest is needed.
Cheers Rob

Edit: Mr.Fiero: I see, you increased acc_gpslpfhz to 20 and therfor had to reduce gps_ins_vel to 0.5, I will try that but I doubt that my vibrating copter will cope with that..

Mr-Fiero
Posts: 216
Joined: Sat Apr 05, 2014 3:26 am

Re: Harakiri aka multiwii port to stm32

Post by Mr-Fiero »

Oh, Thanks for the tips!

Yea, I dont use USB either (only for firmware updates), but I have bluetooth installed so mag calibration can be done with that too. I like the bluetooth regardless of short range because adjustments are made while on the ground. The really nice thing is from the Android phone, I use the CLI but the phone app has a map on it too, with other telemetry so its nice to look at everything before launch.

Fixed my camera unit that had motor dips due to having bullet connector, so will be testing again this weekend. I was able to reduce its weight 100grams because I routed wires shorter at the same time.

: I was thinking about what you said, and I think why I had such a slow RTL is because it was windy that day, and it was pushing against the wind for most of its trip. Therefore having a max angle of 30 degrees might of been close to what it needed just to oppose the wind.

Mr-Fiero
Posts: 216
Joined: Sat Apr 05, 2014 3:26 am

Re: Harakiri aka multiwii port to stm32

Post by Mr-Fiero »

I am having really good success with Testcode3. PH works well. I also tried the RTL again, and it worked fine in about 10 tests, landed even, and then after about 20 or 30 seconds motors decreased RPM until it stopped. I had my throttle up, so I took it down and up to make sure it was disarmed. It only started again when i disarmed with my switch and also had the mode switched to another mode like stabilize. Worked well. I did not change my travel speed and it seemed to be a reasonable speed when RTL was active. So my issues the other day when RTL was very slow had to be related to the 30 degree max angle working against the wind.

I was using my really old multicopter, and while flying in PH, fast, then releasing the sticks, the PH was pretty good. My drift was only about 1M, then you can see it lock in and then hold really well. I think in my past flight when I get more drift, its all related to the 5 second delays you have spoke about, plus the wind compounding the drift. I did calibrate the mag with the sticks before flying and it really seems to clean up the Circle. Now I think I am always going to calibrate before flight such as you suggested Crashpilot1000. Its too simple not too. The only thing is my calibration is 2 minutes as I changed it in the config before I compiled.

Anyways some vids of my loiter....
https://plus.google.com/114605860380045 ... PADtUo6QLn

e_lm_70
Posts: 297
Joined: Fri Aug 09, 2013 8:35 pm

Re: Harakiri aka multiwii port to stm32

Post by e_lm_70 »

Got my 2nd good STM32 board module today.

So ... just few seconds for connect the 10DOF GY-86 ... load the TestCode3 ... and in few seconds bench tests are all looking good.

I have my working DIY OpenLRSng RX module (that will be happily working on 3.3v from the STM32 board) ... some spare GPS ... I just need to assign this board to a copter ... and I will be ready to explore the Harakiri universe.

If I get only 1/10 of the result of Mr.Fiero, I will be already more then happy ...

rank
Posts: 31
Joined: Fri Dec 06, 2013 5:27 pm

Trcipter servo jerks

Post by rank »

Tried the Testcode 3, my tricopter seems to be nicely holding the gps position. The only problem I have, is the yaw servo spitting out some powerful jerks once in a while. This is with no mag activated. I tried very low pid settings for the yaw, but that didn't help. On baseflight, all silk smooth. Any idea why?

e_lm_70
Posts: 297
Joined: Fri Aug 09, 2013 8:35 pm

Re: Harakiri aka multiwii port to stm32

Post by e_lm_70 »

@rank :-> Is the Yaw servo making mess once in a while, in all flying mode or only in GPS position mode / MAG on mode ?

Still bench testing my DIY naze32, with a DIY openLRSng ... all look fine ... except ... I'm no able to arm copter by the classic YAW right + Throttle low ... only Arming via a "BOX Switch" is possible ...

Anyhow idea ?

rank
Posts: 31
Joined: Fri Dec 06, 2013 5:27 pm

Re: Harakiri aka multiwii port to stm32

Post by rank »

e_lm_70 wrote:@rank :-> Is the Yaw servo making mess once in a while, in all flying mode or only in GPS position mode / MAG on mode ?
?

In all modes, every few seconds

e_lm_70
Posts: 297
Joined: Fri Aug 09, 2013 8:35 pm

Re: Harakiri aka multiwii port to stm32

Post by e_lm_70 »

@rank

Maybe is needed some filtering of the yaw servo ... I guess a check of the code could be needed for it ...

User avatar
Crashpilot1000
Posts: 631
Joined: Tue Apr 03, 2012 7:38 pm

Re: Harakiri aka multiwii port to stm32

Post by Crashpilot1000 »

Hi dudes!

@Mr-Fiero: Thx for taking the time and shooting a video! Tried around with normalizing the magvalues but like my older attempt it didn't work better. Normally one calibration at the flyingfield should be enough, however if the mag is close to the lipo it is possible that different lipo-brands have different magnetic footprint (there is some older video online showing that with mikrocopter hardware).

@rank: So your problem is not constant jitter that can be resolved with filtering (->Readme) but the new mwii yaw controller wich I think I fu**ed up a little while putting it on float values. The "I" term is the problem there (its internal limits too low), please reduce that for now (yaw P is not the problem).

@ e_lm_70: Are you searching for "retarded_arm" (?) that term is on one hand suitable, because you can disarm copter in flight while doing a flip, on the other hand misleading so it is "rc_rllrm" now (->readme.txt). Normal multiwii stick arming should work like always.

Current progress note:
- Reworked Main Pid controller (esp. Yaw :) ) - partly back to bitshifts, full gyro resolution, horizon mode (was too slow for me).
- Annoying throttlestick middle - stuff in althold (like mentioned a few posts before) is not bothering anymore now.
- wasted days on mag, feeling like the russian combat sheep http://tinyurl.com/k73ge6x
- Did some changes on baro - but for worse performance - so bad idea.

Stay tuned.
Cheers
Rob

Mr-Fiero
Posts: 216
Joined: Sat Apr 05, 2014 3:26 am

Re: Harakiri aka multiwii port to stm32

Post by Mr-Fiero »

> Crashpilot1000

Cant wait to try the new alt hold fix for stick centre. That fix will we great. I have learned to work around it now, but every once in a while I find myself looking at my TX to make sure its centre so my next climb will respond.

I am still having really good success with Testcode3. Lots of flight time with no problems. But, I am flying in PH because my purpose for the multicopters is to use them for surveys. I position my unit and then build a panoramic so the test sites can be studied later. Its personal projects for wifi coverage, but fringes on what I do at work also.

I have now I bet 50 hours on Testcode3. I fly almost every day right now for all my batteries as I like to store my lipos discharged, or mostly discharged. I get almost 3 hours per day and so far %80 in PH mode. I am also starting to use RTL more often now that I know it works. This has been really nice because when I fly FPV to a remote location, survey, when I am done I just activate RTL and I dont have to stress getting it back. Usually it will land within 1M of first arm. (Home).

Anyways, everything is going very well. I do however always find myself wishing one thing would work different. Its while flying in PH. Its that delay we have discussed before. To recap, if I position and activate PH, it holds well. But if I fly to a new location and release the sticks, it drifts a small amount towards the previous flight path.

This drives me nuts sometimes, because, when I am positioned, I want to move a small amount, I reposition, I try to hold it with the sticks for the 5 seconds, but if I miss that window, and release too soon, it moves a few meters and then locks. Sometimes I am trying to re-position a little closer to get a clear picture of a radio tower (pictures of current equipment on the tower) and I want to only move a few meters closer, but it keeps moving back.

Please forgive me as I am not a coder, but I was wondering is it possible that when the sticks are not in deadband/center to NOT average the GPS and to accept the new position as absolute upon sticks returning to center? Then from that point start averaging position updates again while maintaining the first absolute position as first priority? Maybe with expo to first absolute? Brake can be applied as needed AFTER new absolute maybe? Or, is your code already attempting to do something like this? I know you try to use the braking, but I dont think in a window this small, that the braking delays are my issue.

Its just an idea, just my thoughts for my flight style/purpose. Again I realize my flight style is not to be desired by others.

Cant wait to test your new code.......
Last edited by Mr-Fiero on Thu May 22, 2014 4:22 pm, edited 2 times in total.

e_lm_70
Posts: 297
Joined: Fri Aug 09, 2013 8:35 pm

Re: Harakiri aka multiwii port to stm32

Post by e_lm_70 »

In other words ... Mr.Fiero ... you fly your copter exactly like the GPS mode of DJI Naza right ?
All time in PH right ?

Mr-Fiero
Posts: 216
Joined: Sat Apr 05, 2014 3:26 am

Re: Harakiri aka multiwii port to stm32

Post by Mr-Fiero »

Yes, %80 percent of the time right now PH when I am using the multicopter for other purposes for my other hobbies. When I want to practice flying, then I use other modes. So right now I am very dependant on GPS functions.

My interests are automation with the multicopters, and FPV/Photography.

Just last weekend I was able to put the multicopter in the sky, and have it stay there for 15 minutes while it video taped my son learning to ride his bike for the first time. It was awesome and did a really good job. Of course, I kept the controls in one hand, but down at my side and was able to focus on my son. Makes awesome videos.....I am very thankful to Crashpilot1000 for his modifications as I have never been able to reliably use my copters with automation, till now. Now I am using the copters for new applications as I think of them.

FYI, my kids are so used to multicopters in their lives, it does not even register anymore. They are not even slightly distracted. Same for my dog... LOL I have to keep reminding them to keep a distance from the copter as they just dont notice. My next wish someday is to try "followme". I dont know if its active on Harakiri, I need to sit down and look at the code but I did notice the checkbit when you compile to enable it to be compatible with the gui. I think it would be able to take interesting videos but I'll try it once I am done testing everything over time.

e_lm_70
Posts: 297
Joined: Fri Aug 09, 2013 8:35 pm

Re: Harakiri aka multiwii port to stm32

Post by e_lm_70 »

Since you fly in PH mode ... did you had opportunity to try DJI Naze controller ?
Their PH should be the state of art ... since they sell it commercially since long time ... with mayor focus on GPS functions.

About flow me ... it sound a trivial function to be add in any decent firmware capable to do PH ...

Is CrashPilot1000 still supporting and developing on top of TestCode3 ... or he is moved on on TestCode4 or something else ...

PS: Weekend is coming soon, and my copter and my DIY TestCode3 board is not progressing that much ...

Mr-Fiero
Posts: 216
Joined: Sat Apr 05, 2014 3:26 am

Re: Harakiri aka multiwii port to stm32

Post by Mr-Fiero »

Well, from the reports of the newest firmware in DJI, and with my recent success and major time in the air using Harakiri, I am fine and not interested in any other controller. I finally found what I like. I have tried, aurdupilot, cc3d, taulabs stmf3 stuff, megapirate, multiwii and never had good success.. I give it though multiwii was the best out of the bunch but was underdeveloped for GPS. Baseflight was good when I changed over to STM processors but his interest is not GPS.... thats fair.... Baseflight is easy to config and works really well.

I have tried it all, seen it all, and had LOTS of failures. At one point DJI would of been cheaper, and I was tempted... Until I saw they suffer the same issues as any other controller.

Cost considered, you cannot beat STMF3 controllers.... and with this firmware it works better than most. I am a fan of Crashpilot1000 mods, and will continue to test and post results.... good or bad..

User avatar
bulesz
Posts: 71
Joined: Mon May 06, 2013 8:03 pm
Location: Hungary EU

Re: Harakiri aka multiwii port to stm32

Post by bulesz »

Heyho,

So guys how reliable the Harakiri on Naze32? I'm interested in Loiter and RTH. Currently using APM 2.6 with Arducopter, but I dont like the flight characteristics of it. BUT I need the GPS to could sleep better. :)
I have tried Multiwii on a Crius AIPO V2 board, it flown nicely but I had no luck with the GPS on it.

Now the Naze32 is very tempting specially the Harakiri on it... ;)

What do you think is it reliable enough to switch my APM? (I don't need the waypoints only the RTH and Loiter)

Many thanks,
Bulesz

timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: Harakiri aka multiwii port to stm32

Post by timecop »

You need to switch to DJI Phantom Vision V2+ or a pole. Take your pick.

User avatar
bulesz
Posts: 71
Joined: Mon May 06, 2013 8:03 pm
Location: Hungary EU

Re: Harakiri aka multiwii port to stm32

Post by bulesz »

Do you mean the Harakiri + Naze32 is not that reliable as a pole? ;) :p

Mr-Fiero
Posts: 216
Joined: Sat Apr 05, 2014 3:26 am

Re: Harakiri aka multiwii port to stm32

Post by Mr-Fiero »

> bulesz

I already gave up 5 APM2.5's and am very happy with Harakiri at this point. Too many un-explained sky drops or fly aways with APM's, which its funny how I have not had once since with a different controller :) A 32bit environment is the future for flight controllers. APM2.5 and 2.6 just dont cut it anymore. Infact when you compile it, its already running out of space and you have to strip it down a bit to fit. I am however impressed by the GUI Mission Planner, but thats now where it ends. Not fond of it using .NET and the new APM planner shows promise. Also, not a fan of the Pixhawk. over priced and has a weird platform. And really do not like having a saftey switch forced upon the users. Just dumb.

Naze32, Flip32+, or any STMF3 flight controllers with Baseflight (not GPS interested, but performs, and EASY install) or Harakiri (GPS working and flies nice too) take your pick.

Just my 2 cents......

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: Harakiri aka multiwii port to stm32

Post by copterrichie »

Sidebar: There was some talk earlier of porting the MWC code to the APM hardware, I think the only real issue is, the APM uses SPI sensors.

Mr-Fiero
Posts: 216
Joined: Sat Apr 05, 2014 3:26 am

Re: Harakiri aka multiwii port to stm32

Post by Mr-Fiero »

If you use Crius AIO V2 megapirate you can run either multiwii or arducopter....tried both myself on that FC. But same limitations as mentioned in above posts. Just my opinion, but I think when the intertia was introduced on the Z in arducopter, that cpu just wont process it when it encounters certain instances. Thats why they have you on a hunt for vibrations. I did clean my vibrations up very well, and still had the sky drops. They are a real surprise. It was not "if", it was "when". Multiwii however did not suffer from this when I ran it on the Crius.

Again, just my opinion, but I will NEVER buy another arducopter. Ever. I dont care what they can or cannot do....just not interested anymore.

Now that I have been using the STMF3 board, and harakiri my main problem is my bearings are wearing out....Awesome!

User avatar
treym
Posts: 258
Joined: Sat Jul 21, 2012 12:28 am

Re: Harakiri aka multiwii port to stm32

Post by treym »

Mr-Fiero wrote:Now that I have been using the STMF3 board, and harakiri my main problem is my bearings are wearing out....Awesome!


harakiri with stm32f3 ?

Mr-Fiero
Posts: 216
Joined: Sat Apr 05, 2014 3:26 am

Re: Harakiri aka multiwii port to stm32

Post by Mr-Fiero »

To be clear since you asked... STM32F103CBT6

Mr-Fiero
Posts: 216
Joined: Sat Apr 05, 2014 3:26 am

Re: Harakiri aka multiwii port to stm32

Post by Mr-Fiero »

> Crashpilot1000

is there any way flashing again would change my logged armed time? I have never checked in on my units, but one says 2536:34:23 ... Seems a bit high but its an old unit I have had for a while. It originally had Summergames2.5 on it but this last few months I have been running Testcode3. I have never had a bad flash either. Baseflight was on the unit previous to Summergames2.5 for about 6 months.

There is the off chance its a real number as its seen allot of hours. I have been flying almost every day for over 2 years now. if it was not good weather, I always practiced in a room for a minimum of 2 hours (my wind down time). Plus, maybe another 2 to 4 hours weather permitting. Just weird if its a true count.

User avatar
bulesz
Posts: 71
Joined: Mon May 06, 2013 8:03 pm
Location: Hungary EU

Re: Harakiri aka multiwii port to stm32

Post by bulesz »

@Mr-Fiero: Many thanks for your input, that was what I wanted to know, an opinion about the Naze32+Harakiri based on experiences of an ex APM and Crius owner.
Thanks again bro!

e_lm_70
Posts: 297
Joined: Fri Aug 09, 2013 8:35 pm

Re: Harakiri aka multiwii port to stm32

Post by e_lm_70 »

timecop wrote:You need to switch to DJI Phantom Vision V2+ or a pole. Take your pick.


:D

Sorry, I could not resist ... I like your sense of humor ;)

Anyhow for people on budget you should start to joke over Walkera QR Y100 WiFi: http://www.rcgroups.com/forums/showthread.php?t=2171281

The DJI for 149$ :mrgreen: ... with follow me function ... so cool ... possibly so toy too :mrgreen:

Anyhow ... I think Baseflight an Harakiri should merge .. it will be a gain for everybody.
I understand the acro people, but as said before, having GPS on board give confidence for the panic moments, fpv, radio issue, etc

:ugeek:

User avatar
bulesz
Posts: 71
Joined: Mon May 06, 2013 8:03 pm
Location: Hungary EU

Re: Harakiri aka multiwii port to stm32

Post by bulesz »

Indeed indeed...due the pole is not really portable, I would go with a retractable leash, something like this:
https://www.youtube.com/watch?v=rktYu5KLedI

The best part it supports the "follow me" function too, so its a nobrainer to me.

The only thing I'm confused, not sure which FW should I flash on this... ;)

User avatar
Crashpilot1000
Posts: 631
Joined: Tue Apr 03, 2012 7:38 pm

Re: Harakiri aka multiwii port to stm32

Post by Crashpilot1000 »

Thanks for the encouraging feedback, dudes!

@Mr-Fiero: What is the logged armed time? I don't know where naze would store that - maybe something I missed? The flightcontrol does age by writing the eeprom, that's why I tired to reduce it a great deal in the code (like the trim action), so changes are gathered and then collectively written. During normal flight/operation there should be no eeprom write at all. Howerver I flash my test unit probably 3 times a day average and it runs fine for ca. 2 years..
I've had some unpleasant APM experience as well and currently they are kalman plastering their px4 already hitting hardware limitations again..
@bulez: You can use testcode3 for now to check it out (use original mwii gui 2.1 or similar, that chrome-bf gui will not work for whatever reason). I hope to have something new this weekend. Tests looking good but needs more work.
Concerning the feared RTL flyaways harakiri has a simple countermeasure. On RTL start the distance to home is calculated and compared to the actual home distance during rtl. If RTL is working the distance should get shorter (of course!!!) but if it increases beyond a threshhold (in meters) a major failure is assumed and baro autoland is engaged (tries Ph, may spiral down but will not fly away - i.e gone for ever). That function is deactivated by default but can be activated by setting gps_rtl_flyaway = X [0 = default(deactivated), max 100 m]. Like every multiwii, once disarmed it is disarmed and safe to approach (I've also implemented a killswitch function for the arm switch - I use it for testing new gpscode... already had to use it..) no towel needed (to toss over) like advised in the arducopter wiki (http://copter.ardupilot.com/wiki/safety-multicopter/ "..The first thing to do is throw a towel over your copters propellers (Propellers may start spinning unexpectedly)..." - maybe they should start selling special 3DR safety towels, besides voltage regulators, diodes or whatever stuff regularly likes to burn on their hardware.).

Cheers Rob

User avatar
bulesz
Posts: 71
Joined: Mon May 06, 2013 8:03 pm
Location: Hungary EU

Re: Harakiri aka multiwii port to stm32

Post by bulesz »

Thanks Crashpilot for the feedback, this "anti-flyaway" feature is really great!

Another idea: is the low voltage "fence", if you have reached a voltage limit based on the distance to home, you can't go further. So it' will be contsant changing of coz based on the actual voltage and distance, but not limiting the close range flying like within 100-200m. What do you think guys?

Cheerz,
B

Mr-Fiero
Posts: 216
Joined: Sat Apr 05, 2014 3:26 am

Re: Harakiri aka multiwii port to stm32

Post by Mr-Fiero »

> bulesz

I like your idea of another option for a fence with voltage. would not hurt. There is one condition that I would have that would trip it as I have an older bunch of lipo and they like to dip below 3v per cell quickly a few times while flying, but they are not discharged. I think they are just a little soft and when a bit more current is needed they cannot deliver. But they still fly at %50 throttle for my flight time of 12 - 15 minutes which is still normal. When I am flying with them I am careful not to get into a situation that they might need to deliver more current. If a voltage fence was implemented it might need a small average as well.

How about if there was a way to install a current sensor someday into Harakiri. I find if you know your batteries capacity a total current is very reliable for prediction. The prediction could be and average of total Mah consumed for current armed time, and distance to home considered from that average. The existing current sensors usually have a Vref out and could be read by the flight controller on an analog pin? Could the existing input for Batt voltage pins be modified to read the Vref from the current sensor for those people that might prefer using the total current as the reading? I could not use it right now in its state because its looking for a voltage below a set-point, and if the batteries are a lower voltage, they will be trying to deliver with higher current therefore the Vref will be a higher reading, not lower...

Mr-Fiero
Posts: 216
Joined: Sat Apr 05, 2014 3:26 am

Re: Harakiri aka multiwii port to stm32

Post by Mr-Fiero »

OK, sorry for the delay posting my GPS backup from my best working unit for the config files. I had issues with Wine in Linux because that save did not like the file paths and was crashing Ucenter.

Now, This file is only my findings of what is working very well for me as I am using the Neo6 GPS engines, with 35mm active ceramic antenna's. I am having really good luck with tight fixes so here is the file in-case someone wants to play and see what they find for their GPS.

I did however enable the messages for "SVINFO" with this setup. I did this so I could see it in the GUI, as I figured that running at 115200 baud without errors, I now had some headroom for a bit more.

https://drive.google.com/file/d/0B3z3Y8 ... sp=sharing

google drive keeps converting to text file, just save it and load it with Ucenter tools.

strips
Posts: 163
Joined: Thu Apr 03, 2014 1:28 pm

Re: Harakiri aka multiwii port to stm32

Post by strips »

Great, thanks!

I'll look into what you have different from my setup.

I Have just rebuilt my miniquad with new Cobra 2204 2300kv motors. Wow there is a lot of vibrations from them. Not nice. Had hoped they would work nice without having to balance to death! So I'm not sure if I will make the bird fly with these. Might mess up the acc.

Waiting for another set of 2300kv motors. Crossing my fingers they are better! Next time I see a store with Sunnysky 2204 in stock I am getting some!

User avatar
bulesz
Posts: 71
Joined: Mon May 06, 2013 8:03 pm
Location: Hungary EU

Re: Harakiri aka multiwii port to stm32

Post by bulesz »

strips wrote:Great, thanks!

I'll look into what you have different from my setup.

I Have just rebuilt my miniquad with new Cobra 2204 2300kv motors. Wow there is a lot of vibrations from them. Not nice. Had hoped they would work nice without having to balance to death! So I'm not sure if I will make the bird fly with these. Might mess up the acc.

Waiting for another set of 2300kv motors. Crossing my fingers they are better! Next time I see a store with Sunnysky 2204 in stock I am getting some!


??? did you have vibrations from the Cobra motors?? I have thought that it is at least the same or better than the SunnySkies... ???

strips
Posts: 163
Joined: Thu Apr 03, 2014 1:28 pm

Sv: Harakiri aka multiwii port to stm32

Post by strips »

bulesz wrote:
strips wrote:Great, thanks!

I'll look into what you have different from my setup.

I Have just rebuilt my miniquad with new Cobra 2204 2300kv motors. Wow there is a lot of vibrations from them. Not nice. Had hoped they would work nice without having to balance to death! So I'm not sure if I will make the bird fly with these. Might mess up the acc.

Waiting for another set of 2300kv motors. Crossing my fingers they are better! Next time I see a store with Sunnysky 2204 in stock I am getting some!


??? did you have vibrations from the Cobra motors?? I have thought that it is at least the same or better than the SunnySkies... ???


I had only read good things about them before. Maybe a bad batch?

rank
Posts: 31
Joined: Fri Dec 06, 2013 5:27 pm

Re: Harakiri aka multiwii port to stm32

Post by rank »

Crashpilot1000 wrote:EDIT: Concerning cutting traces look at the bottom of this page: http://copter.ardupilot.com/wiki/common ... rformance/
Image


Been contemplating on putting an external mag for a while now, but every time I look at the mag chip on the rev5 board, I drop the idea. How is it possible to cut that trace without any nano/laser tools? Has anyone done it yet?!

e_lm_70
Posts: 297
Joined: Fri Aug 09, 2013 8:35 pm

Re: Harakiri aka multiwii port to stm32

Post by e_lm_70 »

Ideally, you should use a hot air soldering gun .. you could take out and put back the 5883 without much of mess .. and with minimum damage.
Alternatively .. you could use i2c soft ... but you need to check the current development of it

doppler
Posts: 64
Joined: Wed Sep 26, 2012 1:35 pm

Re: Harakiri aka multiwii port to stm32

Post by doppler »

rank wrote:
Crashpilot1000 wrote:EDIT: Concerning cutting traces look at the bottom of this page: http://copter.ardupilot.com/wiki/common ... rformance/
Image


Been contemplating on putting an external mag for a while now, but every time I look at the mag chip on the rev5 board, I drop the idea. How is it possible to cut that trace without any nano/laser tools? Has anyone done it yet?!


Looking at the trace, if you take a small drill bit and remove the copper at the via (hole) you should achieve the same results. (No warranty on my part given). When I say small, I mean something like 1mm. maybe 2mm max. Best to use a pin vice to hand drill out the copper as well. Do no drill all the way through the board, just enough to remove the copper trace on top around the hole.

Andrew

e_lm_70
Posts: 297
Joined: Fri Aug 09, 2013 8:35 pm

Re: Harakiri aka multiwii port to stm32

Post by e_lm_70 »

I don't like to suggest anybody to cut or make non reversable operations.

Why not take a different mag sensor, like the : http://www.ebay.com/itm/MAG3110-3-Axis- ... 1151142311 ... the MAG3110 has a different i2c address.
Also the new 5983 chip apparently is 1:1 compatible with 5883 but still it could redefine the i2c address (not well documented) ...

I would never ever do this cut operation ... some people on different board reported that cutting only SDA or SDC did made a mess on the board ... anyhow ...

User avatar
Dilbert66
Posts: 45
Joined: Fri Apr 04, 2014 6:09 pm

Re: Harakiri aka multiwii port to stm32

Post by Dilbert66 »

Very good idea for those that can compile their own hex after making the necessary code changes to support the different mag but otherwise the default code will pick what it knows and will ignore the new one

e_lm_70
Posts: 297
Joined: Fri Aug 09, 2013 8:35 pm

Re: Harakiri aka multiwii port to stm32

Post by e_lm_70 »

Mr-Fiero wrote:OK, sorry for the delay posting my GPS backup from my best working unit for the config files. I had issues with Wine in Linux because that save did not like the file paths and was crashing Ucenter.

Now, This file is only my findings of what is working very well for me as I am using the Neo6 GPS engines, with 35mm active ceramic antenna's. I am having really good luck with tight fixes so here is the file in-case someone wants to play and see what they find for their GPS.

I did however enable the messages for "SVINFO" with this setup. I did this so I could see it in the GUI, as I figured that running at 115200 baud without errors, I now had some headroom for a bit more.

https://drive.google.com/file/d/0B3z3Y8 ... sp=sharing

google drive keeps converting to text file, just save it and load it with Ucenter tools.


I'm using u-Center 8.10

And I still need to figure it out how can I use your config file.

In my u-Center, I can click Receiver -> Action -> Save Config /Load Config / Revert Config.

But most of the time nothing happen when I do it.

The only thing that look to works for me is:
View -> Configuration View

With this windows I can see local configuration and update each single parameters ... but this is multiple screens, so it is not an easy way to export this.

If I would understand the logic of your saved configuration:
---------------------
CFG-ANT - 06 13 04 00 0B 00 8B A9
CFG-DAT - 06 06 02 00 00 00
CFG-FXN - 06 0E 24 00 0C 00 00 00 00 00 00 00 00 00 00 00 10 27 00 00 10 27 00 00 D0 07 00 00 18 FC FF FF 00 00 00 00 00 00 00 00
CFG-INF - 06 02 0A 00 00 00 00 00 00 00 00 00 00 00
CFG-INF - 06 02 0A 00 01 00 00 00 87 87 87 87 87 87
CFG-INF - 06 02 0A 00 03 00 00 00 00 00 00 00 00 00
CFG-ITFM - 06 39 08 00 F3 AC 62 2D 1E 03 00 00
CFG-MSG - 06 01 08 00 01 01 00 00 00 00 00 00
CFG-MSG - 06 01 08 00 01 02 00 01 00 00 00 00
CFG-MSG - 06 01 08 00 01 03 00 01 00 00 00 00
CFG-MSG - 06 01 08 00 01 04 00 01 00 00 00 00
CFG-MSG - 06 01 08 00 01 06 00 01 00 00 00 00
CFG-MSG - 06 01 08 00 01 11 00 00 00 00 00 00
---------------------------------

I may try to apply manually ... even if it is looking a long procedure.

Anyhow ... apparently you are not using any configuration on the GNSS -> There is possible to activate: SBUS, GALILEO, BEIDU, IMES, QZSS and GLONASS ... these are totally blank on my current u-blox

My latest test show an error that move slowly from +/- 4 meters ... so I see my distance to home from a standing point, moving slowly (in 4 or 5 seconds) from 7m to 15m ... so only a 10 second filter could absorb this error, but 10sec filter is too bad to be used.

If anybody has some experience on configuring these u-blox ... it will be nice to know ..

Thanks

e_lm_70

e_lm_70
Posts: 297
Joined: Fri Aug 09, 2013 8:35 pm

Re: Harakiri aka multiwii port to stm32

Post by e_lm_70 »

Problem solved ...

On u-center 8.1 ... the option is TOOLS -> GNSS Configuration.

This is the item for load and save ..

So ... I did import Mr.Fiero configuration, I think the main difference was the 3D Pedestrian in NAV5 option and the NAVX5 options.

I did set back in NMEA and 38400 bps ... so .. later I will check if it is better

Mr-Fiero
Posts: 216
Joined: Sat Apr 05, 2014 3:26 am

Re: Harakiri aka multiwii port to stm32

Post by Mr-Fiero »

Yes, Pedestrian mode (tried stationary and didnt work well) and Pdop mask and Hdop mask and sat elevation at 8 degrees if I remember

its only NAV5 options that you will use if your setup correctly.

I did also disable any ports not in use, and only run messages needed. It also has position updates at 5Hz as the Neo6 only really does 5Hz, if you set higher its pointless as the GPS engine wont handle it correctly. SBUS, GALILEO, BEIDU, IMES, QZSS and GLONASS, assist now, and more, have all been disabled as they wont help much. I tried to reduce as much overhead as possible for the GPS engine. I have Ublox-7's as well, with the smaller 25mm ceramic antenna's, and I even disable all those options on them too. I use this same file to start the config on the 7's. GLONASS wont get a better fix...maybe faster fix, but not more accurate! It is counter productive to use systems that don't have the same accuracies. I reject bad data, bad signals/positions with my config.

also enabled the filters for RF signal rejections as I run 1.2Ghz for video TX and ch1 is the only one that will operate without swamping the GPS @ 1080Mhz, but even still I had to notch my antenna's to provide a bit more isolation from the GPS.

Baud at 115200 is fine as the 32bit flight controller handles it well. I had the baudrate high because I am trying to reduce the GPS latency any way possible.

Dont do all your testing how tight the GPS is on the bench as its a false indicator due to multipath issues, signal strengths. You will never be able to see it properly. Its way to sensitive to changes and you just cannot see the true compare. The thinking, "I get a good fix in my basement, but a better fix with a change in the basement, therefore its better" is wrong. GPS cannot properly work that way, and the results are tainted. Skyview is a minimum requirement for proper testing of accuracies. Best signal strengths/quality are also critical. Then quality of SV's is next.

With my GPS file, it might take longer your first fix, and after that you may see less sats, but it is a tighter fix, and fairly responsive. I am having good luck with the current settings on the Ublox and find when I use my file now, it performs in several machines the same. This setup was after allot of testing and reading each setting in the Ublox, many hours of flight tests. Works for me, but if anyone has any better suggestions that can be done, let me know. My thoughts have been, get the GPS, with minimal delays, best accuracy possible because its so dynamic with the flight controllers, and they need this info as its critical for their next response.

e_lm_70
Posts: 297
Joined: Fri Aug 09, 2013 8:35 pm

Re: Harakiri aka multiwii port to stm32

Post by e_lm_70 »

Thanks Mr.Fiero for the clarification.

When I make static bench test on my GPS .. I'm always outside, I don't get a GPS fix indoor ... it may follow me a GPS fix from outdoor to indoor .. but I hardly can make it start to work indoor.

So ... today I did check your setting, I did adapt them to 38400 and NMEA, I need 38400 since I hack GPS on my KK2.0 running multiwii, and using this speed I get the best CPU performance (the 2% error at 115200 is something that I don't believe ... anyhow)

Still I see huge movement ... my MutiWii GUI does show me the distance to home ... and I see this moving around even 10 meters.

So, my GPS hold is really terrible on my Neo 6M ... I'm thinking to maybe try a different GPS module ... my MTK is not very precise but does not make error so big as the NEO6

Maybe I should be more patient ... and wait 10 minutes before start to check the accuracy ...

I'm also hardly getting more then 6 or 7 satellite ... ok ... today test was also quite bad, very very cloudy sky, since it was storming just before my tests.

Anyhow ... I'm quite happy that I find after days, a dummy mistake on my ACTION mode on MultiWii ... still this dummy mistake did help me to improve massively my GPS handling, since I did redesign / optimize some MultiWii area needed on a simple Atmega324chip with only 2K ram ...

Anyhow ... I will keep your GPS setting on my NEO6 ... it is not worst then before, maybe on a sunny day I can get better results.

PS: The NAV 5option on uBlox is what also what 3DRobotics is suggesting for their Arducopter .... so ... definitely your configuration is a good one ... I'm just not sure the Antenna on my NEO6 from HobbyKing is decent or not ... also I may have some noise due to FrSky telemetry RX that is sitting 15cm far from the GPS module ...

Mr-Fiero
Posts: 216
Joined: Sat Apr 05, 2014 3:26 am

Re: Harakiri aka multiwii port to stm32

Post by Mr-Fiero »

As a quick test, are you able to place a small sheet-metal under the GPS? a lid off a can, or something larger than your current GPS just for a test? see if increasing the ground plane under the GPS increases the accuracy, and if it does, its a signal strength issue.

I am playing with this antenna and having good results. The neo-6m will run it well.
http://www.ebay.ca/itm/32db-High-Gain-R ... 324&_uhb=1

About your telemetry, it would have to be a harmonic, but you can test that by watching the signals from the SV's, and unplugging/plugging in your power to your FlySky.

Also, try to run the GPS via the TTL only via USB for power, and see if its better than if the GPS is powered via flight controller bus. If it is better than you might be seeing noise on the power bus, and as I suggested in an earlier post, I think the active antenna's on the GPS's have poor, or no filtering, therefore subject to noise.

Or, as you suggest, could always be a faulty engine/GPS.

On cloudy days, I get only 6 - 10 at most SV's, but I can still make it stay tight in a loiter/PH. My deviation in Ucenter is only maybe 1M over a period of about 15 minutes.

e_lm_70
Posts: 297
Joined: Fri Aug 09, 2013 8:35 pm

Re: Harakiri aka multiwii port to stm32

Post by e_lm_70 »

Thanks again for the tips ...

I did order this antenna ... let see if it can make miracles.

I can easily use some aluminum foil for make a protection base for the GPS ..
Also I may try to add a diode and a big cap for power the GPS ... still my MTK does not bother to be in parallel to the control board power line (it is also on a different board, and it has a better voltage protection/isolation in that board)

Since my TX is an old FM 40Mhz + 2.4G module ... I did notice that with my TX very close to the copter/GPS ... I was having problem on get stable the GPS Fix ... it was intermittent fix up to 5 sat, and then all get lost ... once I move more far my TX ... it got stabilized faster ... so ... definitely my GPS suffer a bit in the environment where I did place it ... still when I fly, my TX is 20m or more far from the copter.

If I can get a decent GPS accuracy, than I'm sure I can massively improve GPS hold also on simple MultiWii .. and this will be very good for my "show up" of KK2.x doing MultiWii.

As well , at the moment with 10m error, I can't do much experiment in my back yard ... since I have huge trees around ... with so poor accuracy I need to make tests only on a big open space

PS: You should make maybe a little article / blog ... with all your tips related to GPS and Harakiri ... I'm sure many will benefit from it. There is not much info around especially on GPS tuning.

Mr-Fiero
Posts: 216
Joined: Sat Apr 05, 2014 3:26 am

Re: Harakiri aka multiwii port to stm32

Post by Mr-Fiero »

if you add a diode, it will have a voltage drop of .5v and that will reduce the gain on the active antenna. I run my power bus on the FC at 5.5Vdc so the active antenna on the GPS has max voltage. If you look at the parasitic power supply suggested by Ublox, it has no regulator to the antenna so max voltage would probably be best for gains. So, I imagine the antenna manufactures will have a minimal circuit due to production costs. Since they are so cheap to buy, I would bet on this.

I have not confirmed myself if the parasitic power is fed from the neo6m directly with minimal circuit, or if they take it off a regulated power from the daughter board. I instead just kept my supply voltage at close to max and either way it will just work. But one thing I do know, is on my GPS daughter board, there is nothing for filtering of power circuit.

Hey, you know, its a bit pricy, but with your telemetry a filter like this WOULD help with the second order RF harmonic. Place it on the telemetry TX.
http://www.dronesvision.net/en/wireless ... ivers.html

Mr-Fiero
Posts: 216
Joined: Sat Apr 05, 2014 3:26 am

Re: Harakiri aka multiwii port to stm32

Post by Mr-Fiero »

> Crashpilot1000

Hey, just to let you know, I am testing allot. I just dont have anything new to report. But, I have been flying a massive amount of time with Harakiri and its been really reliable. I am now using for my other projects as I have gained a new confidence in the performance on my multicopters, especially using GPS functions. The small drift on PH activate, upon further examination, looks to be the delays, and brake as you suggested. My ONLY wish at this point is that it was a bit quicker to lock. But that being said, I only drift 1M if the wind is 0 - 25Km/Hour. This of course increases as the wind increases up to usually 2M max in say 40Km/Hour winds. Its the calm days that bug me I guess because in the wind it just feels expected.

Your future fixes for the Alt hold / return to centre first issue, will be nice :) Looking forward to someday testing that code. I did look in the git repo but did not see it yet.

If I notice anything new about Testcode3, I will post. I would test the Testcode4 but the GPS never seemed to work. I am always tempted to find out why, but I am having way too much success with Testcode3, and for now I like to be in the air.

strips
Posts: 163
Joined: Thu Apr 03, 2014 1:28 pm

Post by strips »

I'm just so annoyed that I don't have any motors for the moment! I want to fly!

Mr-Fiero
Posts: 216
Joined: Sat Apr 05, 2014 3:26 am

Re: Harakiri aka multiwii port to stm32

Post by Mr-Fiero »

Been there.....

User avatar
Crashpilot1000
Posts: 631
Joined: Tue Apr 03, 2012 7:38 pm

Re: Harakiri aka multiwii port to stm32

Post by Crashpilot1000 »

Hi, guys!
Sorry to not chime in into the discussion lately. The main difference between testcode 3 and 4 was the spikefilterusage and I found out that using it all the time is most probably a good idea (so that resembles more to testcode3 in regard to PH in the final stage) however there are some things according modeswitching, filter runuptime and sudden gps losses to consider. So currently the "gps softwarecables" are dangling around in the "engine bay". Because that takes some time I thought of porting of "what is already done" back to testcode 3 (yaw "I" stuff, gyro resolution, improved althold midstickposition passed detection, fixed my too lame horizon mode). Concerning the gps quality there is a difference in hardware - I also have a cheapo ublox(ubx6) that likes to spike around and a navilock that is steady as a rock. But having a GPS groundplate of some sort is an absolute must have item (cut out a 6x6 cm alu/copper/whatever plate, ground it if possible).
Related to additional voltage/ampere sensors - I have no intention to do that because I will screw things seriously up trying. My knowledge of the lowlevel timer/interrupt stuff is minimal (near zero) so old and proven code is used in that area.
Concerning the magnetometer it is a designflaw in general with 3 parties involved. 1) Honeywell for having a fixed I2C adr. (the datasheet seems to hint at I2C adr switching but no one has that working..) 2)The mainboard for having no jumper to deactivate it 3) The builder of the copter (aka yourself) for putting it too close to disturbance and/or not minimizing disturbance (groundplate, twisted powercables etc).
The proposed MAG3110 seems to be worse than honeywell counterparts. The only "unbloody" solution to override the onboard mag that comes to my mind could be a softI2C on some other pins...
Cheers Rob

Post Reply