Trouble getting gy-neo6mv2 serial data with RS232


+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2009
    Location
    Huntsville, AL
    Posts
    29

    Default Trouble getting gy-neo6mv2 serial data with RS232

    I have a gy-neo6mv2 (ublox NEO 6M GPS) that's regulated to 3.3v. I'm planning on parsing the NMEA sentences with code, but wanted to get a sample of the data before it was hooked up to a pic. After hooking it up to an RS232 port on an older computer, it's clearly exporting data, but it's gibberish. I checked several baud rates and other parameter variations in the serial communications format, but it's still gibberish. As a test, I've hooked up a 16F628A regulated to 5v that's exporting at the same baud rate some ascii data, and it imports fine. Regulated to 3.3v, it still appears to import fine.

    My question is: could the ublox voltage levels be lower than 3.3v and not be adequate to trigger the threshold for an RS232 serial connection? If that's not the likely problem, and other suggestions?

    Thanks,
    Dave

  2. #2

    Default Re: Trouble getting gy-neo6mv2 serial data with RS232

    Remember your older computer Serial port has up to + and - 15 volts on the transmit lines, so if you have connected that to your Ublox receive line, then Ublox is probably damaged.

    The receive line on the PC may not accept your Hi (3v) and low (GND Lo as valid signals, so you will get rubbish.

    The default speed on your Ublox default 9600 8 n 1

    I had a very quick scan of the Ublox, and cannot see whether the serial out is serial TTL, (mark=HI, Space=Lo) or whether it is RS232 TTL, (Mark=Lo, Space=Hi)

    If it is Serial TTL then you need a MAX2332 or similar circuit to connect to the PC.

    Had another look around and I think the serial is TTL, so you would need a level converter to connect to PC.

    If you are connecting to uart on pic, would suggest you run pic at 3V.

    If your Pic that exports to the PC is not using the onboard uart and you are just using serout or serout2, are you setting it as inverted as that is what the PC needs?

  3. #3
    Join Date
    Dec 2010
    Posts
    400

    Default Re: Trouble getting gy-neo6mv2 serial data with RS232

    I have not used this specific device, but if it's outputting true NEMA, then it should be 4800 (8 N 1).

  4. #4
    Join Date
    Jan 2009
    Location
    Huntsville, AL
    Posts
    29

    Default Re: Trouble getting gy-neo6mv2 serial data with RS232

    Thanks for the responses...

    I haven't connected the computer to the GPS rx pin, so that shouldn't be damaged. And I misspoke when I said I had connected the module to an RS-232 port... it's a serial port on a 10+ year old computer using windows 98 (I keep it around cause it works with the parallel port ePIC programmer I have and runs the 32bit PBP compiler I use... mainly cause I'm cheap and it ain't broke).

    The terminal program I use has the option of inverting the data, which I've tried along with several other baud, parity, and stop bit permutations. The garble changes, and I can tell there's consistent exported data behind the garble (lots of repeating characters), but nothing that looks intelligible.

    Do I need a pull-up resistor in the connection? Or could it be the logic levels obtained by the gy-new6mv2 module aren't quite high enough? Or could I use a pic as a middle-man between the module and the computer? The pic seems to communicate fine at 3.3v, so maybe importing the data to the pic then the computer would work?

    Thanks for the help!
    Dave

  5. #5

    Default Re: Trouble getting gy-neo6mv2 serial data with RS232

    One of these would sort your connection to the PC serial

    http://www.ebay.co.uk/itm/MAX3232-RS...item2a4634c3f2

    You should find same on US Ebay site.

    I suspect it is just the voltage level that is causing a problem.

  6. #6

    Default Re: Trouble getting gy-neo6mv2 serial data with RS232

    I think also that your terminal program that inverts the signal is not doing what you think.

    Your serial port is hardware, that expects the data to arrive in the proper manner, but your data is we think inverted, so the uart will not take in the inverted data correctly, yes it will give you something but it will not be the correct character even if your terminal inverts what it has received.

    The transmitting device when correct and in idlesits at the MARK (1) level and starts collecting the bits from there, if it is inverted, then the transmitting device is sitting at the SPACE (0)level

    Have a read here

    https://learn.sparkfun.com/tutorials...ules-of-serial

    may help you understanding why the terminal inversion does not work.

  7. #7
    Join Date
    Aug 2003
    Location
    Australia
    Posts
    984

    Default Re: Trouble getting gy-neo6mv2 serial data with RS232

    Quote Originally Posted by achilles03 View Post
    And I misspoke when I said I had connected the module to an RS-232 port... it's a serial port on a 10+ year old computer using windows 98
    That’s almost certainly an RS232 serial port with typical 12 Volt signal, and 24 Volt swing,
    and it occurs to me you misspoke when you say you connected the GPS rx pin to the computer, or you wouldn’t see anything if the ports were compatible!
    So if you have only connected your GPS tx pin to the PC serial port rx pin, I don’t suppose there’s a problem in terms of damage, but surprising you see anything on the terminal.
    So check the 628 data sheet for what voltage is a logic high for the pic input pin you use as GPS receive, and I think you’ll find it’s below 3V.
    Fine if you only want to receive data from the GPS, but if you want to configure it with the pic it will be a different story,
    and you will want to level shift the pic’s 5V serial transmit output to the 3.3/3.6 V or whatever it was for the Ublox.
    The standard NMEA is present for default configuration, so you might not need to ever change the default configuration.

    I haven't connected a Ublox to a PC, but the sentence format is exactly as specified in the data sheet.

    If you can connect the 628A to the PC as in the manual, you might as well do that.
    If using PBP software serial read the ublox data into a big array, then you have the rest of the second to spit the array to the PC.
    If using hardware serial on the 628A, you should be able to read a byte and if a byte was received, transmit a byte (in a loop).

    You want something like 100 byte array or a little less to receive everything the Ublox will spit out by default,
    probably larger than the maximum array, but IIRC, all of the good stuff comes first.
    Last edited by Art; - 8th September 2015 at 20:16.

Similar Threads

  1. Trouble in reading eeprom data..
    By tacbanon in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 7th November 2011, 05:24
  2. strange rs232 data displayed
    By MOUNTAIN747 in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 13th January 2010, 21:09
  3. Colect data from rs232
    By ruijc in forum General
    Replies: 12
    Last Post: - 3rd January 2008, 22:10
  4. Reading large data via RS232
    By Robson in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 28th August 2007, 20:37
  5. serial trouble
    By ronjodu in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 29th November 2004, 00:29

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts