Jump to content

Small can be beautiful


Recommended Posts

It looks like this is too late to help Nev, but there is another issue with installing drivers:-

"Microsoft doesn't allow you to install drivers which are not 'digitally signed' directly (or easily) on later versions of windows (7 and 8). To get around this you must temporarily disable the signature verification process."

How? depends on you Windows version.

I hit this problem trying to install USBasp drivers on Windows 8.1,

(Couldn't get hold of a Micro-Wii, so I needed this to update the firmware on my KK2.1.5)

Currently waiting for replacement propellers !!!

Link to comment
Share on other sites

Hi Geoff, I'm not sure if that was my problem or not but it was definitely a Computer Says No moment, thankfully it was easily resolved once I found the "fix"


Just a thought about the power for the board. 4 x ESC's with 4 x BEC's, isn't this usually a no no with multi fixture wings ? I'm happy to go with it if that's the way it's done, just curious.


I think I have most of my bits now thanks to Chris' reminder about the connectors. Done the initial set up which went ok. The role seems reversed to the GUI display but I'm assuming the compass fix will cure that, I've yet to try it. Done all the soldering and now building up the frame. Enjoying it so far, should get to have a ply at the weekend.
Nev.

Link to comment
Share on other sites

Hi Geoff (for those that don't know Geoff and I are clubmates!)

Good point on the driver. This driver really does take a long long time to load, even when it goes OK.

BTW, all the documentation for the Multiwii software refers to Windows 7. I don't see any really reason why it wouldn't be OK with Windows 8 - but I can't vouch for it.

BEB

Link to comment
Share on other sites

With no real time to do any construction, I've been having a play with the flight controller too.

The driver really did take a very long time to install on the PC, but it did do it, first go.

Arduino IDE went well, boy there's a lot of code in a multiwii. Thankfully we only seem to have to alter one file, and everything seems logically laid out in the one. A few // added and a few // deleted and I've followed BEBs instructions fine. Click file and upload, and the software first does the compiling, and then uploads it to the board. Changes appear to be automatically saved in the file on the PC too.

The Multiwiiconf program - I seem to have to use the 32 bit version even though I have a 64 bit win 7 machine. But it works fine. Every now and again there's a glitch, but stop and start it, and we're away again.

So, on to my first problem. All the on board sensors appeared to work so it was time to connect a receiver.

Even this went well, connecting 4 channels gave me control of 4 channels on screen. Connecting a 5th had a switch operating a channel ready for flight mode selection, but adding a 6th just caused everything to grind to a halt.
BEB can you offer any suggestions of a tweak to enable more than one Aux channel?

Link to comment
Share on other sites

Moving on, I wanted to try a receiver I have that I know can give me CPPM. Composite PPM, i.e. all channels on a single connection, just the same as a buddy lead.

This went rather better. There's a few lines in config.h about this, I removed the // from the line that enables CPPM and removed the // from the line which ended with a comment suggesting it was for the Spektrum channel order (which I tend to stick to since my JR days)

Note here: The channel order in the programming line makes no sense to me whatsoever, but left as it's written, it works fine. (Confession - I thought I knew better and rearranged it - and caused pandemonium. Lesson learned - leave anything you don't understand, well alone!)

So here we have it. A 5g receiver, with 4 control channels and 4 Aux channels all working perfectly.

multiwii cppm.jpg

Link to comment
Share on other sites

That's really neat Chris! Saves a lot of wires. I believe the Multi-Wii code also offers an SBUS option - for those feeling adventurous?

Regarding AUX2, you have to make a small tweak to the software to activate AUX2 etc. Basically you just have to go back into config.h and uncomment the line

#define RCAUXPIN12

and if necessary comment out the line #define RCAUXPIN8 if necessary.

An extra piece of info. If you just want a particular flight mode to always be active you can simple check that box in the GUI matrix and assign no switch. The feature should then be permanently enabled.

BEB

Link to comment
Share on other sites

Although not essential for this, there is an Arduino Starter Kit from Banggood available for the princely sum of £17.14

The Documentation and sample projects are available from here

These kits are brilliant for newcomers to microprocessors - if you are interested and always considered them too difficult, I recommend that you have a go.

Best wishes

Martyn

Link to comment
Share on other sites

Chris,

Watch out for the CPPM output from the FrSKy RX.

You need to get the Multiwii config software running on your PC and make sure that all the Pitch, Roll & Yaw signals are stable and centered.

My experience of doing this (which is very neat) is that the channel value drift or wobble around and it causes chaos in the Multiwii PID loops especially on the Yaw (Rudder) channel.

If you want to do some tuning at the Fun Fly, I have a laptop with the MultiWii config software on it...

Cheers!

Jim

Link to comment
Share on other sites

Oh, and on the subject of neat RX connections on MultiWii.

There is an option / feature to connect and read a Spektrum Satellite receiver unit directly from MultiWii. There is a small wiring issue to do with 3v3 / 5v rail if I remember...

Might help the Spektrum guys...

Link to comment
Share on other sites

Thanks Jim.

The multiwii config software shows my 8 channels as rock solid. I see no worries there.

On the Spektrum satelite connection - you seem to have to choose between having either the spektrum connected OR the USB, but not both at the same time. That's on the board we've bought anyway.

So I don't quite see how you test that with the PC?

Another solution for Spekky users might be this Orange Rx, which has CPPM out.

Link to comment
Share on other sites

Posted by Martyn K on 21/05/2015 09:52:12:

Although not essential for this, there is an Arduino Starter Kit from Banggood available for the princely sum of £17.14

 

The Documentation and sample projects are available from here

 

These kits are brilliant for newcomers to microprocessors - if you are interested and always considered them too difficult, I recommend that you have a go.

Best wishes

 

Martyn

Good suggestion from Martyn there. Most folks might not know, and I hope Martyn doesn't mind me revealing this, but he is keen robotics guy and has a lot of experience with these Arduino based systems - and similar. So good advice there.

BTW - now that their kit has arrived its really great to see more folks getting involved - I as beginning to feel a bit lonely! I'm still waiting for my GPS stuff to be delivered, but I have at least been having a bit fun flying the quad and seeing what it can do in the flight modes we have so far!

BEB

PS Good stuff from Jim to - nice to have another bod with MultWii experience on board.

Edited By Biggles' Elder Brother - Moderator on 21/05/2015 13:43:19

Link to comment
Share on other sites

Chris,

Wow! Rock solid I could never get mine very tight.

I believe that older versions of the MultiWii firmware didn't have very good timing / resolution on the CPPM "reading" code. I think the CPPM coming out of the RX was solid but the timers in the MultiWii code had jitter in them.

Keep an eye on the "Cycle time" value that's reported in the MultiWii config software. It should to be less than 5 milliseconds (or 5000 microseconds as it reports them) ideally.

On the Spektrum Satellite connection and USB port question: I think that is unlikely. USB is two differential data lines, but I thought the Satellite connection went in on a normal digital input pin like the CPPM does...

Never tried as I don't have any Spektrum gear.

I will try to download the latest MultiWii firmware source and take another look. I haven't looked at it for some time now...

PS: Going up the field now (16:00) to check on status...

 

Edited By Jim Mchugh on 21/05/2015 15:57:45

Link to comment
Share on other sites

Posted by Biggles' Elder Brother - Moderator on 14/05/2015 23:26:11:

We have to add a line to the code. So open up the Arduino IDE and go to the config header tab as before and add the line:

#define MAG_ORIENTATION(X,Y,Z){magADC[ROLL] = -Y; magADC[PITCH] = X; magADC[YAW] = Z;}

Am I correct in thinking first you have to un comment the line then edit to correct for -Y and X. I think my line of code it show ROLL = X and PITCH = -Y (which I assume is where the problem lies).

Sorry if that's an obvious question, just checking as up till now all I have had to do us add or delete the //'s

Everything else is going well, connected the motors last night, had to calibrate the ESC's straight away as only 3 would start initially. Adjusted the end points on the TX so I can Arm or Disarm, just need to calibrate the accelerometers, fit some props and we should be good to go.smiley

Nev.

Link to comment
Share on other sites

Hi Nev,

yes you have to comment out the original line and then type that line in. Then check your compass to ensure that its pointing in the right direction and that north is indeed north!

Have you calibrated your ESC's via the throttle full open technique and the temporary line I mentioned above? If not its a good idea to do that.

My GPS receiver unit arrived today (yipee!), but my ublox to I2C interface board has not arrived yet (boooo!) so I have to carry on waiting!

BEB

Link to comment
Share on other sites

Thanks, I thought that must be the case but just wanted to check before I messed anything up, all the pages I read online just said " add the line" I wasn't quite sure how literally to take that.

Yes I used the temporary line in the code and powered up with throttle open, worked a treat and brought the 4th motor in line.

Like you I have a gps but waiting for the interface but I still have a bit of testing to do first and learn to fly of course surprise

Link to comment
Share on other sites

Well after all that it doesn't look like I need to do it !

I did the Calib-Acc and Calib-Mag first, just so I could follow along with BEB and see the changes but after that I put the quad down pointing North and the GUI said North ! Turned to the west it said west

I think the yaw pitch and roll are all in the correct orientation. Maybe I need to check my compass?

Link to comment
Share on other sites

Nev mentioned "learning to fly quads". Well obviously its not desperately difficult, but I did think a few pointers might save a few set of props! So here goes:

1. If you can fly a helicopter then a quad in manual will feel very similar and the whole business shouldn't present too many problems. However be aware of one thing; initially keep it quite near to you, orientation is much more difficult on a quad than it is on helicopter.

2. You have not flown a heli then your first challenge is going to be taking off! Put the quad down facing away from you, step back about 6 to 10 feet for a little-un like this. Arm the quad, then immediately lift the throttle to about 1/3 and pause. Switch to "attitude" or "horizon" mode - you'll find it a lot easier in this mode to start off with. Every quad is different about spooling up, so you need a little delay here to let all four props synchronise up to speed. If you just "go for it" you'll find one prop will speed up much faster than the others and the most likely result will be the quad flips itself over! After your little pause, just a second or two, push the throttle to 1/2, as soon as the quad goes light push to 2/3 and you should get a nice straight lift off.

3. It will be climbing quite strongly now so back off to hover - about 1/2 throttle and just try to keep it still at about chest height to you. You'll probably find pitch and roll much more sensitive than yaw - that's common - and that it is quite hard work keeping it reasonably on one spot. Most folks have a tendency to over control, the quad takes a moment to get moving, then when it does it goes off in a rush!

4. Most important! If you decide to have a go in manual (that's no flght mode on in this set up) you need to understand that if you put some forward in it will tilt and start moving forward. If you hold the forward in it will tilt more and more until its inverts and you crash it! So a "dab" of forward and return to centre will result in a tilt and it will hold that tilt and set off away from you. It will accelerate then horizontally and start to sink - because some of the thrust is going into pushing the quad forward. So to fly forward at constant height you may have to nudge the throttle up. To stop the quad, nudge the pitch backward - note if you only nudge enough to level it then it will carry on moving forwards for some considerable time - because of its momentum. To really stop it 'on a sixpence' when moving forward you need to nudge back passed the level until tilting backwards slightly to 'put the brakes on'. Then you need to time the return to level with nudge forward just at the point when it stops moving. Flying in manual is not easy - some multi-rotor forum sites will tell you its "impossible" but that's rubbish, its just that they have never flown anything else and they have spent too long flying in GPS-Hold or ATTI mode! But flying in manual is well worth mastering - because its very satisfying when you do it well and great fun for aerobatics.

That should get you started! If anyone wants an other tips on flying quad just ask. There are some good exercises you can do to improve your control.

BEB

Link to comment
Share on other sites

It flies smiley


Fitted the props, powered up and did the tilt test, then got giddy, so while BEB was typing his good advice I was having a go. I have to confess that in my haste I didn't enter the recommended PID start points but I had entered the 2 fright modes "Angle" and "Stable " BEB showed before.
In stable it was manageable but a bit rocky but I think I had the pitch reversed, push the stick up an it came back to me, pulled it down ant flew away. Didn't think to stop and reverse the channel, too busy trying to work out which way was correct and there lies the problem with teaching your self to fly but I'm happy that way.


Well pleased, although I lost it in the end, tried it in "angle" and it just kept creeping further and further and higher away. And just as predicted the further it got the harder it was to bring it back. So the landing was a bit hard. No damage but did chip a prop.
Next time I'll be in a calmer mood. devil thanks BEB, good project.
Nev.

Link to comment
Share on other sites

I've had a nudge that this stuff about commenting and uncommenting lines could do with explaining in a bit more detail for those less familiar with computing stuff. So here goes:

The way the computer programme works (like most these days) is that it consists of two types of files;

1. The main body of the code (which at this stage at least we are not involved with)

2. What are called "header files" - these we are concerned with.

Header files basically set the programme up to run. They contain definitions of terms that will be used in the main programme. The definitions are grouped together by themes in the header files. One particular header file we are concerned with defines the configuration - its called the config.h file. So, for example, one of the definitions needed is; what type of multi-rotor it is we are controlling. It could be:

a) quadX (a quad that flies so it looks like a letter 'X' when going forward and viewed from above)

b) quad+ (a quad that files so it looks like a '+' when going forward and viewed from above)

