Jump to content

DIY autopilot


Recommended Posts

Hi folks,

 

Been lurking here a while and thought i'd post on something I've been working away on for a while.

 

I sail a raven 26 out of the Mahurangi. I got her for a pretty sharp price and with it came a semi-defunct simrad tp10. I tried and failed to get the thing going but the electronics were toast. 

 

I had been mucking around with arduino for a while and thought that it would make a great platform for a DIY tillerpilot using the linear actuator from the simrad (which was fine).

 

Someone had already done the thinking on this - all I had to do was adapt it for my circumstances.

 

Here's a vid I made of where I'm up to....

 

 

https://www.youtube.com/watch?v=TRd4Qv0znGw&t=109s

 

would love to get your thoughts....

 

Jim

Link to post
Share on other sites

Awesome work.

 

Do you find that the tuning is the difficult part? Making it respond in an orderly fashion would be where I would have thought the problems could arise. damping the motion of the vessel so the actuator is not constantly operating.....

Link to post
Share on other sites

Only been in pretty flat seas so far, but yep, can adjust gain, deadband, motor speed (it's graduated, not all or nothing) and maximum rudder angles all through the software. So in short it takes some tinkering, but customising it to any particular boat it definately doable. 

 

The motion of the vessel is a slightly different challenge. The IMU (compass) does compensate for pitch and heel etc, but I've seen one on a mechanical gimbal which improved its performance a lot. That's next step.... 

Link to post
Share on other sites

The compass input is probably the most difficult part.

Advanced AP's use a 10Hz compass, usually now solid state,(rather than the older gyro type) adjusted for pitch roll and yaw, and also outputting rate of turn info. The current standard is - thats a B&G H5000 AP.

Link to post
Share on other sites

there would be a market worldwide for a rugged waterproof improved tillerpilot alternative to the commonly available ones, if it was competitively priced.  I have an electric ram if you want to build me a brain / control system.

Link to post
Share on other sites

That's good to know. The guy who used the mechanical gimbal has achieved a within  2 degrees of error apparently in rough seas off Tassie, Would be stoked if I could get my error down to that. One advantage of a slow old boat is the error don't matter so much!

Link to post
Share on other sites

Yep, that sounds good - but its not just the error, but the speed of the updates as well, so the AP can "catch" the boat immediately it begins to go off course. The heading sensors that do this are about $1K retail - down from $15K 5 years ago...

Once the heading and rudder control issues are sorted, are you thinking of any type of wind or nav interfaces??

Link to post
Share on other sites

Have you used a rudder position sensor to make this work for you? Or have you managed to get a position signal from the linear actuator? ( I guess with a LA you can have it do a full sweep of the range and it can then make a guess at rudder angle based on prior movements of the actuator? ).

 

It all sounds like a fun project, although the software and tuning could be the part which would make me pull my hair out. I have quite  a number of Arduinos running various things on the farms such as monitoring water systems, fencing, etc,  We have moved more toward using a Raspberry Pi for most things but often an ardunio is in the mix also. 

Link to post
Share on other sites

Thanks for the feedback all.

 

exTL - not sure my fabrication skills are quite up to doing this for money but that's very flattering. I should think the video of my compass unit in an icecream container should have erased that thought from yr mind.I'd love some other people to have a whirl at it though. it doesn't take a great deal of skill.

 

IT - the compass is capable of quite high speeds I think, but it's the rest of the script that slows things down. I've currently got extra print commands active in there for trouble shooting, and they slow things down a lot. Once i get rid of those, I think I'll be able to get around 10hz. 

 

no plans at the moment for wind or GPS integration, although the original coder has done this. For the times that I would use it, dealing with all that it entails isn't really worth it for me. My first experiences on boats were with old compass autohelms and that's all i really require.

 

Also, i studied human factors in jet airliners as part of my psychology many moons ago - the takeaway lesson is that the more automated the system, the less situational awareness the pilot has, and the bigger screw ups as a result. Something that I can just set to set to a bearing while I look after everything else and tweak as needed is just right for keeping me engaged in what the boat is doing.

Link to post
Share on other sites

too tall - yep the rudder sensor was my big innovation I'm quite proud of. It resides in the tillerpilot itself and is just a 10 turn poteniometer driven by the ram via 3d printer belts and pullys. That gives me 0-5v depending of the relative position of the ram (and therefore the position of the rudder). Then it's just a case of measuring the signal back at hard port, hard stbd and neutral, entering these into the code and voila - rudder position.

 

Obviously, this means the pilot is only able to be used on my boat and requires re calibration if used elsewhere - but not planning on that. 

Link to post
Share on other sites

Thanks for posting; that's a cool looking project.  I like your rudder feedback mechanism and have always wondered why Raymarine/Simrad don't include the same.

 

Have you considered using a 5V UBEC to power the Arduino rather than the LiPO power pack?

 

It's what I use to power both my Arduino and Raspberry Pi projects. http://www.trademe.co.nz/toys-models/radio-control-robots/parts-accessories/chargers/auction-1305879640.htm

 

I'm keen to look at the code and logic being used for both the 9DOF IMU and the direction/correction logic.  I see you have provided the link to most of the source code so I'll have a deeper look.  I have a hat for a Raspberry Pi that's primarily intended for a home-made quad-copter but has the IMU and some of the other components that I need to create a DIY autopilot.  It's on a growing list of things to do ....

Link to post
Share on other sites

Slanty, have a look at NZ Posts "youshop" for getting stuff out of the states. a lot of companies wont ship internationally but if you use "youshop" they ship to a US address and that address (youshop) then ships to you. My experience is that the charges getting stuff out of the US using youshop are very reasonable.

Link to post
Share on other sites

Thanks "Slanty",Have you tried any of the chinese sites for parts. As an example our hp laptop fan shat itself and a tech crowd wanted $280 to fix,my 17yr old geek student went on line and got free shipping and fan for $9.95. in the mix for some reason he got sent 20 air/water temps sensors for free and has since on sold them..

Not doubt the USA sites have their gear made in china so might be able to miss out the middleman?

Link to post
Share on other sites

Farrari- the ubec looks like the business. I was just going to get a dc-dc converter but I didn't think about the noise issue. Looks like this may solve it. 

 

Didn't think about youshop - bugger! next time.

 

Most of my parts are chinese cheapies. All have worked great so far and quality has been fantastic for the price. I've bought the key items from US suppliers (motor controller, compass module) as there was no good generic available that I could find. Almost everything else is from banggood.com. Free shipping on everything!

 

warning tho - bangood is highly addictive.

Link to post
Share on other sites

 

hp laptop fan shat itself and a tech crowd wanted $280 to fix,

That's just plain daylight robbery.

 

It's about time we had something to take on the costs of these things. An AP is simply not that expensive to make by the manufacturers. They charge what they do because they can, not due to cost of making. There is not a great deal inside the units and most of the "brains" is inside a Chip. There would be lucky to be maybe $80 worth of parts inside. As IT said, the compasses and Rate Gyro are all solid state now. The old compasses were a bit more expensive due to a lot more manual labor involved, but now the Solid state devices are few bucks if even that.

  • Upvote 1
  • Downvote 1
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...