Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

2nd project GPS

Status
Not open for further replies.

karenhornby

New Member
Does anyone have any clues how i'd go about connecting a GPS module to a PIC but sending it to (and this is where it gets hard) either a 3 digit LCD or 3 digits of 7 segment display, I guess 2 digits would do as the ONLY thing it will display is MILES PER HOUR and SHOULDN't go over 70mph but sometimes my foot does slip and it goes over "slightly" :)

The main problem is the display has to be big enough to be seen while driving, I'm going to mount it to the left of the proper speedometer in my vehicle,(right hand drive here in UK) so a normal 2X 16 display wont be big enough and to be honest I dont know of any other displays that might be suitable.

2nd part of this question, anyone know what NMEA sentence would be best for getting my speed and inputting that sentence into the pic for conversion?

Hopefully IF i can get the basics of this project sorted, I'll buy a small GPS module that has a SiRFStarIII Chipset or one that uses the MTK chipset but I think both output NMEA and mount it into the dashboard of my car behind the speedo out of sight the only thing that will be showing will be the display.

I was originally going to get one of these: (heads up display for a car) https://www.pocketgpsworld.com/bluetooth_hud_gps_review_globaltop_hg-100.php
but it's too bulky and cant be mounted out of sight and would have to be removed from the car every time I parked up or theiving hands would smash the windscreen and grab it. Apart from that it has to be manually turned on each time it's used so I figured i'll make my own, even if it's not a display that shines onto the glass of the windscreen.
 
You can find 3 1/2 digit large lcd modules (as used in multimeters etc) at most large suppliers, but you will need to drive each segment.

You say you want visual warning of over speed - having regularly used an Origin GPS unit - it is the audio warning that first alerts you to overspeed, your eyes are already off the speedo, so you will only use the display to confirm this after the event - which you car speedo should also be telling you anyway.
 
richard.c said:
You can find 3 1/2 digit large lcd modules (as used in multimeters etc) at most large suppliers, but you will need to drive each segment.

You say you want visual warning of over speed - having regularly used an Origin GPS unit - it is the audio warning that first alerts you to overspeed, your eyes are already off the speedo, so you will only use the display to confirm this after the event - which you car speedo should also be telling you anyway.
Sorry that should have been Audible not visual, I only want the speed display from the GPS because it is WAY more accurate than the car's speedometer and as the UK police have a policy of not issuing tickets or fines unless you go 10% +2MPH OVER the posted speed limit i.e for a 70mph speed limit, you wont get stopped untill you reach 80Mph so it's handy having a reliable speedo, and i'd set the alarm at 77mph just to be safe.

Thanks, didn't think of 3and 1/2 segement displays:)
Nigel Goodwin said:
I thought you took two positional readings, calculated the distance travelled, the time it took, and worked out the speed?.
I'm not an expert on these, but from what I understand, most of the GPS modules will output an NMEA sentence that includes the speed your travelling at, i.e it does the calculations before it outputs the NMEA sentence,

and Hi Nigel, thanks for the help a few months back, your tutorials are a great help to newcomers, although as you can see I'm still learning :)

This was me personally but I found it easiest to learn by getting snippets of code and modifying various sections to see what happens, those bits that it wasn't obvious what the code did anyway.
 
Last edited:
karenhornby said:
I'm not an expert on these, but from what I understand, most of the GPS modules will output an NMEA sentence that includes the speed your travelling at, i.e it does the calculations before it outputs the NMEA sentence,

Hi Karen Hornby
Well as far as i know the gps mpdule calculates the speed ++ for you (i belive its part of NMEA) so it should be possible to get that out.

So good luck on that project. and keep us uptodate on it (hmm maybe i will make one for my self :) )
 
I reckon so, all the GPS modules do is output the MNEA sentences via a serial output.
I've seen various projects done with pic's that use lots of this info to display all sorts of things such as heading and so on, but ALL I want to output into the PIC is the actual speed in MPH or knots per hour as long as someone can tell me how to convert that to mph :) and then ONLY display the speed, the overspeed alarm should be easy to implement.
 
Try this (and other threads here)
**broken link removed**
or this **broken link removed**

there are lots of projects like yours out there.
I did a quick google and found lots
 
Anyone fancy trying to sort out a basic code to do this? (PBP prefered but any will do)
Code:
 ' Look at the first word to decide where to go next
    Select Case GetWords(sentence)(0)
      Case "$GPRMC"      ' A "Recommended Minimum" sentence was found!
        Return ParseGPRMC(sentence) ([COLOR="Red"][SIZE="3"]monitor NMEA and when $GPRMC is received, SEND SENTENCE to PIC via serin?[/SIZE][/COLOR])
      Case Else
        ' Indicate that the sentence was not recognized
        Return False
    End Select

' Does the device currently have a satellite fix?
    If Words(2) <> "" Then
      Select Case Words(2)
        Case "A"
          RaiseEvent FixObtained()
        Case "V"
          RaiseEvent FixLost()
      End Select ([SIZE="3"][COLOR="Red"]on display output a pin to light an LED when fix is obtained[/COLOR][/SIZE])
    End If

If Words(7) <> "" Then
      ' Yes.  Convert it into MPH ([COLOR="Red"][SIZE="3"]Speed is sent as KNOTS per hour and needs to be converted to MPH[/SIZE][/COLOR])
      Dim Speed As Double = CType(Words(7), Double) * 1.150779
       RaiseEvent SpeedReceived(Speed) ([SIZE="3"][COLOR="Red"]display speed on LCD?[/COLOR][/SIZE])
    End If

I'm thinking of using something like this **broken link removed**
as the GPS module along with an aerial.
It outputs NMEA sentences via serial Baud rate 4,800 to 57,600 bps adjustable
From what I can see that is all I need to put into the PIC and then displaying the result shouldnt be too much of a problem (i hope )
The display will have either 2 or 3 digits, and an LED to indicate an active and valid fix.
anyone see any problems I cant see?
 
Last edited:
No, if it outputs the speed it's just a question of picking it out of the data stream - get a GPS module, add a MAX232, and connect it to your PC and Hyper Terminal so you can see exactly what it's providing.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top