This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pypilot with ST4000 autohelm
#41
Ok, now I know the signal is coming out:
https://youtu.be/5riiLPt5fb0


(OpenCPN kept crashing on me so couldn’t illustrate it with AP route plugin)

I’ll try again tomorrow.
Br, Peter
Reply
#42
Super!!!! I got it working and my code that I posted earlier was perfect.

I used the wrong tx pin (which happens after a long day at and only had 30 min to install and test it)

Thanks for all the help guys, and I have now learned about rs232, rs442 and rs485 which is fantastic. I also now have a setup without wires which is so great. ESP32 run directly off the raymarine power using the UBEC it’s so elegant and well hidden.

Maybe one last question. Has anyone had luck with sending wind data to the raymarine? I tried to send MWV from OpenCPN but I can see in the NMEA debug window that it is not sending it out...

Anyways this was enough victory for now, I’m so happy that it’s technically working and it will be fun to see how it performs.

Br, Peter
Reply
#43
(2020-11-30, 05:31 PM)ironman Wrote: Note that I had to run opencpn as root to get access to the uart at /dev/ttyAMA0. Interested to hear how to run it as an unprivileged user.
Try:
ls -al /dev/ttyAMA0
crw-rw----    1 root     dialout     204,  64 Mar 28 07:12 /dev/ttyAMA0

If it reads the same as above, try "sudo usermod -a -G dialout opencpnuser" to add the opencpnuser to the dialout group.

With OpenCPN you also might want to check the groups for /dev/ttyS0 and /dev/ttyUSB0 if they exist and if you get a warning message.
Reply
#44
(2020-12-09, 11:05 AM)Peter— Wrote: Super!!!! I got it working and my code that I posted earlier was perfect.
[...]
Maybe one last question. Has anyone had luck with sending wind data to the raymarine? I tried to send MWV from OpenCPN but I can see in the NMEA debug window that it is not sending it out...

Well done, inspiring idea that wireless ESP32 solution!

It is my understanding that OpenCPN sends out what it receives, unless filtered out. So the question is: do you receive MWV into OpenCPN?

(2020-12-09, 06:53 PM)hreuver Wrote: ls -al /dev/ttyAMA0
crw-rw----    1 root     dialout     204,  64 Mar 28 07:12 /dev/ttyAMA0

If it reads the same as above, try "sudo usermod -a -G dialout opencpnuser" to add the opencpnuser to the dialout group.

With OpenCPN you also might want to check the groups for /dev/ttyS0 and /dev/ttyUSB0 if they exist and if you get a warning message.

Thanks for this -  I have matched the group membership but the ttyAMA0 still does not show up in the OpenCPN serial connection dialog dropdown. When I force-type the device name, OpenCPN gives me a referral to the /etc/udev/rules.d. There seems to an openplotter file there already, but these kernel rules are beyond my ambition levels ;-) What had to be demonstrated was the electrical aspect and that has been QED'd sufficiently.

Cheers,

-
Reply
#45
(2020-12-14, 06:02 PM)ironman Wrote:
(2020-12-09, 11:05 AM)Peter— Wrote: Super!!!! I got it working and my code that I posted earlier was perfect.
[...]
Maybe one last question. Has anyone had luck with sending wind data to the raymarine? I tried to send MWV from OpenCPN but I can see in the NMEA debug window that it is not sending it out...

Well done, inspiring idea that wireless ESP32 solution!

It is my understanding that OpenCPN sends out what it receives, unless filtered out. So the question is: do you receive MWV into opencpn


OpenCPN is receiving gps, aid, apparent wind and direction along with compass so I would assume it would create the MWV itself....

Anyways if I don’t figure it out I’ll just create the NMEA code myself and send it to the ESP32-autopilot unit..

Have so many ESP32’s in my boat now that I have to be careful to send to the correct one - nearly updated some code today to a wrong unit  Big Grin

Thanks for all the help Ironman really appreciated it..

Merry Christmas to you all
Reply
#46
(2020-12-14, 07:51 PM)Peter— Wrote: OpenCPN is receiving gps, aid, apparent wind and direction along with compass so I would assume it would create the MWV itself....

How do you know for certain it receives it? It should then either be visible in the NMEA stream, or (and I'm guessing now) somewhere in SignalK, if you use that in conjunction with OpenCPN.
Reply
#47
(2020-12-15, 11:50 AM)ironman Wrote:
(2020-12-14, 07:51 PM)Peter— Wrote: OpenCPN is receiving gps, aid, apparent wind and direction along with compass so I would assume it would create the MWV itself....

How do you know for certain it receives it? It should then either be visible in the NMEA stream, or (and I'm guessing now) somewhere in SignalK, if you use that in conjunction with OpenCPN.

I know it because I display the data in the OpenCPN dashboard - and I assume it is pulling data from OpenCPN.
Reply
#48
(2020-11-26, 12:39 PM)Peter— Wrote: Hi all

I'm using a ST4000 on my sailboat and it works acceptable. However, I would love to be able to use the features of track following and wind vane control.

The ST4000 has an NMEA+ and NMEA- input to receive data to make the above features work.

Questions:
How do I hook up my Raspberry Pi (or ESP32) to the NMEA input on the Raymarine controller? Do I just use the tx and rx pins? And how do I make Openplotter recognize the pilot? Also, is it possible to use an ESP32 as I would avoid all the wirering..?

Kind Regards,
Peter

Hey Peter! Curious how you made out with all of this? I've read the thread and when it starts getting into electrical specifics I'm lost.

I have Pican-M hat (with NMEA0183) for the pi, and interested in doing what you've described. If I can get that working then ideally I'd like to have pypilot drive the St4000 motor itself (the idea of using the IMU and possible machine learning for optimal steering intrigues me as I've done some ML in the past and see it working well).
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)