Shop OBEX P1 Docs P2 Docs Learn Events
control RC car using GPS system — Parallax Forums

control RC car using GPS system

cherascheras Posts: 11
edited 2008-02-28 13:36 in BASIC Stamp
hi all,
I am new in this forum.i am doing a final year project in which i have to implement GPS navigation system.My task is to control the RC car using GPS receiver signal(Informations) from satellites.i have all the materials from parallax.such as:BS2 Boe-bot,RC car, GPS recever,parrallel LCD 2x16 modue.i know there are many experienced persons in this forum as well as parallax knowledgeable engineers. Now my question is, how to start with all those things?i have read all related post in this forum but confused a bit.Anyone wants to share anything on this?

Any guidance will be appreciated.

Regards;

cheras.

Comments

  • stamptrolstamptrol Posts: 1,731
    edited 2008-01-31 13:42
    Cheras,
    As odd as it sounds, its unlikely you'll be able to just jump in and get everything hooked up and programmed on the first pass. Even with all the help here on the forums you will have to approach the problems on a step by step basis. Each component you mentioned has a learning curve associated with it; and each combination will have challenges.

    So, the first step is to get used to the Stamp by itself. The "What's a Microcontroller" download has numerous experiments to get you going.
    Then, learn a bit about getting the GPS to communicate with the Stamp. There are several sample programs on the forums or with the GPS module you're using. During this phase, determine if the typical GPS resolution of a few meters will work for your project. Also, does your project have to run indoors? Without a clear satellite view, the system is blind.
    Connect the LCD to the Stamp and get the GPS data to print on the LCD.
    To do navigation, you'll need to get the Stamp to do calculations.
    Finally, the issue of motor control will have you learning about transistors, relays, H-bridges and PWM.

    This will be a great learning experience. It may make sense to do it as a team in the beginning. That way, the class can make some fast progress in the beginning by sharing resources and knowledge gained.

    At that point you'll be able to ask specific questions on the forums and get some pretty specific answers.

    Cheers,

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com
    ·
  • cherascheras Posts: 11
    edited 2008-01-31 14:13
    hi cheers,thank you for your kind informations.in my lab we have done some basic experiments using BS2.i will use it out door as the GPS receiver needs to have clear view of the sky.i have tried with the GPS demo given by parallax.its working too.The next step is i need to read the data on LCD.As i have gone through the forum i got better information about my project.it seems to be that controlling the parallel LCD is difficult compare to serial one.but i bought already parallel LCD display.would you mind to give me some explanation about this?how to get the DATA on LCD?any example?once i get the DATA on LCD i can proceed with the calculation part.I hope i can finish on time.I have attached the GPS demo code which i downloaded from parallax.You could have seen it too.The attachment also available in forum.some people might have used it before.

    Thanks all there.

    cheras
  • Sadao Fujiwara-sanSadao Fujiwara-san Posts: 31
    edited 2008-01-31 14:14
    for the motor control it was recommended to me to go to the downloadable tutorials under the stamp in class section look for industrial control
  • cherascheras Posts: 11
    edited 2008-01-31 14:27
    thank mr. sadao.do you remember the website?if so it would be great once i get to see the tutorials.thanks again.
  • Sadao Fujiwara-sanSadao Fujiwara-san Posts: 31
    edited 2008-01-31 14:35
    yah its under the dowload section at parallax.com
  • cherascheras Posts: 11
    edited 2008-01-31 14:40
    thanks lot.i got it already.millions thanks.
  • Sadao Fujiwara-sanSadao Fujiwara-san Posts: 31
    edited 2008-01-31 14:42
    your welcome

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Sadaao Fujiwara-san




    Never offend people with style when you can offend them with substance
    Sam Brown··············

    ·
  • stamptrolstamptrol Posts: 1,731
    edited 2008-01-31 15:03
    I'd suggest the sample program that is shown in the LCD manual. If its not with your LCD module, download from the Parallax store.

    It lets you use 4-bit mode which will save a few pins for the future. The parallel interface is not as nice as the serial LCD (IMHO, anyway), but its not too bad once you get onto sending characters one at a time as a lownib and a highnib. You should be able to use parts of the sample programs with only minor changes.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com
    ·
  • cherascheras Posts: 11
    edited 2008-01-31 15:16
    thanks,i have downloaded it already.but i am not really familiar with how to send data to LCD screen and what are the commands i need to use to get to see the Data on LCD screen from GPS receiver?still vague to me.....any hints? in the forum also there is not much information about this.

    thank you Mr.Tom.

    Cheras.
  • stamptrolstamptrol Posts: 1,731
    edited 2008-01-31 17:41
    The basic process is to capture the GPS data, essentially putting each character into an array. For instance, this might happen with a SERIN command that puts the data into an array called gpsdat which had previously been defined as gpsdat VAR byte(15).

    Note that you will have to trade off the length of the captured data with the number of variables needed elsewhere in your program. Sometimes you will have to gather the GPS data in two or more SERIN commands, using the SKIP directive to skip over the data already grabbed. See the help file under SERIN.

    Once the data is gathered, take the contents of the array and send it off to the LCD, as shown in the LCD sample program. Typically this will be a loop that chugs through the array and gets each character in turn. If you have to have more than one SERIN to get all the GPS data, this print process will have to be repeated after each SERIN.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com
    ·
  • stephenwagnerstephenwagner Posts: 147
    edited 2008-01-31 20:28
    I would recommend you purchase a handheld marine GPS. Fill full of Waypoints. Set a route. Search the WEB for NMEA data. Use the stamp to collect steering and heading data to control speed and direction of your RC car. The Auto Pilot B sentence will tell your stamp to turn Right and Left. You can ignore the steer right and left until your cross track error and or your heading exceed a value. Closed loop control. The marine GPS does all the difficult math. You may also want to purchase an electronic compass. The marine GPS can not tell you your heading until it is moving.
    ·
    http://www.gpsinformation.org/dale/nmea.htm
    ·
    Program a route on the marine GPS. Capture the Auto Pilot B APB sentence and Recommended Minimum Data RMC sentence using the stamp SERIN. The APB sentence will steer a boat equipped with auto pilot as told by a GPS route.
    ·
    $GPAPB,A,A,0.10,R,N,V,V,011,M,DEST,011,M,011,M*82
    ·
    where:
    ··· APB···· Autopilot format B
    ··· A······ Loran-C blink/SNR warning, general warning
    ··· A······ Loran-C cycle warning
    ··· 0.10··· cross-track error distance
    ··· R······ steer Right to correct (or L for Left)
    ··· N······ cross-track error units - nautical miles (K for kilometers)
    ··· V······ arrival alarm - circle
    ··· V······ arrival alarm - perpendicular
    ··· 011,M·· magnetic bearing, origin to destination
    ··· DEST··· destination waypoint ID
    ··· 011,M·· magnetic bearing, present position to destination
    ··· 011,M·· magnetic heading to steer (bearings could True as 033,T)
    ·
    $GPRMC,123519,A,4807.038,N,01131.000,E,022.4,084.4,230394,003.1,W*6A
    ·
    Where:
    ···· RMC········· Recommended Minimum sentence C
    ···· 123519······ Fix taken at 12:35:19 UTC
    ···· A··········· Status A=active or V=Void.
    ···· 4807.038,N·· Latitude 48 deg 07.038' N
    ···· 01131.000,E· Longitude 11 deg 31.000' E
    ···· 022.4······· Speed over the ground in knots
    ···· 084.4······· Track angle in degrees True
    ···· 230394······ Date - 23rd of March 1994
    ···· 003.1,W····· Magnetic Variation
    ···· *6A········· The checksum data, always begins with *

    I hope this helps.
    ·
    SJW
  • cherascheras Posts: 11
    edited 2008-02-01 02:23
    Thanks all.

    i will try to proceed with your instructions until i face difficulties.

    thanks
  • cherascheras Posts: 11
    edited 2008-02-01 13:59
    hi all,
    I have attached one demo which had been used for Garmin GPS receiver.Can i use this in my project?what are the things i need to changes to view data on LCD from GPS receiver?as i am new in programming so i am just blurred about how to write the program for my project?any idea?

    Thanks all.
  • stamptrolstamptrol Posts: 1,731
    edited 2008-02-01 17:55
    Cheras,

    The program will give you a very good demonstration of reading a GPS and displaying it on an LCD. Typical of Jon William's work, it demonstrates some very good programming techniques as well.

    There are a couple things to keep in mind:

    1. The program is written for the BS2p series, as evidenced by the use of the SPSTR modifier for the incoming string.
    2. Also, the program is set to use the Garmin proprietary sentence structure which is different from the standard output string defined by NMEA.
    3. Everywhere you see SEROUT LCD......, you have to send the program to the new LCD routines you will write to use the parallel style LCD display. Depending on the time frame of your project, purchasing a serial display may be advised.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com
    ·
  • cherascheras Posts: 11
    edited 2008-02-02 06:10
    thanks,
    what kind of serial LCD i have to buy?only can support from parallax as i am using all other materials from parallax?or any kind of serial LCD will work with this?

    thanks lot.

    regards;
    cheras
  • stamptrolstamptrol Posts: 1,731
    edited 2008-02-02 20:38
    I've been happy with serial LCDs from Parallax, Scott Edwards and Matrix Orbital.

    If you look on the Parallax web site you'll see the 2 x 16 LCD in both parallal and serial forms.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com
    ·
  • cherascheras Posts: 11
    edited 2008-02-03 06:04
    k,Thanks.
  • cherascheras Posts: 11
    edited 2008-02-28 13:36
    hi all,does anyone has any example program code for parallax GPS receiver module interface with PIC16F877A? i am quite new in interfacing these.any help would be highly appreciated.Thanks all.
    Regard;
    Cheras.
Sign In or Register to comment.