Thread Tools
Feb 04, 2011, 04:08 PM
Registered User
MorrisM's Avatar
Quote:
Originally Posted by eekflyer
I'd like to fly my tricopter with the yaw servo in the front. Looking at the code, is this a possibility?

I'm thinking I may have to swap some of the polarity of correction. Right now, my tricopter corrects in the wrong direction in the pitch axis.
All you need to do is reverse aileron and elevator in your transmitter.
Sign up now
to remove ads between posts
Feb 04, 2011, 04:10 PM
master of the universe
captaingeek's Avatar
quick question, how do I set it so that when the throttle is lowered the props stop?
Feb 04, 2011, 04:16 PM
Registered User
richardkalaf's Avatar
Quote:
Originally Posted by captaingeek
quick question, how do I set it so that when the throttle is lowered the props stop?
In this line :

Code:
#define MINTHROTTLE 1300 // for Turnigy Plush ESCs 10A
Decrease the value to 1000 or whatever isnīt enough to make the motors spin.

EDIT: Or, if you mean the MOTOR STOP funcition, just uncomment the #define MOTOR_STOP line.
Feb 04, 2011, 04:16 PM
Or just say Peer
JollyJoker's Avatar

The "P" "I" "D" Controller, an unknown creature.


A brief explanation for entry into the self-study phase:

The PID control is one that has been known for a long time, to keep unknown states of technical equipment in control! By try and error, because you just donīt know the states!
It is a kind of "counter-vibration control".

The controll consists of 3 parameters: P, I and D. (Wikipedia-> PID Controller)

1. Make your mind free from the expectation that there is the "right" adjustment - it is NOT! Everyone here has to find the settings for himself.

This is due to:
a) the stiffness/rigidity of the frame
b) the characteristics of the motors (spin up-/down speed)
c) in that context, the mass of the engines and in particular the propeller (google-> inertia)
d) the control speed of the escīs -> (keyword: Quax software) the software works at 490Hz to the escīs (as MultiWii 1.6 final)
e) of the sensors used (original Wii or clone, or Breakout Boards, for example: from Sparkfun)
f) of the vibration damping of aforementioned sensors (assembly and internal signal processing)
g) the quality of the balancing of the engines and propellers
h) of the batterys ability to deliver power
i) of the thrust to weight ratio
j) the leverage ratios at the Copter (arm length, height of center of gravity, ..)
k) ..... and even the approximately 1,000 other reasons

2. Read point one again and internalize.

3. Let's go to the Copter:

How do I now get out flyable settings?

Let's start with "P" as in proportion.
"P")
This value causes a reaction to the experienced disturbance from outside (yes, even stick input from the pilot!). The greater the disturbance, the greater the reaction (proportional). This value is going down with stick deflection, because you want to be able to controll the copter. This value is used to set, how big the output to the escīs is in relation to the experienced disturbance.
Good starting values are given with 4 (for very stiff structures could be less, about 2) Lowering far more makes no sence any more, because if the value is = 0, then the copter is not longer stabilizing by itself!

How do I set this stuff up?

Copter in your hand (be careful that you stay away from the rotating props, possibly wear a thick jacket, the props can cut bad) move slowly up to "hovering throttle" position and trim the first time roughly with the remote control. So then the copter should not try to turn away to one side and / or to push ahead with a motor through the ceiling. The better your do it, the more relaxed the copter will hover in front of you.

There are two "approved methods": sit down and hold up above your head with one hand; or stand above and hold down with one hand.

Now slowly add throttle until the copter hovers somewhat. Should it start to fidget while doing so - cut throttle and lower P and start again. (Google: Resonance)
Does it, (always keep in focus the fact that the thing might go like hell - cut down > throttle!) Then gently begin to "irritate" the copter, for example: move one arm up and down, it should fight it, but not begin to flutter resonate / or so. The same test for rapid movements, move brief back and forth or up and down. Again, the copter should stay quite calmly.
You can now try to raise the value so far, that no oscillations occur, if so lower the value of a few 10ths.

