Pushing information to a computer


Closed Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2006
    Posts
    747

    Default Pushing information to a computer

    Hello,

    I am creating a module that will be receiving multiple GPS coordinates from distance transmitter.
    I would like to push the information from the module to the computer to get interpret onto google map.
    My concern is how to push this information to the PC (or mac)
    I think Bluetooth (wireless) could be the way to go.
    any thought on this?
    Last edited by lerameur; - 1st February 2015 at 17:02.

  2. #2
    Join Date
    Oct 2004
    Posts
    440


    Did you find this post helpful? Yes | No

    Default Re: Pushing information to a computer

    If you are receiving the GPS coordinates from a transmitter a simple wired RS232 connection to the PC may be easier depending on the available ports.
    The final decision might be what your PC Google map program can interface to?

    Norm

  3. #3
    Join Date
    Oct 2009
    Location
    Utah, USA
    Posts
    427


    Did you find this post helpful? Yes | No

    Default Re: Pushing information to a computer

    Here is a program called "earthbridge" that takes a serial GPS data stream and plots it on Google Earth.

    http://mboffin.com/earthbridge/

    I don't think it is being developed any more (no new revisions for several years)

    I have used it to recieve gps coordinates over an XBEE wireless connection and plot it on google earth.
    I had a PIC (12F683) connectd to the GPS module and parsing the data and then sending it to my PC via the XBEE link.

    On the PC end I just had the XBEE radio connected to the PC via an FTDI USB to Serial converter.
    Here is the code I was using in the PIC...

    Code:
    @ device  pic12F683, intrc_osc_noclkout, BOD_OFF, PWRT_OFF, wdt_off, mclr_off, protect_off
    
    DEFINE ADC_BITS 8     ' Number of bits in ADCIN result
    define ADC_CLOCK 3    'SET CLOCK SOURCE TO RC = 3
    DEFINE ADC_SAMPLEUS 50
    
    ' -----[ Initialization   ]------------------------------------------------
    
    Reset:
                          
    CMCON0     = %00000111 ' Comparators off
    
    TRISIO     =   %101100 
    ADCON0     = %00001100 ' LeftJust,VDD,x,x,AN3,x,ADCdisabled
    ANSEL      =  %0010000 ' -001xxxx Fosc/8, -xxx0000 all pins digital not analog
                          
    IOC        =   %001000 'enable gpio.3 interrupt on change 
        'NOTE: you must also clear the CONFIG.5 fuse bit to change gpio.3 to 
        'an I/O instead of MCLR (its under the configuration link on the 
        'pickit2 programing app. This bit must be done each time before you
        'program the chip.
    
    OPTION_REG = %10111111 'b7=pullups disabled
                           'b6=int on falling edge
                          
    
    Xpwr var gpio.0 'Output to turn on XBee
    XBrx var gpio.1 'Output serial data to XBee
    XBtx var gpio.2 'Input
    rst  var gpio.3 'Input
    Gpwr var gpio.4 'Output to turn on GPS
    GPS  var gpio.5 'Input serial data from GPS
    
    symbol I = 254        'LCD prefix for Instruction
    symbol clr = 1        'LCD CLEAR SCREEN
    SYMBOL LINE2 = 192    'LCD ADDR FOR 1ST CHAR ON 2ND LINE
    SYMBOL H = 2          'LCD HOME COMMAND
    
    NMEA1 VAR BYTE[35]
    NMEA2 VAR BYTE[35]
    FN    var byte        ' For Next loop counter variable
    
    
    '============= Main Program ==========================================
    Main:
    high gpwr     'turn ON GPS module
    pause 5000
    
    GPSin:
    for fn = 0 to 5
    
         SERIN2 GPS,188,1500,tmout,[WAIT("$GPRMC,"),WAIT("A")]
         serin2 gps,188,3000,tmout,[WAIT("$GPGGA,"),STR NMEA1\35,STR NMEA2\35\"$"] 'Data IN from GPS
        
        
    next
    
    
    low gpwr    'Turn OFF GPS module
    high xpwr   'Turn ON XBEE radio
        pause 500
        
        SEROUT2 xbtx,188,[$0D,$0A,"$GPGGA,",STR NMEA1\35,STR NMEA2\35]            'Data OUT to XBEE
        pause 500
    
    low xpwr    'Turn OFF XBEE radio
    
    pause 5000  
    
    goto main
    
    '-----------subroutines-------------------------
    NoFix:
      high xpwr
      pause 500  
      serout2 xbtx,188,[13,10,"X"]  ' send X's while waiting for satelite fix
      low xpwr
      goto gpsin 
    
    tmout:   'end up here if no data from gps within 3 seconds
      high xpwr
      pause 500
      serout2 xbtx,188,["timeout"]
      low xpwr
      GOTO MAIN
    The code is a bit rough... I wasn't actually using the ADC yet the code contains setup for the ADC.
    Also the CINFIG is the old style and needs to be updated for newer PBP

    I can post a schematic if you want it.

    The GPS/PIC/XBEE combination was powered by a single Lithium ion cell (old cell phone batt)
    And was designed to track my dog around the yard so I could see where he went.
    Last edited by Heckler; - 1st February 2015 at 20:11.
    Dwight
    These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.

  4. #4
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default Re: Pushing information to a computer

    HI Dwight,
    Thanks for the program ,
    I would not mind the schematic.
    How do you know what data to put in your SEROUT statement. I looked through the earthbridge web page but did not see any technical details.
    Thanks
    Ken

  5. #5
    Join Date
    Oct 2009
    Location
    Utah, USA
    Posts
    427


    Did you find this post helpful? Yes | No

    Default Re: Pushing information to a computer

    Hi Ken,

    I just looked through my stack of papers and notebooks and can't locate the schematic. I will keep looking.
    It actually was quite simple... I used two BS170 FET's to allow the pic to power on/off the GPS module and the XBEE radio.
    If you haven't used small FET's in this manner they work great. Very easy to interface to a PIC and control ~500 ma or so.
    The radio pair that I used was a XBEE09P by Digi International (note: if you go XBEE they have nonstandard pin spacing so you may need a .1 inch adapter board so it will fit a breadboard)
    They make several models of the XBEE radios, so if you decide to go that way, take a look at the various models and range capabilities.
    SparkFun, Adafruit, digikey, (probably Amazon) all carry them
    You can see in the code where I turn on/off the GPS and the XBEE radio, one after the other.

    For shorter ranges you could also probably use the cheaper serial radios sold on ebay. http://www.ebay.com/itm/2pcs-433Mhz-...item1e869e9107
    Or as you were thinking, bluetooth.

    Here are a couple of pics of my little project.

    To answer your question I think the earthbridge was able to parse the NEMA strings coming from the gps and pull out what was needed.
    It has been over a year since I built this so I am a bit rusty. If you mock up the same thing I build you could just output the serial string that I was sending to the XBEE radio instead to a local LCD or to a serial terminal on your PC to have a look at it. ( I find having on hand an LCD with Serial Backpack invaluable for quick testing and debugging serial comms)

    Actually I think you could just fire up earthbridge and recieve the serial string from the 12F683 directly into the serial port defined in earthbridge.
    If you take a look at the code I posted you can see in the SEROUT and SERIN statements I did a little NEMA parsing as the data came in and before I sent it out.

    Name:  2015-02-02_205453.jpg
Views: 417
Size:  68.7 KB

    Name:  2015-02-02_205420.jpg
Views: 448
Size:  80.4 KB


    The only component on the bottom of the board is a single diode (for reverse battery protection) and the wiring connections.
    Notice on the PCB I included a 6 pin header strip to allow me to connect my PICKIT 2 to update the code in the PIC easily.
    If I locate the schematic I will post it.
    Last edited by Heckler; - 3rd February 2015 at 04:36.
    Dwight
    These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.

Similar Threads

  1. "Debug" pushing my modest program space over the edge
    By HankMcSpank in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 23rd May 2011, 21:06
  2. Pushing the limits of a PIC10F222
    By brid0030 in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 22nd September 2010, 08:38
  3. R/C Failsafe Information
    By DanPBP in forum Off Topic
    Replies: 3
    Last Post: - 12th March 2009, 04:51
  4. DS1821K information
    By Nicmus in forum Documentation
    Replies: 7
    Last Post: - 19th June 2008, 20:00
  5. Looking for Information
    By schu4647 in forum General
    Replies: 2
    Last Post: - 27th June 2006, 14:52

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts