Show Posts
Pages: 1 2 [3] 4 5 ... 18
31  Community / Exhibition / Gallery / Re: BlueCopter - Arduino Quadcopter on: January 19, 2014, 12:29:38 pm
@Satiro: If it's not hovering then your not giving it enough throttle, push it a little more.. Post a video of the quad. in action.. I need to see what you're talking about..

@TheAviator: I saw this error in the log you posted before, and ignored it because I thought you knew what it meant.. You got that error because the pin change interrupts are not defined for the DUE.. Just as I said a couple of times before, if you're trying to port the code to another board than the leonardo you'd have to go ahead and re-write the entire RX-section..  So that is what you'd have to do..

//Basel
32  Community / Exhibition / Gallery / Re: BlueCopter - Arduino Quadcopter on: January 19, 2014, 06:53:18 am
@TheAviator: Sure thing.. Even if the sensors come separately they will work.. What's important here is that you think of the orientation of the sensors when soldering them! The library initializes the compass sensor (HMC5883L), so if it's not present that will maybe cause some problems on the I2C bus (not sure, but maybe).. So you either buy one compass sensor or you'll have to go into the library and remove it altogether..  I bought my IMU on ebay, and as of now, there are a lot of 10DOF sensors like mine on there, so check it out..

Everything as far as I can see looks fine on the pictures (cool quad btw =) )..

The reason for the Errors in MPULib is that the MPU "name" is already used by something else in the DUE jungle of library's and core! But not only the MPU "name" but also the buffer name.. Change all the "MPU" to small letters "mpu" everywhere in the sketch (mostly in Sensor.ino and BlueCopter.ino).. And change buffer to buffer0 instead.. This will make it compile without any problems..

Yes, the buffer-array consist of the x,y,z coordinates respectively..

//Basel
33  Community / Exhibition / Gallery / Re: BlueCopter - Arduino Quadcopter on: January 18, 2014, 04:42:22 pm
Basellllll he could fly! thank you! you're the same guy! but hey, he is wavering a bit and is a bit hard to keep it standing up! are they Kp values​​? will decrease and try again! look, I'm just using a battery of 3000mAh lipo with 20C discharge! Dude, if you can help me with the issues I thank MATLAB! as I told you is an academic work and have knowledge of the subject! then I'll post a video with the flight!

I'm glad to hear that =)! Try decreasing the Kp values (just do small changes, it shouldn't be a lot).. If it still wiggles a lot, try decreasing the Kp and Ki for the YAW axis (SMALL CHANGES HERE ALSO)!  I'll give you tips and help you with your matlab scripts.. But I don't have the time to write and test something for you, I hope you understand..

//Basel
34  Community / Exhibition / Gallery / Re: BlueCopter - Arduino Quadcopter on: January 17, 2014, 02:10:50 pm
Basel, I had to set the ESC's again worked. Tonight beginning again trying to check their latest PID values​​!
Basel, how do I view the oscillations of Ku to determine other values​​! so would the frequency and would find the starting values​​! It is possible to visualize with MATLAB scripts? and what data to send to the serial port to view the oscillations? can help-me!

