Shop OBEX P1 Docs P2 Docs Learn Events
GPS Interface — Parallax Forums

GPS Interface

ajs2001txajs2001tx Posts: 25
edited 2005-10-10 01:38 in BASIC Stamp
First off I just was to thank everyone·for helping me with my last project and taking the time to explain how to fix the bugs.

Now on to bigger pastures.......

I am a farmer and I would like to setup a STAMP to take info from a GPS guidance system and use the info to drive a stepper motor with a rubber wheel on the shaft that I can mount on a slide in the cab and move it over to turn the steering wheel to stay on course.

The GPS unit I have is the Outback S you can see it at the link below.· They have an autodrive option for it·but it is·$4,500 plus about·$2000 for·a kit to mount to my tractor,·and I think this will make a "fun" project.

http://www.outbackguidance.com/product/displayfeatures.asp

FYI it has an RS-232 serial port on it.
outbackphoto.gif
If you follow the link you can see that is has what is refered to as a light bar which is a horizontal line of about 11 LEDs.· Only one will be lit at any time.· If you are too far left of your path the light will "move" farther to the right the more you are off course and vice-versa.· The center LED will be lit when you are on course.· It also has an "arc" of LEDs that move left or right that show you where you should steer to correct your course.· It will also have the center LED lit when you are on course.

My question is where do I start?

I would guess to have it running and mearsuring the outputs comming from the serial port.·

Do I really need the Parallax USB Oscilloscope?·

You should be able to tell from that question that I have no idea what to look for but I am eager to learn so just point me in the right direction as to where to start.

Thanks for your advice.

Andy





·

