Cruisers Forum
 

Go Back   Cruisers & Sailing Forums > Engineering & Systems > Marine Electronics
Cruiser Wiki Click Here to Login
Register Vendors FAQ Community Calendar Today's Posts Log in

Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 07-06-2023, 10:46   #1
Registered User
 
JeffBurright's Avatar

Join Date: Aug 2013
Location: Oregon
Boat: Northwest 21 & Islander 36 (too many boats problem)
Posts: 78
Yet another Arduino autopilot for wheel or tiller ($150)

Hello,
On the subject of Arduino autopilots, I humbly submit my own winter project creation. I built two pilots - one for wheel and one for tiller - based on my own code built from the "Jack Edwards autopilot".

My rendition uses an ESP32 as the brain, with a wifi/HTML interface so it can be controlled from any phone, including PID tuning and deadband adjustment from inside the interface. This is a dead simple compass-only pilot, like an ST2000 or similar, and I have tested it on an Islander 36 and a Northwest 21.

Total project cost is approximately $150 for each version. I included a parts list with links on my GitHub page here: https://github.com/jeff-burright/Autopilot_ESP32_wifi/tree/main.

The code is still subject to tweaks, but my code allows easy over-the-air updates so owner customization is easy.

Short video of the tiller version in action this weekend:

Video of the wheel version while I waggled the compass at the dock: https://www.youtube.com/shorts/7anuzTAU0g8

Pic of HTML interface: https://imgur.com/7R8gE5P.jpg

Some photos of the hardware on the two boats are attached. Note that the external battery was just for testing, and the version installed on the boat is tied to the 12V system. In addition to phone control, the big boat version has an LCD screen and a big red button stuffed into an old instrument round, an IR remote control, and a rudder feedback sensor to improve efficiency. Note that I changed the wheel motor box from what's pictured to have the whole box flip up on a hinge rather than using a tension pulley. The pulley didn't work as well as I'd hoped, but the hinge box works well so far.


Hooray for lowering the bar on marine autopilots!

Use at your own risk, no guarantees, yadda yadda.
Attached Thumbnails
Click image for larger version

Name:	PXL_20230122_014414638.jpg
Views:	131
Size:	416.5 KB
ID:	276433   Click image for larger version

Name:	PXL_20230122_071917178.jpg
Views:	142
Size:	424.2 KB
ID:	276434  

Click image for larger version

Name:	PXL_20230213_160852749.jpg
Views:	133
Size:	430.0 KB
ID:	276435   Click image for larger version

Name:	PXL_20230213_182616878(1).jpg
Views:	121
Size:	430.5 KB
ID:	276436  

Click image for larger version

Name:	PXL_20230414_172924659.jpg
Views:	122
Size:	408.2 KB
ID:	276437   Click image for larger version

Name:	PXL_20230415_022031018.jpg
Views:	107
Size:	433.2 KB
ID:	276438  

Click image for larger version

Name:	PXL_20230415_165501871.jpg
Views:	116
Size:	424.9 KB
ID:	276439   Click image for larger version

Name:	PXL_20230215_230458845.jpg
Views:	112
Size:	426.8 KB
ID:	276440  

__________________
Knowing we were fools had not made us sages.
https://www.taketothesea.us
JeffBurright is offline   Reply With Quote
Old 07-06-2023, 11:18   #2
Registered User

Join Date: Aug 2020
Posts: 922
Re: Yet another Arduino autopilot for wheel or tiller ($150)

Awesome work, I especially like the clever enclosures- filing the pill bottle idea away for future use. Thanks for posting.
markxengineerin is offline   Reply With Quote
Old 08-06-2023, 21:22   #3
Registered User
 
JeffBurright's Avatar

Join Date: Aug 2013
Location: Oregon
Boat: Northwest 21 & Islander 36 (too many boats problem)
Posts: 78
Re: Yet another Arduino autopilot for wheel or tiller ($150)

Thank you, it was a labor of love for saving money. Not pictured is the compass chip I affixed to the cabin ceiling of the Islander inside a tic tac box.
__________________
Knowing we were fools had not made us sages.
https://www.taketothesea.us
JeffBurright is offline   Reply With Quote
Old 08-06-2023, 23:58   #4
Registered User

Join Date: Jun 2015
Location: Monterey, California
Boat: Westsail 32
Posts: 783
Re: Yet another Arduino autopilot for wheel or tiller ($150)

Sounds like a fun project!

What are you using for a digital compass and how is that being calibrated? I was messing with this a little for one of my own projects.
Ryban is offline   Reply With Quote
Old 09-06-2023, 05:15   #5
Registered User
 
Bill O's Avatar

Join Date: Jul 2015
Boat: Bruce Bingham Christina 49
Posts: 3,328
Re: Yet another Arduino autopilot for wheel or tiller ($150)

Jeff,
Looked at Jack's Arduino AP many years ago and looks like you may have added some nice tweeks to make it work better. Good job.
My coding skills were not very good at that time (not much better now) and decided to go with pypilot instead. Are there any features on yours that would help advance the pypilot?
__________________
Bill O.
KB3YMH
https://phoenixketch.blogspot.com/
Bill O is offline   Reply With Quote
Old 09-06-2023, 08:00   #6
Registered User
 
