Jump to content

Small can be beautiful


Recommended Posts

Posted by Martin Rogers on 05/06/2015 15:46:14:

Hi I just stumbled across your very interesting forum and I am at about the same stage as you. My quad is flying well but will not hold GPS position I have GPS fix on 10 satellites but the quad just hovers for a couple of seconds before darting off randomly at which point I have to take control. I have set the magnetic declination and tried adjusting the pos P setting from 0.11 up to 0.5 and reducing the slew to 10 but with no luck. my hardware is a CRIUS MWC MultiWii SE V2.5 Control Board W/GPS NAV Module Combo as in the link below

 

**LINK**

 

I have seen a post online stating that the GPS module itself needs to face the front which I'm not sure is correct (as I thought it just supplied position information) but can't see any arrow on the module anyway. The magnetometer is correctly calibrated having checked the heading shown in the GUI with a compass. The compass does move 2 degrees with full throttle applied but I wouldn't have though that this is the problem. Any suggestions would be greatly appreciated as I'm running out of things to try .

 

 

Hi Martin,

welcome on board! First let's deal with the question about whether the GPS has to face forward. The answer as far as this GPS is concerned is "no". With the DJI GPS you do have to orientate it with an arrow printed on the top of the unit facing forwards. That is because it contents both a GPS and the magnetometer. But for us the magnetometer is on the MultiWii board - not in the GPS - so GPS unit orientation is immaterial.

I've been up to my neck the last couple of days - but its windy (again sad) today so I'll be getting into the shed this afternoon to try to solve some of these issues with the GPS - I'll report back tonight.

BEB

Edited By Biggles' Elder Brother - Moderator on 06/06/2015 12:12:33

Link to comment
Share on other sites

Advert


Hi BEB

I tried EZ-GUI again today with position hold.
Looking at the GPS info the direction to home field did not seem to make any sense as it stayed pretty constant between 90 and 60 whilst turning the quad through 360. The heading field was correct however ie showing zero when facing north
Link to comment
Share on other sites

Well, very frustrated!!!!

I've downloaded the software for the i2C-GPS board, made the appropriate changes in the config.h file and can I reflash the software to the interface board? Can I hell!

I've looked at all the obvious stuff - COM port set correctly, board connected to the FTDI correctly, rang-out the wires to check them, swopped wires round to supply GND and +5V from different combinations (to further check continuity) all well. But the Arduino IDE will not upload the software to the chip - it says "the programmer is not responding".

Puzzled at present. Was starting to get pretty frustrated so I've decided to have a sleep on it, before I throw it out the window in temper! Anyone got any thoughts?

Martin - one thing that does confuse me about your situation is you say you have 12 satellites? That's a hell of a lot more than usual! Normally you'd get 5-6 maybe on a very good day 7. But never 12!

I'm wondering if your device is seeing more than one system - e.g. GPS and GLONASS? Does it have the capability to decode other satellite systems? If so could this be confusing it? Just a thought.

BEB

Link to comment
Share on other sites

Hi BEB

Try connecting all available lines. I'm not sure I fully understand the handshaking, but it worked for me.

I2C GPS                   FTDI232
NAV 

DTR----------------------DTR
Tx-------------------------Rx
Rx-------------------------Tx
Vcc------------------------Vcc
Gnd-----------------------CTS
Gnd-----------------------Gnd

Edited By Chris Bott - Moderator on 06/06/2015 18:54:31

Link to comment
Share on other sites

Hi BEB

Its some time since I set up my GPS but I f think I followed the Painless 360 Multiwii SE V2.0/2.5 Utube video and it all worked well. So sorry I cant really help.

My GPS position seems fine as EZ-GUI has a map option that shows your quad position on google maps

I walked round my garden and it overlayed it on the map perfectly. The multiwii therefore seems to know its location, the distance to home (arm position) and knows where North is. I am wondering now if it is the PID setting and it is overshooting madly. Nest still day i'll try again

Link to comment
Share on other sites

That suggestion of connecting all six lines worked well Chris and the software changes to the interface board have now been uploaded.