My matlab work was done on an old computer (that I passed on to another family member).. So unfortunately, I don't have anything for you in that department.. It is possible to do what you mentioned, but you will have to code it yourself.. it won't be pretty though because it'll be running faster than the serial interface, so you won't find a real optimum because of the delays.. I think you're making things hard on yourself.. Your optimal PID values should be very near mine (the ones that came with the firmware in the first place).. Worst case scenario, you'd have to reduce the gain and integral parts a notch.. As I mentioned earlier, I managed to run my code with minimal PID changes (only reduced the gain on the rate PIDs a little, because I didn't want that fast a response).. When I say a little I mean from 0.250 to 0.230.. And the Rx part on that small quadcopter is a whole new story for itself.. So even if you add/remove features from the firmware, as long as the timing, IMU and quadcopter configuration are the same you won't have to change the PID settings that much.. So use the original PID values and play around with the gain a little until you get successful lift off.. If you want to do it all from scratch then I maybe can give you some tips, because what you are talking about is a university course in itself, and as you understand would be difficult to teach in a forum..

//Basel
35  Community / Exhibition / Gallery / Re: BlueCopter - Arduino Quadcopter on: January 16, 2014, 03:27:15 pm
@MuhammadArslanKhan: I told you to not connect the motors while SAFE mode is turned off.. Turn on SAFE MODE.. What you are experiencing is the ESC's not getting enough time to check for the PWM freq. and the PWM zero level.. What happens is the each ESC will be timed differently and thus give you this erratic behavior.. After turning on SAFE mode connect the motors and start up your quadcopter.. Give it 3-5 seconds (until the motors stop beeping).. Then increase the throttle to approximatley 10%.. If it still doesn't start increase it to 20%.. It should start as soon as the throttle signal is approx. 1100us.. Try it out..

@Satiro: I can't say for sure what the problem is.. It definitely has something to do with the PID's in some way.. Not necessarily the integral-action.. It could be that your quadcopter not getting enough throttle after the arming procedure.. Try increasing the MOTOR_ARM_START in config.h to let us say 150..

//Basel
36  Community / Exhibition / Gallery / Re: BlueCopter - Arduino Quadcopter on: January 15, 2014, 02:41:59 pm
@ basel
yessss..!!!! u r the man basel....thanksssss
its working now...


This doesn't mean that it's working! There is something not working.. The SAFE procedure keeps your motors from spinning out of control as soon as you connect the battery! So don't connect your motors just yet!! Debug your transmitter (RX) and see that your controls give values between 1000 and 2000us. If they doesn't that means that you need to calibrate these values in config.h...

//Basel
37  Community / Exhibition / Gallery / Re: BlueCopter - Arduino Quadcopter on: January 15, 2014, 01:47:16 pm
Here comes the updated photo:

//Basel
38  Community / Exhibition / Gallery / Re: BlueCopter - Arduino Quadcopter on: January 15, 2014, 09:41:31 am
@Muhammad... Disconnect the motors, turn off safe mode by commenting the line

Config.h
Code:
#define SAFE    //Arming procedure

Turn on debug mode and check and see if you get any response..

@Satiro: I'll be back with a better drawing of my setup..

@TheAviator.. I'm not using a kalman filter.. Instead I'm using a complementary filter.. You can see it at lines 27 and 28 in Sensor.ino .. I'm using a low-pass filter for the accelerometer and a two-step moving average filter for the gyrometer...

"avr/pgmspace.h" this file does exist if you're using avrgcc.. No it's not a arduino library, it's a header and is part of the avrgcc compiler..

//Basel
39  Community / Exhibition / Gallery / Re: BlueCopter - Arduino Quadcopter on: January 13, 2014, 07:41:36 pm
@satiro: well your post indicates that you didn't read through this thread before starting your quadcopter project.. Now, my software package isn't as complete as multiwii.. Because what I'm offering is a way to learn how everything works or how to make your own firmware plus hardware from scratch.. Multiwii doesn't give you that option because it's a complete software package with a nice and simple interface between PC and quadcopter.. When I answered your questions I was assuming that your ESC's, propellers, hardware in general were complete and your only problem were lying in software.. But clearly that wasn't the case.. If you've done everything right your PID values should have been very close to the ones in the original file.. As I said earlier, I'm working on a mini quadcopter that uses my bluecopter firmware.. Today I test flew it.. And it flew without any problems with the original PID values, no modifications.. I'll post the results very soon together with a flight video.. Just to compare, my original quadcopter is 660mm from motor to motor and weighs 1500g.. The mini quadcopter is 150mm and weighs 45g.. Anyhow, I'm glad your getting somewhere with your project.. Best of luck smiley

//Basel
40  Community / Exhibition / Gallery / Re: BlueCopter - Arduino Quadcopter on: January 13, 2014, 03:38:38 pm
Wow, a lot of messages.. No, I'm not on vacation, it's just I usually visit this site when I get a notification email that says that I've got a new Post on the forum.. This didn't happen...

Anyhow to the problems:

@Satiro: I'm having a hard time knowing what you're after.. Do you want to fly it in + mode? In that case you'll have to modify the output of the PIDs to the motors.. You can find these in the following variables: in FlightCtrl.ino

Code:
  int m0_val=throttle+PIDroll_val+PIDpitch_val+PIDyaw_val;
  int m1_val=throttle-PIDroll_val+PIDpitch_val-PIDyaw_val;
  int m2_val=throttle+PIDroll_val-PIDpitch_val-PIDyaw_val;
  int m3_val=throttle-PIDroll_val-PIDpitch_val+PIDyaw_val;

You have to rearrange PIDroll, PIDpitch, PIDyaw accordinaly.. But I don't recommend you to do anything like that until you get your quadcopter working with my setup.. Because if you venture into something like that I can't be 100% sure each time I answer your questions..

What settings do you want me to pass you? Can you try out something for me? Try the following values and report back:

Code:
#define ROLL_PID_KP  0.200
#define ROLL_PID_KI  0.800
#define ROLL_PID_KD  0.00
#define ROLL_PID_MIN  -50.0
#define ROLL_PID_MAX  50.0

#define PITCH_PID_KP  0.200
#define PITCH_PID_KI  0.800
#define PITCH_PID_KD  0.00
#define PITCH_PID_MIN  -50.0
#define PITCH_PID_MAX  50.0

#define YAW_PID_KP  0.500
#define YAW_PID_KI  0.300
#define YAW_PID_KD  0.00
#define YAW_PID_MIN  -50.0
#define YAW_PID_MAX  50.0

#define ANGLEX_KP 3.0
#define ANGLEX_KI 0.02
#define ANGLEX_KD -0.015
#define ANGLEX_MIN -100.0
#define ANGLEX_MAX 100.0

#define ANGLEY_KP 3.0
#define ANGLEY_KI 0.02
#define ANGLEY_KD -0.015
#define ANGLEY_MIN -100.0
#define ANGLEY_MAX 100.0

If these settings don't work at all, then you maybe you have your IMU set in the wrong direction on the quadcopter.. Anyhow, try these settings and report back..


@MuhammadArslanKh: What's not working when you upload/run the code on the leonardo..? If you've connected everything right then it should run right out of the box.. Check your connections again and report back..

//Basel
41  Community / Exhibition / Gallery / Re: BlueCopter - Arduino Quadcopter on: December 30, 2013, 07:51:11 am
@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
42  Community / Exhibition / Gallery / Re: BlueCopter - Arduino Quadcopter on: December 30, 2013, 05:39:12 am
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
43  Community / Exhibition / Gallery / Re: BlueCopter - Arduino Quadcopter on: December 22, 2013, 09:53:46 am
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
44  Community / Exhibition / Gallery / Re: BlueCopter - Arduino Quadcopter on: December 21, 2013, 04:19:05 pm
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
45  Community / Exhibition / Gallery / Re: BlueCopter - Arduino Quadcopter on: December 18, 2013, 02:43:32 pm
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..
Pages: 1 2 [3] 4 5 ... 18