JeffBurright's Avatar

Join Date: Aug 2013
Location: Oregon
Boat: Northwest 21 & Islander 36 (too many boats problem)
Posts: 78
Re: Yet another Arduino autopilot for wheel or tiller ($150)

Quote:
Originally Posted by Ryban View Post
Sounds like a fun project!

What are you using for a digital compass and how is that being calibrated? I was messing with this a little for one of my own projects.
This one uses an older LSM303/L3G 9-axis compass chip like this: https://www.ebay.com/itm/202091223251

I did an initial calibration using a small Arduino sketch that reports the xyz min/max by waving the chip around, and those values are coded into the base sketch. There is also a magnetic variation variable that you can set in the base code and then modify within the HTML interface depending on your latitude. Adjusting the mag var variable can also make up for an imperfect forward-facing installation of the compass chip (ask me how I know). Jack's original code also has a drift correction algorithm that I don't 100% understand, so I just kept it.

So far I found that the pilot keeps course well on our lake, but I wonder what specific problems you were seeing with your compass. Was it a drift issue over longer heading fixes, or something else?

----

To Bill's question, I think the pypilot has more technical features (like GPS and wind tracking) and hooks into other services like openCPN. I'm just an amateur in the coding realm, and Arduino/C made more cognitive sense to me than python for some reason. I actually removed the GPS and wind functions from Jack's original code because they didn't fit my simplicity approach (and I cruised with an ST2000 before and found it to be entirely adequate for my kind of sailing). Plus, it seemed Raspberry Pis were more expensive and hard to find, so I opted for the $10 ESP32.

Personally I prefer my own user interface, and for me there is value in having an independent system where every component is super cheap, easily swappable, and simple to assemble. I might be reinventing a wheel here, but there is some pleasure in 'rolling your own'.
__________________
Knowing we were fools had not made us sages.
https://www.taketothesea.us
JeffBurright is offline   Reply With Quote
Old 09-06-2023, 08:15   #7
Registered User

Join Date: May 2011
Location: Lake Ont
Posts: 8,548
Re: Yet another Arduino autopilot for wheel or tiller ($150)

Great project! Thanks for sharing.
__________________
When we give up on truth, we concede power to those with the wealth and charisma to create spectacle in its place.
- Timothy Snyder
Lake-Effect is offline   Reply With Quote
Old 19-06-2023, 17:06   #8
Registered User

Join Date: Jun 2017
Posts: 399
Re: Yet another Arduino autopilot for wheel or tiller ($150)

You do not need to hardcode magnetic variation.
You can simply integrate this
library into your code:

https://github.com/DavidArmstrong/WMM_Tinier

Thanks!
mgrouch is offline   Reply With Quote
Old 14-10-2023, 10:14   #9
Registered User
 
JeffBurright's Avatar

Join Date: Aug 2013
Location: Oregon
Boat: Northwest 21 & Islander 36 (too many boats problem)
Posts: 78
Re: Yet another Arduino autopilot for wheel or tiller ($150)

As an update, I built a smartwatch interface for the pilot that works on a Lilygo TTGO-S3 watch. The watch sends commands to the pilot using the ESP-NOW communications protocol and receives back the new course heading from the pilot after the command is executed. This should make it so I don't have to take my phone up to the mast or foredeck for remote control.

This version of the watch also has a LoRa radio transmitter, so my long term plan is to try to integrate a walkie-talkie for anchor hauling and a long-range anchor alarm that I can wear to shore (building on this project: https://github.com/factoidforrest/an...ra/tree/master). We'll see how much time I actually have.

I'm still doing some tuning, but the current build is up on my github page.
Attached Thumbnails
Click image for larger version

Name:	PXL_20231014_154416834.jpg
Views:	26
Size:	412.4 KB
ID:	282084   Click image for larger version

Name:	PXL_20231014_154455143.jpg
Views:	29
Size:	412.1 KB
ID:	282085  

__________________
Knowing we were fools had not made us sages.
https://www.taketothesea.us
JeffBurright is offline   Reply With Quote
Reply

Tags
autopilot, wheel


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fenix autopilot project - tiller autopilot based on Arduino spascual90 Marine Electronics 70 16-05-2023 14:21
[SOLD] Raymarine SmartPilot S1 Wheel & Tiller Autopilot System jefndeb General Classifieds (no boats) 0 06-11-2020 14:23
Converting linear tiller autopilot to wheel steering. Stormboy Auxiliary Equipment & Dinghy 12 23-12-2018 02:07
I'm a tiller guy, not a wheel guy. With a tiller, I felt I always had complete... Pipeline Multihull Sailboats 30 30-04-2016 09:24
tiller autopilot attached to wheel? anotherT34C Navigation 6 10-03-2009 09:13

Advertise Here


All times are GMT -7. The time now is 10:04.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.