Reply
 
Thread Tools Display Modes
 
Old 10-13-2016, 10:52 PM   #1
TG
Senior Member
 
TG's Avatar
 
City: Oceanside, CA
Country: USA
Vessel Name: Tera Grace
Vessel Model: Californian 42 LRC
Join Date: Oct 2012
Posts: 110
Arduino Autopilot

I thought I'd share a project I've been working on.

My initial intention was to automate my 1970's BENMAR 16B Autopilot by substituting the signal from the Binnacle with a signal generated using data from my Furuno Navnet. My reasoning was two-fold, I could retain the old system as a backup and, integrating into the old system with this method seemed to be the least invasive should I abandon the project.

The ultimate goal was to be able to navigate a route or hold a heading. Secondly, the new device should be able to pick up the route automatically when set or cancelled on the chart plotter.

I chose the Arduino Mega platform for the usual reasons, it's inexpensive and there exists a huge knowledge base and developer network.

I did some initial circuit design to create the link from the arduino to the Benmar, basically converting the 5v logic signals to voltages the schmitt triggers on the benmar main board could use to operate the helm pump.

The small circuit board in the upper left of the photo below was my first attempt at interfacing with the Benmar. I connected it up and wrote a small program to send a signal to apply left rudder for 10ms then wait 10ms then right rudder 10ms and ran it in a continuous loop. I achieved success on the first attempt and boy was that exciting, I knew right then this was going to work.

The next step was to develop the data interfaces. RS232 for NMEA, RS422 for the heading sensor. All of this needed to be converted to 5v TTL levels in order to be compatible with the Arduino Serial ports. I spent a lot of time designing and bread-boarding circuits at this stage, but ultimately settled on a Maxim 250/251 isolated transceiver chipset for the RS232 and a Maxim 487 transceiver for the RS422. (To Be Continued)
Attached Thumbnails
Click image for larger version

Name:	IMG_0293.jpg
Views:	43
Size:	150.9 KB
ID:	57350  
__________________
Advertisement

TG is offline   Reply With Quote
Old 10-13-2016, 11:00 PM   #2
Senior Member
 
Toolbuddie's Avatar
 
City: Huntsville, AL
Country: USA
Vessel Name: Sea Note
Vessel Model: Mainship 40
Join Date: May 2014
Posts: 174
Well don't just leave us hangin'!!
You techno geeks just slay me>
Dave
__________________

Toolbuddie is offline   Reply With Quote
Old 10-13-2016, 11:15 PM   #3
TG
Senior Member
 
TG's Avatar
 
City: Oceanside, CA
Country: USA
Vessel Name: Tera Grace
Vessel Model: Californian 42 LRC
Join Date: Oct 2012
Posts: 110
Now that the data interface was worked out I focused on developing a rudder position sensor interface. I read where someone had used a Motorola Rotary Position Hall Effect Sensor so I obtained my own and set about to design the support circuitry. My first attempts were successful but the voltage readings experienced a little fluctuation. I resolved the issue by using the Arduino's 3.3v regulated output pin and feeding it back into the Aref pin.

At this point I had everything I needed to start writing code. I set up a serial link from my Furuno to my laptop and downloaded a stream of NMEA data that I could use to simulate the Furuno connection while working from my office.

The RPS is visible at the left of the image below. I would write code as I had time and carry the prototype back and forth from home to the boat testing pieces of code as I progressed.
Attached Thumbnails
Click image for larger version

Name:	IMG_0062.jpg
Views:	38
Size:	128.4 KB
ID:	57351  
TG is offline   Reply With Quote
Old 10-13-2016, 11:17 PM   #4
TG
Senior Member
 
TG's Avatar
 
City: Oceanside, CA
Country: USA
Vessel Name: Tera Grace
Vessel Model: Californian 42 LRC
Join Date: Oct 2012
Posts: 110
Quote:
Originally Posted by Toolbuddie View Post
Well don't just leave us hangin'!!
You techno geeks just slay me>
Dave
LOL! I'm working up to it. It's been operational for three months now and I have about 300 NM on it with great success.
TG is offline   Reply With Quote
Old 10-13-2016, 11:23 PM   #5
Senior Member
 
Toolbuddie's Avatar
 
