homemade autopilot

Discussion in 'OnBoard Electronics & Controls' started by bertho, Nov 8, 2009.

  1. bigkahuna
    Joined: Jun 2008
    Posts: 53
    Likes: 1, Points: 8, Legacy Rep: 41
    Location: USA

    bigkahuna Junior Member

    Sorry I didn't realize that I neglected to mention this in my first post. I haven't designed the boat yet, but it will likely be around 40 - 60 inches LOA and under 50 lbs displacement. I would guess the loads on the tiller will be measured in ounces, not pounds and consequently the servo I linked to is over kill, I'll probably be able to use something smaller.
     
  2. Tim B
    Joined: Jan 2003
    Posts: 1,438
    Likes: 59, Points: 0, Legacy Rep: 841
    Location: Southern England

    Tim B Senior Member

    No problems with the actuator then! You will have the problem of fitting a waterproof autopilot in, though, and that might limit your choices a little.

    Cheers,

    Tim B.
     
  3. X7JAY7X
    Joined: Jun 2011
    Posts: 28
    Likes: 0, Points: 0, Legacy Rep: 10
    Location: Toledo, OH

    X7JAY7X Junior Member

    Been a while since this thread was posted to. Is anyone still working on this?
     
  4. Tim B
    Joined: Jan 2003
    Posts: 1,438
    Likes: 59, Points: 0, Legacy Rep: 841
    Location: Southern England

    Tim B Senior Member

    No idea, however, for another computer-control task I have written a servo-driver utility for OpenPilot to drive the POLOLU Maestro range of boards. I have also been looking at using a very auto-pilot-like system on an Embedded ARM TS7550 board, with some sucess, so the general area is still active.

    Tim B.
     
  5. X7JAY7X
    Joined: Jun 2011
    Posts: 28
    Likes: 0, Points: 0, Legacy Rep: 10
    Location: Toledo, OH

    X7JAY7X Junior Member

    I am working on one and I came across this thread. I was wondering if anyone else was still working on something.

    I bought a autopilot drive motor for my boat last year. To get the project started, I wrote firmware for the microcontroller to control the motor driver IC. It allows servo control of the drive motor. I took it one step further and wrote code to allow me to control my boat from an RC remote control. That worked great.

    I am now back on the project and I have written microcontroller firmware that can read and parse the NMEA autopilot string from OpenCPN. I have a little more code to work on then it will be very close to a fully automated autopilot. I will hopefully be ready for sea trials in the next few weeks.
     
  6. farjoe
    Joined: Oct 2003
    Posts: 163
    Likes: 1, Points: 18, Legacy Rep: 26
    Location: med

    farjoe Senior Member

    This is interesting. May I ask which drive motor you bought and from where?

    I always get stuck when I need to do or get the hardware stuff.
     
  7. Tim B
    Joined: Jan 2003
    Posts: 1,438
    Likes: 59, Points: 0, Legacy Rep: 841
    Location: Southern England

    Tim B Senior Member

    And also which microcontroller?

    Tim B.
     
  8. X7JAY7X
    Joined: Jun 2011
    Posts: 28
    Likes: 0, Points: 0, Legacy Rep: 10
    Location: Toledo, OH

    X7JAY7X Junior Member

    I bought an older Octopus drive for cable drive steering off of criagslist. It didn't have the feedback sensor so I had to add a potentiometer to it with some gears. It works well.

    I am using a Arduino currently. I was thinking about switching to a 32-bit processor but for now I decided against it because alot of the code is already written for the Arduino. If I handle the cross-track error calculations in the micro I may consider switching. I am only using GPS data, no compass. That may be a later addition.

    To avoid oscillations in the steering due to slow update rates from OpenCPN, my GPS is cable of updating at 5, 8, 10, and 20Hz. I had to modified the OpenCPN source code and then recompile it to a allow a faster update rate to the micro.
     
  9. CaptBill
    Joined: Jan 2010
    Posts: 184
    Likes: 10, Points: 0, Legacy Rep: 64
    Location: Savannah,Ga

    CaptBill CaptBill

    Hi Capt,
    Is she a powerboat or sailboat? I have been working on a small code library which I plan to drive a hybrid system for a sailboat. By hybrid i mean it is driven mainly by the sail/sails themselves which are cam geared directly to the tiller. The arduinos job will be to simply make small corrections, mainly by a simple (but much smaller) linear screw drive along the length of the tiller, changeing the angle to effect the amount of tiller ratio. With this setup there is no need for a power source. The larger force (from mainsail) is much higher than the demand of the tiller correction so much so that placing a GENERATOR in-line is needed instead of a power source(same motor and mount it is just a braking force now). so essentially now, we have two circuits that need to be controlled. One varies the tiller ratio/angle and one to vary the braking force (a dynamically tunable dampening force too). Two potentiometer knobs is the heart of this system, working constantly 'dialing in' a mechanical camed arrangement.

    Autopilots shouldn't need to be powered if you boat posses a 'Helm'. Your helm allows a small force to correct a larger force. So if you can connect the larger force to the helm you can make necessary corrections for course AND produce power. In fact the producing of power on top of taking some for the helm will affect overall 'trim''. Equalize the forces instead of trying to fight them with dc power. a mechanical autopilot just works better and harder in situations your dc autopilot can't handle.

    Concerning the code library its job is to calculate fairing curves (beziers,bsplines etc) set on a tuned scale (as opposed to equidistant grids). The idea is to get away from 'digital' and get 'hi-fi analog' ramp curvatures that can be adjusted dynamically at will by sensor readings. The mechanical setup is 90% of the system and works excellent on its own,by a super sensitive direct connection to the tiller. It just needs slight tweaking every few minutes or so to maintain perfect trim(power consuming) and/or to track an exact course with GPS.It also will double duty to sense optimum dampener (power producing) abilities of the system.

    The library is developed in Freepascal/Lazarus which is the opensource version of Delphi for Windows. It is the ultimate cross/compiler development environment. A steep learning curve up front but the object model is where it's at... the Mazaratti of programming languages, all in all. Perfect match for the Arduino because you can compile THE SAME CODE to power it from your iPhone with bluetooth wireless and have the option to power it from windows, linux, even Mac as well. Write once, compile anywhere.

    The library consists of objects/components that simplify curve calculations by eliminating unneeded point data an targeting 'golden ratio' or 'Hi-Phi' points set up a scale ratio. Instead of all points on a line (which are technically infinite) it computes, say 7 chosen points from the phi value and stores them in an array. This is important with arduinos because you have 'analog' curvature from 7 key points. One simple call to move along the scale...

    x:=THiPhiCurve.create(50,30,7);
    THiPhiCurve.setIDX(6);

    //create curve 50 inches long by 30 in high store 7 indexed 'hi=phi ratio #s'
    //this sets the ThPhiCurve object value to 6 which an integer index of the array pointing to a high resolution number stored in the array...THiPhi.indexVal[1]:=30.95123 etc.

    The library is is intended for hi-resolution as well as low-resolution usage(for arduino etc), just set the resolution property of the object.

    I have no access to an Arduino to play with and would be interested to see if this code does what I'm hoping. Would be great to see someone like yourself DIY your own killer autopilot system/ride dampening/power generating setup.

    Even a powerboat could leverage this by integrating the concept via stabilizer fins, I would imagine.
     
  10. Frosty

    Frosty Previous Member

    I gather this discussion is for model boats and not real ones.

    If there is one thing I consider seriously important its any electronic device that navigates my boat.

    -----------------------------------------------------

    Lucifers horns found on mount Sinai Luciferstuff.com
     
  11. CaptBill
    Joined: Jan 2010
    Posts: 184
    Likes: 10, Points: 0, Legacy Rep: 64
    Location: Savannah,Ga

    CaptBill CaptBill


    Hi Frosty,

    Long time no see. This is scalable if we are talking RC boats too. Just smaller. Fishing line, and mini servos (generators).

    And as far as electronic devices controlling your boat i say is a bad idea when your boat can control itself without any electronics. Electronics are optional as a matter of fact. Any sailboat can dial in it's own high power windvane...just cam off the main directly to the tiller. Or how about just wick the power from the backstay? The electronics serve in a totally different way now. The Arduino will drive the amount of power generation instead of driving the whole system. A variable braking force (dc generator) augmenting a simple old,old, old school autopilot from before DC.

    This is from old school sailing tricks from before DC power was invented, fellas.

    Your boat is already 'wired' for the ultimate windvane. Just plug the freakin' mainsheet into the friggin tiller handle. Hello!

    ...and Voila

    300 square foot windvane. (but with ZERO LATENCY, unlimited power band yet generates power instead of consuming it)

    I see plans around using simple block and tackle arrangements that work well and none that use cams which I believe may be all that's necessary for a totally mechanical solution...electronics or not.
     
  12. Frosty

    Frosty Previous Member

    A wind vane will sail a sail boat in the direction you have set it in relation to the wind. Calling it an auto pilot is incorrect.

    So many of these ugly contraptions for sale in the junk shops and boats with visable holes epoxied on the transom where history once was.

    ---------------------------

    London bus found on the moon

    Moonbus.com
     
  13. CaptBill
    Joined: Jan 2010
    Posts: 184
    Likes: 10, Points: 0, Legacy Rep: 64
    Location: Savannah,Ga

    CaptBill CaptBill

  14. Frosty

    Frosty Previous Member

    Dangerous stuff, nothing more than hands off device for a minute or two to drink your tea.

    Or lake sailing where you can see your destination no more than 1 km away.

    Auto pilot this is not.

    Like putting some string on your throttle pedal and saying you have cruise control.

    ----------------------------

    3 wise men found in America

    wise men .com
     

  15. CaptBill
    Joined: Jan 2010
    Posts: 184
    Likes: 10, Points: 0, Legacy Rep: 64
    Location: Savannah,Ga

    CaptBill CaptBill

    Well if it is connected to a sail and the sail pulls the string pressing the pedal AND controlling the steering wheel in the correct direction the i would say that's one fine automobile you have there.

     
Loading...
Similar Threads
  1. Deering
    Replies:
    2
    Views:
    1,791
  2. Bumbleguy
    Replies:
    3
    Views:
    3,298
  3. missinginaction
    Replies:
    1
    Views:
    4,969
  4. sv alexandra
    Replies:
    2
    Views:
    3,467
  5. missinginaction
    Replies:
    1
    Views:
    1,947
  6. missinginaction
    Replies:
    2
    Views:
    2,067
  7. Jdawg
    Replies:
    9
    Views:
    2,594
  8. Tony.R
    Replies:
    0
    Views:
    2,097
  9. Steve W
    Replies:
    0
    Views:
    1,749
  10. cal_d_44
    Replies:
    0
    Views:
    2,094
Forum posts represent the experience, opinion, and view of individual users. Boat Design Net does not necessarily endorse nor share the view of each individual post.
When making potentially dangerous or financial decisions, always employ and consult appropriate professionals. Your circumstances or experience may be different.