Using with Nasa Clipper Instruments

Discussion and support for the Nmea2Wifi multiplexer - a 2-input Nmea 0183 wifi multiplexer.
Post Reply
stuartnorton
Posts: 4
Joined: Mon Mar 19, 2018 5:31 pm

Using with Nasa Clipper Instruments

Post by stuartnorton » Mon Mar 19, 2018 6:00 pm

Hi,

I'm trying to interface Nasa Clipper Wind and Nasa Clipper Depth and send to a Vesper Marine XB-8000. It seems like the Nasa instruments don't drive very strong signals and the data doesn't come out of the opto-couplers with clean square edges. Consequently the micro isn't reading anything.

Has anyone else had similar issues?

Thanks, Stuart

Luis Sa
Site Admin
Posts: 843
Joined: Thu May 04, 2017 4:12 am

Re: Using with Nasa Clipper Instruments

Post by Luis Sa » Mon Mar 19, 2018 7:08 pm

Hello Stuart,

As you can imagine I have not the possibility of testing the multiplexer with all possible instruments. I have a Nasa AIS on my boat whose Nmea183 output was connected to my chartplotter. When I connected the AIS simultaneously to the chartplotter and to the P2 input of the multiplexer (one talker and two listeners) the chartplotter stopped receiving AIS data. So I am not surprised by what you say. I solved the problem by connecting the Nasa AIS to P2 only and then connecting P3 (repeating P2) to the chartplotter.

Regarding the optocoupler, the wave forms are quite squared at 4800 baud and get a bit rounded at 38400. If you own an oscilloscope please tell me as we can discuss this more efficiently. I test every unit using a method described in this forum. Please excuse me if what I am writing next is too technical. When testing and given the enourms variations of the 6n139 characteristics, I decided to change the output load resistor R3 on the P2 channel from 470R to 270R. In that way the waveform has a better rising time at 38400 baud. But in order for the optocoupler to drive it's output transistor into saturation, I had to decrease the resistor on the input of P2, R2, from 2K2 to 1K (in that way, the minimum current gain of the 6n139 is capable of forcing the transistor into saturation).

I do not know if your unit has R2 equal to 2K2 or 1K. With 1K the waveform is more squared but it demands more current to the nmea talker.

Having said that I do not believe this is pertinent to your case as I imagine that we are taking about 4800 baud rates.

Before we discuss this further please confirm that you made the test described in this forum.

https://www.vela-navega.com/forum/viewt ... p?f=6&t=51

Regards, Luis

Luis Sa
Site Admin
Posts: 843
Joined: Thu May 04, 2017 4:12 am

Re: Using with Nasa Clipper Instruments

Post by Luis Sa » Thu Mar 22, 2018 2:11 am

Hello,

While we are trying to sort out Stuart problem, I just wrote an note about optocouplers here in the forum.

Regards, Luis

stuartnorton
Posts: 4
Joined: Mon Mar 19, 2018 5:31 pm

Re: Using with Nasa Clipper Instruments

Post by stuartnorton » Sun Apr 08, 2018 8:54 pm

A 'good news' update. I found the link below showing that the Nasa Clipper Depth was outputting I2C data for a repeater rather than NMEA:

http://wiki.openseamap.org/wiki/De:NASA ... pper_Depth

but that it could be converted with an Arduino. I bought an Arduino and put the code on. Amazingly, it worked and fed the NMEA output straight from the UART on the Arduino into the Wemos D1 Mini GPIO, bypassing the optocoupler completely. I ran the NMEA2WIFI RS422 output into my Vesper Marine XB-8000 and got the Depth sentences through to OpenCPN and the Watchmate app ok.

Super-pleased, and thinking about what else I can add to the Arduino inputs to generate more NMEA sentences.

Thanks to Luis for excellent support - extra components sent free and numerous emails.

(Pic attached of final setup)
Attachments
IMG_20180406_144851.jpg

Luis Sa
Site Admin
Posts: 843
Joined: Thu May 04, 2017 4:12 am

Re: Using with Nasa Clipper Instruments

Post by Luis Sa » Mon Apr 09, 2018 10:40 am

Hello Stuart,

Congratulations and thank you for posting here! It is great to know that you were able to convert the data with the arduino and get everything working!

Allow me to call your attention for 2 points. I am not sure which Arduino you used. Here at my place, I used an Arduino mini on my first NMEA2WIFI design. The reason why I had this Arduino was due to the fact that I was not able to get 2 uarts on the Wemos working without problems. On the Wemos D1 mini, there is only one usable hardware UART. If you use an existing library called SoftwareSerial to create an extra "UART by software" the Wemos crashes! Before I wrote my own software UART, I used that Arduino to receive data on 2 uarts and send the combination to the Wemos. The Arduino that I used was "Pro Mini Module Atmega168 5V 16M For Arduino Compatible Nano". It has a +5V power supply. I am not sure which Arduino you used (there are 3V3 versions as well).

Now, the first point is the connection from the TXD (transmission - pin 1 on my Arduino) to GPIO13 (receiving pin on the Wemos). If you look to this old circuit diagram you will see that I used a R5 R6 resistor attenuator to convert the Arduino +5V amplitude signal to a +3V3 amplitude signal before entering the Wemos (although the Wemos is feed with a +5V voltage supply it has an 3V3 regulator on the module to create a 3V3 voltage that feeds the ESP8266). There are discussions that the ESP8266 is 5V tolerant but I really am not sure. I leave this here for your (or other readers) consideration.

