Propeller with propellers

Here's a video of the most recent flight of my custom quad rotor. It's built and programmed from scratch, and uses a Parallax Propeller chip for processing and an ITG-3200 3-axis gyro for stability.



I still have a bit of oscillation, but it's intermittent. If anyone recognizes the behavior exhibited at ~0:45 I'd be happy to hear suggestions on how to correct it. I'm using proportional and derivative (no integral) to keep the integrated gyro values in line with the integrated results from my remote control input.

The crash was all me, but thankfully it was fixed in about 2 minutes. :-)

E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • Very cool, John - Thank you. It works very well. :-) I modified it to only grab as many inputs as I need. Then I realized that the code uses the internal clock to catch the edges, so as long as the pulses are spaced apart by a couple microseconds, the accuracy isn't affected by the number of channels. Nicely done sir!
  • Developer
    HA! The world is indeed a small place. I just had a look at the parallax forums and found the quad build thread. I actually wrote the RC_Receiver.spin code mentioned in that thread back in 2007, as a crash course to teach myself PASM. :)
  • Moderator
    Some of that looks familiar ;-)
  • Yeah, I'll share - I need to clean it up a little and comment it before I release it. Also, the temperature drift compensation formula may only work for my gyro - I have no idea if the temperature response of other ITG-3200's is the same or not.

    The code is actually very simple. The Propeller chip is a dream to work with in many respects - No interrupts required, and a lot of off-the-shelf objects make things easy. I kept everything in integer math for speed and readability. Once I clean it up, I'll post it and the schematic.

    I'm currently only using 4 of the 8 cores:

    - The servo core updates the (ESCs) at 200hz. It'll handle 8 of them at this rate.
    - The receiver core reads the 4 R/C inputs constantly - it handles out-of-order or simultaneous pulse lines.
    - The gyro core reads the ITG-3200 values at 200hz.
    - The main core takes the receiver and gyro values, runs the 3 PIDs, and sets the output values for the servo core.

    With the remaining cores I'm considering:
    - SD card interface
    - Data logger (uses the SD interface core)
    - Standard speed (50hz) servo core for the ailerons / elevators / rudder / gear servos that I still have to add.
    - Serial interface for an LCD display for live settings, like PID consts, input scale factor, etc.
    - XBee interface for live telemetry and settings changes
  • Cool! would you be willing to share the code?
  • My update rate is 200Hz. I have lowered the P value, but then it starts to feel "mushy'. I suspect that it's resonance of some kind messing with the gyro, so I'm going to add the ability to log everything to an SD card or XBee - hopefully that'll tell me something. I think my D values are in line with yours, but I'll double check. Thanks for the feedback!
  • Developer
    Good stuff!. Have you tried lowering the proportional to reduce the oscillations? In my quad experiments I had to use low P values and relatively high D values (about 3xP) to get a good stable hover. I also kept the integral at zero just like you have. What refresh are you using on the motor controllers? I noticed a big difference in stability when I moved from normal 50hz updates to 250hz updates.
  • I am very impressed !
    It has been a while sense I used my prop stuff, but I could give you the prop spin code I wrote for an OSD that uses 1 pin on the prop.with 1 sync separator chip.8 pin dip.
    Earl
This reply was deleted.