Shop OBEX P1 Docs P2 Docs Learn Events
need help with GPS to BS2 connection - Page 2 — Parallax Forums

need help with GPS to BS2 connection

2»

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-05-04 02:11
    Perhaps the unit *sleeps* when not connected to a device that can read its stream. Or perhaps it's *stealing* a bit of power from the Rx pin.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • guitar_plrguitar_plr Posts: 31
    edited 2005-05-04 03:19
    Jon,

    So, it is possible that the GPS unit it looking for that "keepalive" signal before it transmits anything?· Can you suggest a possible next step for me as far as testing goes to nail this down, in particular I want to eventually be successful in recieving the location data on my BS2.· (As a side note, I have an older Magellan gps that works perfectly with the BS2 with NO problems whatsoever).

    Jon, I noticed in column 103, you interfaced a Garmin eTrex and seemed to have it work fine.· I'm wondering why it would be any different.· Also, I haven't looked at the official RS-232 spec, but I'm curious to know if it is "normal" for my laptop to continuously send a signal (see above post for specifics) from its pin 3 according to the specification.

    Thanks for the help!
  • steve_bsteve_b Posts: 1,563
    edited 2005-05-04 04:19
    Usually they use a separate pin to tell the unit to "wake up"....and I doubt that is the case here!
    I'm willing to bet a Canadian loonie that it's 'borrowing' power from the laptop port!
    Hyperterminal doesn't, by default, send any sort of 'wakeup' stream through the PCs TxD pin. What it does is raise other pins on the rs232 connector that you don't even use in your setup!
    Have you gone thru and check all your pins to see if there's more than one pin that goes thru and connects to your GPSs RxD pin?
    The PC would raise DTR and CTS ( I believe) and if these pins, along with the PCs TxD pin, are connect together and to your GPSs RxD pin, then that might be where th epower comes from!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·

    Steve
    http://ca.geocities.com/steve.brady@rogers.com/index.html
    "Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-05-04 13:09
    I can't tell you why things are different for you; I've worked with two Etrexes and one Geko -- and never had a lick of trouble with any of them.

    It would be a surprise to me if your RS-232 port was oscillating as you suggest.· Perhaps you should connect a 10K resistor between Rx and Ground, then put a scope across it to see what the static level of that pin actually is.· The oscillating you're seeing may be induced by your GPS.

    BTW ... have you attempted to contact the GPS vendor for tech specis on the RS-232 end?
    guitar_plr said...

    Jon, I noticed in column 103, you interfaced a Garmin eTrex and seemed to have it work fine.· I'm wondering why it would be any different.· Also, I haven't looked at the official RS-232 spec, but I'm curious to know if it is "normal" for my laptop to continuously send a signal (see above post for specifics) from its pin 3 according to the specification.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • guitar_plrguitar_plr Posts: 31
    edited 2005-05-04 14:48
    Jon,
    I took measurements of my laptop's serial port Tx pin (pin 3) alone and not connected to anything and it is still oscillating continuously .22v p-p @ 3khz.
    Jon Williams said...

    It would be a surprise to me if your RS-232 port was oscillating as you suggest.· Perhaps you should connect a 10K resistor between Rx and Ground, then put a scope across it to see what the static level of that pin actually is.· The oscillating you're seeing may be induced by your GPS.

  • guitar_plrguitar_plr Posts: 31
    edited 2005-05-04 14:55
    I dug up the Garmin Interface Specification (attached) and these excerpts are the only parts I found interesting:
    "Unless otherwise noted in this document, a device that receives a data packet must send an ACK or NAK packet to the transmitting device to indicate whether or not the data packet was successfully received. Normally, the transmitting device does not send any additional packets until an ACK or NAK is received (this is sometimes referred to as a "stop and wait" protocol). "
    "The Serial Protocol is based on RS-232. The voltage characteristics are compatible with most hosts; however, the device transmits positive voltages only, whereas the RS-232 standard requires both positive and negative voltages. Also, the voltage swing between mark and space may not be large enough to meet the strict requirements of the RS-232 standard. Still, the device voltage characteristics are compatible with most hosts as long as the interface cable is wired correctly. "
    See attached document, maybe I'm missing something.
    Thanks Again!
    Jon Williams said...

    BTW ... have you attempted to contact the GPS vendor for tech specis on the RS-232 end?

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-05-04 16:07
    Are you attempting direct communications with your GPS, or are you simply wanting to process *normal* output (like $GPRMC strings)?· I have no idea why your comm port RC pin is osciallating ... seems odd to me.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • guitar_plrguitar_plr Posts: 31
    edited 2005-05-04 18:16
    Jon,

    I am simply wanting to retrieve and process "normal" gps output only.· (such as location, altitute data)· As stated in a previous post, I've tried connecting a scope to the GPS Tx pin (and ground) and measured no voltage.· It is only after connecting the GPS Rx pin to my laptop Tx pin that I start recieving signal out of the GPS Tx pin.· Stange, isn't it?
    Jon Williams said...
    Are you attempting direct communications with your GPS, or are you simply wanting to process *normal* output (like $GPRMC strings)?· I have no idea why your comm port RC pin is osciallating ... seems odd to me.

  • steve_bsteve_b Posts: 1,563
    edited 2005-05-04 19:55
    I didn't see anything to note whether the ACK/NAK stuff was for 'communicating' or for just sending data (as in a dumb terminal).

    Honestly, I don't think Hyperterm is any more intuitive than the stamp as far as receiving data.
    I could see Garmins' own softare needed to have proper comms as far as CRC type checks (ACK/NAK).

    Guitar_plr...have you tried this on a different machine?

    And as far as your comm port oscillating....this was with no load? put a load on it and see if it still does it. 220mVpp isn't much when nothing is hooked up (when it doesn't matter). Were you near fluorescents? or motors?
    Since you laptop works fine with the cable, I wouldn't think this is something to spend too much time on!
    You are also still able to program your stamp...so the laptop port works! But for whatever reason you can't see your GPS.

    Build that breakout box you talked about and solder an extra couple wires in to the box that will let you tap off the data/gnd while connected to the laptop.
    If the laptop can see it...the stamp should be able to!
    Go in to Pbasic>preferences>Debug Function and turn off the Clear screen character.
    I don't know if you are indoors and are just receiving all sorts of zero's and it's not letting you see anything (I doubt this....but I only have CR selected on, in all that list!)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·

    Steve
    http://ca.geocities.com/steve.brady@rogers.com/index.html
    "Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
  • guitar_plrguitar_plr Posts: 31
    edited 2005-05-05 00:54
    steve:··I tried this on a different laptop and got the same results.· Except the com port wasn't continuously oscillatating this time until I made a connection in hyperterminal.

    I didn't build the breakout box, but I did something similar by having the 2 DB-9s disconnected and connected only wire-by-wire.· I found that only having the Tx pin of the GPS and the Rx pin of the com port connected wasn't enough to output ANY signal from the GPS.

    As soon as I connect the GPS Rx to either pin 3 (Tx), 4, or 7 of the com port, the GPS magically starts sending data (and signal as seen on my scope).

    With this conclusion it most likely seems that the GPS is waiting for a specific signal to start sending.· Well, I'm all out of ideas to try so I think I'm going to try and contact Garmin and see if that product specifically requires a signal on its Rx pin in order to start transmitting data.

    Thanks!
  • steve_bsteve_b Posts: 1,563
    edited 2005-05-05 03:01
    guitar_plr....
    pin 7 of your RS232 line is the RTS (Request To Send). When you load Hyperterm or any other terminal program, this line will go high which would be part of the flow control to tell the other end that it's Clear To Send (CTS).

    Just re-reading up on this. When the PC is ready for data, it "asserts" the RTS line...meaning it goes positive (so +5 or +12V).
    I guess to be sure, measure the voltages off of that pin4 before and after Hyperterm loads (and assuming you go ahead and "connect to com1").
    Pin 4 is DTE (Data Terminal Ready)...when the PC is ready to communicate it "asserts" this pin (goes positive)....probably done so by Hyperterm.
    pin3 being transmit (from the PC) it says it holds it low when no data is flowing....

    the last one sorta kills the other idea on it stealing power. So maybe pin 4 and 7 don't go positive.
    I wonder if your GPSs RxDpin sees some of this oscillation and refuses to send because of the Smile it sees. When you connect your GPSs RxD pin to either of these other pins...I'm guessing it gets grounded or held high!

    Maybe try a 22kohm resistor (just picking a value we use when running to stamp pins) and run one end to the GPSs RxD pin and the other end of the resistor to ground.
    Be sure you are using the Db9's pin5 for ground....if you are going to run the laptop/GPS/stamp all off the same set of wires, you'll need to connect all ground together as well!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·

    Steve
    http://ca.geocities.com/steve.brady@rogers.com/index.html
    "Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
Sign In or Register to comment.