The second point is about the bypass of the optocoupler. If the Arduino and the Wemos are near each other and share the same ground you can connect the transmitting Arduino pin to the Wemos receiving directly. You could use the optocoupler as well but then you would need to consider that the Arduino Serial is what it is called "Serial TLL". When no data is transmitted (idle state) the Arduino transmitting pin is HIGH. When a transmission starts that pin goes LOW (start bit) followed by 8 HIGHS or LOWS that represent the byte. On the contrary the idle state of a NMEA talker (or "RS232 talker") is 0V or LOW. From the receiving Wemos point of view, the same happens, eg, its idle state is also HIGH. So in order to receive the NMEA183/RS232 signal on the Wemos we need an inversion! The optocoupler output transistor is the inverter. Further - its pullup collector resistor is connected to the 3V3 power supply of the Wemos so that no voltage adaptation (previous point) is needed. In order to connect the Arduino through the optocoupler you connect the TX pin of the Arduino to B1 and A1 to the +5V! This is similar to the connection of a Daisy AIS (AIS receiver which has a RS-232 TTL built-in interface). One user of the multiplexer told me how he connected his Daisy AIS in the following way:
I did it this way:
1. I have opened Daisy AIS and soldered cable to serial interface pins on PCB. I have used pins: 5V, TX, 3V3 and GND
2. I have connected pins this way: (Daisy AIS -> NMEA2WIFI)
5V -> 5V on NMEA2WIFI PCB (I have used power source from NMEA2WIFI for running Daisy AIS, since 5V power source on NMEA2WIFI is powerful enough)
TX -> B2
3V3 -> A2
GND -> GND
We can understand this as follows:
  • When the Daisy is Idle TX=B2=5V and A2=3.3V. So the optocoupler input diode has an inverse polarization of 1.7V (actually less because of the external protecting diode).
  • When the Daisy is active TX=B2=0V and A2=3.3V. So the optocoupler input diode has a direct polarization of 3.3V which forces the transistor into saturation
Sorry for this long post Stuart! As you said if it works do not change it! But I wrote this here as it could help other users!

Best Regards, Luis

ChristianLabezin
Posts: 1
Joined: Tue Apr 07, 2020 5:20 pm

Re: Using with Nasa Clipper Instruments

Post by ChristianLabezin » Fri May 15, 2020 2:06 pm

Hello Luis,
I hope you are well and your loved ones also.... 
I was not able to finish my project so far (and order) due to various activities that took all my time off the boat and then the lockdown did not help.
I restart it now ; If you have time, I have a couple of questions for you :
1 reading again the forum posts, particularly the one here where you describe how a guy connected the dAISy AIS receiver to wifi2nmea  a question arose : you mention that the TX TTL level out of the daisy is 5V but here : https://www.tindie.com/products/astuder ... -receiver/ the designer says it is TTL level 3,3V , (at 8th bullet of the specification part), and so, I don't understand how this works. Any clue ?
2 I want to implement kind of an alarm that would go up when a message is issued by the AIS (dAISy) ; is there a signal on your module (nmea2 or nmea4) that could be used for that ?
3 I will also connect Seatalk-1 instruments to it and will use the adaptation you suggested on another post here. Not a question but just in case you recommend a better way.
Many thanks

Luis Sa
Site Admin
Posts: 843
Joined: Thu May 04, 2017 4:12 am

Re: Using with Nasa Clipper Instruments

Post by Luis Sa » Sat May 16, 2020 1:53 am

Hello,

Thank you for your post. I am well still thinking that I can sail in Greece from mid July to mid September.

Regarding your questions:

1) 3v3 should go to A2 and TX to B2. TX will be 0 or 3v3 ideally. When it is 3v3 the optocoupler diode will not conduct (iddle state). When it is 0 the diode conducts.

2) Hummm... the alarm would be triggering almost every time. Normally the chartplotter or the App that shows the AIS targets can be setup to give an alarm when a target is moving towards you.

3) no comment to add

Hope you are well. Regards Luis

k_o_l
Posts: 1
Joined: Thu Oct 05, 2023 9:04 pm

Re: Using with Nasa Clipper Instruments

Post by k_o_l » Fri Oct 06, 2023 12:44 pm

Hello,

I have been enjoying reading about the challenges you have all been facing regarding reading/writing things to Arduino and I am wondering if you could give me some guidance.

For some background, I am an Irish artist (and sailor!) using technology to replicate patterns in nature and most of my work to date is related to the sea. I am about to start a 1 month residency in Eastport, Maine where they have the largest tidal range in the world (~18metres!) and I want to use these tidal shifts to trigger movement in my studio which will be on the pier.

My aim is to have a float/buoy anchored just off the pier that will house a depth transducer in conjunction with an Arduino and wifi module. This will send the depth values to me in my studio where I will have a separate thing moving.

I have used tidal charts and API keys before in my work and so for this project it is important that I am gathering the data first hand. I have looked extensively on the arduino forum and most people are suggesting to use an ultrasonic sensor to measure the distance to the water from a height and calculate it that way but I am quite determined to have a floating device...

I'm looking for advice / suggestions on the components I need: depth transducer , interface / data converter...

Blue Robotics https://bluerobotics.com/store/sonars/e ... nar-r2-rp/ sensor that looks appropriate but I am wondering if there is a less expensive way to go about it but given that the focus is on the art that it will be producing, this out-of-box solution might be most suitable...

I would be really appreciative for any guidance you have, thank you in advance!
Kerrie

Post Reply