# how to calculate speed of the car ?

Hi everyone

I am new in the world of Arduino .. I have a project to do and I want help from you

My project is an alert (sound) if I reached a certain speed in the car and a certain distance from the car in front of me

What I need is what is the best way to measure the speed of the car in real time (same as the car speedometer)? (I just want to read the speed in order to do some calculations and not to show the speed of the car in the LCD screen)

Will the UltraSonic sensor work efficiently if the car is traveling at 100 mph?

Are you talking about real, full-size cars, or models? If real cars, this sounds like a dangerous project and the forum members will not want to help you with something that could lead to someone's injury or death.

The project is a model of a car is not real but I want to know all the information in order to have a full report on all possibilities, for example is the ultrasonic will work when car reach i certain speed ? what is the best way to calculate a speed of car ?

Measuring the speed of a car can be accomplished in various ways, depending on your real needs and budget. A simple (speedometer) solution would count the revolutions of a wheel, see rotary encoder.

100 mph for a model seems extreme.

Laser would be a better option for distance measure.

Video hereā¦

bluejets:
100 mph for a model seems extreme.

Laser would be a better option for distance measure.

assuming that this is a school project, the project is mostly theoretical with a practical portion to get experience and some results to deal with.
the VL53LOX can sense distance up to 2 meters.
100 MPH = 44 meters per second.
It seems things would be happening really fast.
but, I am not sure how to turn distance on a highway to speed of a car.

On the other hand, if this could be water/oil proof, it would be a great device to measure the height of a fish tank or oil tank

bluejets:
100 mph for a model seems extreme.

Maybe its only 100 mph scale speed? i.e. if the models are 1/20th size of a real car then the models would only be travelling at 5 mph.

speed of car = (distance traveled)/(time to travel that distance)

A couple of ideas to read the speed:

1. Use a GPS module. This is likely to be more accurate than the car speedometer.
2. Use a OBD (on board diagnostics) reader. This will actually get the speed from the car itself. Here's a post that uses one: My home-brew Arduino OBD-II connection kit - Other Hardware Development - Arduino Forum

turboultra:
Use a OBD (on board diagnostics) reader. This will actually get the speed from the car itself.

Do many model cars have OBD?

PaulRB:
Do many model cars have OBD?

All of them (in the USA) since 1996.

Ultrasonic is great for parking sensors. Short distances like 10-60cm are perfect for an ultrasonic sensor. Ultrasonic is also good at "false positive" detection. If there's a blade of grass or a gust of hot air disturbing the beam, it's going to squeak "too close" even though you're not too close. False negatives are much rarer. It is less likely to say "everything is awesome" while you hit the garage wall.

But for on the road, avoiding other cars, you don't want your car to brake suddenly at a blade of grass. Radar is a much better technology. Current radars can follow the car in front as it goes around curves and hills. I recently came across this poster on automotive radar (requires a registration to access). Read that and repeat it back to your teacher and they will think you are very smart.

MorganS:
All of them (in the USA) since 1996.

Wow!

I wonder: modern (big) or model (small) cars?

Guess all my HotWheels were made before '96.

MorganS:
All of them (in the USA) since 1996.

My question was rhetorical. I don't think model cars have OBD, regardless of year of manufacture. This thread is about model cars, as confirmed by the OP in post #2.

I would recommend to all forum members to read a thread in full, from the original post, before contributing, not only the last or last few posts.

I'm not sure what really is meant. A speed of 100mph (OP) for a not real model car (#2) look not very compatible to me.