Mayday! More lost in Multiwii Pro coding then a bird in fog over the ocean.

SGrog

New member
So, quick run down of the problem, then Ill post all the technical details and whats been tried.

I am building an H copter and have everything just about where Im comfortable at in terms of physical things (motors, esc, frame, etc), but in trying to download all the software for the Multiwii pro, I cannot get any response out of my board. I downloaded the Arduino software, and the gui for Multiwii.

The link in the previous paragraph is the exact one I ordered, and in terms of what I have installed, I have Arduino 1.05 - r2, A gui program, and I have checked which port the software is on. Any suggestions?

Attached are a few images of my build so far. And I may have used to large of wire for my electrical. Only 10 gauge :eek:.

IMG_20140525_172746.jpg IMG_20140525_172737.jpg IMG_20140525_172730.jpg IMG_20140525_172723.jpg

Thank you for your time and any help you mat have.

-Sean
 

Attachments

  • IMG_20140525_172711.jpg
    IMG_20140525_172711.jpg
    1.7 MB · Views: 24

Craftydan

Hostage Taker of Quads
Staff member
Moderator
Mentor
Ok, first things first.

ALL of this can be done with your copter unpowered . . . and probably best to do so.

You've got the arduino software installed and moved a Multiwii sketch into the sketchbook folder, right?

For that board (I have that one, actually), select the Arduino Mega 2560 from the tools>Board menu.

Hit the verify button (green checkmark) and it says "Done Compiling" and reports a binary sketch size.

now look at the tools>serial port menu and note what's available. *now* plug in your board and wait 30s or so for the board to power, connect to the PC and make the new serial port available. go back to tools>serial port and select the new com port.

if everything has worked to this point, you're ready to flash. press the upload button (green arrow) and wait and watch all the flashy lights. it should report success after 30s or so, and the board will reboot. open the MWC, and connect to the same COM port you flashed to, and click start . . . and you should see a live response.

That should get an image flashed . . . the setup will take a bit more, but get that far first.
 

SGrog

New member
Okay, thank you for that information, I did follow those steps (have not powered it up with the battery yet, just USB to computer). When I open the MultiwiiGUI and try tilting or essentially testing the various components is where I do not get any information. Attached is an image of what I see.

GUI.jpg

Thank you by the way,

regards

Sean
 

Andrew

G'day Mate
I'm using multiwiiconf 2.1, and with that, after selecting the right "COM" port I have to press "start" to start the live real time data read-out.
 

SGrog

New member
Okay, so Looking through the code some (I have had one class on C++ years ago, and that was only writing simple if then statements), I noticed that in the version 2.3 which I downloaded I did not have the Quad X selected, and the board I had selected was FFIMUv2 (which could be the incorrect board possibly?). With selecting those two options, I got the gyros to recognize movement, but the icons at the bottom of the screen, including GPS (which was connected at the time of testing) did not show up. Once I connected the battery (without blades on) the throttle and other settings did not change when I changed the sticks position on the controller.

Is there something else I am missing possibly?

Thank you again all!

-Sean
 

Craftydan

Hostage Taker of Quads
Staff member
Moderator
Mentor
Sean,

Correct board -- motors are assigned to the correct ports and the sensors match what's installed.

motor settings won't change until you arm the board, and the default setting won't let you arm if the board isn't level . . . have you calibrated the acelerometers yet? can't be level if they're uncalibrated . . .

I'd HIGHLY recommend uncommenting:

Code:
      #define ITG3200_LPF_42HZ
you might want to pick a different one as you dial it in, but as a default it makes a HEAUGE difference on an untuned board on an viby airframe.


GPS needs to be turned on and configured down in the GPS section:



Code:
    /* GPS using a SERIAL port
       if enabled, define here the Arduino Serial port number and the UART speed
       note: only the RX PIN is used in case of NMEA mode, the GPS is not configured by multiwii
       in NMEA mode the GPS must be configured to output GGA and RMC NMEA sentences (which is generally the default conf for most GPS devices)
       at least 5Hz update rate. uncomment the first line to select the GPS serial port of the arduino */
    #define GPS
    #define GPS_SERIAL 2 // should be 2 for flyduino v2. It's the serial port number on arduino MEGA
    //#define GPS_BAUD   4800
    //#define GPS_BAUD   57600
    #define GPS_BAUD   115200


   /* GPS protocol 
       NMEA  - Standard NMEA protocol GGA, GSA and RMC  sentences are needed
       UBLOX - U-Blox binary protocol, use the ublox config file (u-blox-config.ublox.txt) from the source tree 
       MTK_BINARY16 and MTK_BINARY19 - MTK3329 chipset based GPS with DIYDrones binary firmware (v1.6 or v1.9)
       With UBLOX and MTK_BINARY you don't have to use GPS_FILTERING in multiwii code !!! */

    
    #define NMEA
    //#define UBLOX
    //#define MTK_BINARY16
    //#define MTK_BINARY19
    //#define INIT_MTK_GPS        // initialize MTK GPS for using selected speed, 5Hz update rate and GGA & RMC sentence or binary settings



Keep at it . . . it takes a bit to get all the "lights" turned on, but you're getting there.
 

SGrog

New member
Okay, that makes a lot of sense. I got the GPS working (6 Satellites all placing me within my kitchen(temporary testing location)), activated the line of code recommended, recalibrated the Accelerometers and Magnetometers, accounted for declination, and ran the code for calibrating ESC's.

Now, all that is left is finding out why my motors will not arm/run. The throttle min/max is higher then the bare minimum for starting, I believe the cutoff is like 1000, Im running about 1077, and the throttle min is around 1500.

Just going through and checking things out and searching every board I can think of.

Thank you again CraftyDan!

-Sean
 

Craftydan

