OpenMarine

Full Version: ST7002 as control for PyPilot?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have recently bought an old Raymarine ST7002 SmartPilot controller very cheap, which I would like to use as the control for PyPilot, either because I like to have a nice control box for in the cockpit and certainly also because it makes for a nice hobby-project Smile
 
I have working Arduino code running on an Arduino Mega incl. hardware to read and write to the SeaTalk-bus, so I can read all button presses on the ST7002 and am able to process them to PyPilot. 
What I want to get working now is sending identification, status, course and rudder data to the ST7002 from PyPilot so that I will show this data on the ST7002 screen.
I have a SeaTalk log from an SPX5 course computer (but without timing), so I can try to reverse-engineer that and see how often / when I have to send a certain SeaTalk message for the ST7002 to accept it as if there was a real Raymarine course computer on the SeaTalk bus. 
When this is working, I will also need to extend the serial communication between the PyPilot Pi and motor controller Arduino to include (at least) course information. But that will probably (hopefully?) not be the most difficult part.
I have searched the forum for quite some time, but, to my surprise, no-one seems to have done this, or at least has not posted about it here. Is there anyone who has tried or done this already?

However: Not a lot of people seem to be using Arduino's anymore to interface Seatalk from PyPilot since they use SignalK. That might be an option too, but will SignalK acually be able to act as a 'virtual Raymarine course computer' on the SeaTalk bus, so that the ST7002 recognises the virtual course computer and displays the data? Or are the necessary SeaTalk messages not included in the conversion, since they probably never have to be in a real Raymarine controlled SeaTalk bus system?

Regards,
Reinier
I am interested in some of the thinking you are doing. I have had a Mega setup with my own sketches  to use gps modules, mpu module, and LSM 303 compass module. for some time. The system is operational but unstable due to unknown causes. Last year I worked for several weeks trying to ungrade my system to a rpi4b due to the attraction of pypilot and the openplotter system. I had a lot of fraustration  and very limited success, then found that openplotter was not compatible with the rpi4 (they failed to document this at the time). My output is to two "drives" - a wheel mounted gear drive with clutch using a 12vdc hand drill, and an optional hydraulic steering motor. These drives were designed and built for a mason 38 ketch with hydraulic steering. I have recently sold the ketch but removed all my autopilot system. I have bought a 45ft cutter with shaft and cable steering and a standard binnacle. This boat has a raymarine wheel pilot that appears to be rated at about half the size needed  - these things are pretty mickey mouse and my thoughts spin towards re purposing the raymarine controller and HMI button unit and installing my own drive from the old boat. There is a 2016 vintage raymarine charter and digital color radar that displays 
but does not appear to be networked. Raymarine with their proprietary seatalk seems like a bottomless pit so I was wondering, like you, if the mega could be used as "universal" networking multiplex/modem or what ever. Signal K was a pain with openplotter so I wouldn't return to trying, however pypilot does install easy and the BBN system also installs easy to get AIS, and other data. The mega is a far better IO device than rpi. I had also bought a betaflight flight controller to try out as mpu/gps  etc. I have yet to try setting it up. 
It would seem better to look at if nmea2000 hardware could be used to make the overall system compatible with purchased sensors and such, and make it easier to get used marine instruments incorporated if they come cheaply to you later on.   
I would appreciate making contact with you at burgoynebc@netscape.net
Richard
SV Kelaerin
I have opted for a SeaTalk1 instrument for the very simple reason that NMEA2000 or SeaTalkNG instruments are much more expensive and there are not much sold at all 2nd-hand. 
I am also not interested in expanding the system with more equipment, I just want to control my PyPilot with the ST7002 instrument.

I have made some more progress in the project: I can now read (in 8-bit, but it works and is stable) all button press commands from the SeaTalk-bus and can write the commands for the virtual course computer so that the ST7002 displays the correct data. I need to do some more fine-tuning in that (send commands using timers to lower the SeaTalk bus load, and write some conversion functions for course, heading and rudder angle). 
and after that I will start in including this code in the ‘motor.ino’ code so that it all runs on a single Arduino Mega.
(2023-09-02, 06:01 AM)rbergevoet Wrote: [ -> ]I have opted for a SeaTalk1 instrument for the very simple reason that NMEA2000 or SeaTalkNG instruments are much more expensive and there are not much sold at all 2nd-hand. 
I am also not interested in expanding the system with more equipment, I just want to control my PyPilot with the ST7002 instrument.

I have made some more progress in the project: I can now read (in 8-bit, but it works and is stable) all button press commands from the SeaTalk-bus and can write the commands for the virtual course computer so that the ST7002 displays the correct data. I need to do some more fine-tuning in that (send commands using timers to lower the SeaTalk bus load, and write some conversion functions for course, heading and rudder angle). 
and after that I will start in including this code in the ‘motor.ino’ code so that it all runs on a single Arduino Mega.
There are two motor.ino sketches - Sean dePagner's original bit banging and an update available on hackaday - I think this one is an improvement. 
on autopilot controls watch out for 0 deg = 360 deg, and chaos created if cts and cog are in 3rd and 1st quadrant - you need math in sketch to correct for both. There is also a complicated math equation avail that does both that I found but have not understood.
I'm checking my install on new boat for how/if seatalk or 0183 networking is used. For Hdrive output from mega I am using IBT-2 modules 
If you want some more insight into openplotter best to make contact on my burgoynebc@netscape.net email
Richard
SV Kelaerin