Shop OBEX P1 Docs P2 Docs Learn Events
Trouble with PMB-648 GPS (#28500) — Parallax Forums

Trouble with PMB-648 GPS (#28500)

NutDriverLeftyNutDriverLefty Posts: 5
edited 2012-07-27 10:44 in Accessories
Hi! I picked up a PMB-648 yesterday, however, I'm having a bit of trouble. I've soldered Berg connectors onto the red, black, and yellow leads, and covered the ends of the blue, green, and white wires with shrink tube (individually) so they won't short each other or the environment. I'm using an ATMega2560 to drive it. The GPS module gets +5V and GND from the Arduino and the yellow data wire goes to the #6 digital pin on the Arduino, as per the diagram on the kickstart page. I'm using Arduino 1.0.1, so it has the updated Software Serial module. I installed the TinyGPS module from SourceForge yesterday.

When I provide power, the PMB-648 LED blinks while acquiring lock, and goes solid when it locks. If I interfere with the signal enough, it will lose lock, then regain it when I stop interfering. So the module itself seems to be working, and I'm guessing the internal battery has charged up, since it locks in a handful of seconds now, even being without power for several hours.

However, the Arduino never receives any serial data from the GPS. By that, I mean that in the "while" statement at line 37 in the code, the nss.available() routine always returns zero. So when I run the example code, it fires up and says "Reading GPS" and doesn't say anything else. I've allowed it to sit there, locked, trying for up to three hours without receiving any data from the unit. Any help troubleshooting this further would be greatly appreciated.

Doug

Comments

  • NutDriverLeftyNutDriverLefty Posts: 5
    edited 2012-07-23 21:09
    Hi! I picked up a PMB-648 yesterday, however, I'm having a bit of trouble. ...

    Am I being too needy to hope that someone might have /something/ to say in 24 hours? :-)
  • Mike GreenMike Green Posts: 23,101
    edited 2012-07-23 21:35
    You're going to have to be patient. This is mostly a support forum for Parallax's microcontrollers. Many of the people who might help you with using the GPS receiver with a Propeller or Stamp don't have much experience with the Arduino. The GPS module is probably sending the data just fine based on your observations. Why the Arduino is not seeing it is a good question. Maybe the Arduino libraries have changed since the KickStart sample code was posted. Make sure to try the version mentioned on the KickStart webpage.
  • NutDriverLeftyNutDriverLefty Posts: 5
    edited 2012-07-23 22:01
    Well, Mike, this sounds like a solvable problem. Tell me what more I should do. I followed the kickstart explicitly. I wired the hardware as it said. I downloaded the test software, and ran it. I had a problem and explained it in as much detail as I could and asked for help. In what way should I have done things differently?
  • JLockeJLocke Posts: 354
    edited 2012-07-23 23:06
    It would appear that to use SoftwareSerial with the ATMega2560 that you have to change the pin that is used for communication. According to the Arduino reference: "Not all pins on the Mega and Mega 2560 support change interrupts, so only the following can be used for RX: 10, 11, 12, 13, 50, 51, 52, 53, 62, 63, 64, 65, 66, 67, 68, 69". I'd try changing the pin used and see if that makes any difference. I believe the KickStart was written with the Arduino UNO in mind.
  • NutDriverLeftyNutDriverLefty Posts: 5
    edited 2012-07-24 20:06
    JLocke wrote: »
    It would appear that to use SoftwareSerial with the ATMega2560 that you have to change the pin that is used for communication

    Thank you so much, that did the trick! I saw that note, but since I'm new to this, I figured the author of the kickstart article knew something I didn't. Not wanting to let the magic smoke out of anything, I figured I'd wait to hear from you folks before proceeding.
  • NutDriverLeftyNutDriverLefty Posts: 5
    edited 2012-07-27 10:44
    Just a quick update. Some more digging and I found the Mega2560 has three additional hardware UARTs. So, if you're connecting to a ArduinoMega2560, connecting it to one of them, such as pins 18 (TX) and 19 (RX), and using "Serial1" instead of "SoftwareSerial", you get full speed communication with the PMB-648 without the heavy overhead of "bit banging" a serial port with the CPU. With the SoftwareSerial, I was losing sometimes as much as 20% of the tick interrupts that keep the milliseconds clock up to date. Using UART1, I'm not losing any that I can detect.
Sign In or Register to comment.