Pages: 1 ... 7 8 [9] 10 11 ... 20   Go Down
Author Topic: BlueCopter - Arduino Quadcopter  (Read 96493 times)
0 Members and 2 Guests are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

baselsw , Yep , not direct copy , but the idea is similar.
I must say that I'm not filtering the data , from sensors so nice as you , and I have not completely understood the controlling part of the code.

I would say that you should pay attention to sensor reading part ( filtering data )  and quad controlling part. Most of the controlling part (PID class i.e)  was copied from your code.

 I will appreciate  your help because I have no one to ask for help , and the code from "aeroquad" and so on , is not so easy to understand.

Many thanks..
Logged

Sweden
Offline Offline
Sr. Member
****
Karma: 13
Posts: 257
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hello Basel..!
if i use your code for Arduino Mega2560, whatt kind of problems would occur..??

You'd have to re-write the entire receiver (RX.ino) section to support the mega.. otherwise everything else should be compatible..

//Basel
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hello Basel..!
if i use your code for Arduino Mega2560, whatt kind of problems would occur..??

You'd have to re-write the entire receiver (RX.ino) section to support the mega.. otherwise everything else should be compatible..

//Basel
thanks basel..!
can you help me by writing the algorithm of (RX) for mega2560..?
Logged

France
Offline Offline
Newbie
*
Karma: 0
Posts: 39
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
can you help me by writing the algorithm of (RX) for mega2560..?

This website explains really well how to read a RC receiver with an arduino: http://rcarduino.blogspot.com.au/2012/01/how-to-read-rc-receiver-with.html
I used it on my own quadcopter code, works flawlessly!
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
Youtube, rc's, programming, gaming, mechanics, editing.etc
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey Basel,

Unfortunately i have to use the Arduino uno.
The exact esc's i am using are these ones: (99% sure they are the same ones) http://hobbyking.com/hobbyking/store/__13430__HobbyKing_20A_BlueSeries_Brushless_Speed_Controller.html

I now just need an imu, could you link me to a good one? (cheaper the better)
Can i get one from hobbyking? (prefered)

Could you draw me up a wiring diagram of where i should plug the imu, receiver, and esc's to the Arduino uno? That would make it 10x easier thank you. The last question i still have is the files... I use "bluecopter.ino" right?

I am 16 and very new to programming, what exactly is the main conflict with the rx code?
« Last Edit: December 25, 2013, 03:45:32 am by HipOrc » Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 58
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Basel,
the child Jesus bring peace and joy to your life and your family! keep it up! Merry christmas and a prosperous new year!
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 58
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Basel ,
is too strange because of som so it oscillates with the addition of the term " D " did as you told me , and nothing varied the RX_SENSITIVE , decreases to 1 and then increased to 2 and nothing ! one hours initiated in the same " loop " setting of the two values ​​at the same time , "P" and "D " to see if it still respendendo , in case that best P value of 0.315 was found and it continued by adding Kd Replying the stick but not swayed somehow got to add kd equal to 0.2 and nothing , so I uploaded again and tried to vary only the Kd and as before nothing happens on the stick , I think something in the code interferes with the setting of other parameters ! if he'd like to find the period of the oscillations could use the term P - Zilguer Niches to find the critical period ? can you help me !
Is it my trasmissor that has no configuration ?

The video explains well ! and provides for the osclilações , where the term P well they are visible, they are smaller in D and R even lower !

Can you help me ?
« Last Edit: December 29, 2013, 02:35:02 pm by satiro » Logged

Sweden
Offline Offline
Sr. Member
****
Karma: 13
Posts: 257
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Can you help me ?

Hey,

It sounds like you have a small delay.. That delay could be the Serial interface.. So just put the D-term to 0.014 (I calculated this number) and try adjusting the I-term instead..

//Basel
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 58
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Basel, as you did to get its values​​? apneas used your step by step? used the serial interface? used some of matlab script and model of the plant? Yesterday I downloaded two batteries and can only find the right value of "P", it swings even!
How do I adjust without using the serial, after all you said that you have not tested this example, so it has no chance to even work. 'll Susbtituir values ​​in config.h as you said P = 0.315 and D = 0.014 and I will try to find the value of I, if I could still talk today ahar something.
Logged

Sweden
Offline Offline
Sr. Member
****
Karma: 13
Posts: 257
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@satiro: I did use matlab.. I used the serial interface to get data for my model (taking all the delays into consideration in the plant model), then optimized the PID values for the plant model and used those values in my final design..

//Basel
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 58
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Basel, you can send me the Matlab script for me to try to find the values ​​of PID? Look, what you did was find values ​​in Matlab with your plan then test and optimize these values ​​in the model real.Com time you can use Zilgler-Nichols to find the critical gain and critical period, was that what you did? if possible send scritp Simulink for satiromedeiros@yahoo.com.br.
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 58
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Basel, tried with the value you suggested and got the Ki value = 0.83, have not tried to fly but tomorrow I will test for real! Look, I know sometimes I'm annoying, but it's for a good cause, I need your help because I'm trying to fly with this Quadcopter .. hey, he's my college work and then I want to thank your references as you should and send you a copy of my work! as I said I'm bothering you more than it should. Look also use Matlab and Simulink have a scrip in, just to test. You could look at it and suggest corrections to me, I am sending you attached, and as I said before, just answer me in satiromedeiros@yahoo.com.br. My version of Matlab is ra2011

* Saida_PID_Quad.zip (9.81 KB - downloaded 28 times.)
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Greetings Basel,

Thanks for your great job and happy New Year.
I am a newbie in microcontrollers and arduino. Trying to learn day by day.  As I said I am a newbie, my question may be ridiculous. Sorry for that.
My first question is about analogwirte(). You used analogwrite() to trigger the motors’ esc (am I wirte?), I am a bit confused because there some info says that the analogwrite() cannot be used to trigger the servos and esc (http://forum.arduino.cc/index.php/topic,5701.0.html). I tried to control my servo with analogeitre() but I couldn’t. How did you control the escs with analogwrite()?I will appreciate if you explain this.

Regards,
zafer
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
Youtube, rc's, programming, gaming, mechanics, editing.etc
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Greetings Basel,

I don't understand why the "rx.ino" needs to be re coded to work with an Arduino uno...

The one file i think i would need to re code is the "config.h" because i do not have any pins higher than 13 (for the last part of the code, rx defining)

Or at least that's the way i see it. Please help! smiley-sad-blue
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Basel. It’s me again. I would like to ask a question about pinChangeInt. I upload two code below. In the first one I used attrachInterrupt to get signals from receiver. In the second one I used pinchangeInt. Two code are almost identical except the interrupt functions.

These two codes get different values from the receiver. I couldn’t understand where the problem is. Could you help me to solve this problem?

I got the attachInterrupt code from the previous posts in this topic. 


* attachInterrupt_exp.ino (0.6 KB - downloaded 29 times.)
* pinchangeinterrupt_exp.ino (0.81 KB - downloaded 29 times.)
Logged

Pages: 1 ... 7 8 [9] 10 11 ... 20   Go Up
Jump to: