Pages: 1 ... 6 7 [8] 9 10 ... 20   Go Down
Author Topic: BlueCopter - Arduino Quadcopter  (Read 100821 times)
0 Members and 3 Guests are viewing this topic.
Sweden
Offline Offline
Sr. Member
****
Karma: 13
Posts: 257
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ohh, wow a lot of questions.. Sorry guys, I've been a little busy ..

@satiro: It's a long process to get to the optimal PID values, specially if you've never done it before, so have patience..  Your progress looks promising.. No the sticks should respond at all times, I have no idea why they're not responding when you're changing the Kd value.. Maybe it has something to do with RX_RATE_SENSITIVITY .. Try changing RX_RATE_SENSITIVITY from 3 to 1 and try again (you can find this macro-variable in Config.h)... My recommendation is to save the optimal PID value before jumping on to the next.. So if you, like you said, found 0.36 to be optimal, then change it in Config.h to 0.36 and reupload the code (but don't forget to remove the part of the code that changes the P-value in the serial-monitor, otherwise you'll just re-write this value when you start your quadcopter)...


@SuleymanSahin: They're not reading an analog value, but a digital one.. They're just using an analog input, instead of a digital one, which I assume is because of the lack of better choices...

@Krooks86: You're right about the plus-configuration, that's how it's done..! The reason that we add and substract from the throttle is to compensate for the change in orientation.. Let us say that throttle is about 50% and the quadcopter is leaning 30 degrees forward (pitch) and the supposed angle should be 0.. Then we need to add a little throttle to the motors in front (m0 and m1) to compensate for this error.. Now in-order for me to explain how I derived my equations, that would take some time, google is your friend in this case.. This article by Hefny is in my opinion good at explaining the difference: http://technicaladventure.blogspot.se/2012/09/quadcopter-stabilization-control-system.html

Edit: I'll be updating the BlueCopter firmware during the holidays (that's because I'll be working on a new miniature 3d printed quadcopter, so stay tuned!)..

//Basel
« Last Edit: December 16, 2013, 05:10:57 pm by baselsw » Logged

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

Basel,
idea of how busy you are! but my questions were: What values ​​of Kp, Ki and Kd initially you found? I find the three figures in the same loop? fluctuations Kd and Ki are as visible as the kp? after finding the three values ​​is now possible to fly with him? after that I try to go to the angle mode and try again to find the other PID values ​​and leave the setting Yaw last?
Basel, you talked about changing the value of Kp there at 0.36 in the config.h "PID_Change_Serial" tab?
Logged

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

Well, I don't really remember, but it's something near the default values that comes with the firmware... No, I meant changing the value in config.h to 0.36 .. My recommendation is to calibrate the yaw axis before the angle PID's.. that way uou won't have any dependencies from the yaw axis while calibrating the angles...
//Basel
Logged

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


Basel,
with PID Pitch and Roll adjusted it already is balanced? You can fly it?
Logged

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


Basel,
with PID Pitch and Roll adjusted it already is balanced? You can fly it?
You need to balance the yaw too... otherwise there is a risk that it will start to spin... When the yaw is calibrated you can go ahead and fly it smiley...
Logged

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

More Basel,
yourself said you must first balance and then adjust the Yaw! can not then test to see if will be balanced in the air and then start of the PID Yaw?
Logged

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

More Basel,
yourself said you must first balance and then adjust the Yaw! can not then test to see if will be balanced in the air and then start of the PID Yaw?
Yes, you can try it.. But it's not ready to fly per say.. But sure, go ahead and try it out =)!
Logged

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

Basel,
can you tell me how to adjust the Yaw, type the walkthrough, because this weekend I want to take on the project in earnest! Look, stretch a wire in my room and I think you can hang it! You can adjust the yaw PID as well?
Logged

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

Basel,
can you tell me how to adjust the Yaw, type the walkthrough, because this weekend I want to take on the project in earnest! Look, stretch a wire in my room and I think you can hang it! You can adjust the yaw PID as well?

I didn't hang my quadcopter.. I held it in my hand.. Just use the same guide as you did before, it will work fine.. Just be careful as always.. You'll have to hold it in your hand, change the desired P, I or D and try spinning it with your other hand and observe the respons.. At some point it will start oscillating (it will shake/vibrate a lot, usually you'll see that two motors, CW or the CCW motors will somehow take over and make the quad go back and forth).. It is really hard to explain but you'll see it when it comes =)! Again be careful and push down the throttle to zero if it gets out of hand..!!

//Basel
Logged

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

Basel, it is kind of complicated, because how am I going to send data through the serial interface to handle with one hand and still girálo it on low speed until start to swing! is half difícel of view! I think it is as follows:

Connecting the quad;
increase the throttle to 40%;
Go varying Kp values ​​until the system oscillates turning the quad left or right;
If ouver problems reduce to zero the throttle!

Do the same for the Kd and Ki!
  That basel ....?

Basel, the next video would clear enough!

I know that you have little time ... but it would help very much!
Logged

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

Basel, it is kind of complicated, because how am I going to send data through the serial interface to handle with one hand and still girálo it on low speed until start to swing! is half difícel of view! I think it is as follows:

Connecting the quad;
increase the throttle to 40%;
Go varying Kp values ​​until the system oscillates turning the quad left or right;
If ouver problems reduce to zero the throttle!

Do the same for the Kd and Ki!
  That basel ....?

Basel, the next video would clear enough!

I know that you have little time ... but it would help very much!

It won't oscillate left or right.. When it oscillates it will start to rock back and forth.. Yes, your method is a-okay! Yes, you do the same for Kd and Ki also! I couldn't find a suitable video for you, sorry for that.. But you need to start experimenting a little.. Don't be afraid to do something wrong (just don't cut of a finger =P ).. Try experimenting yourself and find a method that works for you, otherwise you won't learn anything..
Logged

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

EDITED:
 Hey Basel, I found out how to wire everything which was my original question. My new question is will this setup work and what changes would you make to it?

I own:
Spectrum dx7 transmitter/receiver
Arduino uno

I am planning on getting:
Hobbyking X525 V3 Glass Fiber Quadcopter Frame 600mm
Turnigy Aerodrive SK3 - 2826-1240kv Brushless Outrunner Motor
hobby king 20A speed controllers
any 8x4.5 prop
11.1v 3s 25c lipo batt

Will I also need a 9DOF? do i just need a gyro? or an accelerometer?  Is there something similar that would work better or anything cheaper?  I just want something that will keep it stable in the air so it will be much easier to handle. Also do i have to plug it into arduino or is there something that i could plug inline with my receiver to the arduino that will adjust the signal accordingly?

anything else i might need?

If you could also give me some insight on how to properly program my arduino for this setup too that would be greatly appreciated!
This is for a school project and i am looking to order tomorrow. There for my price range is restricted too.
Thank you sooo much for your time! ~Dustin
« Last Edit: December 19, 2013, 07:59:18 pm by HipOrc » Logged

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

HI!
I'm actually building a quadcopter on raspberry pi based on your code ( the fligth controll part )
Can You check my code please ? May be I have misunderstood the flight controlling part of your code.
Problem: I'm getting a little bit low speed on one motor...

The code: http://gfile.ru/a2PlF
First of all I initialize sensors , then arm motors  using deamon (pigpiod which sends pwm signals to motors) then read data from sensors and try to stabilize the quad.

A little bit later I will show the actual  data output may be that would help


Logged

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

I own:
Spectrum dx7 transmitter/receiver
Arduino uno
hobby king 20A speed controllers

Will I also need a 9DOF? do i just need a gyro? or an accelerometer?  Is there something similar that would work better or anything cheaper?  I just want something that will keep it stable in the air so it will be much easier to handle. Also do i have to plug it into arduino or is there something that i could plug inline with my receiver to the arduino that will adjust the signal accordingly?

anything else i might need?

Hey Dustin,

The transmitter/reciever will work with my code.. Unfortunately the Arduino UNO isn't supported by my code.. To make it work with the UNO you'll need to re-write the entire receiver section (RX.ino) to support the UNO.. Otherwise you'll need to get a Arduino Leonardo/Micro to make my code work, out of the box...

Which ESC are you getting?? hobbyking 20A speed controllers can be anything.. ESC that will work and that I'm currently using is the BlueSeries ESC from hobbyking.. Here is the 20A version of the blueseries ESC i'm using: https://www.hobbyking.com/hobbyking/store/__13430__HobbyKing_20A_BlueSeries_Brushless_Speed_Controller.html
The reason you may ask? The reason is you need the ESC to support PWM signals.. And because I've used the blueseries ESC, I can personally guarantee that they will work..

For my current code you need at least a 6 DOF, more specifically the ADXL345 and L3G4200D (accelerometer and gyrometer)... you can find some cheap IMU's on ebay..  And yes, you need to plug the IMU directly to the arduino...


@xSpamerx: Because it's not a direct modified copy of my code, I can't just look at it and point something out.. With other words, I really would like to, if I had the time..

//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..??
Logged

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