GPS Speed Logger + Dual 4k Video Recorder

Hi All,

Brand new to the forum and still very new to the world of Arduino. I am actively researching and practising to facilitate building this project. But thought I would jump in early here to minimise me chasing avenues which aren't feasible or if there are better ways than my limited knowledge allows me to think of.

I have been tasked with creating a system to track the speed of a race car, to ensure it does not break a hard 160km/h limit and at the same time, record vision from the front and rear of the vehicle. All 3 data sets are only required for post-race review and no live view of speed or transmission of footage is required.

My initial thoughts for hardware and outputs are as follows:

For GPS:
Arduino Mega
Adafruit Ultimate GPS Shield

For Video:
2x Hawkeye Firefly 4k drone FPV DVR

Due to my limitations of knowledge, I would assume that the simplest setup is to record the data and video onto 3 separate memory cards; GPS, Front Cam, Rear Cam.

For the GPS logging, I think the simplest output would be:
Date/Time/Lat/long/Speed in Km/h

I think that it could be just be recorded in a TXT file as a list.

I think the above is achievable with a bit more research and learning on my part. But here are the things I am unsure of and need some guidance.

  1. Turning on and off each of the 3 systems at the beginning and end of each race. Ideally, it would be 3 switches, one for each system. Status leds would also be required so that there is a visual status of GPS lock, GPS logging, Video Recording.

  2. Ideally, a way to highlight in the GPS log the moments that 160km/h is reached, so that officials can easily spot when how long a the speed was exceeded.

  3. All 3 devices use MicroSD slots on the PCB. I would like to use SD cards. Is there a way to do this via the Arduino headers?

One other thing Im not sure on is the GPS capability to even accurately track the vehicle at those sustained speeds. Very interested to hear the opinions of others on this.

If anyone has any input, tutorials, advice, negative or positive, Im very much happy to hear it all. I would appreciate if someone could confirm my hardware choices so that I can order it and start learning on the job, so to say.

Thanks for your time,

Ned

Hi Ned.
Very interesting project. I suggest learning each technology separately before bringing them together in a single design. A single Arduino capturing data from all three devices might be challenging.

I made a GPS speedo for my car. Some problems. Occasional wildly spurious speeds. Significant latency, ie, displayed speed lags behind actual. These problems are probably solvable.

I doubt 160 kph would be a challenge for the GPS.

The data you want (long. lat. speed ....) will be available without any special effort.

I have no reason to be critical of Adafruit's GPS, but you might like to research modules based on GPS receivers made by u-blox. They have a range of receivers providing varying performance levels. They offer a free software tool, "u-center", which can record and play back logs, display photos taken during a trip, configure the receiver for special purposes. There is good expert advice thru their forum which I suspect you might need.

Goodluck.
John.

NissanCedric:
Hi Ned.
Very interesting project. I suggest learning each technology separately before bringing them together in a single design. A single Arduino capturing data from all three devices might be challenging.

I made a GPS speedo for my car. Some problems. Occasional wildly spurious speeds. Significant latency, ie, displayed speed lags behind actual. These problems are probably solvable.

I doubt 160 kph would be a challenge for the GPS.

The data you want (long. lat. speed ....) will be available without any special effort.

I have no reason to be critical of Adafruit's GPS, but you might like to research modules based on GPS receivers made by u-blox. They have a range of receivers providing varying performance levels. They offer a free software tool, "u-center", which can record and play back logs, display photos taken during a trip, configure the receiver for special purposes. There is good expert advice thru their forum which I suspect you might need.

Goodluck.
John.

Thanks very much for your repsonse John. I will take a look into Ublox.

Cheers,
Ned

Ned,
The attachment shows a typical display from u-center. No programming effort required. Can also show speed and course.
John.

Curious here. How well does a GPS compute speed on a curved track?

Paul

youtube video from iforce2d has a couple of GPS speed related videos amongst his vast library.

One here .....

As mentioned above, Arduino is quite busy just capturing data from the GPS which created some display problems.
Might have to consider going to an STM32 to eventually cover all three of your requirements.

Does it quite well in my airplane going 145 mph, and while climbing and descending as well, so the satellites can definitely put out the data needed.

Paul_KD7HB:
Curious here. How well does a GPS compute speed on a curved track?

Paul

It's calculating speed in three dimensional space. That includes the vertical component. It does this once per second or even up to 10 times per second.

It's a bit like Marvin the Robot from Hitchhiker's Guide to the Galaxy: "A brain the size of a planet and they ask me to park cars."

John.

