Arduino Projects For Your Boat

A forum for discussing boat or trailer repairs or modifications that you have made or are considering.
User avatar
BOAT
Admiral
Posts: 4969
Joined: Fri Oct 19, 2012 5:12 pm
Sailboat: MacGregor 26M
Location: Oceanside, CA MACMJ213 2013 ETEC60

Re: Arduino Projects For Your Boat

Post by BOAT »

I used to sell the FANUC Programmable Controllers (PLC's) when I worked for General Electric - the very first Industrial Automation Computers were made by Westinghouse - they were called Numa Logic. I was there - I worked for Westinghouse and sold the First Numa Logic PLC's. (Those were the old days). The programming on the Numa Logic was primitive but the Fanuc machines used State Logic and now today most people use the PLC's made by Allen Bradley who created the DeviceNet which is the entire NMEA0180 and NMEA2000 command line system that we use today. The idea is that you would send the commands from any brand of PLC, (Allen Bradley, Numa Logic, Square D, Ardruino) to any brand of external device and they would know what it means.

I used to program the State Logic Language for Fanuc, and right now as a database person I must use a lot of Visual Basic (which is a compiled c+ windows thing). Even in Excel you use VB to write the Macros to control spreadsheets.

I have access to industrial PLC units and can configure them to run conveyor belts and bottle line machines, elevators, and all kinds of stuff. The machines are a little pricy because they are industrial and they use analog and digital input output modules that are seperate and get costly, but you need these inout output modules to control anything that uses any real voltage. There are small cheap PLC units you can buy for 40 bucks that have 12 input and 12 output 2 amp 12VOLT DC slots or so.

All this stuff is great and you can build things real cheap. The problem is the External Devices
Example:

Your not going to turn the rudder on your boat with a dinky little 5 volt servo - maybe you can turn the rudder on your toy airplane, but not the boat.

You need real massive strong and powerful external equipment to produce the kind of horsepower you need to control a tiller or steer an automobile or swing a 50 pound iron gate.

For that, you need high voltage high amperage output modules that can send a real high voltage 12 volt current at sufficient amps to make a piston push 30 pounds of rudder resistance through 7 knots of moving water. The Ardruino could never produce a line current to an external device powerful enough to do that on it's own - your going to need to send your Adruino signal to a high powered "Brain" with some really stiff relays and transistors that can control a much bigger current than the little .5 amps your Arduino can handle. You will burn up the Arduino trying to control a 10 amp control piston.

I would be skeptical about any auto pilot that someone has claimed to have created with this until I see the equipment list that was used to control the boat. I think it's great to learn PLC languages and the little unit is great for lot's of stuff but make sure you can actually turn the boat with it before you put all your eggs into that basket as tiller pilot.

If you are going to make a wheel pilot the electric motor that controls the wheel needs a good voltage - even a stepper motor needs some beef to turn the wheel, but no where near as much as a tiller. If you make a wheel pilot then EVERYTHING depends on the wheel motor you select - that is the real linchpin in a good wheel pilot and highly doubt a better wheel pilot could be obtained to surpass the one Captain Vic has already designed - fer crying out loud - HIS wheel pilot motor is better than the motor on the RayMArine wheel pilot!! I would ask him what motor he used before I ever attempted to create a wheel pilot.

Remember - it's the equipment that moves the control surfaces that makes all the difference - not the thinking part of the unit.
User avatar
sailboatmike
Admiral
Posts: 1597
Joined: Thu Mar 12, 2015 10:17 pm
Sailboat: MacGregor 26X
Location: Australia

Re: Arduino Projects For Your Boat

Post by sailboatmike »

Boat, Boat, Boat, do some reading up on these little devices, they are using them right now to power 12 to 30 volt DC motors pulling 6 amps or more, they use a power board that is given instructions from the Arduino, and even that power board isnt costly.

The Arduino can both read and output NEMA 0183 and 2000 sentences, its way more than a toy

Here it is driving a tiller pilot https://www.youtube.com/watch?v=kE4qSK2DyFs

Is this 12v motor big enough?? https://www.youtube.com/watch?v=Lzxuro0Z2Ew

I think your missing the point of the Arduino a bit, the idea is the Arduino runs the program, yes it can run small motors directly but for larger draw you use a Shield (Arduino talk for external board), because they are mass produced the cost per unit is dirt cheap.

One cant possibly say you cant run a boat autopilot off one, do a search on YouTube you will find at least a dozen people that have bothered to make a video and upload it, nevermind the countless people that didnt make a video, the biggest boat I can remember was a 40 foot cat
User avatar
BOAT
Admiral
Posts: 4969
Joined: Fri Oct 19, 2012 5:12 pm
Sailboat: MacGregor 26M
Location: Oceanside, CA MACMJ213 2013 ETEC60

Re: Arduino Projects For Your Boat

Post by BOAT »

sailboatmike wrote:Boat, Boat, Boat, do some reading up on these little devices, they are using them right now to power 12 to 30 volt DC motors pulling 6 amps or more, they use a power board that is given instructions from the Arduino, and even that power board isnt costly.

The Arduino can both read and output NEMA 0183 and 2000 sentences, its way more than a toy

Here it is driving a tiller pilot https://www.youtube.com/watch?v=kE4qSK2DyFs

Is this 12v motor big enough?? https://www.youtube.com/watch?v=Lzxuro0Z2Ew

I think your missing the point of the Arduino a bit, the idea is the Arduino runs the program, yes it can run small motors directly but for larger draw you use a Shield (Arduino talk for external board), because they are mass produced the cost per unit is dirt cheap.

One cant possibly say you cant run a boat autopilot off one, do a search on YouTube you will find at least a dozen people that have bothered to make a video and upload it, nevermind the countless people that didnt make a video, the biggest boat I can remember was a 40 foot cat
Well, yes I am way behind the curve on these things as I pointed out my experience is back in the old days of industrial computers.

Okay - I read that output is .5 so I assumed there must be external devices to control.

The board is controlling external devices - that's the part I see in the vids - I'm not aware of the cost of those devices - I am not saying you can't run an autopilot - I'm sure you can - I just don't know how much money your really saving after you buy all the external devices. The question I am trying to figure is how cost effective is it. What does it cost to built a working AP?
User avatar
sailboatmike
Admiral
Posts: 1597
Joined: Thu Mar 12, 2015 10:17 pm
Sailboat: MacGregor 26X
Location: Australia

Re: Arduino Projects For Your Boat

Post by sailboatmike »

On average a GPS shield is about $10, a compass shield $3, the Arduino board itself less than $10, motor controller about $10 or less.

Most of the shields are between $2 and $6. I just bought a 4 line led backlit screen with 4 buttons on for $6.

I would say well under $100 for all the parts to make a auto pilot from scratch and if you wanted something simpler to just hold a course cheaper again.

I also just bought the Arduino "Mega" board with more memory and extra digital and analog pins for the princely sum of $10.06 (you have to admit thats cheap as chips)
Here is the spec

The Mega 2560 is an update for the Arduino Mega, which it replaces.
The board is a microcontroller board based on the ATmega2560-16AU .It has 54 digital input/output pins (of which 14 can be used as PWM outputs), 16 analog inputs, 4 UARTs (hardware serial ports), a 16 MHz crystal oscillator, a USB connection, a power jack, an ICSP header, and a reset button. It contains everything needed to support the microcontroller; simply connect it to a computer with a USB cable or power it with a AC-to-DC adapter or battery to get started. The Mega is compatible with most shields designed for the Arduino Duemilanove or Diecimila.
Product Summary:

Microcontroller:ATmega2560
Clock Speed:16 MHz
EEPROM:4 KB
SRAM:8 KB
Flash Memory:256 KB of which 8 KB used by bootloader
Operating Voltage:5V
Input Voltage (recommended):7-12V
Analog Input Pins:16
Digital I/O Pins:54 (of which 14 provide PWM output)
User avatar
BOAT
Admiral
Posts: 4969
Joined: Fri Oct 19, 2012 5:12 pm
Sailboat: MacGregor 26M
Location: Oceanside, CA MACMJ213 2013 ETEC60

Re: Arduino Projects For Your Boat

Post by BOAT »

What turns the boat?? I still don't see what your going to do about actually controlling the rudders on the boat.

Do you have a set up to actually steer the boat?
User avatar
kmclemore
Site Admin
Posts: 6256
Joined: Sun Feb 08, 2004 9:24 am
Sailboat: MacGregor 26X
Location: Ambler, PA -- MACX2018A898 w/ Suzuki DF60AV -- 78 BW Harpoon 4.6 -- 2018 Tahoe 550TF w/ 150 Merc

Re: Arduino Projects For Your Boat

Post by kmclemore »

sailboatmike wrote:... I also just bought the Arduino "Mega" board with more memory and extra digital and analog pins for the princely sum of $10.06 (you have to admit that's cheap as chips) ...
Cute. I see what you did there. ;)
User avatar
Neo
Admiral
Posts: 1093
Joined: Fri Jan 30, 2015 4:29 pm
Sailboat: MacGregor 26M
Location: Central Coast, NSW, Australia

Re: Arduino Projects For Your Boat

Post by Neo »

Wow Mike,
I can see your Arduino studies are coming along nicely 8)
I was under the same impression as BOAT and thought I'd need an external motor controller for the motor but even that simple MOSFET seems to do the basics nicely :)
Arduino hardware seems to be closely related to Lego! :D .... But what about the software code? Have you found something open source to get you going?