c) quadH (you get the idea!.....)

d) Hex.....

e) Octo..... etc. etc.

One thing is for sure - it can't be more than one of these! So what the software boys and girls do is put all of the definitions for all the different types in the code, BUT they "comment out" all bar one of them. That looks a bit like this:

//#define QUADX

//#define QUAD+

#define QUADH

//#define HEX

//#define OCTO

Now the computer - when it is processing this code - will completely ignore any line that begins with the characters '//' You can see above that that means that all of the lines above will be ignored, except the line: #define QUADH. Because it doesn't have a '//' in front of it. This is great if the multi-rotor happens to be an 'H' configuration quad! But suppose its an 'X' configuration quad? Well easy, you edit the file and:

1. first you type in '//' in front of the line '#define QUADH' - that's called 'commenting out'

2. you delete the '//' from in front of the '#define QUADX' line - that's called 'uncommenting'

This disables the QUADH line and enables the QUADX line. So now the computer will know that the machine is an 'X' configuration quad.

The origin of these expressions is that, in the main body of the code, the programmer will from time to time want to leave a message to remind himself, or to tell another programmer, what a particular bit of code does - its not always obvious. These messages are called 'comments' and the symbol '//' is put in front of them so the computer will not think they are commands and get confused.

Really good programmers put plenty of helpful and clear comments in to help others - really bad ones write hundreds of lines of code with no comments or, worse, completely incomprehensible and meaningless comments!

So that's the origin of comments - they are being used here a slightly different way. They are there to enable us to customise the code to our application, without having to actually write new code. Its a sort of  'pick n mix' approach. We can do what we want by choosing which lines are active and which lines are commented out in the definitions, and so made inactive.

Hope that helps anyone who has been a bit 'at sea' about all this commenting and uncommenting lark!

If anything is unclear please don't hesitate to ask - I'd really like this thread to encourage people to have a go and if something is not clear for you, then its probably confusing others as well and we 're happy to try to sort it out between us. remember, there are no daft questions except the ones you don't ask! We ALL had to learn - and we are ALL still learning! As will be proved when I come to try to fit the GPS!

BEB

Edited By Biggles' Elder Brother - Moderator on 23/05/2015 00:06:01

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...