Comments

  • Bruce BatesBruce Bates Posts: 3,045
    edited 2005-10-02 05:57
    Andy -

    I'll give you a REAL EASY way to think about this application. In terms of applications, it's essentially identical to a line following robot. If the robot find itself going over the center line from right to left, it needs to steer right to get back on course. If the robot finds itself going over the center line from feft to right, it needs to steer left to get back on course. In your case, you're looking at the LED's as the "moving" element, but you respond accordingly, turning, as required.

    The one potential problem I see up front in this application is the 180 degree turn at the end of each row! That will need to be a set of specialized routines. As crazy as this may sound, especially since you've already got the more accurate GPS on board, is that an inexpensive compass app mod might be the easiest way to perform the turns (present course +/- 180 = future course). If not used directly for the end-of-row turns, it certainly provides an easy to use feedback mechanism.

    I'm sure one of the other folks can chime in with some Parallax BOE Bot line following examples, but since I've never owned one, I really don't know where they might be, without downloading most/all of the BOE Bot sample programs. I would suspect there would be a simple, sample program with the Line Follower App Mod, but I also suspect there may be better examples as well. Here is a link to that latter resource:
    http://www.parallax.com/detail.asp?product_id=28108

    Regarding this sample program (above), don't get wrapped up in the details of the program, you're just examining it for overall logic flow. What does it do when this happens? What does it do when that happens. Also remember that unless you've got a Caterpiller Tractor (doubtful) you don't have differential steering (two treads/wheels powered independently), so again, just note that "turning" is done, and not exactly how it's done. DO realize that there are (at least) two turning routines (one to the left, and the other to the right).

    Lastly, you might want to consider some sort of linear actuater as opposed to a rubber drive wheel. First, the rubber drive wheel might easily slip, especially during wet/humid or cold conditions, even in the best environmentally conditioned cab. Second, you will want to get feedback information in your application which isn't necessarily done with line following applications. Otherwise you'd never know if the actuator (regardless of the type) is reacting to "commands" being sent to it.

    Here is a typical motorized, gear-driven, linear actuator, so you get the idea of what I'm suggesting. I see this being loosely attached to a wheel mounted lever:
    http://www.dcactuators.com/Detail.asp?Product_ID=301.500_6178E

    An over simplified feedback mechanism, a linear resistor, could be mounted on the stationary part of the arm, and the resistor slide actuated by the movable part of the arm. Here is a typical linear resistor, although not the one I'd necessarily choose for this application:
    http://www.allelectronics.com/cgi-bin/category.cgi?category=search&item=LSP-75K&type=store

    That should get your thinking started. Sounds like a fun project.

    Regards,

    Bruce Bates

    Post Edited (Bruce Bates) : 10/2/2005 6:00:25 AM GMT
  • steve_bsteve_b Posts: 1,563
    edited 2005-10-02 06:02
    The O-scope would help you figure out levels and timing wrt the serial port....it won't easily tell you what the data is...you could just connect a pc to it and run hyperterminal (or something similar--procomm?).

    I didn't go to your link (too late...me tired)....but some GPS modules only gave direction (cardinal compass points) based on your direction of movement. So, if you stop and sit still and rotate 90degrees, your direction arrow on your GPS wouldn't update.
    Newer GPS modules have a digital compass that senses magnetic north and will give direction....only reason I bring this all up is, if you're moving from cardinal point to cardinal point, you can use a compass to help you stay the course, and then use the GPS to stop when you reach a certain lat/long.

    Certainly using the stamp to read the GPS data (on off the shelf handheld ones anyways) you can easily read the data (NMEA 800 I think it is...unsure) and then have the stamp update a stepper control that would have linkages/gears to your steering wheel!

    You should certainly start with baby steps. Get a stepper and GPS and be sure you can read the GPS and control the stepper independantly....then move to integrating them together....bench test bench test bench test....

    You said this was just for a "fun project"....that's ok, assuming you'll be 'babysitting' this unit while it's in operation...but nevertheless, safety initiatives are needed.
    Like, if desired course is more than 10meters from actual course, STOP! haha

    I don't know what accuracy your GPS module has....but even within WAS (ground-based truthing) you don't get much better than 3m accuracy.

    Sounds cool anyhow....there's enough expertise on this site that you should have too much problem getting this running.

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

    Steve

    "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."
  • SPENCESPENCE Posts: 204
    edited 2005-10-02 13:03
    Andy.
    I am not shouting. I have been able to read and type all caps much easier for over 50 years.

    Caution. Gps can drift badly. You will have to stay on the tractor all of the time or design in many many failsafe measures.

    A friend of mine, a lake warden, drove from his parking space around the lake and returned to his parking space. The altitude has drifted over 1000 feet in less than 1 hour.

    I suggest that you study carfully the "poor mans dgps" used by hams. It uses a local base reference which greatly improves its stability. Don't know if it is still there but there used to be a project on it, on www.tapr.org about aprs (think i remmember that is automatic position reporting system by bob bruninga wa4apr at the us naval acadamy) which hams have been using for years. I think you are realy going to need a small laptop for the project. Be safe, not sorry. Your tractor is worth a lot of money. Saftey is insurance. Which you can not buy.

    73
    spence
    k4kep
  • ajs2001txajs2001tx Posts: 25
    edited 2005-10-02 15:19
    Guys,

    ···· My GPS does also get info from WAAS and DGPS to help against drift.· However on a day when drift is back I can always reset my course on an old track after lunch or having to stop,·I have already had to do that and it is no big deal.· Also I was gonig to do the 180 degree turning at the end of the rows myself so I won't need any provisions for turning.· When I hook the GPS up to my laptop I guss I will want to set the system up in my truck and see what kind of out put I get when I am off course and then on course.· Right?· Bruce, thanks for the example programs.· I was planning on going with the rubber wheel setup because another company already does that but their "driver" will not interface with my GPS.· So I figured that would work pretty good.· My tractors·include a John Deere 4455 and a JD 4440 that I will be using this system on.·

    Is there any text you can recommend that I can study in effort to understand what the GPS is sending out to Hyperterminal?· Also do I just hook it up and turn on hyperterminal and it will do the rest?

    Thanks again.

    Andy
  • OrionOrion Posts: 236
    edited 2005-10-02 16:31
    That model says the output is NMEA so there should be plenty of info here in the forums or the parallax site to get you well on your way. You will first need to nail down what format of NMEA that gps is send out though.· Get out a laptop and post the output here.

    Here's a few articles on using gps with the stamp.

    http://www.parallax.com/dl/docs/cols/nv/vol3/col/nv83.pdf
    http://www.parallax.com/dl/docs/cols/nv/vol4/col/nv103.pdf

    Search the forums for gps and you will find a ton of links. I like the line follower idea. If you’re a beginner with the stamp it may be a lot easier to adapt that code for your purposes. It may not be a versatile as reading in the lat/lon and calculating the course, but it should get the job done.
  • ajs2001txajs2001tx Posts: 25
    edited 2005-10-02 21:29
    I will post the data as soon as I can.· I will be at a conference all next week but I will get on it as soon as I get back.
  • hank van burenhank van buren Posts: 57
    edited 2005-10-04 11:40
    Andy, we have controlled a vehicle using Gps quit successful look at this website ·www.gpscontrolledvehicle.com··maybe we can·give you some advice·Hank·
  • steve_bsteve_b Posts: 1,563
    edited 2005-10-04 13:51
    Very cool stuff Hank!!

    Do you monitor altitude/elevation changes in order to maintain speeds or to prevent the bot/machine from tumbling in to a bunker/pond?

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

    Steve

    "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."
  • ajs2001txajs2001tx Posts: 25
    edited 2005-10-09 18:12
    Here is some of the data that I collected.

    A·new line comes up about every 0.75 seconds.

    ·
    $GPVTG,11.08,T,,M,0.07,N,0.13,K,D*05···································
    $GPGGA,163746.00,3308.10581,N,09646.12395,W,2,09,0.9,229.2,M,-25.0,M,5.0,0122*73···············································································
    ·
    $GPVTG,245.37,T,,M,0.09,N,0.18,K,D*3F····································
    $GPGGA,163747.00,3308.10581,N,09646.12396,W,2,09,0.9,229.2,M,-25.0,M,6.0,0122*72···············································································
    ·
    $GPVTG,25.26,T,,M,0.04,N,0.08,K,D*07···································
    $GPGGA,163748.00,3308.10581,N,09646.12394,W,2,09,0.9,229.2,M,-25.0,M,7.0,0122*7E···············································································
    ·
    $GPVTG,196.34,T,,M,0.05,N,0.10,K,D*35····································
    $GPGGA,163749.00,3308.10580,N,09646.12394,W,2,09,0.9,229.2,M,-25.0,M,7.0,0122*7E···············································································
    ·
    $GPVTG,228.78,T,,M,0.10,N,0.19,K,D*36····································
    $GPGGA,163750.00,3308.10580,N,09646.12395,W,2,09,0.9,229.2,M,-25.0,M,3.0,0122*73···············································································
    ·
    $GPVTG,267.00,T,,M,0.05,N,0.09,K,D*37····································
    $GPGGA,163751.00,3308.10582,N,09646.12394,W,2,09,0.9,229.2,M,-25.0,M,4.0,0122*76················ ·······························································
    ·
    $GPVTG,187.28,T,,M,0.07,N,0.12,K,D*38····································
    $GPGGA,163752.00,3308.10582,N,09646.12394,W,2,09,0.9,229.2,M,-25.0,M,5.0,0122*74··································· ············································
    ·
    $GPVTG,277.78,T,,M,0.07,N,0.13,K,D*30····································
    $GPGGA,163753.00,3308.10582,N,09646.12395,W,2,09,0.9,229.2,M,-25.0,M,6.0,0122*77······················································ ·························
    ·
    $GPVTG,317.48,T,,M,0.06,N,0.10,K,D*36····································
    $GPGGA,163754.00,3308.10581,N,09646.12395,W,2,09,0.9,229.2,M,-25.0,M,7.0,0122*72········································································· ······
    ·
    $GPVTG,0.60,T,,M,0.02,N,0.04,K,D*38··································
    $GPGGA,163755.00,3308.10582,N,09646.12395,W,2,09,0.9,229.2,M,-25.0,M,7.0,0122*70···············································································
    ·
    $GPVTG,227.52,T,,M,0.06,N,0.11,K,D*3E····································
    $GPGGA,163756.00,3308.10581,N,09646.12413,W,2,09,0.9,229.2,M,-25.0,M,3.0,0122*7D···············································································
    ·
    $GPVTG,266.78,T,,M,1.50,N,2.78,K,D*3C····································
    $GPGGA,163757.00,3308.10575,N,09646.12478,W,2,09,0.9,229.2,M,-25.0,M,4.0,0122*7D···············································································
    ·
    $GPVTG,262.54,T,,M,2.63,N,4.88,K,D*3C ····································
    $GPGGA,163758.00,3308.10559,N,09646.12580,W,2,09,0.9,229.2,M,-25.0,M,5.0,0122*7B···············································································
    ·
    $GPVTG,257.84,T,,M,3.83,N,7.09,K,D*32··················· ·················
    $GPGGA,163759.00,3308.10533,N,09646.12718,W,2,09,0.9,229.2,M,-25.0,M,6.0,0122*76···············································································
    ·
    $GPVTG,256.55,T,,M,4.90,N,9.08,K,D*35····································

    $GPGGA,163800.00,3308.10496,N,09646.12894,W,2,09,0.9,229.2,M,-25.0,M,7.0,0122*71···············································································

    ·

    Post Edited (ajs2001tx) : 10/9/2005 6:21:29 PM GMT
  • OrionOrion Posts: 236
    edited 2005-10-10 01:38
    These links at least give you a good idea of what the data means.

    http://home.mira.net/~gnb/gps/nmea.html#gpgga
    http://home.mira.net/~gnb/gps/nmea.html#gpvtg
Sign In or Register to comment.