I've been looking at what will actually push and pull my steering (Rudders and OB in my case) because I don't really want a wheel pilot thing and a Linear Actuator can't move my rudders while the OB is connected. So I'm actually considering modifying my Uflex Dual Cable Rotary Steering Box to connect to a gear motor (or some other motor). The Steering wheel shaft passes all the way through the box and just peeps out the other side. So I'm considering having an extension welded on the back of the rod so I can mount a pulley wheel for belt. And I'm thinking the motor will be mounted on the base of the helmbox (inside).
Which kind of motor do you think I should be aiming for? .... I know little about stepper motors and a belt driven gear motor will most likely need to be re-centered each time it's engaged.

All the best.
Neo
User avatar
sailboatmike
Admiral
Posts: 1597
Joined: Thu Mar 12, 2015 10:17 pm
Sailboat: MacGregor 26X
Location: Australia

Re: Arduino Projects For Your Boat

Post by sailboatmike »

BOAT wrote:What turns the boat?? I still don't see what your going to do about actually controlling the rudders on the boat.

Do you have a set up to actually steer the boat?
In the short term I was going to use a stepper motor with like a rubber stopper on the end that will use friction to push up against the wheel and when the stepper motor turns it will turn the wheel, not sure if this will work but its my first idea and its a start, the stepper motor will be able to be dropped back off the wheel unit to disengage.

