HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old Apr 28, 2012, 10:43 AM
Registered User
Kalmar, Sweden
Joined Apr 2009
63 Posts
Mini-HowTo
MultiWii, Clone WM+ with ITG3205 gyro and a Nunchuck clone with ADXL335 acc chip

This is a mini-howto regarding the rebuild of my TriCopter that was using KK-board before.

This time Im trying out the MultiWii concept as I want level stabilisation as I plan on getting into FPV. I think level will help me alot when learning FPV.

I hade alot of problems soldering together all cloned bits and pieces and trying to get them to work.
All info needed was found on the web, but spread out on various sites/threads that made it very hard to find.
After 12 hours of soldering, reading forums, searching solutions, testing, playing with GUI and so on I got it to work.

I hope this guide can be of use to people with similar set-up problems.




My way of connecting and setting up a clone WM+ with ITG3205 gyro and a Nunchuck clone with ADXL335 accelerometer to the Arduino Pro Mini.


It took me alot of trial and error and searching various forums and threads to get an idea of how to make this work.
Im putting this text together to supply the needed info in just one place, making it easier for people with similar problems to get up and running.


Hardware:
Old TriCopter with its guts ripped out (KK board) The tri is based on rcexplorers build.
Arduino ProMini 5V/16MHz
FTDI breakout board
Clone Wii Motion + with ITG3205 gyro chip
Clone Nunchuck (Nunchuck G edition v1.1 marked on PCB) with ADXL335 accelerometer chip


Original Nunchuck does not work with this setup (only tried SDA/SCL mode) nor does SDA/SCL connection of the clone Nunchuck. ADXL335 clone nunchuck must be connected in analog mode to arduino!


Connecting the WM+ the standard way (using only the original connectors solder pads on the PCB) makes the output to GUI to strong/sensitive. Direct connection of SDA/SCL to the ITG3205 chip makes good readings in GUI.
Connecting the clone or original nunchuck in SDA/SCL mode gives no output at all from the nunchuck to GUI!
Tried removing pullup resistors, feeding +3V and +5V and so on but nothing worked for me.


Only way (for me) to get this to work is a clone nunchuck with ADXL335 chip connected in analog mode to A1, A2 and A3 on Arduino. Power the nunchuck from WM+ 3V by the pullup resistors. WM+ is powered by the arduinos pin 12, but this is not needed in direct connection mode and 5V can be taken from arduino VCC instead.
The VCC is more stable than pin 12 from what I read on forums.






Mount the boards in the directions shown on multiwii.com.
Connect them as my image shows.
Change the following parameters and it should work good, or at least get you started with sensor tuning.


/* The type of multicopter */
#define TRI

Disable pullups
//enable internal I2C pull ups
//#define INTERNAL_I2C_PULLUPS




//#define YAW_DIRECTION 1 // if you want to reverse the yaw correction direction
#define YAW_DIRECTION -1




//if you use independent sensors
//leave it commented if you already checked a specific board above
/* I2C gyroscope */
#define ITG3200



/* ADC accelerometer */ // for 5DOF from sparkfun, uses analog PIN A1/A2/A3
#define ADCACC




//if you want to change to orientation of individual sensor
#define ACC_ORIENTATION(X, Y, Z) {accADC[ROLL] = -Y; accADC[PITCH] = X; accADC[YAW] = Z;}
#define GYRO_ORIENTATION(X, Y, Z) {gyroADC[ROLL] = -X; gyroADC[PITCH] = -Y; gyroADC[YAW] = -Z;}
//#define MAG_ORIENTATION(X, Y, Z) {magADC[ROLL] = X; magADC[PITCH] = Y; magADC[YAW] = Z;}








If TX (radio transmitter) stick moves the tail servo (TRI) the wrong way, but Arduino compensates the right way, do not reverse YAW in TX (you will reverse all stick programming to) but instead change the following lines (changes needed marked with red color):


//#define YAW_DIRECTION 1 // if you want to reverse the yaw correction direction
#define YAW_DIRECTION -1


TO THIS:
#define YAW_DIRECTION 1 // if you want to reverse the yaw correction direction
//#define YAW_DIRECTION -1






ALSO CHANGE THIS:
//if you want to change to orientation of individual sensor
#define ACC_ORIENTATION(X, Y, Z) {accADC[ROLL] = -Y; accADC[PITCH] = X; accADC[YAW] = Z;}
#define GYRO_ORIENTATION(X, Y, Z) {gyroADC[ROLL] = -X; gyroADC[PITCH] = -Y; gyroADC[YAW] = -Z;}
//#define MAG_ORIENTATION(X, Y, Z) {magADC[ROLL] = X; magADC[PITCH] = Y; magADC[YAW] = Z;}


TO THIS:
//if you want to change to orientation of individual sensor
#define ACC_ORIENTATION(X, Y, Z) {accADC[ROLL] = -Y; accADC[PITCH] = X; accADC[YAW] = Z;}
#define GYRO_ORIENTATION(X, Y, Z) {gyroADC[ROLL] = -X; gyroADC[PITCH] = -Y; gyroADC[YAW] = Z;}
//#define MAG_ORIENTATION(X, Y, Z) {magADC[ROLL] = X; magADC[PITCH] = Y; magADC[YAW] = Z;}






