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
#11
(2020-11-26, 09:53 PM)You ironman Wrote: Well if you can post a little more details on that genius mosfet layout I'll give it a glance.

I bought it around a year ago in a box of components:
NOK 8.25  5% Off | 5PCS 4 Channel IIC I2C Logic Level Converter Bi-Directional Module 5V to 3.3V
https://a.aliexpress.com/_mMirk4H

Some one as in this link...
Reply
#12
(2020-11-26, 09:59 PM)Peter— Wrote: I bought it around a year ago in a box of components:
NOK 8.25  5% Off | 5PCS 4 Channel IIC I2C Logic Level Converter Bi-Directional Module 5V to 3.3V
https://a.aliexpress.com/_mMirk4H

Some one as in this link...

Won't work - it does not invert the signal.
Reply
#13
(2020-11-26, 10:23 PM)Ok ironman Wrote:
(2020-11-26, 09:59 PM)Peter— Wrote: I bought it around a year ago in a box of components:
NOK 8.25  5% Off | 5PCS 4 Channel IIC I2C Logic Level Converter Bi-Directional Module 5V to 3.3V
https://a.aliexpress.com/_mMirk4H

Some one as in this link...

Won't work - it does not invert the signal.

Jesus Christ !! How complicated can it be...

Ok so the one referred to on the pypilot shop, or maybe even this one:
https://a.aliexpress.com/_mscSpGt

Which should deliver a stable 5V inverted signal as per rs232 standard

So I think what I’ll try is to use the ESP32, then a max232 inverter chip, then the logic leveler and connect it up to the NMEA. That should work. I really want the wireless solution

Here is a link to the inverter board:
https://a.aliexpress.com/_mNu86bj

Br, Peter
Reply
#14
(2020-11-26, 04:47 PM)ironman Wrote:
(2020-11-26, 03:53 PM)Peter— Wrote: Thanks Ironman - That is exactly what I want to do - but why do I need an adapter when I have Txd and rxd pins? 

There must be a way to use that instead + that would enable me to use an esp32 which I would really prefer to avoid pulling wire. I just pick up the nmea on udp from the pi and transfer it over txd to the nmea- port would be my guess. Am I right? Or is there a voltage problem or something? Would do I ground it?

Br, Peter

Well, nmea0183 is rs422 - that is, a balanced version of rs232. The TxD on the pi (or the ESP32?) is 3.3V TTL. So you won't get away without some form of electrical level adaptor. Besides, you'd probably want to have galvanic isolation to prevent ground loops. 

For only sending data off to the raymarine, which is what you would do, you could get away with a much cheaper RS232 USB adapter - the raymarines seem to have optical isolation on their nmea input (see below - from the ST2000 service manual).

But trying to interpret your remark about avoiding pulling wire - if your plan is to stick an ESP32 to the raymarine and transmit the data by air to it, then you probably know how to figure out a signal adaptor.

Ironman, just a final question on the wires. Let assume that I had a usb to rs422 like this one:
https://a.aliexpress.com/_m0M4v5x

How would I connect the wires to my raymarine nmea- and nmea+ terminals? Rs422 seem to have 5 terminals.. tx+,tx-, rx+ rx- and ground.

I’m not familiar with anything else than TTL so this is really confusing to me..
Reply
#15
(2020-11-27, 12:44 AM)Peter— Wrote: How would I connect the wires to my raymarine nmea- and nmea+ terminals? Rs422 seem to have 5 terminals.. tx+,tx-, rx+ rx- and ground.

Also interested.  My boat has very old Navman instruments that support their proprietary NavBus, but they also have NMEA0183 in and out.  I'm looking to hook that up to my RPi4.  I bought these, don't know if they'll work (or even how to connect them):

 https://www.ebay.com.au/itm/363169726044

For isolation I'm planning to use the Si8621 chips I have on hand.
Reply
#16
So based on this https://www.cruisersforum.com/forums/f13...12967.html

it seems that my TX+ should go to NMEA+ and TX- should go to NMEA- when using the RS422. As my raymarine only have 2 nmea terminals I expect it’s because it can only receive transmissions and not send them.

Rs422 seems to use relative voltages. Not sure how to connect a similar ground or if it is even needed.

Br,
Peter

(2020-11-27, 11:52 AM)Peter— Wrote: So based on this https://www.cruisersforum.com/forums/f13...12967.html

it seems that my TX+ should go to NMEA+ and TX- should go to NMEA- when using the RS422. As my raymarine only have 2 nmea terminals I expect it’s because it can only receive transmissions and not send them.

Rs422 seems to use relative voltages. Not sure how to connect a similar ground or if it is even needed.

Br,
Peter


Hmm, the st4000 service manual says:
NMEA+: Intermittent streams of (nominal) 12V pulses
NMEA-: 0V

Source: http://www.ganssle.com/jack/st4000.pdf

So I’m not so sure on anything anymore. Seems that I even need at 12V signal and not a 5V as I expected..

Br, Peter
Reply
#17
With an RS422 adapter, Tx+ to nmeain+ and tx- to nmeain- would do the trick in a proper and safe way. I would not worry about the seemingly contradictory messages. A responsible electronics engineer who is afraid to lose his job might give you this advice as well.

However, it can probably be done much simpler. You found that service manual (well done, I couldn't), and it gives the following schematic for the NMEA input circuit (see below). This means that your input is indeed properly isolated, like it should be, and you could get away with hooking the +3V3 of your raspberry to nmeain+, and your txd to nmeain-. I'm willing to risk my own st2000+ to check this advice before you attempt it yourself, but you have to wait a bit because it's at the boat at the moment.

Big disclaimer here: this might only work in this particular case and is definitely not reversible: if you try to hook a nmea-out to your pi's rxd this way you are very likely to blow your pi. If you don't understand the electronics that sit behind an input like this, you'd better stick to using safe, pluggable components, like the USB to NMEA0183 module. This might require you to tone down your ambition levels a bit, but they are likely come down anyway after so many blown electronics ;-). But I like your tenacity and don't want to leave you hanging.

Cheers,


Attached Files Image(s)
   
Reply
#18
i suggest using isolated rs422 adaptor which is relatively cheap and avoid any possibility of burning raspberry
Reply
#19
Agree, this one would be isolated so you can also read back one NMEA source: https://www.aliexpress.com/i/4001365764504.html
Reply
#20
That is some excellent advice thank you!!

Ironman, don’t go an burn your st2000. I can plug an 422 adapter into my raspberry or esp32 so I don’t need to use the tx gpios

Why do I need an isolated 422 when the raymarine nmea is isolated?

The costs of the isolated 422 is much higher than an ordinary one.


Br, Peter
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)