The first thing for me to do is get the a simplified project up and running, I have not played with electronics since I was at school, however working in computers for many years I have a good mind for logic, drawing out schematics for how the system needs to run and inputs and outputs that will be needed.

The Arduino IDE (programming language) is very much like the old basic unstructured language I used to mess around with many many years ago, with the for / next, if / then statements, also many people have already written similar code and most are more than happy to share in the public domain (why recreate the wheel so to speak)

Once I have something of a small working project up and running I will test it on one of my RC yachts.
User avatar
sailboatmike
Admiral
Posts: 1597
Joined: Thu Mar 12, 2015 10:17 pm
Sailboat: MacGregor 26X
Location: Australia

Re: Arduino Projects For Your Boat

Post by sailboatmike »

Neo wrote:Wow Mike,
I can see your Arduino studies are coming along nicely 8)
I was under the same impression as BOAT and thought I'd need an external motor controller for the motor but even that simple MOSFET seems to do the basics nicely :)
Arduino hardware seems to be closely related to Lego! :D .... But what about the software code? Have you found something open source to get you going?

I've been looking at what will actually push and pull my steering (Rudders and OB in my case) because I don't really want a wheel pilot thing and a Linear Actuator can't move my rudders while the OB is connected. So I'm actually considering modifying my Uflex Dual Cable Rotary Steering Box to connect to a gear motor (or some other motor). The Steering wheel shaft passes all the way through the box and just peeps out the other side. So I'm considering having an extension welded on the back of the rod so I can mount a pulley wheel for belt. And I'm thinking the motor will be mounted on the base of the helmbox (inside).
Which kind of motor do you think I should be aiming for? .... I know little about stepper motors and a belt driven gear motor will most likely need to be re-centered each time it's engaged.