Some servos goes CW with rising input and some others goes CCW with the same input.
If the servo behaves the wrong way, try changing Z/-Z in gyro orientation and YAW 1/YAW-1


Connect RX (radio receiver), servo and motors as described on multiwii.com


After getting good readings in GUI and gyro/acc compensation working the right way, go ahead and follow the setup and adjustment guides others have written.
markusb2 is offline Find More Posts by markusb2
Reply With Quote
Sign up now
to remove ads between posts
Old Apr 29, 2012, 01:33 PM
Registered User
Polska, dolnośląskie, Wrocław
Joined Aug 2008
12 Posts
Hi markusb2,

Thanks a lot for your post.

My friend bought the same clone WM+ with itg 3205 but we had no idea how to connect it directly to SDA/SCL .... now i do hope to get it working .... i will report back if we are sucessful using your method .... as you connected it directly to 5v it means that this board has incorporated 3.3 v regulator? Am i correct saying that this board has 2.2 k pullups? if so there would be no need to assembly any additional ones! wow what a simple solution

Darek
darec is offline Find More Posts by darec
Reply With Quote
Old Apr 29, 2012, 01:42 PM
Registered User
Polska, dolnośląskie, Wrocław
Joined Aug 2008
12 Posts
202 = 2kOhm as i found in internet so they should be perfectly acting pullups!
darec is offline Find More Posts by darec
Reply With Quote
Old Apr 29, 2012, 03:57 PM
Registered User
Kalmar, Sweden
Joined Apr 2009
63 Posts
Hi,

Did you also try to hook it up the way described on multiwii.com, with no success?
You are right about the voltage. The WM+ has a 3V regulator (ok to feed with 5V) and we steal that voltage to feed the ADXL335 on the nunchuck board.
The pullups on the WM+ is the only ones used with this mod.

Dont forget to cut the pcb tracks above the resistors.

Hope you get it to work!
markusb2 is offline Find More Posts by markusb2
Reply With Quote
Old Apr 29, 2012, 05:28 PM
Registered User
Polska, dolnośląskie, Wrocław
Joined Aug 2008
12 Posts
No, we did not try to connect it like the original one...relatively long time ago i found some info that there are advantages of going direct way so i think it is not a good idea to go backwards or i missed something?

Can you explain what these two cuts are for? How did you find out what to do with this clone to make it standalone ITG3205? Do you have a schematic of this clone? or you did a good analayses with magnifing glass vs generic scheme?

Would you indicate how to cut the board to make it as small as possible provided we don't need onboard 3 V regulator but still want to keep pullup resistors on the board after modification...or even without pullups?

now i have just noticed in your picture that 2k pullups are connected to 3v voltage line...in some specific configurations it may not work properly
darec is offline Find More Posts by darec
Reply With Quote
Old Apr 29, 2012, 06:47 PM
Registered User
Kalmar, Sweden
Joined Apr 2009
63 Posts
Me guess is that you cut the tracks to separate the gyro from the C on the pcb. Maybe the C puts out voltage or sinks it? Dont know, I just found the info and followed it.

http://www.rcgroups.com/forums/showt...1382&page=1063

My board is mounted and soldered now so I can not show you how to cut it smaller. I dont see a good reason why you want to do that. For saving weight its not worth it. You remove a few grams at most.
I think you need the onboard pullups if you use a 5V arduino. If you set pullup in arduino you will get 5V to the gyro, dont know if it likes that.
If your arduino is 3.3V you can probably go ahead and use arduino pullups and remove the onboard resistors.

Are you going to use a nunchuck? If so, please connect it and test before you for some reason cut or modify the nunchuck pcb. My genuine nintendo nunchuck did not work so II screwed it back together again.
Only the clone with ADXL335 acc directly connected works for me.
I have just removed the potentiometers and connectors from the pcb. Did not cut it.
The nunchuck with WM+ and pro mini mounts up very nice on top of each other.

This is where I got the idea to direct connect the ADXL335
Dont speak a single word russian but the image said it all
http://wiicopter.wordpress.com/acc/wii-nunchuk-adxl335/


My uncut boards mounted with foam tape on a prototype board as shield,





markusb2 is offline Find More Posts by markusb2
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Discussion Is my itg3205 from WM+ bad? SevenDays Multirotor Talk 3 Apr 29, 2012 05:55 PM
Discussion RC Segway with arduino wm+ nunchuk and multiwii code Widelec Multirotor Talk 0 Mar 07, 2012 08:43 AM
Sold Multiwii quadCopter gyro ACC & baro ($205) madushan2008 Aircraft - Electric - Multirotor (FS/W) 12 Jan 23, 2012 09:19 PM
Discussion multiwii nunchuck problem with video and gui screen shot rcta15 Multirotor Talk 2 Nov 28, 2011 01:46 AM