homemade autopilot

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

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

    Dave911 Junior Member

    Tim B.: >>Congratulations, you have automated and obsoleted yourself in a single shot! Seriously, though...

    Yes, it was a rather strange sensation when I realized that it was steering a lot better than I could have... I felt a bit like a passenger..

    There are a number of ways to implement an autopilot, that is certainly clear to me now.

    >>usefulness of WiFi and a web-server

    I thought of that.. the idea of using a tablet connected to a PC via Wifi for a screen is also interesting. But I have heard of some serious heat problems in tablets when exposed to the sun, which is probably a transitional thing that they will work out. A lot of this is all very new.

    My reasons for including a PC along with the Autopilot is that I really need an onboard chartplotter. Once you get into chartplotter land then you have to have an AIS equipped chartplotter. OpenCPN has that capability already. I believe that SeaClear also has that capability.

    Do they have AIS in the UK waters? That is known as "poor mans" radar here. All of the commercial ships over a certain tonnage, which is pretty low, must have an AIS transponder. The transponder broadcasts the ships coordinates, speed and heading. An AIS charter like SeaClear or OpenCPN can receive those signals and plot them on a map showing projected courses, possible collisions and even signal an alarm if a collision is possible. It is rather amazing. As Jay knows there is a lot of freighter traffic in Lake Erie and for that matter the Great Lakes. And they can move very quickly. So the PC should be very useful once I get an AIS receiver which will happen this spring as there are some new Standard Horizon radios that have built in AIS receivers. Of course the Chartplotter software can also create waypoints and I already have the waypoint outputs tied into the Autopilot controller using OpenCPN. So as my system stands now, I can chart a series of waypoints across Lake Erie for a couple of hundred miles, tell it to go and the autopilot will steer the boat along the route created by the waypoints.

    I really need more than just an autopilot for my boat and that is why I included a PC in my design in the first place.

    So I think I will keep the PC in the mix for now and see how this all packages into a box and go from there.

    >>I'm not sure that 30W consumption is a real figure

    I'll attach a good digital ammeter to it and let you know what I find. I got the 30W figure as the amount of AC power being fed to a power supply that was powering everything (PC included), so it might be less than that.

    I should know a more exact figure also..

    Dave
     
  2. X7JAY7X
    Joined: Jun 2011
    Posts: 28
    Likes: 0, Points: 0, Legacy Rep: 10
    Location: Toledo, OH

    X7JAY7X Junior Member

    I have a commercial Octopus drive that is a cable steering box. It has a motor and clutch in it to engage/disengage the motor. I got a good deal (well good deal compared to new) on it so I bought it. That is the most expensive part of my autopilot project but at least I know that it will be reliable.

    The compass MUST be tilt compensated. All of the links that were posted here did not have tilt compensation. I did alot of searching and came across one that does tilt compensation for $35. It has a 16bit micro on board that does the tilt compensation calculations. Most that I found cost ALOT to get this feature. I can post pictures of mine soon.

    Dave, don't get me wrong, I think your doing a great job and we are all learning from you but I think your system is way too costly for the average person. This is one reason I went with an arduino and also the ease of programming it. I can't even imagine programming in ladder, I mean I can because I work with PLC's as well but sometimes C is just alot easier. Like Frasco said before, we are making a system for us with the features that we want. That is exactly what you did, you loaded it with features but to sell these alot of people don't want or need all that functionality. Have you thought of a "poor mans" version? I am still very concerned about waterproofing. Throwing parts in a water resistant box is not waterproofing.

    I have a powerboat so 30w is no big deal to me but if I had a sailboat I wouldnt want that power draw.
     
  3. X7JAY7X
    Joined: Jun 2011
    Posts: 28
    Likes: 0, Points: 0, Legacy Rep: 10
    Location: Toledo, OH

    X7JAY7X Junior Member

    My compass. The enclosure could be alot smaller but it was something I had laying around. The enclosure and the connector are waterproof.

    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
     
  4. Dave911
    Joined: Aug 2011
    Posts: 70
    Likes: 2, Points: 0, Legacy Rep: 16
    Location: Indiana

    Dave911 Junior Member

    I like your compass. Does it meet your expectations?

    Yes, tilt compensation is a requirement and apparently it is not easy to do electronically as a lot of the marine electronic compasses still have a liquid float system that levels itself to compensate for roll and pitch. If that could all be done on a chip you'd think they would drop the mechanical compensation immediately, but perhaps not.

    >>I think your system is way too costly for the average person.

    You may be right. But I haven't figured the cost yet!

    Don't get to hung up on the CPU cost by itself. There are a lot of parts and pieces besides the CPU. If you spend too much time trying to make everything really inexpensive you might end up with a lot of really inexpensive things that don't work well and are hard to program and debug. Your time, and even more so, your on the water testing time is valuable.

    I have to balance how much time I spend on development with how difficult it is to work with the equipment. (This is a common dilemma I get to deal with ) More than a few times I have made changes to the PLC program while onboard the boat. Making changes are quick and fairly painless. If the PLC cost is an issue, I can rewrite the program into another platform. Doing this in ladder was pretty easy as the PLC does floating point calculations very nicely. The hard part of this has not been the programming, but trying to figure out "what" to program. I don't have any issues writing code in C or C++, but this PLC only supports ladder.

    >>Have you thought of a "poor mans" version?
    Yes, but I really need to make a unit that I can use first (like you and Frasco) and then see where it goes. This would be easy to break apart - the PC from the PLC. For me though, having it all in one box has a lot of benefits on my boat as I mentioned.

    >>I am still very concerned about waterproofing. Throwing parts in a water resistant box is not waterproofing.

    Unless you have water sloshing into your cockpit you really should not have big problems dealing with water infiltration.

    If you use a plastic box that is gasketed - Menards has some 8" Carlon type boxes for about $20, and you mount your box vertically, then run all of our cables into the bottom side of the box, it will be very hard for water to migrate into your box. If you want to really seal it up, use cable glands with gaskets. If you do that then you are basically meeting Nema 4X which is "washdown proof with a high pressure hose".

    Dave
     
  5. Joakim
    Joined: Apr 2004
    Posts: 892
    Likes: 53, Points: 28, Legacy Rep: 422
    Location: Finland

    Joakim Senior Member

    It's an inclinometer with 0.001 degree resolution and 0.01 degree accuracy used for replacing a pendulum or water scale in stability measurements.
     
  6. Joakim
    Joined: Apr 2004
    Posts: 892
    Likes: 53, Points: 28, Legacy Rep: 422
    Location: Finland

    Joakim Senior Member

    AIS is used in Europe as well and you can buy a 300 €/$ chartplotter that shows AIS targets, if you have an AIS receiver, which you can buy for 100-200 €/$ or it may be included in a 300 €/$ VHF.

    I think that Seaclear/Open CPN is really just for geeks (I have both, but don't use them while boat is moving).

    At least NEXUS has a compass transducer called HPC which doesn't have a float system. It uses a three axis fluxgate and shows heel and pitch as well.

    What does a PLC-system cost? I have no experience of PLC. I'm certain a AVR 8 bit microprocessor (e.g. Arduino) would be enough for an autopilot controller and many other jobs. I think there are model airplane and helicopter autopilots made using Arduino platform. They can easily be programmed in C while testing as well. They have to do floating point in software, but that is fast enough anyway. One option might also be an ARM-based Linux computer like NSLU2. I had one in my previous boat, it only took 3 W. Unfortunately NSLU2 is no longer made, but it used to cost about 80 $/€ and it had USB and ethernet. You can also use WLAN-boxes with Linux.
     
  7. Dave911
    Joined: Aug 2011
    Posts: 70
    Likes: 2, Points: 0, Legacy Rep: 16
    Location: Indiana

    Dave911 Junior Member

    >>you can buy a 300 €/$ chartplotter that shows AIS targets

    With maps? Where? Send me a link please! Things must be cheaper in Finland.

    >>I think that Seaclear/Open CPN is really just for geeks
    I think that if you had a waterproof/water-resistant platform to run this software on it would be the standard. The problem is that laptops suck in the cockpit. There is no PC hardware that is cockpit friendly that I know of that does not cost a fortune.

    >>What does a PLC-system cost? I have no experience of PLC.
    Saying "PLC" is like saying "Computer" - they come in all sizes, shapes and costs. If you do a google search you will find "PLC" that cost as little as about $50 up to Modular units with distributed I/O that costs many thousands of $.

    This PLC I am using is basically a packaged microcontroller. It draws less than 4 watts. The cockpit screen draws less than 2 watts. There are slightly cheaper "PLCs" that do the same thing, but they tend to have less mechanical features and the development software gets more expensive and they are made for high volume users. At that point the line gets very blurry between a PLC and a microcontroller. Some "PLCs" are also programmable in C and other languages.

    This unit has removable screw terminals, a plastic housing, din rail mount, indicator lights on all of the I/O etc typical of a traditional PLC.
     
  8. bertho
    Joined: Aug 2006
    Posts: 181
    Likes: 5, Points: 18, Legacy Rep: 59
    Location: asean archipelago

    bertho bertho

  9. Joakim
    Joined: Apr 2004
    Posts: 892
    Likes: 53, Points: 28, Legacy Rep: 422
    Location: Finland

    Joakim Senior Member

    Here is the chartplotter that came with my boat (350 €): http://www.svb24.com/index.php?sid=...ils&cnid=10906&anid=116646&tpl=&listtype=list
    It has reasonable AIS features, not as good as OpenCPN, but good enough for normal usage.

    I don't think it is the cheapest one.

    Maps for Germany, Denmark and the whole Baltic Sea for it are 220 €: http://www.svb24.com/index.php?sid=...a2c0c0710c7&cl=details&cnid=13456&anid=117658

    For me this map covers about 1000 M from home to all directions, thus I probably will never need other regions.

    A much cheaper option is to use IPhone, IPAD or some Android platform, since for those you can buy these (same!) maps and navigational software for 10-20 €.

    I don't think there are any legal and cheap maps for SeaClear or OpenCPN for this region. You can find some illegal free maps for both, but I don't think you can sell devices counting on illegal maps.

    Can you buy and use legal maps easily with SeaClear or OpenCPN? Until this is made as easy as for chartplotters (just insert a map card) I think these are only for geeks. And as you said there are no cheap and easy to use marine PC available.

    For AVR (Arduino) microcontrollers the programming platfrom for C is free. There is also a free platform for ARM Linux.
     
  10. Dave911
    Joined: Aug 2011
    Posts: 70
    Likes: 2, Points: 0, Legacy Rep: 16
    Location: Indiana

    Dave911 Junior Member

    >>Here is the chartplotter that came with my boat (350 €): http://www.svb24.com/index.php?sid=8...&listtype=list
    It has reasonable AIS features, not as good as OpenCPN, but good enough for normal usage.
    Maps for Germany, Denmark and the whole Baltic Sea for it are 220 €:<<

    Adding those two numbers together and multiplying by 1.6 dollars per euro (about) is about $900.00. Not cheap by my standards.

    >>I don't think there are any legal and cheap maps for SeaClear or OpenCPN for this region. <<<

    I never thought about that...

    >>Can you buy and use legal maps easily with SeaClear or OpenCPN?

    Yes, they are free for all of the coastal areas of the US and most of the major waterways inside the USA. The government maintains the download website and they are easy to load into OpenCPN and I think they are easy to get into SeaClear also. That is one of the big attractions to OpenCPN and SeaClear for me. Free, frequently updated charts for life!

    I found a similar Standard Horizon 190i for $557 which has all of the coastal and inland waterway maps for the USA preloaded. Not too bad! And it also shows AIS targets! Nice... And it has a sunlight readable color screen.

    >>IPhone, IPAD or some Android platform, since for those you can buy these (same!) maps and navigational software for 10-20 €.

    Cheaper .. true but then if you want to link your Navigation system to the autopilot to load waypoints, that becomes an issue .. The other thing is water resistance... I get quite a bit of water spray in my cockpit during rougher weather so everything has to be at least drip proof in the cockpit. I think I would trash an Ipad or Android based tablet in short order. I have a water resistant cell phone for the same reason.

    I did more autopilot testing today. I had the mainsail up only - which is the worse case for my sailboat as it tends to push the back end of the boat around due to the missing headsail. The tiller becomes very unbalanced with only the mainsail. (Manually handling the tiller with just the mainsail is a workout!) We had steady 15 knot winds with gusts beyond 25 knots at times... The Autopilot worked fine. At certain times it was working pretty hard to maintain control of the boat.. but that was due to the unbalanced sail situation. With only the mainsail up, the boat was reaching hull speed, which is about 6.2 mph. I tested the autotack feature and it worked very well since I added in counter steering at the end of a big course correction to brake the boats rotation as it gets near the new target heading.

    The boat has to come out of the water on Thursday though so testing is done for this year. But there is not much I would change. I am going to add a few more controls to the screen so I can tweak the autotack. I can see that it would also be nice to have an adjustable rotation rate limit just for autotacking. I also need to make the autotack angle adjustable. But those are pretty minor changes.

    I am surprised how fast I have adapted to having an autopilot. When we were dropping the mainsail we just started the engine and set the autopilot to drive the boat directly into the wind and I climbed up to the mast to pull the sail down - I never really gave a lot of thought to it. Previously, that used to be a two man job. Not this time. :)

    Singlehanding the boat is suddenly a lot easier.

    After thinking about all of the comments .. I think I will package this autopilot as a stand alone device, yet maintain the ability to connect to a navigation device like the Standard Horizon 190i, Seaclear, or OpenCPN. If I could find a waterproof - sunlight readable small LCD PC display that was reasonably priced, I would package it all together and use the PC display as a cockpit screen, but I just can't find one yet. Perhaps someone will come up with something reasonable in a few years..

    Dave
     
  11. Joakim
    Joined: Apr 2004
    Posts: 892
    Likes: 53, Points: 28, Legacy Rep: 422
    Location: Finland

    Joakim Senior Member

    Most marine electronics seem to have about the same price in $ and €. The prices I linked to include EU TAX (20-25% depending on country, you can buy tax free to US) and the exchange rate is about 1.4. Why would you multiply with 1.6?

    Do you know which graphical LCD displays (black and white) are visible in sunlight? I'm looking for one for my AVR project. What type of displays do marine instruments use? E.g. Raymarine ST60 graphical display is not very good in visibility compared to segment ST60 display. It has worse contrast and angle of view.

    Do you have a gyro in your pilot? If not, you should add one. You can buy a good enough gyro sensor for 30$, thus it will not add the cost much and then you will have something more than any sub 1000$ pilot on the market. I think it would be much easier to limit the turn rate and slow down the rate before reaching the new heading using one. Also it will be necessary in bigger waves etc. See this: http://www.cruisersforum.com/forums/f13/raymarine-gyro-sensor-upgrade-for-25-a-53175.html
     
  12. Dave911
    Joined: Aug 2011
    Posts: 70
    Likes: 2, Points: 0, Legacy Rep: 16
    Location: Indiana

    Dave911 Junior Member

    >>and the exchange rate is about 1.4. Why would you multiply with 1.6?

    Hmmm... I have no idea where I got that number now! My mistake.


    >>Do you know which graphical LCD displays (black and white) are visible in sunlight?

    I think you almost have to look at them to figure out which ones work best. But the White LED backlit Monochrome LCDs "seem" to work well. I think the brighter the backlight, the more readable it will be in sunlight. If you look at a lot of the sunlight readable color displays - they seem to take two different approaches - 1. Use a transflective display which is inherently readable in sunlight but expensive. Or 2. Use a conventional color LCD screen and raise the backlighting to extremely high levels to improve the contrast in sunlight.

    Then they also do things to reduce the reflection problems but that probably applies to both screen technologies.

    Anyway, I would look for a monochrome LCD screen with white LED backlights.

    Gyro/Yaw velocity feedback - I think that is a good idea. I have read a lot of things and gone over most of the autopilot manufacturers websites regarding their technology. Some of the current manufacturers are using technology which is really old. Of course those pilots don't have anything like gyro technology built in.

    Rate gyros seem to be much more applicable for faster power boat applications where the rate of turn can be a lot faster than a sailboat. Many of the commercial autopilots don't have rate gyros simply because the boats can't turn that fast. But I think you have a good suggestion since I would like to make this autopilot more generic and flexible. I think that adding the ability to close the loop on the rate of turn would be very useful. Even on a slower moving boat it could make the steering more accurate. I found this tutorial on the Sparkfun website which is pretty extensive. http://www.sparkfun.com/tutorials/167

    One of the possible problems I see with those sensors, is that alone, they are not tilt compensated. So if the boat goes over a large wave and pitches down, rolls, and also yaws, then the rate sensor will be inaccurate in the vertical yaw direction since the boat will also be pitched forward and partially rolled to the side a bit. One possible way around that is to get a fast 3 axis tilt compensated compass and derive rotational velocity from the change in compass heading per time. The compass I have can run at 10 hz, so I could derive a yaw rotation velocity every 100 ms which would probably be plenty fast. I'm looking at some other possible compass solutions which can run even faster than 10 hz. It would be nice to be able to determine yaw rotation velocity without adding another device.
     
  13. Joakim
    Joined: Apr 2004
    Posts: 892
    Likes: 53, Points: 28, Legacy Rep: 422
    Location: Finland

    Joakim Senior Member

    I have a monochrome transflective display (FSTN) and it was not expencive (15 € for 64x128 70x40 mm view area). It has a backlight too. I haven't tested it yet in sunlight. What is a conventional type? Transmissive?

    What kind of compass transducer are you using? Is it a floating one like most marine compasses? Do you really get such noisefree and fast signal that you could derivate yaw rate from it?

    I think rate gyro is important to sailing boats as well or even more important than to motor boats. You need guick responses to waves and gusts in many boats and without a rate gyro you don't know what is happening until your heading has already changed considerably.
     
  14. Dave911
    Joined: Aug 2011
    Posts: 70
    Likes: 2, Points: 0, Legacy Rep: 16
    Location: Indiana

    Dave911 Junior Member

    I think the one I have is simply a monochrome STN display with LED backlighting.

    http://en.wikipedia.org/wiki/Super-twisted_nematic_display

    Quote for the link above:
    >>New CSTN displays offer 100ms response times (for comparison TFT displays offer 8ms or less), a 140 degree viewing angle and high-quality color rivaling TFT displays - all at about half the cost. <<

    I wonder if I can find a CSTN display with LED backlighting to use as a PC display?? Hmmmm.. I'll have to look.

    Compass - I am using a fluxgate compass that is floating for tilt compensation.. I think it is a military surplus unit. New it goes for something close to $1000. KVH still makes them. I think the compass was dumbed down to spit out data at 1 hz. It can be set for 10 hz easily. It seems to have zero noise. So deriving a rotation velocity should be easy with this compass. But for near $1000 it should be pretty nice. :) Unfortunately the compass is way too expensive. But some of these new 3 axis solid state compass boards can spit out headings a lot faster than 10 hz... So as long as they aren't noisy I should be able to get the velocity out of them also.
     

  15. Joakim
    Joined: Apr 2004
    Posts: 892
    Likes: 53, Points: 28, Legacy Rep: 422
    Location: Finland

    Joakim Senior Member

Loading...
Similar Threads
  1. Deering
    Replies:
    2
    Views:
    1,811
  2. Bumbleguy
    Replies:
    3
    Views:
    3,316
  3. missinginaction
    Replies:
    1
    Views:
    5,003
  4. sv alexandra
    Replies:
    2
    Views:
    3,486
  5. missinginaction
    Replies:
    1
    Views:
    1,962
  6. missinginaction
    Replies:
    2
    Views:
    2,094
  7. Jdawg
    Replies:
    9
    Views:
    2,623
  8. Tony.R
    Replies:
    0
    Views:
    2,115
  9. Steve W
    Replies:
    0
    Views:
    1,762
  10. cal_d_44
    Replies:
    0
    Views:
    2,113
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.