All the best.
Neo
Its very much a work in progress, Im searching and studying what other have done before me, (Im no hero that wants to build a better wheel).

Im VERY open to ideas from people as to how to make this thing work, I dont have all the answers, but I have a few possibilities, I know its possible as others have already built them, but they are way smarter in electronics than I am.

The old adage in computing is "One step at a time" do something, get it right, test it and test it before moving to the next thing, its just like Lego building blocks, build on what you have that you know works
User avatar
Neo
Admiral
Posts: 1093
Joined: Fri Jan 30, 2015 4:29 pm
Sailboat: MacGregor 26M
Location: Central Coast, NSW, Australia

Re: Arduino Projects For Your Boat

Post by Neo »

Hi Mike,

It's been a VERY long time since I've done any programming but I'd like to start by browsing some example Arduino Autopilot code .... where do I find this? .... I surprised no one on Youtube provides links to their code?

Also, I know this is cheating but I have put an add up on a contractors site to for a Auto pilot Arduino Controller for a yacht (To design an Arduino device that will sens GPS/Compass bearing and correct the course by controlling a servo motor to ultimately control rudders). Arduino hardware needs to be specified and flexible code will need to be written for a device that looks a behaves just like this .... https://www.youtube.com/watch?v=apSmwGJRisc).... Many people have replied (some with excellent references) to do this for US$250 .... Which I didn't think was so bad? ... I know a big down side of this strategy will be not knowing the code well enough to fine tune and make any changes but I was thinking I could specify area's that must be made variable/changeable .... ie. things like "Steering repose delay" and "Wheel Rotation Speed".

Also have you written any form of "Design Criteria" for your project yet?

All the best.
Neo
User avatar
sailboatmike
Admiral
Posts: 1597
Joined: Thu Mar 12, 2015 10:17 pm
Sailboat: MacGregor 26X
Location: Australia

Re: Arduino Projects For Your Boat

Post by sailboatmike »

Neo wrote:Hi Mike,

It's been a VERY long time since I've done any programming but I'd like to start by browsing some example Arduino Autopilot code .... where do I find this? .... I surprised no one on Youtube provides links to their code?

Also, I know this is cheating but I have put an add up on a contractors site to for a Auto pilot Arduino Controller for a yacht (To design an Arduino device that will sens GPS/Compass bearing and correct the course by controlling a servo motor to ultimately control rudders). Arduino hardware needs to be specified and flexible code will need to be written for a device that looks a behaves just like this .... https://www.youtube.com/watch?v=apSmwGJRisc).... Many people have replied (some with excellent references) to do this for US$250 .... Which I didn't think was so bad? ... I know a big down side of this strategy will be not knowing the code well enough to fine tune and make any changes but I was thinking I could specify area's that must be made variable/changeable .... ie. things like "Steering repose delay" and "Wheel Rotation Speed".

Also have you written any form of "Design Criteria" for your project yet?

All the best.
Neo
This guys has a Youtube channel and a website, both have the code and a full explanation of what each line of code does http://www.toptechboy.com/arduino-lessons/

The end product of what this guy did was to send a balloon into space and take pictures
User avatar
1st Sail
Captain
Posts: 680
Joined: Wed Dec 31, 2008 11:58 am
Sailboat: MacGregor 26M
Location: Moline, IL '06M 50hp Etec
Contact:

Re: Arduino Projects For Your Boat

Post by 1st Sail »