The software can be found here - download the zip version and then copy the files from that folder onto an unzipped folder on your desktop. If you open the Arduino file in that package you will get a warning that says something like: "Can't open file. File needs to be in a sketch folder, Do you want to move it there?" just say "yes" then copy all the other files in the package to that new folder.

Open the "ino" file with Arduino IDE and then locate the tab with the config.h file. We only need to make two changes:

1. Set the speed to 115200

2. Set the protocol to UBLOX

You do the first of these by editing the number and the second by commenting out the MTK line and uncommenting the UBLOX line.

Then set the COM port to the correct value for your FTDI board - in my case COM10. Connect the interface board to the FTDI board as Chris shows above then select File and Upload. All should go well.

Next we have to make a couple of small changes to the FC software - so it's back to the code we edited originally when we set stuff like #define QUADX etc.

The changes I made here are in the GPS section of the config.h file again and were::

1. #define GPS_BAUD 115200 (This is probably not necessary - but I did it anyway!)

2. #define UBLOX

3. #define I2C_GPS

Setting the COM port to COM9 (the port for the FC) I then uploaded this code. At this point I got a warning -

"Low memory available stability problems may occur - Global variables 1747 bytes, leaves 301 bytes for local variables"

Mmm, well its warning - not an error. Although 301 bytes for any local variables does not seem much!

I now connected the GPS to the FC, connecting the +ve and GND leads and connecting SCL to SCL and SDA to SDA - which makes sense to me as SCL is the clock signal and SDA the data signal. Then I powered everything up.

It went bonkers!!! The Artificial horizon in the GUI was rolling all over the place, the accelerometer traces were doing a jig and the little quad icon was flipping backwards and forwards! While this was going on the I2C error count was whizzing upward at a fine old rate! Finally, although there was power to the GPS - the blue LED was on - there was no sign that the GPS had a signal, there was no green LED which indicates a lock. Is this what "stability problems may occur" implies?

On the plus side (!) all the GPS "stuff" - i.e. new flight modes etc. had appeared in the GUI. But the Lat and Long etc were all zero.

I disconnected the GPS - the system remained in "crazy mode". So I stopped the GUI, shut it down, reconnected the GPS restarted the GUI and,.....it was fine. The GPS green LED was on, the artificial horizon was behaving itself - as were the accelerometer traces - and most importantly the I2C error count was fixed at zero. But there was still no Lat and Long in the GUI.

Finally, I noted that AUX1 seemed to have stopped working! I could toggle the switch on the Tx, the channel indicators (both in the Tx and the GUI) showed that the value was changing in the way it should - but the flight mode table was not changing - ie the different flight modes were not going green as the switch was moved.

Finally I tested to see if I could still arm the quad - and that was fine.

So, that's where I am up to - some progress, some promising signs - but we're not there yet.

BEB

Link to comment
Share on other sites

Hi, I haven't done any of this yet, that's tomorrow's job but in the painless 360 u tube vid you linked to earlier, did he have and extra step when editing the ino file for the I2C board. I think he also commented out the line
define NE06_NOT_CONFIGURED_AT_POWERON
Don't know if that would help.
Nev

Link to comment
Share on other sites

Two other things.

I did notice very early on when I was sorting out the TX that on one occasion the Aux switch didn't toggle the white boxes, closed it down and started up again and it's been ok since.

I can only arm mine in certain flight modes, angle is ok but nothing more complicated

Doesn't solve the problem though.

Link to comment
Share on other sites

An almost breathless night so I have been trying to get in a bit of flying practice. Coming from a fixed wing background I learned 2 things tonight.
1 a neck strap helps
2 I have an almost instinctive impulse to chop the throttle if I'm running into trouble. At one point I was bouncing it across the field as I chop the throttle and then try and recover before it hits too hard.
Presently surprised how rugged it is but it does eat props !
Slow but getting there.
Nev.

Link to comment
Share on other sites

Hi Nev,

I didn't see the line define NE06_NOT_CONFIGURED_AT_POWERON in the file, but maybe I overlooked it. I'll have another look though in case I have missed it.

Yes, it is a fundamental difference between rotor and wing flying. You can't make a rule that always works - but as a generalisation while its usually a good idea with a plane to cut the throttle when you are in trouble - with a rotor it's often wiser to actually put more power in!