City: Huntsville, AL
Country: USA
Vessel Name: Sea Note
Vessel Model: Mainship 40
Join Date: May 2014
Posts: 174
Awesome. You seem to love problem solving with a pioneer spirit. Well done. I look forward to following your project.
Dave.
Toolbuddie is offline   Reply With Quote
Old 10-14-2016, 02:20 PM   #6
TG
Senior Member
 
TG's Avatar
 
City: Oceanside, CA
Country: USA
Vessel Name: Tera Grace
Vessel Model: Californian 42 LRC
Join Date: Oct 2012
Posts: 110
As the coding progressed I started to think about the interface component. I knew I didn't want to end up with a keyboard duct taped to a box with a 4 line LCD display.

I was really interested in using a graphic display but the Arduino really lacks the horsepower to process graphics and drive this type of display directly.

I found the solution in what is called an intelligent display. This type of display has its own onboard graphics processor and memory facilities. In fact this type of display could actually handle all of the work the Arduino is doing as well as the graphics. But of course I'm committed to the Arduino and don't really want to learn another specialized language.

I ended up selecting the 4D Systems intelligent uLCD-43DT with resistive touch panel. Features include; a 4.3" TFT 480x272 touch screen display, audio, micro-SD card connector, an expansion port along with a series of GPIO, I2C, SPI, and UART serial comms.

With this panel, there's no need for external buttons or switches as they can all be created on the display itself. The display is independently programmed and all the graphics and button processing reside on board. The communication with the Arduino is by high speed serial connection and it requires very little overhead so it's very fast.

Another and most important feature of the 4D System is the developer software. They have created a virtual drag and drop environment similar that is similar to creating a form in Microsoft Access. You pick an object be it a button or numerical digit or text box and drag and drop. The VisiGenie option will write the graphics code automatically which makes for some very rapid development possibilities.

I can envision using this display for any number of functions; Engine Monitor, Tank Level, Battery Monitor etc...

Enough said, if you are interested, search it out, I can't say enough good things about this display.
Attached Thumbnails
Click image for larger version

Name:	uLCD-43D_s_02.jpg
Views:	37
Size:	50.8 KB
ID:	57378   Click image for larger version

Name:	uLCD-43DCT-slide-3.jpg
Views:	39
Size:	158.5 KB
ID:	57379   Click image for larger version

Name:	IMG_0218.jpg
Views:	42
Size:	126.7 KB
ID:	57380  
TG is offline   Reply With Quote
Old 10-14-2016, 03:21 PM   #7
Guru
 
MYTraveler's Avatar
 
City: West Coast
Country: USA
Join Date: Apr 2014
Posts: 651
Very interesting project. I have built several Arduino-based monitoring and control devices for my boat, and have a long list of others that I intend to build as time permits. For display, I mostly have wireless connections (XBees) to a PC that runs Processing based code to display on any of my boat's displays. But I also typically have an LCD display at the source. None are as powerful as the display you use -- I am going to look that up and give it a try.

If you are willing to share your Arduino code, I would certainly enjoy seeing how you handled sensitivity and smoothing.

Thanks for your posts -- Rick
MYTraveler is offline   Reply With Quote
Old 10-14-2016, 03:54 PM   #8
TG
Senior Member
 
TG's Avatar
 
City: Oceanside, CA
Country: USA
Vessel Name: Tera Grace
Vessel Model: Californian 42 LRC
Join Date: Oct 2012
Posts: 110
Quote:
Originally Posted by MYTraveler View Post
Very interesting project. I have built several Arduino-based monitoring and control devices for my boat, and have a long list of others that I intend to build as time permits. For display, I mostly have wireless connections (XBees) to a PC that runs Processing based code to display on any of my boat's displays. But I also typically have an LCD display at the source. None are as powerful as the display you use -- I am going to look that up and give it a try.

If you are willing to share your Arduino code, I would certainly enjoy seeing how you handled sensitivity and smoothing.

Thanks for your posts -- Rick
I do intend to share and post the code. I haven't played with XBees yet but I'm quite interested in looking at some wireless solutions. For now I'm taking a little break and just enjoying using the AP out on the water and making a bug list.
TG is offline   Reply With Quote
Old 10-14-2016, 03:57 PM   #9
Guru
 
MYTraveler's Avatar
 
City: West Coast
Country: USA
Join Date: Apr 2014
Posts: 651
Quote:
Originally Posted by TG View Post
Enough said, if you are interested, search it out, I can't say enough good things about this display.
I notice that this display is available in a few different flavors, one of which is as an Arudino shield but that you recommend (or at least used) the one with a dedicated processor. Why did you not use the arduino version?
MYTraveler is offline   Reply With Quote
Old 10-14-2016, 04:00 PM   #10
TG
Senior Member
 