It continues with "I"

"I") as integral (summary / integral) that comes in the end.

So now the turn is on "D"

"D")
as Derivative (derivative, development) are encouraged or appreciated here, as it will probably affect the above-mentioned disturbance in the system (Copter), so if it comes to rest on its own, or whether it swings like hell -> resonance. Comes to rest on its own = 0. Swings like hell = maximum. Somewhere in between, we will probably arrive, it must be "felt/flown".
This value does speak against the disturbance by attempting to counteract the imminent change of the oscillation in anticipation (to calm it down). Sort of like if we imagine a pendulum: it has stopped just on one side, it is now over to swing the other, we have to move our finger (for braking) from one to the other side of the pendulum to slow it down. Do we do too quick (ie by a finger switch on the other side) before the pendulum has reached the full deflection, then we push it a part of itīs way - the same is true if it happens too slow -> We donīt want that. I like the pendulum-idea

now then "I"
So in summary / integral. The name says it all, since this factor summarizes the height / size of the disturbance also as their duration, so to speak, trying to take into consideration the previously accumulated / accrued total error. Here one should rather go cautiously to work, goal is to correct smaller overshoots, for example, rotation stop, but it continues to rotate. Then gently increase, 0.0XY is almost always good enough. If unsure always keep a small value of 0.005 to 0.010 (thus the PID control is maintained, otherwise we would have only a PD control ;-))

Wishes for changes and suggestions will be discussed and accepted!

Regards Peer
Feb 04, 2011, 04:18 PM
quadcopters & FPV padavan
Rurek's Avatar
Quote:
Originally Posted by ppuxley
Why so erratic while calibrating in V1.6?
Same set up on V1.5 is more or less smooth
Both the Pitch and Roll indicators rotate and the graph for these reverses by 180 deg about once a second as I hold the sticks in calibration mode.

The led is blinking and however long I hold the calibration this behaviuor continues.Ie it never settles

And I am using the V1.6 GUI

#define MINTHROTTLE 1080
#define QUADX
#define YAW_DIRECTION 1
#define I2C_SPEED 100000L tried 400000L aswell
#define PROMINI //Arduino type
#define INTERNAL_I2C_PULLUPS tried disabled aswell
#define INTERLEAVING_DELAY 4000
#define NEUTRALIZE_DELAY 100000
#define MINCOMMAND 1000
#define MAXTHROTTLE 2000
#define SERIAL_COM_SPEED 115200
#define MIDRC 1500

Using Jussi V1.1 shield ,no external pull ups .bridged diode ,5v D12
I don't know where is your wrong...I simply do the calibration, moving for a half of second both sticks to calibration positions (pitch down, throttle down-yaw left in this order)...after a few seconds the board beep me several times (with NK) and now is ready to go, the graphs in GUI after this short period (a few seconds after moving sticks to its neutrals) goes to nominal, leveled pos. Maybe you are so impatient :-)

NOTE: put yours sensors stable during calibrations...and , If you want to arm motors - the sensors (especially ACC) must be in the same position, Alex in 1.6 code give us "security feature" thats don't allow to arm the motors while the ACC sensor differs a few degree (I don't know how much?) from stored during calibration position of sensor
Last edited by Rurek; Feb 04, 2011 at 05:18 PM. Reason: add a note.
Feb 04, 2011, 04:30 PM
Registered User
richardkalaf's Avatar
Quote:
Originally Posted by JollyJoker
A brief explanation for entry into the self-study phase:

" The PID control is one that has been known for a long time, to keep unknown states of technical equipment in control! By try and error, because you just donīt know the states! ........."

Regards Peer
VERY GOOD guide.

The other PID guideīs here are also nice, but this is the more accurate one iīve seen when it comes to real PID terminology and explanation.