But despite what many plane flyers think - they are not trivial to fly, especially, in manual are they? Plenty of challenge there for any pilot!

BEB

Link to comment
Share on other sites

Posted by Chris Bott - Moderator on 05/06/2015 18:19:25:

Hi Martin and welcome aboard. The only think I know to ask about the GPS would be: Does it shows a locked and working, as expected in the Multiwii GUI?

I've gone and bitten the bullet and fitted prop guards to mine. While I feel a bit like a 6 year old with stabiliser wheels on my first bike, I hope it's going to save me money in props.

img_4813 (large).jpg

Hi Chris

Looks like a good idea. Where did you get them from?

Martyn

Link to comment
Share on other sites

Yep, from Hobbyking (UK). They are mostly a good thing, but as I said, I have put it down once such that it was the guard that broke the prop. I think at the stage I'm at, a large stock of props is the best idea.

OK - Fanfare - I seem to have sorted the GPS.

Simply by flashing the Flight Controller with eeprom_clear, and then re-flashing with Multiwii 2.4, all set up for our board, CPPM input and I2C GPS.

eeprom_clear can be found in:- File_Examples_EEPROM
It looks like it may be a good thing to do if ever we're struggling with something that should be working.

A quick flight test after a acc and mag calibration and it appeared to be doing a job in GPS hold mode. Well, it seemed to be keeping the quad within the bounds of my lawn at least.

UPDATE - Just put a whole LiPo through it on GPS hold. It's nice to see it wander off about six feet an then gently come back to takeoff position all on it's own. I think I only touched the right stick once during that flight and it would probably have been fine if I hadn't.

Link to comment
Share on other sites

I'm at BEB's crazy mode stage. No GPS or AUX switches, lots of I2C errors but sticks and artificial horizon etc look ok. Tried The Clear EEPROM and re load but no difference.

I tried commenting out the #define RCAUXPIN12 line again, just in case as I assume Chris isn't using that but just the same.

Try again tomorrow I think
Nev.

Link to comment
Share on other sites

Hi Chaps

Query from Stone age Tech Corner.....

Moving back slightly to the stage of adding the #define MAG_ORIENTION..........line, I'm having trouble identifying where exactly in the configh file script I have to add this, and which lines or line I then have to comment out.

Getting to grips with this slowly but still very much trying to learn to crawl before I learn to walk!

Rich

Edited By Richard Elliot on 10/06/2015 07:41:14

Link to comment
Share on other sites

Hi Nev,

I might be "teaching my grandmother to suck eggs" but here is a thought:

Check the connection between the interface board and the FC. The SCL and SCD leads needed swopping over on mine. SDA on the interface board should be connected to SDA on the flight controller - and vice versa SCL connected to SCL. They should not be crossed over - as they were on the lead as supplied.

You might already have done this - but just in case you haven't spotted it.

BEB

Edited By Biggles' Elder Brother - Moderator on 10/06/2015 10:05:41

Link to comment
Share on other sites

Hi Richard,

as promised I have had a look in the code. Here is the location:

File: config.h

Block: Section 1' Basic Set up'

It is near the end of the section under a comment that says:

"/* enforce your individual sensor orientation - even overrides board specific defaults */

Add the line to the end of that group of three lines - comment the other lines out.

Remember - check that you need this by checking your compass in the GUI.

Hope this helps

BEB

Link to comment
Share on other sites

I think we're on the egg sucking course here BEB, so don't hold back, crossed wires sorted it. I had spotted they were crossed last night but assumed that's how it should be, same as the RX to TX on the GPS.

So I had everything sort of working on the GUI but couldn't get any response to my Switch on AUX2 and that's where I did something silly. I wasn't sure which was the correct input position.
The position next to AUX 1, printed AX2 on the FC, didn't work
The position D12 (AUX2) next to the motor connections didn't work
Only position left and the most likely candidate D12 (AUX2), printed PWR on the FC, didn't have any pins. So before I stripped the board out to solder some pine on, I thought I would just try it by holding the wires in place. Don't know what I did but now I don't have any communication from the FC to the GUI !

Will have another look tomorrow but may be ordering a new FC frown
Nev.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...