TG's Avatar
 
City: Oceanside, CA
Country: USA
Vessel Name: Tera Grace
Vessel Model: Californian 42 LRC
Join Date: Oct 2012
Posts: 110
These are snapshots from the developer app of the various display modes and setting screens.
Attached Thumbnails
Click image for larger version

Name:	AutoPilotD4.jpg
Views:	25
Size:	49.4 KB
ID:	57410   Click image for larger version

Name:	AutoPilotD5.jpg
Views:	28
Size:	65.5 KB
ID:	57411   Click image for larger version

Name:	AutoPilotD6.jpg
Views:	35
Size:	63.6 KB
ID:	57412   Click image for larger version

Name:	AutoPilotD7.jpg
Views:	40
Size:	47.5 KB
ID:	57413   Click image for larger version

Name:	AutoPilotD8.jpg
Views:	36
Size:	63.6 KB
ID:	57414  

Click image for larger version

Name:	AutoPilotD9.jpg
Views:	34
Size:	65.8 KB
ID:	57415  
TG is offline   Reply With Quote
Old 10-14-2016, 04:16 PM   #11
TG
Senior Member
 
TG's Avatar
 
City: Oceanside, CA
Country: USA
Vessel Name: Tera Grace
Vessel Model: Californian 42 LRC
Join Date: Oct 2012
Posts: 110
Quote:
Originally Posted by MYTraveler View Post
I notice that this display is available in a few different flavors, one of which is as an Arudino shield but that you recommend (or at least used) the one with a dedicated processor. Why did you not use the arduino version?
I did use the arduino version, they all have the dedicated processor. I have the shield and used it for the initial development work. Later I consolidated all of the support circuits to a single 4 x 4 PCB and did away with the shield. I was making circuit design revisions faster than I could produce new PCB's so I worked with the breadboard until the final revision. The only thing I needed to replicate from the shield was the display reset circuit. Other than that the shield doesn't do much except provide a uniform way to connect the 5 pin ribbon cable.
Attached Thumbnails
Click image for larger version

Name:	IMG_0292.jpg
Views:	29
Size:	77.0 KB
ID:	57416   Click image for larger version

Name:	IMG_0194.jpg
Views:	29
Size:	170.8 KB
ID:	57417   Click image for larger version

Name:	IMG_0193.jpg
Views:	35
Size:	160.2 KB
ID:	57418   Click image for larger version

Name:	AutoPilotD1.jpg
Views:	39
Size:	53.7 KB
ID:	57419  
TG is offline   Reply With Quote
Old 10-14-2016, 04:34 PM   #12
TG
Senior Member
 
TG's Avatar
 
City: Oceanside, CA
Country: USA
Vessel Name: Tera Grace
Vessel Model: Californian 42 LRC
Join Date: Oct 2012
Posts: 110
This is the final revision so far. I was going to build the Arduino circuit on the board but at $11 for a functioning board I decided last minute to expand the board and put headers to mount the Arduino as an add on board. If it ever goes bad I can just unplug and put a new one in place.

It was quite a challenge with routing the traces on a single sided board and so my terminal blocks are in the middle of the board rather than on the edge due to the last minute expansion to incorporate the Arduino headers.
Attached Thumbnails
Click image for larger version

Name:	C1.jpg
Views:	27
Size:	113.6 KB
ID:	57420  
TG is offline   Reply With Quote
Old 10-14-2016, 07:34 PM   #13
Guru
 
MYTraveler's Avatar
 
City: West Coast
Country: USA
Join Date: Apr 2014
Posts: 651
Your work shows the amazing sophistication that a hobbyist can achieve in this area. It must be very satisfying!

Hopefully, I will have time to review the details for the display you recommend. What language (variant) is used to program the display? How is the IDE?
MYTraveler is offline   Reply With Quote
Old 10-14-2016, 08:12 PM   #14
TG
Senior Member
 
TG's Avatar
 
City: Oceanside, CA
Country: USA
Vessel Name: Tera Grace
Vessel Model: Californian 42 LRC
Join Date: Oct 2012
Posts: 110
The IDE for the display side is basically an object oriented environment. In the background there is an underlying language 4DGL or 4D graphic language that is said to incorporate the best elements of C, VB and Pascal. There are several options for programming, from scratch, drag and drop with basic structure and then customize the code or let the Genie write the code for you. Of course writing from scratch gives more options and control.

