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
NMEA Input Help
#1
I recently purchased a RPI 4 and MacArthur hat and installed OpenPlotter.  I have it all wired up and everything appears to be working, except that I cannot get NMEA data in.  I have the SeaTalk data coming in just fine.  I am trying to get my ais data which is NMEA 0183 at 38400 baud.  I set it up for UART 3, connected to RX1, connected it to SignalK, but I get no data.  I tried UART5 using RX2 as well and I've tried reversing the + and - data leads....nothing.  I've confirmed that NMEA data is being sent by hooking it up to another device and it is getting the data fine.  Any ideas on what I am missing?

Gerhard
Reply
#2
Just been investigating the very same thing...

So.. sending out NMEA0183 data from the gps through a usb/serial  adaptor which then goes back in to the Pi through a opto isolator into ttyAMA3 (UART3) it would only work at slower speeds. With both the usb/serial adaptor connection & uart3 set to 9600 baud the data would get received, both at 1300 it would work, 13500 it would just work, faster and nothing came in.

Might be down the the opto isolator circuit this end, this is 3.3v output, 9600 baud, works >
[Image: csKhdsM.jpeg]

And this one 13500 baud, just about works..
[Image: SfIYCPH.jpeg]

This is the optoisolator circuit below, altered a bit from the 4 way board that came from ebay >
[Image: z3RWdEf.png]

With a 1k resistor paralleled with the 8K pull up it worked a bit faster, decoupling capacitor might help as well.

All this may be just coincidence, I'm no electronics designer but maybe sailoog could confirm the opto board on the hat can transfer data plenty fast enough.  Cool

Off now to speak to my friendly AI... "teach me about optocoupler circuit design for high speed data transfer"  Big Grin
Reply
#3
Well, I don't know what I did, but it is now working at 38400. I actually have the AIS output at 38400 driving two "listeners." I did kind of change the way they were paralleled and it might have been that there was a conflict between the + and - inputs between the two listeners. Anyway, not sure of the problem you are having, but it appears that it will support 38400 baud. That being said, I do have a lot of NMEA data flying around in various directions, so it is possible that the data is finding its way in via a different route, but I just checked the Signal K dashboard and the AIS NMEA input was active, which I had never seen in my previous attempts. So, I think it works.

Gerhard
Reply
#4
@Kijit Glad you got it working.

@PaddyB is that trace with the MacArthur or a separate opto coupler? At higher speeds, the strength of the pull-up, as well as the drive current through the LED inside the opto are important to get square transitions between the bits.
Oh, and that circuit would not work as drawn with the two LEDs facing each other Smile
Reply
#5
(2024-09-25, 09:49 PM)Kijit Wrote: Well, I don't know what I did, but it is now working at 38400.  I actually have the AIS output at 38400 driving two "listeners."  I did kind of change the way they were paralleled and it might have been that there was a conflict between the + and - inputs between the two listeners.  Anyway, not sure of the problem you are having, but it appears that it will support 38400 baud.  That being said, I do have a lot of NMEA data flying around in various directions, so it is possible that the data is finding its way in via a different route, but I just checked the Signal K dashboard and the AIS NMEA input was active, which I had never seen in my previous attempts.  So, I think it works.

Gerhard

Thanks for the update, good news Cool

I put a 390 Ohm in parallel with the 8k to try & it works now as well   Big Grin

(2024-09-25, 10:53 PM)Adrian Wrote: @Kijit Glad you got it working.

@PaddyB is that trace with the MacArthur or a separate opto coupler? At higher speeds, the strength of the pull-up, as well as the drive current through the LED inside the opto are important to get square transitions between the bits.
Oh, and that circuit would not work as drawn with the two LEDs facing each other Smile

It's just a cheap little board off amazon which didn't work so it got changed a bit. The signal needed to get inverted for the UART to read it.  The circuit works fine now, the LEDs aren't facing each other as they're different components , bottom one is just an indicator to show when data is going through. Nice to get rid of that snakes honeymoon of usb/serial adaptors  Cool

[Image: ezERodA.jpeg]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)