arduino nano mpu6050 stabilisation

Post Reply
marius
Posts: 3
Joined: Thu May 15, 2014 9:55 pm

arduino nano mpu6050 stabilisation

Post by marius »

Hi,
After I funned my time with arducopter kit from 3dr I ran in to 'low-cost-arduino-based-auto-stabilizing-system', but soon I got stuck with the firmware.
A day later I found that the schematic are a multiwii schamtics, so I
downlaoded the firmware from multiwii.com. I configuerd the config.h for X frame, and on MPU6050,
and I hooked by RX Turnigy 5 channels after hooks-un-hooks on DATA 2 4 5 6 7.
I have soldereed only the board. Image

I use MultiWiiConf 64 bits java app on Ubuntu 14.04 LTS. I tuned up the MAG,ACC
and the thr. All remote 5 channels works according to MultiWiiConf .
I have no ESC's and motors (waiting for them from China).
Meanwhile I powerd up and looked with the ossciloscope (xoscope 4
linux on audio card and hand made cable 33k/470ohm div rate) on the motors
contoller, and I definetlly can see the PWM working when throttle goes up/down,
lft right, yaw,roll,pitch.

thr low
Image

thr hi
Image

When I incline th board any side it is supposet for the lower mottors to
boost the PMW to keep the frame horizontal, (is this right ?) but
I cannot see any changes in PWM %, though the UI rool,pitch
and elev are reflecting the inclination.

Image


Is the PWM delta too small I cannot see it on the crappy xosciloscope time resolution
or there is someting else I miss.
Thank you.


P.S.
The mutilwii site docs and schematics are the best I've
seen. Very proffessional, well presented.
Thx the community maintaing this.

User avatar
Hamburger
Posts: 2582
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: arduino nano mpu6050 stabilisation

Post by Hamburger »

You could use the mwii.conf gui to observe changes on io.
Did you calibrate the acc part of 6050 once either via gui or stick combo?

waltr
Posts: 733
Joined: Wed Jan 22, 2014 3:21 pm
Location: Near Philadelphia, Pennsyvania, USA

Re: arduino nano mpu6050 stabilisation

Post by waltr »

Is MW in ANGLE (auto-level) mode? It must be for it to use the Accelerometer to self-level.

marius
Posts: 3
Joined: Thu May 15, 2014 9:55 pm

Re: arduino nano mpu 6050 stabilisation, SOLVED

Post by marius »

Hi,
Thank you. Almost fine now with your help.

I add the Gy-65 baro on A4 A5 I2C as well

In the default config I uncomented:

Code: Select all

#define QUADX
#define MINTHROTTLE 1020
#define MPU6050
 #define BMP085


Meanwhile I ran into a complete schematic here.
http://www.rcgroups.com/forums/member.php?u=290153

The PWM response on inclining is responsive but the rear REAR_L
level is behind the others.
minimum throttle is OK, at the middle the SW motor is already lower.
Attached picture.

Image

sv650s
Posts: 2
Joined: Thu May 29, 2014 8:49 pm

Re: arduino nano mpu6050 stabilisation

Post by sv650s »

Hello

I'm trying to make a quadcopter with arduino nano + mpu6050 + lemonRX receiver
However i don't know how to connect my RX to the arduino nano shield....
Could you post a figure of how to connect RX to the arduino nano please ?
And could you say me witch board i must select in config.h ?

Thanks very much for you help

m.homayoun
Posts: 9
Joined: Mon Jul 28, 2014 10:28 am

Re: arduino nano mpu6050 stabilisation

Post by m.homayoun »

Hi
Dear friends
please help me.I built a multiwii FC board with Arduino nano and mpu6050 for my H-copter.I do these:
#define QUADX
#define GY_521
#define MPU6050
#define FORCE_ACC_ORIENTATION(X, Y, Z) {imu.accADC[ROLL] = Y; imu.accADC[PITCH] = -X; imu.accADC[YAW] = Z;}
#define FORCE_GYRO_ORIENTATION(X, Y, Z) {imu.gyroADC[ROLL] = X; imu.gyroADC[PITCH] = Y; imu.gyroADC[YAW] = Z;}
#define MOTOR_STOP
everything is good but my copter flip back in take off.the roll axis is good but the pitch axis has problem.for example when I take tail down, my copter want to come down more and it doesn't level.I think the auto level for pitch is reverse.and another problem is when i give elevator one of the motors spins faster(for forward elevator motor number 9 spins faster and for rear elevator motor number 3).but the yaw and aileron work good.
I calibrated ESC's and Acc and balance my props.but I couldn't solve this problem.
What is the problem?What's your suggestion?please help me
Thanks

m.homayoun
Posts: 9
Joined: Mon Jul 28, 2014 10:28 am

Re: arduino nano mpu6050 stabilisation

Post by m.homayoun »

Somebody please help me
Should I change something in these lines??????:
#define FORCE_ACC_ORIENTATION(X, Y, Z) {imu.accADC[ROLL] = Y; imu.accADC[PITCH] = -X; imu.accADC[YAW] = Z;}
#define FORCE_GYRO_ORIENTATION(X, Y, Z) {imu.gyroADC[ROLL] = X; imu.gyroADC[PITCH] = Y; imu.gyroADC[YAW] = Z;}

waltr
Posts: 733
Joined: Wed Jan 22, 2014 3:21 pm
Location: Near Philadelphia, Pennsyvania, USA

Re: arduino nano mpu6050 stabilisation

Post by waltr »

Use the MultiWiiConfig.exe and look at the Roll/Pitch displays when you roll/pitch your quad (motors not running.
Then modify the code to get these correct. There have been a number of threads on how to do this so search, find and read.

m.homayoun
Posts: 9
Joined: Mon Jul 28, 2014 10:28 am

Re: arduino nano mpu6050 stabilisation

Post by m.homayoun »

In configuration everything is good according this:
How should be the sensor axis directions
TILT the MULTI to the RIGHT (left side up):
MAG_ROLL, ACC_ROLL and GYRO_ROLL goes up
MAG_Z and ACC_Z goes down

TILT the MULTI forward (tail up):
MAG_PITCH, ACC_PITCH and GYRO_PITCH goes up
MAG_Z and ACC_Z goes down

Rotating the copter clockwise (YAW):
GYRO_YAW goes up

The copter stays level:
MAG_Z is positive ; ACC_Z is positive
but when i install board on my quadcopter I have problem!!!!!!

Post Reply