NMEA DEVICE

HELLO ALL

Im looking for some advice I have a device that gives wind direction and wind speed it outputs two nmea sentences MWV & XDR .

ive hooked up to pin 5 ,gnd & 5 volts on the arduino .Ive tested with with the software serial example @ 4800 baud which the manfactures have comfirmed is the correct rate. Im definatly getting sentances out of the device to the serial monitor but they are garbage .im going to test the
device with a usb to serial adapter in terminal to try to establish a recognisable sentence .
any futher advice with this problem would really be appreiciated as im rater stumped at this point.
many thanks ken b

There is more to serial than just the baud rate.

Firstly, is the device outputting TTL or RS-232 voltage levels? If the latter you will have to pass the signal through a MAX-232 or similar chip to invert and reduce the signal. Otherwise yes, you will just get garbage.

Secondly, the serial protocol is more complex than just the speed. You also have to match the number of bits. A serial "word" is made up from a single start bit (always there), a number of data bits, a possible parity bit, and one or more stop bits.

The most common format is 8 data bits, no parity bit, and one stop bit. This is known as "8-N-1". You also get "7-E-1" for 7 data bits, an even parity bit, and 1 stop bit, or "7-O-1", for 7 data bits, an odd parity bit, and one stop bit, or maybe "7-N-2", for 7 data bits, no parity, and 2 stop bits.

The device specification should tell you which you need to use.

TBH it's probably the first problem, as 8-N-1 is by far the most common protocol in use today for serial communications.

many thanks majenko

if it proves to be as you suspect do you know of a hardware solution any recomendations
cheers ken

kenbrown93:
many thanks majenko

if it proves to be as you suspect do you know of a hardware solution any recomendations
cheers ken

Yes, as I think I mentioned - a MAX232 chip or similar. There are literally millions of articles on the 'net about using them on the Arduino.

The MAX232 is an RS-232 driver chip that includes a charge-pump system to convert 0-5V into +10v and -10v respectively. It usually has 4 channels, but you'll only need one or two. All it takes is 4 capacitors. There are many suppliers of pre-made boards, marketed as "TTL to RS-232" or similar.

thanks for your speedy response
no doubt you have guessed Im new to electronics and arduino.so its all a bit daunting .I can see a lot of reasearch and reading in front of me on this one ,sooner or later I was gonna have to do it but its encouraging that you say theres plenty of ref out there and boards are available
i just need to get an idea of what im talking about cheers ken

To connect a sensor of wind NMEA directly on an entry UART of a micropross, it is necessary to use wire “NMEA -”.
Indeed, the MAX232 reverse the signal.
It is necessary to check the tension of signal “NMEA -” and to adapt a resistance consequently.
Standard NMEA envisages:
4800 Bauds
8 bits
1 bit stop
No parity