Yes, but it calculates for a straight line. GPS has no clue how far you traveled to get to the two points, hence, the actual speed to travel the curve.

Calculating many times per second will give you more chords and will more closely represent the curve.

Paul

I asked on u-blox's forum how speed is calculated -- does it use the straight line distance travelled between successive positions, or the doppler shift in the radio signals?

The experts replied it is a mix of the two, but the actual algorithms are intellectual property so the exact method is secret.

It will be interesting to see what Ned develops, don't you think?

John.

Don't think there's any way to get Arduino to record 4K video, let alone 2 channels. The cameras will have to record directly to their own sd cards. The Arduino may be able to trigger recording to start & stop.

Sounds like you will need quite a fast Arduino, that can perform complex floating point maths fast and record to SD card fast. Maybe Teensy 3.6?

I feel the GPS part of this is not difficult and the performance might exceed Ned's hopes.

Ned, how do you envisage the post race analysis using the GPS data and the videos? Do you need them merged in some way? Will viewing them separately be adequate? I assume the videos will have a time stamp. The GPS time shud be taken as the master reference.

It will be easy to tell when and for how long speed breaches the 160 limit, but how do the videos come into it?

John.

Thanks to all for your input, questions and recommendations.

To clarify further and answer some your questions which will hopefully in turn help me to narrow my scope a bit.

The current solution employed to facilitate gathering this data requires the use of 3 separate GoPro cameras.
1x forward-facing
1x rear-facing
1x filming a dashboard-mounted GPS speedometer.

Obviously, this setup is filled with potential issues such as battery charging, complicated power on and capturing procedure, and not to mention the fact the race officials need to sit down and watch the speed camera for the whole race, to note any periods in which the car exceeded the speed limit. There is no need to overlay the GPS data with the video.

So the solution we have proposed addresses these core issues:

Permanent power supply from the vehicle 12v system
Data log of GPS based speeds
Simple interface to turn GPS logging on/off and video recording on/off.

On paper, recording all data to one SD card would be the most efficient use. But in reality, I think having 3 separate SD cards, whilst increasing the admin to manage separate cards, would actually be better as the GPS log card can go straight to the race officials and the video can be kept by the team for post-race debrief and then also handed over as evidence for crashes etc etc,

The video system I have my eye on is this. Its a 4k drone FPV system, which comes with its own DVR card.
In my Beta version, I don't see the need to have the Arduino interact with the video systems at all. As I will just use a hardware switch for video record start and stop. In future versions, I think there could be scope to integrate an automatic speed based on/off trigger.

PaulRB:
Don't think there's any way to get Arduino to record 4K video, let alone 2 channels. The cameras will have to record directly to their own sd cards. The Arduino may be able to trigger recording to start & stop.

Sounds like you will need quite a fast Arduino, that can perform complex floating point maths fast and record to SD card fast. Maybe Teensy 3.6?

Hi Paul,
Could you please explain which part of the GPS logging would require the faster microcomputer of the Teensy compared to a UNO?

Thanks
Ned

Just found this Ublox M8N based Shield which looks like a very competent piece of kit. https://duinopeak.com/index.php?route=product/product&product_id=45&search=M8n

Ned, perhaps an ordinary Arduino will be fast enough, so try that first, but if that fails to perform well enough, the Teensy would be a good option.

PaulRB:
Ned, perhaps an ordinary Arduino will be fast enough, so try that first, but if that fails to perform well enough, the Teensy would be a good option.

Yeah great. I have ordered a generic UNO kit to start cutting my teeth. Will order the above GPS shield for the beta testing. If I notice the write speeds are too slow at 10hz, I will look at using Teensy.

The attachment is a screenshot of the GPS output at a sampling rate of 1Hz. It's not a lot of data. I imagine all of this could be recorded as it comes in. Capturing it this way would allow you to play back the trip on u-center at any speed you wish. You can also link it with Google maps so you would see the car's trip overlayed on a map of the circuit.

You can configure the unit to output only the sentences you need, which would reduce the data load.

John.

nedmo:
and not to mention the fact the race officials need to sit down and watch the speed camera for the whole race, to note any periods in which the car exceeded the speed limit.

In one of the iforce2d videos on the site I linked to you will see where he captures the maximum speed off the GPS so no requirement for above.

Ned, why do you want to video the GPS speedo? This introduces complications.
John.

NissanCedric:
Ned, why do you want to video the GPS speedo?

That's the way he is doing it now. He wants to replace that with an Arduino that records the GPS data directly to sd card in tablular format, so it can be quickly queried for periods over 160KPH.