Cruise Control with the Arduino

I say screw the haters man, go for it. People thought the wright brothers were nuts, I probably wouldn't try building self driving capabilities into your car, but cruise control should be cake. The vehicle's ground is the chassis. just tap into anything structural with a 10/32 and a ground pigtail and your in business.

wvmarle:
That's why a commercial cruise control costs USD 300 to install in your car, while it's maybe USD 10-20 worth of electronics.

Not quite.
They cost that because the manufacturer has to undergo expensive testing procedures to make sure they are safe and to make profit.

Nothing to stop you experimenting though.

If you wish to use on a road going vehicle be very careful.

An acquaintance of mine removed the passenger seat from a luton van to accommodate the length of a carpet roll.
This is a modification to a vehicle, if you do not inform your insurance co. it invalidates the insurance.
This is a common practice for carpet fitters and in the event of an accident could mean you have to buy a new vehicle.
What you propose however affects the running properties ov the vehicle.
In the event of a problem involving a third party you could possibly face a very expensive legal/liability bill for which your insurance will not cover you.

roosterqmoney:
The vehicle's ground is the chassis. just tap into anything structural with a 10/32 and a ground pigtail and your in business.

Geez ....

...R

Thanks again to you all for your concern. I am doing this to prove it can be done. I do not intend on using it on a regular basis. As I do the testing I will update this forum.

walttheboss:
I do not intend on using it on a regular basis.

One paraplegic on the irregular day would be one too many.

...R

Hello sir
Nice to find some one intrest in this topic
I want to do exact same project
This my post
https://forum.arduino.cc/index.php?topic=560154.0
I ommitted the speedometer option

Do you do it
Does it function well
Can you tell us the full details
So we can replicate your work

Thanks

Hello @Snabark. Thanks for your reply. If you read through the post the responses were very strong against the project. Whether or not I did it I will not say for fear that some well meaning person will go after me or remove me from the forums altogether. My ComSci class is writing a book on the Arduino and it just might appear in that book in a hidden form. If you find me in another way or personal message I will reply more in detail.

Its interesting how you can ask a simple question and all of us try to put on lawyer hats.

Cruise control is actually quite difficult. Forget all the (how do you turn it off stuff for a minute).

Think about how much do you need to accelerate when you are not going the desired speed:

What if you are going up hill?
What if you are going down hill?
How powerful is your motor?
How much "gas" do you give it when you are falling behind?

I have a project where I have been trying to tweek these things and it is difficult.

For any vehicle, it is different depending on what speed you are going... You can give more acceleration at low speeds than you can at high speeds.

Its loads of fun to play with this type project. The interface to your 0-5v is the EASY part.

PID is what it is all called. Great reading, etc.

Google PID for more.

Try asking us here for more specific interface info, like-- "how do I generater a 0 - 5 volt signal to adjust the throttle on my engine?"

How do I measure the speed of a rotating shaft and turn it into MPH?

Greg

gmcmurry:
put on lawyer hats.

Not so much lawyer. More like guy-with-some-common-sense.

I don't know where this guy is trying out his new cruise control, so I have to worry that it might be near to where I am driving.

Then I see:

I am a mechanical engineer and Math and Science teacher.

Followed by:

WHAT is the way to tie my arduino ground to the car's computer ground

and I know that this guy is either 1. a liar 2. stupid or 3. the worst engineer ever.

Either way, it doesn't instill a lot of confidence and I know that I might have to drive around some idiot trying to build a cruise control on a highway. If it isn't this guy it will be some other numb-skull who reads this thread and decides it's all good to control a 2 ton machine at 70 miles per hour with a $2 hobby microcontroller.

All I'm saying is, Do your testing on a track and not the street.

That's it. And I don't think that is too much to ask. Please consider my safety and not just your own desire to do something stupid.

All well said. As to which of the three choices I am(liar, stupid, worst engineer) only time will tell. I don't mind any of those names. Except liar I suppose.

As to how the program works there is a learning cycle/program. With an accelerometer I can help the controller to pick the right numbers. When going uphill or downhill. When the unit is installed it will learn the right parameters quite quickly. So a 5 liter engine or 1.3 will configure itself with different numbers. Once you have those numbers you lock them in.

So when the car begins going uphill the program kicks in faster and more agressively. If you begin to crest a hill the increment numbers decrease so you don't launch over the crest of the hill.

Its been a great project. Keep your helmets on all of you!! :slight_smile:

1 Like

Again, please test far away from me. On a track. Like a real engineer. Not on the highway like an idiot where someone can get hurt.

Delta_G:
Again, please test far away from me. On a track. Like a real engineer. Not on the highway like an idiot where someone can get hurt.

Delta_G:
Again, please test far away from me. On a track. Like a real engineer. Not on the highway like an idiot where someone can get hurt.

Absolutely. I will test up on a lift at a shop first. Then on an abandoned highway near my house. (GMT+8). Then maybe on the road if I am happy with it. Or maybe I already did all of this. Say no more.

Thanks for keeping me honest @Delta_G I appreciate it.

Is the standard Arduino, such as the UNO, suitable (and safe) for use in a harsh automotive environments ?

Firstly ATmel has been bought my Microchip so with that out the way here's an interesting thing there is a 328p and 328p-automotive

ATMEGA328P-AUTOMOTIVE

ATmega328P

both have the same specs but i assume one has been far more tested, can anyone spot something that is different between the two ?

Usually the main difference is in the operating temperature range, which is much greater for automotive versions.

I'd be impressed if you can measure the slight slope of a highway (usually <4% incline) with an accellerometer - as the signal is easily drowned in the noise of the vibrations of the car's engine, the bumps in the road, etc.

Here is a good article, though written for Basic Stamp, about using PID. Believe me, this part of your project will be the most interesting.

http://learn.parallax.com/tutorials/language/pbasic/pid-control/proportional-integral-and-derivative

I have built many devices that ride around in all sorts of vehicles. You will not have a problem there.

You need a speed pickup, which could be something like a Cherry KB15MKW01 Gear Sensor. It can sense a piece of metal flying by and generates a nice open collector signal. Just attach it to your Arduino and use a pull up resistor. It is a hall effect device and any sort of rotating shaft with a bolt in it (or similar) will give you a nice speed reference.

I would buffer your Analog throttle output with another OpAmp. Always nice to have a couple of pots on there to adjust the range without having to get out your computer. And use use a simple double throw relay to switch out your gas pedal and in your Cruse Control. That way, your emergency / kill system could easily just revert to your gas pedal when you take away power from the relay.

An Opto Isolated pick up off your brake light will give you a signal to release the Cruise Control when you touch the brake.

Then a couple of buttons to turn things on and off. You might also like to use a pot to set your speed in your first model, instead of trying to capture your current speed with a button press. Do both, simple logic.

I have done all this but my programming ability is limited and the PID work I have done needs some help.

Forget the accelerometer and stuff like that. Your software should just keep track of how fast your system responds to corrections. Its a classic servo loop you have to close and all well written about on the internet.

Its a great project.

Greg

hi
back in the 90s i did one, quite simple
1st: power only when brake pedal not depressed so best use both "not depressed" and "no brake light" to supply 12vdc. (2 inputs in series for safety)
2nd: use arduino
3rd: use small stepper that will have enough power when energized but return with the force of the throttle spring
4th: put a sensor on the speedometer cable or get an input from the speedometer to ecu signal.
5. add a pushbutton for latching the actual speed
good luck

Given , at the start you didn’t know how to connect the grounds , then I would advise you don’t do this project !!

Another necrothread resurrection...