Richard
Feb 04, 2011, 04:34 PM
Registered User
capt's Avatar
Quote:
Originally Posted by gena_g
Good afternoon. It is possible to connect this module to WiiCopter. HDPM01 module includes a pressure module and a compass module
Attachment 3776852

Attachment 3776855
Any price on this?
Feb 04, 2011, 04:52 PM
Registered User
richardkalaf's Avatar
Quote:
Originally Posted by capt
Any price on this?
You know what... since you guys are slowly feeling your way towards UAVīs, experimenting with different sensors, magnetometers, gyros, accels, barometric pressure sensors, and the likes... might as well go all out and get this:

http://www.st.com/internet/evalboard/product/250367.jsp
Feb 04, 2011, 05:28 PM
www.joescnc.com
Joecnc2006's Avatar
Quote:
Originally Posted by richardkalaf
You know what... since you guys are slowly feeling your way towards UAVīs, experimenting with different sensors, magnetometers, gyros, accels, barometric pressure sensors, and the likes... might as well go all out and get this:

http://www.st.com/internet/evalboard/product/250367.jsp
Has anyone used it or even know the price?
Feb 04, 2011, 05:54 PM
Registered User
richardkalaf's Avatar
Quote:
Originally Posted by Joecnc2006
Has anyone used it or even know the price?
If i recall, US262,00 a piece.

Thatīs why i didnīt get one myself yet, as i was on a UAV project for the past year and a half.

But if iīm not mistaken this board is already microcontrolled and the sensors are already internally integrated and kalman filtered onboard.

The name given to that kind of integrated and filtered board, is AHRS ( Attitude and Heading Reference System) . Itīs used in auto-pilots and all sorts of UAVīs and drones.

You can search for AHRS boards in sparkfun or google around, but in the end, i think this goes in the opposite direction of Alexīs initial proposal for his project. Wich was to build a low cost and functional multicopter, and thatīs pretty much all there was to it.
Feb 04, 2011, 05:56 PM
Registered User
capt's Avatar
Quote:
You know what... since you guys are slowly feeling your way towards UAVīs
That's a natural progression I guess, nice looking board but it is 262$ on digikey. That's why we are so excited about Jussi's sensor board which should be similiar but much less.
Feb 04, 2011, 08:46 PM
Registered User
I am trying to compile v1.6 but have this error:
MultiWii_1_6.cpp: In function 'void loop()':
MultiWii_1_6:1854: error: 'YAW_DIRECTION' was not declared in this scope


Its because of this line:
#define YAW_DIRECTION 1 // if you want to reverse the yaw correction direction
//#define YAW_DIRECTION -1


In previous versions i had it commented out, because it was just for tris.
Feb 04, 2011, 08:57 PM
Spark antenna on my Tx !
eekflyer's Avatar
Quote:
Originally Posted by MorrisM
All you need to do is reverse aileron and elevator in your transmitter.
Thanks but that doesn't change the direction of gyro correction on pitch, that only changes the effect direction of the radio stick. For aileron though, it worked.
Feb 04, 2011, 09:15 PM
Registered User
Quote:
Originally Posted by Devonboy
Hey Steve71,

I see you are in Tiverton RI - I'm in the other and older Tiverton !

Nigel.
Greetings from Tiverton! My wife is from Barnstable which is twinned with Barnstable, England. Quite snowy here in this Tiverton.
Feb 04, 2011, 11:25 PM
Registered User
Quote:
Originally Posted by kiliam
I am trying to compile v1.6 but have this error:
MultiWii_1_6.cpp: In function 'void loop()':
MultiWii_1_6:1854: error: 'YAW_DIRECTION' was not declared in this scope


Its because of this line:
#define YAW_DIRECTION 1 // if you want to reverse the yaw correction direction
//#define YAW_DIRECTION -1


In previous versions i had it commented out, because it was just for tris.
leave it in, it wont effect the setup