On the Arduino side you just add the genie library and there are a whole host of commands based in C. The objects on the display are indexed in hex so referencing from the Arduino is done by object type and then hex index value. You can read or write data both directions.

I think you can download the IDE from 4D. Give it a test drive. You don't need a display connected.
TG is offline   Reply With Quote
Old 10-14-2016, 08:20 PM   #15
Guru
 
hmason's Avatar
 
City: Westport, CT
Country: USA
Vessel Name: Magic
Vessel Model: Grand Banks 46 Europa
Join Date: Aug 2013
Posts: 1,525
Am I the only one here who is clueless?
__________________
Howard
Magic, 1996 Grand Banks Europa
Westport, CT and Stuart, FL
hmason is offline   Reply With Quote
Old 10-14-2016, 09:02 PM   #16
Ted
Senior Member
 
Ted's Avatar
 
City: Campbell River
Country: Canada
Vessel Name: Okisollo
Join Date: Apr 2012
Posts: 472
Quote:
Originally Posted by hmason View Post
Am I the only one here who is clueless?
NOPE

Ted
Ted is online now   Reply With Quote
Old 10-14-2016, 11:20 PM   #17
Guru
 
C lectric's Avatar
 
City: Somewhere
Country: somewhere
Join Date: Oct 2007
Posts: 1,405
Quote:
Originally Posted by hmason View Post
Am I the only one here who is clueless?
+3
C lectric is offline   Reply With Quote
Old 10-15-2016, 09:13 AM   #18
TG
Senior Member
 
TG's Avatar
 
City: Oceanside, CA
Country: USA
Vessel Name: Tera Grace
Vessel Model: Californian 42 LRC
Join Date: Oct 2012
Posts: 110
Before heading out to do sea trials I needed to mount the rudder position sensor. Right about the time I was working out fabricating an arm and linkage for the Motorola sensor, a dock mate installed a new Furuno AP and gave me a box of old autopilot parts from his ComNav system. In the box was a ComNav rudder position sensor and linkage.

I took it apart to see what was inside and confirmed it was configured as a voltage divider with a potentiometer and resistor. Virtually a drop in replacement for my AP design. I connected it to my prototype and reset the voltage endpoints and it worked perfectly so I replaced the cable with new and installed it on the boat.

The last hardware issue to deal with was mounting the display. I had a non-functional Furuno Navtex NX-300 that I considered using for the enclosure but it would require fabricating a new front cover and bazel. I ended up going with a stomp box enclosure instead and used the Furuno mounting bracket and knobs. The bracket was too wide so I cut 3/4" out of the center before mounting. For cabling I installed the 7 pin NMEA jack salvaged from the Navtex receiver on the new enclosure. I had a spare 7 pin Furuno cable so I left the connector on one end to connect to the display and pinned out the other end to connect to the 5 pin display header on the AP processor. Inside the display enclosure I pinned the back of 7 pin NMEA jack to the 5 pin header on the display.
Attached Thumbnails
Click image for larger version

Name:	AutoPilotD3.jpg
Views:	43
Size:	65.4 KB
ID:	57439   Click image for larger version

Name:	AutoPilotD2.jpg
Views:	29
Size:	53.5 KB
ID:	57441  
TG is offline   Reply With Quote
Old 10-15-2016, 10:27 AM   #19
Senior Member
 
TONTOROSS's Avatar
 
City: Portland, OR
Country: USA
Vessel Name: Cool Water
Vessel Model: C&L Puget Trawler
Join Date: Jun 2013
Posts: 193
Quote:
Originally Posted by C lectric View Post
+3
I hate these guys
TONTOROSS is offline   Reply With Quote
Old 10-15-2016, 11:28 AM   #20
Guru
 
hmason's Avatar
 
City: Westport, CT
Country: USA
Vessel Name: Magic
Vessel Model: Grand Banks 46 Europa
Join Date: Aug 2013
Posts: 1,525
I have a Garmin AP. I know exactly how it works. You push a little button. Even Marin's dog can do it.
__________________

__________________
Howard
Magic, 1996 Grand Banks Europa
Westport, CT and Stuart, FL
hmason is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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





All times are GMT -5. The time now is 11:26 PM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2016, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0
Copyright 2006 - 2012