homemade autopilot

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

  1. brianb00
    Joined: Sep 2012
    Posts: 24
    Likes: 1, Points: 0, Legacy Rep: 25
    Location: San Francisco

    brianb00 Junior Member

    rate gyro's ?

    Are you using rate gyro's ?
     
  2. Arne81
    Joined: Dec 2012
    Posts: 4
    Likes: 0, Points: 0, Legacy Rep: 10
    Location: The Netherlands

    Arne81 New Member

    I use the CMPS10 Module. I take 10 measurements after which I use the median to display.

    Brian, do you have any tips how to implement the PID controller?
     
  3. brianb00
    Joined: Sep 2012
    Posts: 24
    Likes: 1, Points: 0, Legacy Rep: 25
    Location: San Francisco

    brianb00 Junior Member

    PID implementation:
    Sample rates of a 1/10 to 1/20 of a second are more than adequate.
    Reduce the bandwidth as much as possible to eliminate sensor noise. I use accelerometers and have implemented my own compass tilt algorithms.
    Use rate gyro for yaw rate, this can eliminate or augment rudder angle feedback and gets better results, in a big way.
    Assume you are steering via the rate gyro in the short term (say over several seconds) and the compass provides occasional low levels of input. The compass will be heavily damped, likely bandwidth is in the range of seconds, hence the rate gyro covers the high bandwidth (1/10 seconds) region.
    Put another way, the rate gyro feedback will be large compared to the compass feedback, of course this assumes units of output are the same magnitude. This also depends on how you do sensor fusion.
    Brian
     
  4. brianb00
    Joined: Sep 2012
    Posts: 24
    Likes: 1, Points: 0, Legacy Rep: 25
    Location: San Francisco

    brianb00 Junior Member

    BTW, I have done two versions of an HBRIDGE that can drive 10 amps or possibly more (I am using it up to 10 amps currently). I am about to release another circuit board order. If you are interested in this I could provide details. It provides motor drive current feedback. It's inputs are drive port and drive starboard. It uses screw terminations and the latest bridge controller IC.
    Brian
     
  5. brianb00
    Joined: Sep 2012
    Posts: 24
    Likes: 1, Points: 0, Legacy Rep: 25
    Location: San Francisco

    brianb00 Junior Member

  6. Royston
    Joined: Jun 2013
    Posts: 3
    Likes: 0, Points: 1, Legacy Rep: 10
    Location: Earth

    Royston New Member

    > are you planning an atlantic crossing just like this guy?

    I am not sure yet, haven't thought that far forward but it would be great if I could achieve something like that.

    I purchased a small DC motor and ESC over the weekend, I can now regulate the speed of my motor using a lux meter, i.e. if its bright sunshine run at full speed, low light/no sun run at a lower capacity.

    brianb00, great video, Thanks.

    On a separate note, anyone using Solar? I am now looking for a charge controller that handles Ethernet so I can poll either via SNMP or a script.

    Thanks.
     
  7. budicaa
    Joined: Nov 2013
    Posts: 2
    Likes: 0, Points: 0, Legacy Rep: 10
    Location: Rome

    budicaa New Member

    Goodmorning! This is my first approach to this forum. Please allow me to congratulate for the amount of ideas and contribution I got from it.
    I read in the 5th page a few lines about the "auto learn" function implemented in some commercial A/P: did anybody have any success in discovering what an "auto learn" code could look like or in finding out his personal solution? I would be delighted in getting some hint shared.
     
  8. Zipp3564
    Joined: Dec 2013
    Posts: 1
    Likes: 0, Points: 0, Legacy Rep: 10
    Location: Sweden

    Zipp3564 New Member

    Hi All

    This is my first post in this forum, and it is really fun to find such great info about autopilot development.

    I have developed my own autopilot from scratch (except the linear DC-motor) after bying a brand new Raymarine Autohelm 2000+ that had very poor performance. I have made my own power drive hardware and control software that runs on a microcontroller that gets all its information (wind data, pitch, roll, heel/pitch compensated compass @ 5Hz, 5Hz GPS, and target polar data from tactical computer + more) from the instrument network (Nexus NX2 FDX) on my boat. The first prototype is far better than the Raymarine, but there are still more to do on the control performance.

    The compass I am using gives very accurate data (upp to 60 degress of heel) with resolution 0.1 degrees at 5 Hz with very low noise, so it is possible to use the derivative to get the yaw-rate information. I have recently added a high performance yaw-rate gyro that shall be sensor fused with a Kalman filter to hopfully give even better data.

    I am an control engineer and very interested in the control topologise used for your autopilots. Do you use sensor fusion (compass/rate gyro)? Feed-forward of the boat dynamics (invers Nomoto model)? Rudder servo with estimated rudder angle? Do you use a reference model of the set point values? Wave filter with/without Kalman prediction filter, etc, etc.

    I use Matlab/Simuling for modelling and simulations. If some are interested in my control topology I can try to add a picture or so?

    Brianb00: Great video! Seems to work very well!

    /Fredrik
     
  9. budicaa
    Joined: Nov 2013
    Posts: 2
    Likes: 0, Points: 0, Legacy Rep: 10
    Location: Rome

    budicaa New Member

    Hi Fredrik.
    I'm just about starting with a very cheap GY-86 10 DOF IMU, alias the sensor fusion you were mentioning in your post. If - or when - I'll have an Arduino sketch to extract compass and other data, I'll forward to you. In the meantime, I'd be very interested in your control topology.
    Have a Happy New Year!

    Alessandro
     
  10. callnoori
    Joined: Jan 2014
    Posts: 4
    Likes: 0, Points: 0, Legacy Rep: 10
    Location: ezhimala ,kerala ,india

    callnoori New Member

    good afternoon gentlemen . i am marine electrical engineering student and i am working on remote control survey boat . we have designed one with a 4.5 mtr RIB . using a 40 hp yamaha enduro OBM . using an atmega 16 micro controller and XBEE trx rcv module .it does sail. but lacks refinement . i am looking forward for better reliable throttle controller and steering mechanism . at present we are using two in no. dc motors to control the steering as well throttle. all these test have been conducted in Kavayi back waters , were the tide is relatively calm . may request your words of wisdom and guidance to achieve our goal.
     
  11. Dave911
    Joined: Aug 2011
    Posts: 70
    Likes: 2, Points: 0, Legacy Rep: 16
    Location: Indiana

    Dave911 Junior Member

    Hi Guys,
    I was AWOL most of last year regarding Autopilot development. Too much work, not enough free time. I have an Autopilot running that works for my 29' Ericson Sailboat but as usual, I can see room for improvement.
    I used a PLC as the control basis for that Autopilot. The Autopilot I put together then used an Automation Direct Click PLC and small HMI (screen). I was going to port that over to a Siemens S7-1200 but life got in my way. So a lot of things have changed since then. My Ericson 29 is going up for sale this spring since I bought a bigger boat, a Pearson 10M 33 footer. The reasons for moving up to a bigger boat are many but basically I wanted to go further - faster.
    The Ericson 29 was a tiller boat so I used an electric actuator to control the tiller. It had a potentiometer built into the actuator that I used for tiller position feedback in the control.
    The big primary problems with the autopilot were two:

    1. Downwind it could not detect when the boat wanted to "round up". Piloting a sailboat downwind can be very tricky and what I learned over the last two years is that some boats are tricker than others. Shorter boats with spade keels like the IOR design sailboats of the 70's are simply tricky to sail downwind without close attention to the tiller. Since my homemade autopilot did not have an accelerometer to detect a initial change in yaw (acceleration about the Z axis), it was hopeless at controlling the boat downwind. Heck, I have a hard time steering the boat downwind. Long full keel boat do not have this problem nearly as much. On all over points of sail it did great except:

    2. Sailing close to the wind. Lesson learned. You can't sail close to the wind without a windvane on your boat that is tied into your autopilot. It just doesn't work. On Lake Erie (Great Lakes, USA for our overseas friends) where my boat is docked the wind is constantly shifting. I simply could not sail upwind close hauled with the autopilot, but then again, even doing that with the tiller is a tough chore.

    So now that I have a different boat I also need a different actuator. This boat has a wheel. It had an old Autohelm Autopilot but some of the cables are gone although the motor and drive belt and pulley are still intact at the wheel.

    Has anyone rigged a stepper motor to steer their boat via the wheel? It seems like it would be a good fit and they are relatively cheap.

    I'm thinking of changing control platforms also. I was thinking Raspberry PI last year but the Beagle Board Black is much nicer and it has a real time operating system already ported to it and will run Linux without problems.
    The Beagle Board Black can run a stepper motor without problems. Actually it can run several stepper motors. Instead of using an industrial HMI I am thinking that a control panel based on a cell phone or tablet running Android would be more economical and powerful. They are just too cheap and powerful to ignore. Plus then I would have at least one backup display (my phone). Any ideas? Comments?
     
  12. Skyak
    Joined: Jul 2012
    Posts: 1,462
    Likes: 145, Points: 63, Legacy Rep: 152
    Location: United States

    Skyak Senior Member

    I have had an idea in the back of my mind for some time now -use an old smart phone (or tablet) for the brain and interface. All smart phones have high quality GPS, accelerometers, and gyroscopes. They also have bluetooth to interface with masthead wind speed and direction sensors and the USB has more than enough speed to control communications (or another bluetooth for the output). The programming language support is great and the processing power is great so it shouldn't be too hard to program an advanced autopilot that would work with a standard power interface board. The gyroscopes are what you need for downwind control. The phone would have to be hard mounted to the boat, but it could even be used to download charts and weather info.
     
  13. doogymon
    Joined: Jul 2006
    Posts: 30
    Likes: 0, Points: 6, Legacy Rep: 10
    Location: Ontario

    doogymon Junior Member

    Late into the thread......has anybody mentioned the old TillerMaster yet? Would be interesting to attempt a hybrid conversion using an Arduino board, fluxgate compass and a Chartplotter. The hardware on the TM was top shelf.

    Doog
     
  14. discovery
    Joined: Aug 2013
    Posts: 78
    Likes: 0, Points: 0, Legacy Rep: 10
    Location: Australia

    discovery Junior Member

    Why not use a stepper motor to drive a hyd pump?
     

  15. Dave911
    Joined: Aug 2011
    Posts: 70
    Likes: 2, Points: 0, Legacy Rep: 16
    Location: Indiana

    Dave911 Junior Member

    I do a lot of industrial controls work and the big thing these days is to get rid of hydraulic systems. In a nutshell, they are inefficient and messy. Those who can, are going to motor driven screw systems. Basically electric actuators instead of hydraulic cylinders.
     
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,469
  5. missinginaction
    Replies:
    1
    Views:
    1,947
  6. missinginaction
    Replies:
    2
    Views:
    2,068
  7. Jdawg
    Replies:
    9
    Views:
    2,595
  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.