Interfacing PAM-7Q GPS Module with Propeller Mini

Hi,
Any ideas on what it would take to interface the PAM-7Q GPS Module with a Propeller Mini? Specifically, I am attempting to design and build a "invisible fence" type dog collar. How difficult might it be to perform logic based on coordinate readings from this module? What types of input can I expect? I assume there probably is interfacing code somewhere? I would need the finished system to continuously check coordinates (accuracy does not need to be precise in my application) and perform actions based on direction and position (such as dog whistle if the dog goes out of bounds etc).

Comments

  • 13 Comments sorted by Date Added Votes
  • first of all, welcome to the forum.

    the gps-module sends continuously out some nema-sentences over serial.

    so it is quite easy to interface.

    you just need to pick out current latitude and longitude out of that stream of data. There are multiple objects in the OBEX able to do that.

    Luckily you stated that accuracy is not sooo important because gps coordinates tend to swing around about +-10feet.

    Since your dog will not move far enough to be affected by the curvature of earth you can use the coordinates of lat and long as absolute coordinates in a square grid.

    subtract some home-coordinates and the values you get are now relative to your home position and easy to handle as long integers instead of float.

    checking the boundary might be tricky since your place might not be square and aligned to the gps-grid.

    imagine a chess board with your home position somewhere in the middle.

    you now have to define boundaries depending of your wanted invisible fence.

    if latdiff< -20 and longdiff< -10 do something.

    interesting project, but easy to handle with a prop.

    Enjoy!

    Mike

    I am just another Code Monkey.

    A determined coder can write COBOL programs in any language. -- Author unknown.

    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this post are to be interpreted as described in RFC 2119.
  • Hi,
    Any ideas on what it would take to interface the PAM-7Q GPS Module with a Propeller Mini? Specifically, I am attempting to design and build a "invisible fence" type dog collar. How difficult might it be to perform logic based on coordinate readings from this module? What types of input can I expect? I assume there probably is interfacing code somewhere? I would need the finished system to continuously check coordinates (accuracy does not need to be precise in my application) and perform actions based on direction and position (such as dog whistle if the dog goes out of bounds etc).

    I like your idea. I have been thinking about something similar, with Prop mini, GPS, but also with a LoRa radio modem to transmit the dog's location to me. LoRa can easily do many miles, is not dependent on a mobile phone network, and is cheap on power consumption. Progress so far: the parts are sitting on my shelf. The missing 'how-to' is plotting the location or alternatively displaying relative direction and distance at the receiving end.

    Erlend

    21st century - when everything changes
    "Better with a DAT and a COG than with a CAT and a DOG"
  • Another question then - assuming i get everything interfaced correctly, and have latitude, longitude position data, what logic could i use to determine if the current position is within or out of an arbitrary area that is defined by several (3-10) (lat, long) waypoints? I would like to be able to use simple integer math in my logic if possible.
  • jmgjmg Posts: 10,608
    Specifically, I am attempting to design and build a "invisible fence" type dog collar. .

    So the Dog has to carry a GPS and Battery and some local Tx too ? Sounds like it gets large and heavy ? Hopefully he is a large Dog?
    Another question then - assuming i get everything interfaced correctly, and have latitude, longitude position data, what logic could i use to determine if the current position is within or out of an arbitrary area that is defined by several (3-10) (lat, long) waypoints? I would like to be able to use simple integer math in my logic if possible.

    I think you may need a local base GPS too, to allow more like differential GPS, and it also simplifies the design, as now you do not care where in the world you are - you just convert both the strings to suitable integers, and subtract in native units.
  • You don't need a second, fixed GPS -- just a set of coordinates from Google Earth for you "base station." Trying to do your own differential GPS in the hopes of improved accuracy will be a vain attempt at best. Been there:

    http://forums.parallax.com/discussion/140890/diy-differential-gps-no-but-maybe-something-better

    -Phil
    “Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away. -Antoine de Saint-Exupery
  • I was doing very basic location pinpointing on my Reverse Geocache Box that I did a few years ago. The thread has lots of details and code.
    http://forums.parallax.com/discussion/118830/propeller-based-reverse-geo-cache-birthday-present-project

    If you modify the antenna so the cable isn't so long, you could also use the VPN-1513 Board since it already has the Propeller. I have one done so the cable is only 5". Modify the end that is inside the antenna magnet as it's easy to unsoldered.
    https://www.parallax.com/product/28510
  • jmgjmg Posts: 10,608
    Trying to do your own differential GPS in the hopes of improved accuracy will be a vain attempt at best.

    and yet commercial systems seem to do exactly this ?
    One link there claimed
    "The successive positions typically differ by 100 microns or less (over 3 km baseline!) and during the 1/2 hour run the position drifted 2-3 mm. "
    So it seems the model of GPS matters, and I can imagine quite some variation in models, as many vendors will simply stop when they are 'consumer grade'. These days Power consumption seems to trump precision.

    How do the 2017 models, compare with the earlier tests ?
    Are they better, or 'built to a price' better, which means they have worse correlation ?
  • jmg wrote:
    and yet commercial systems seem to do exactly this ?
    No, they do not. Differential GPS relies upon more than just two stations that are not in communication with each other:

    https://en.wikipedia.org/wiki/Differential_GPS

    One big issue with my approach was that there's no guarantee that both GPS receivers are using the same set of satellites. So there's no guarantee that the position errors between the two stations are correlated.

    -Phil
    “Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away. -Antoine de Saint-Exupery
  • jmgjmg Posts: 10,608
    No, they do not. Differential GPS relies upon more than just two stations that are not in communication with each other:

    https://en.wikipedia.org/wiki/Differential_GPS

    That wiki link you give says
    "The baselines represent a three-dimensional line drawn between the two points occupied by each pair of GPS antennas. The post-processed measurements allow more precise positioning, because most GPS errors affect each receiver nearly equally, and therefore can be cancelled out in the calculations."

  • jmg wrote:
    because most GPS errors affect each receiver nearly equally
    That much is nonsense. Someone should edit the Wiki, then, since that contradicts my direct experience -- at least with the GPS receivers in question.

    -Phil
    “Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away. -Antoine de Saint-Exupery
  • jmgjmg Posts: 10,608
    jmg wrote:
    because most GPS errors affect each receiver nearly equally
    That much is nonsense. Someone should edit the Wiki, then, since that contradicts my direct experience -- at least with the GPS receivers in question.

    Yes, hence my question above about if newer GPS units are better/same/worse in that respect ?

    Do sales features like faster updates, mean they lop a few bits off the floating point convergences, for example ?

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 21,331
    edited March 17 Vote Up0Vote Down
    In any event, I don't think differential corrections are possible without some sort of communication between units:

    "Hey, which satellites are you using?"
    "I'm using these twelve: ..."
    "Good, I'm also using these nine of yours: ... I know your real position. So give me your computed position based on just those nine; I'll do the same and correct accordingly."

    -Phil
    “Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away. -Antoine de Saint-Exupery
  • jmgjmg Posts: 10,608
    I find this post in an Adafruit forum
    https://forums.adafruit.com/viewtopic.php?f=19&t=113482&p=567151&hilit=GPS+accuracy#p567151

    Claims 1~3m using their "GPS module Adafruit Ultimate GPS Breakout - 66 channel w/10 Hz updates - Version 3."

    which I think is what I have here, for the 1pps timebase calibration.

    Of course, tracking a Dog means you cannot take too long to make decisions, or average.
    It may need a green/orange/red zone approach, and maybe some inertial navigation can do shorter term variations at 'dog speed' from a more stable longer term average ?

Sign In or Register to comment.