Hostage Taker of Quads
Staff member
Moderator
Mentor
No sweat Bro! Been there, and muddled through. Glad I could save you some of that pain.

About the only difference in my ROM is I've picked the V-tail, and twisted the board 90 degrees.

There's a LOT of options in a multiwii build but it's surprising how few you need to turn on.
 

SGrog

New member
Definitely! It is amazing how much you can do with a relatively small amount of modifications!
V tail and Tri copters are on the horizon, and I hope to use the same board/ Tx/ Rx, for all. with different settings of course.

Only thing is getting the motors to spin up, but bit by bit it is coming to life! Glad I decided to start from scratch for the entire set up, learned a lot more then I expected to!

Ive searched and searched the codes, and am unsure as to why my motors will not engage


-Sean
 
Last edited:

SGrog

New member
Well, the good news is that using the Aux 1 (Gear, 2 position switch on my DX6i) I can arm my motors, still dont know why I cant arm them using the other traditional way, and the motors are revving to high, but I think if I modify the Throttle min? I should be able to tone it down some more.

So, in conclusion:
-Have a fix for arming the copter.
-Need to tone down the RPM at idle.
-Install props after further testing, and enjoy!


As a side note, To anyone who might see this post, keeping the blades off is paramount. If I would not have kept mine off, I could have very well had 12x4.5 props spinning up from the floor hitting me in the face or other body parts, and going as fast as they were, it would have gotten lift if I had the blades on. It is worth taking the few extra minutes to take off the props to test new codes rather then risking potential injury to self or copter.

Thanks again all, and if anyone has suggestions for the Multiwii board as it pertains to lowering idle, I am all eyes!

-Sean
 

Craftydan

Hostage Taker of Quads
Staff member
Moderator
Mentor
Sean,

sorry, forgot to mention uncomenting "#define MOTOR_STOP" -- prevents the arm from throttling up the props to idle, even if the throttle is down. some prefer it to spin up on arm . . . I don't.


still not sure what to suggest for stick arm/disarm. If your RX channels are testing out centering at neutral (1500) and just crosses min(<1100) and max (>1900) as the sticks bang the gimbal, the RX is set and it should arm. . . is "ALLOW_ARM_DISARM_VIA_TX_YAW" or "ALLOW_ARM_DISARM_VIA_TX_ROLL" uncomented?
 

SGrog

New member
No worries! Its been fun learning about everything in the MultiWii! The number of forums is incredible, and a lot of the issues are pretty common, but have multiple solutions, its fun learing how the different fixes interact with the copter, and the PID tunning will be the next big step (think I will buy the Bluetooth board, which then should talk to my bluetooth enabled computer :D , no more cables!)

I have been tuning the Min and Max numbers and honing it in closer and closer. Once I switched to the Stick and was able to get it working, I have been able to bring the numbers closer and closer to the 1100 and 1900, or there about. A lot of the concepts that made no sense starting out on the spec sheets and manuals is slowly making more sense as I work on tuning it, before long I should have a Copter that can fly well and might have a decent flight time!

I did have the Yaw arm/disarm engaged, but just switched it to the Roll arm/disarm, and will test it tomorrow.

Thank you again for all your help Craftydan!

P.S. When I am done and satisfied with my setup, I might write a short segment on what I ran into and how it was fixed, so that other new MultiWii users with similar specs can maybe work through the steps easier/ make the board more accessible for more people!
 
Last edited:

jhitesma

Some guy in the desert
Mentor
One thought on arming. If you have it set to allow arming by an AUX channel then the "traditional" stick arming is disabled even if it's enabled in your config.h I found a post over on the MW forums explaining this a few months ago. So you may want to try disabling that and see if you can get stick arming to work.
 

Paulobrasil

Junior Member
Hi I Just use a Arming How to Note from HK file and I found my mistakes, I had a yaw inverted and have to work on it limits.

I hope it woks for you to!

WHAT TO DO IF YOUR MWC BOARD DOES NOT ARM

If your board does not arm with full down throttle and full right yaw held in place for several seconds, you might like consider the following.

Prelim stuff - Clear your EEPROM and upload a fresh sketch – uncomment only frame and sensor to make it simple for now.

There are some basic things that need to be checked or considered for setting up making sure the correct working environment for the radio, software, GUI and connections.

Radio in heli mode and/or has mixes enabled. Use airplane mode and clear all mixes.
Uncalibrated radio sticks. The radio neutral points (1500 ..) have not been properly established. Calibrate your radio sticks to center properly.
Incorrect RX connection to the board - polarity reversed or floating ground,
Rx not properly bound. Outer rail ground. Inner rail signal.
USB cord / port defective. Try using another cord or USB port.
Silabs driver not installed properly. Download from the Silabs site and install.
Incorrect COM port/speed used for GUI. Look up the correct COM in Device Manager. Normal baud rate in 115200 – unless it was changed.
Wrong stick direction on the radio - full right yaw on the radio translates to full left yaw. Full down throttle translates to full up in the GUI ( it happens ...) . Go to radio set up and reverse the travel accordingly.

Conditions that will prevent arming (NO ARM factors) and what to do/check.

a) Accel is not calibrated. The first thing you should do is calibrate your Accel – since you are using WinGUI – hit the Accel Calibrate button. You will have to do a more accurate calibration later.

b) Full Down Throttle is above 1100 in the GUI. Go to the end point adjustment menu of your radio and push down throttle (some radios, lower the % from 100 to say 95…) and test.

c) Full Right Yaw is below 1900 in the GUI. Go to the end point adjustment of your radio and push up yaw to over 100) and test.

d) Full Down Throttle / Full Right Yaw is held for less than one second - Sticks should be held steady until the arm LED's - RED beside the USB plug - lights up.

Hopefully your board arms by now…..