I stumbled on this company a year ago while involved in a robotics program at one of my clients schools.
www.pitsco.com
For kicks I bought a pile of hardware for a personal play project on ebay. So now I have a pile of servos, dc motors, dc motors with servo stepping controllers, plus build hardware. Everything integrates to arduino controllers or their own extended controller.
Here is a link to the free download programming software. Their videos are great for beginners like me.
The ardublocky is a graphic based block designer. You can also view the corresponding c code simultaneously.

https://www.pitsco.com/SearchAll/?keywo ... ock&type=0

Their shield mounts on an arduino board. However, it appears that are numerous sources for the same per SailboatMike's post.
You could certainly prototype an auto pilot with this stuff then scale up to a larger drive motor as discussed previously. Looks like all the components are available open source. Particularly a server drive motor which could be gear driven to the steering wheel shaft or wheel itself. Similar to the RayMarine gear drive unit.
User avatar
sailboatmike
Admiral
Posts: 1597
Joined: Thu Mar 12, 2015 10:17 pm
Sailboat: MacGregor 26X
Location: Australia

Re: Arduino Projects For Your Boat

Post by sailboatmike »

I have downloaded Ardublock, its a bit fiddly to install (has to be done exactly right and to the right directory structure) but the instructions are reasonably clear.

I looked at Ardublock as a way of getting kids to write simple code and the concept seems great, last year my youngest did a 3 or 4 hour class on robotics with the school (he is in year 3) that cost me $35, I did a quick calculation, thats 23 kids in the class @ $35 per child, thats over $800 and they ran one class in the morning and after lunch, so a cool $1600 for a days work, not bad money if you can get it.

I was hoping for that sort of money would of at least got a Arduino Uno, a couple of LED's and some resistors to bring home (maybe $10 worth if your lucky) but alas nothing was forthcoming.

I can see some great little projects I can do with the kids to give them a appreciation of electronics and programming, Ardublock is a nice tool that will make the programming more visual however you still need the basic knowledge to make it work.

Im a qualified vocational education teacher, so this sort of stuff really excites me
User avatar
Neo
Admiral
Posts: 1093
Joined: Fri Jan 30, 2015 4:29 pm
Sailboat: MacGregor 26M
Location: Central Coast, NSW, Australia

Re: Arduino Projects For Your Boat

Post by Neo »

sailboatmike wrote:This guys has a Youtube channel and a website, both have the code and a full explanation of what each line of code does http://www.toptechboy.com/arduino-lessons/
Thanks Mike... Yes you posted that link before and I bookmarked it... then forgot it, sorry :(
Anyway I've sat through lesson 1 and it's pretty Awesome! .... He promotes the SparkFun kit (Expensive!!) but from that search I have found this kit https://goo.gl/A91NZ6 with two motor types included ... Is this Ok? ... or is it best to Buy an Arduino Mega Board instead?

Thanks for encouraging me into this :)
User avatar
sailboatmike
Admiral
Posts: 1597
Joined: Thu Mar 12, 2015 10:17 pm
Sailboat: MacGregor 26X
Location: Australia

Re: Arduino Projects For Your Boat

Post by sailboatmike »

I would get the standard Uno for a start, the only reason i bought a Mega is because i ordered a few other things from the same place and postage was free, so just threw a mega onto my order for a extra $10, I will keep that for later on.

I got the bigger kit because I figured that it saved me getting the other bits later, you could probably find another kit with all the same parts as the Sparkfun kit for lots less on Ebay.

My kit came from Sydney and took just on a week to arrive, I'm really happy with. Of course I realize its all about budgets, so get what you can afford and top up with other bits from China like I'm doing, I figure I wont be able to use those parts until after they arrive in a few weeks anyway.

I'm working on finishing a sailing dinghy that has been sitting in my garage over winter, I loved to sail that little boat and dearly want it back on the water before the sun runs out this summer, so thats been eating into my time.

Anyway off to put another coat of laquer on her and finish off modifying a Mirror center board and rudder to make her a SAILING MACHINE :D
Post Reply