Hi. I am looking for a cost effective solution to generate a simple square wave speed pulse much like the speed sensor on a vehicle, using a GPS receiver. Is there a processor that can extract the information from the NMEA string and convert it to a ppm signal?
You can use almost any microcontroller that has a UART. It doesn’t take much processing power to exact the velocity string from the NMEA data and toggle an output pin based on that value.
I’m working with an arduino mini pro / venus gps combo now. It wouldn’t be hard to use one of the output compare PWM channels to generate a pulse whose width was inversely proportional to speed (which I assume is what you want). You would have to pick through the data, but that is also easy.
Depending on what else is there, the arduino can even power the Venus GPS (I would use low power on the venus and not demand too much current from the arduino drivers themselves). It takes a wide voltage input range.
It also depends on what frequencies you want. I’m assuming something linear like 1Hz = 1MPH, 50Hz = 50MPH, or even 10x - higher you start to push granularity. (Linear as opposed to exponential like music, where every 10MPH goes up one octave). A few more details - even a list of speed/hz values - would help.
Thanks. Sounds interesting. Didn’t know anything about UART or how streaming data is processed. I would want something that runs on 12 Volts but gives me a 2-3V pulse. I believe 1hz would give me 3600 pulses per mile? I wish I had the time to do this as a hobby but I don’t. I need to make about 1000 pieces. My regular engineer didn’t seem to know about GPS circuits. I saw the “Venus GPS with SMA Connector”. I obviously would still need the antenna and micro controller. Any suggestions on the most cost effective way to end up with a finished product that I can reproduce?
Yes, 1 hz = 1 pulse / second x 3600 pulses / hour (cancel the pulses, in the denominator and numerator respectively) you get 3600 pulses per hour.
But first, do you need speed or distance? A GPS just sitting there will drift a bit and give slow set of pulses as it thinks it moves, but it is just jitter from the satellite calculations. Normally this isn’t a problem but if you are counting distance it will accumulate. Note you can filter “distance” by using the actual coordinates and averaging within a window (think of a curve tracing points on a road by passing near each set of points, so sitting still creates a “cloud” which the curve passes through the center of, instead of bouncing between them like a pin-ball)
Also precision - Venus goes to 10Hz, so you get an update 10 times a second, which can be important, e.g. instead of seeing 20 mph then 30 mph, you would see 20, 21, 22… etc.
Feel free to PM me if you don’t want to make all the details public, but I find it hard to nail something down without knowing the application in some detail.
Also note the GPS will need a clear view of the sky and/or battery backup, and will take a few seconds to lock. Also if you go through a long tunnel, you will lose the (gps) signal. There are other technologies if you just want an external speedometer (e.g. radar).
The Arduino has a 3.3v regulator which can take 12v, and if the ONLY thing it needs ot drive is the Venus it should work as it is rated for 100mA, but it might get hot and I would worry if you are going to Arizona. The 3.3v supply will return ~3v pulses.
I’m also not sure if you would want to get the chips and do a circuit board with the venus and microcontroller, or just buy the spark-fun modules and integrate them. At 1000 units, I think the costs would be even or maybe favor a custom board but you would have to lay it out and there are some subtle things in the GPS RF section.
(I’m doing an acquisition and instrument cluster for my motorcycle so I have to solve the same problems except getting the speed out as a frequency, which is generally simple).