First successful GPS position hold tests!


I added a GPS module, a compass and a pressure sensor to my tricopter to enable automatic position hold. GPS is implemented using a PD control loop, compass is P only, and height is PID. And... it works! Still not optimal, but in principle it is already ok. There are some things that have to be optimized of course, e.g. a one-axis compass will probably not work for waypoint navigation and position hold when there is wind. And my code is still far from being optimal. At the moment, I have to make my copter hover at the position + height that I want. Then, I flip a switch (connected to channel 6) - current position, heading and height is stored and used as setpoint for position hold. I think I will have to switch to a 3-axes compass in combination with an additional 3-axes accelerometer. That will enable tilt compensation for the compass, as well as improving the D-term for height stabilization.
The tests that you see in the video where done with no wind at all. The tricopter stayed mostly within a circle of around 3m diameter. So that is close to GPS precision. Funny to watch the tricopter for 30 minutes without doing anything...

Additional components used for this setup (maybe I'll try different ones):
GPS: LEA-4H
Pressure sensor: BMP085
Compass: HMC6352





And here for the DLXm (parameters don't fit yet, but pressure sensor is also very close to the propellers...):

Comments

  1. Congratulation Willian .
    if you like... i can help you to make this code.
    I am developing a navigation routine (waypoint)and in near future i adapt a video motion for position hold and auto land and take-off.
    i love your code and your frames.

    regards.

    ReplyDelete
  2. willian, what the name of music track ?

    ReplyDelete
  3. Hi, this is digitalism - idealistic . You could help me with a brief description of how to make a waypoint navigation. i have several ideas of how to make it, but I don't know how this is usually done...

    ReplyDelete
  4. well, i supose that for Position Hold you are calculating the diference between the actual and desired. The result are used in a PID correct ?

    In my first test i use the sabe algorythm but in the in the desired i put the waypoint´s.

    The problem is the cross wind and other disturbances.

    i talk with you by e-mail right ?
    regards.

    ReplyDelete
  5. Hi, yes I am using a PD to make position hold. I am not using the I term, because I heard that this leads to instability of the position. But I will test this in the future. I am thinking of the following for waypoint navigation:
    The copter is in position A, the target is position B. First a straight line between A and B is calculated. Using pitch and yaw, the copter follows the line at a given speed. Roll is then used to compensate for wind and to stay centered on the straight line. Maybe this could work...

    ReplyDelete
  6. Yeah ... this will work good but you change the bearing of copter when moving. I prefer that the copter move with out change the bearing but your idea is good and seems to be more simple.

    The BIG problem of navigation is discover the error when you have a cross wind.
    I search for my paper and send to you see my calculations.

    ReplyDelete
  7. Hello, nice video and congrat on advancement. What sensors are present in the configuration of the tricopter in this video ?

    Regards,
    Magnus

    ReplyDelete
  8. Hi Magnus,
    I just added the info to my post.

    ReplyDelete
  9. William, I have become a big fan of your innovations. I'm currently designing a tricopter of my own and you are much of my inspiration. I am a software engineer and have even started dusting off my skills in Matlab/Java. I have a nice desktop CNC in my shop so if you or any other readers of your blog need something, or wish to collaborate on a project, I'm available.

    I have a few questions if you don't mind.

    What kind of transmitter/receiver is delivering the gyro/gps/altitude to the computer? I assume the computer on the ground is deciphering the data and sending flight adjustments to Shrediquette.

    How are you interfacing the pressure sensor and gps inboard? Wiring diagram or picture?

    What kind of transmitter is delivering flight corrections to Shrediquette? I believe I wad somewhere that is is not gghe R/C transmitter but rather, the computer.

    Thanks in advance and keep all of the great work and updates coming. I can't wait to see what it does next.

    Take care,
    Matt - St. Louis, Missouri

    ReplyDelete
  10. Hi Matt,
    the GPS, pressure and compass sensors (see the post for the names of the sensors) are mounted to the copter. There is an additional microcontroller on the tricopter which computes everything for the PID control loops. The "compressed" data is then transferred via UART to the main controller on the copter. Pressure sensor and compass are interfaced via I²C so the wiring is pretty simple. I am using a laptop only for debugging purposes, currently the laptop doesn't send anything to my tricopter.

    ReplyDelete
  11. how to do gps position.can u pls explain me briefly?

    ReplyDelete
  12. wheather i will go for seperate loop for both lat and long??or i will calculate the heading using the compass and correct it.

    ReplyDelete
  13. This comment has been removed by the author.

    ReplyDelete
  14. I want one of these :) My tri is on a back burner presently

    I have a Ar5duino/Xbee controller working now for those interested please see
    http://kiwitricopter.blogspot.co.nz/2012/10/simple-arduino-rx.html#links

    ReplyDelete
  15. I added a GPS module, a compass and a pressure sensor to my ... iquadrocoptergps.blogspot.de

    ReplyDelete

Post a Comment

Popular posts from this blog

Side Force Generators (SFGs) in FPV Racing

Aerodynamics in racing multirotors! Part 2.

FPV Air race Saarland