Arduino Automotive Cruise control questions

Hello!

I'm new to programming and Arduinos but I would really like to learn more about it.

I'm planning on making a cruise control system for my car.

My plan is to take the signal from the speedometer and use it to count the current speed. When I have a certain speed, i would like to press a button too keep the car at that speed with a servo motor attached to the throttle. If the frequency drops, the servo would open the throttle more until the frequency matches the set speed frequency. And of course also the other way around.

For safety, I would like to take the signal from the brake lights to turn off the system. And if it's possible to have two more buttons, one for increasing and one for decreasing the speed.

I've seen both Frequency counter library and Servo library that i think could be helpful.

Do you think that this project could work? Is the Arduino capable of counting the speedos frequency and also control a servo at the same time? Which Arduino board would you recommend me to buy for this project? I'm thinking about the Uno, Leonardo or the Mega but i don't really know the pros and cons.

What do you think?

Please notify me or move the thread if it's in the wrong category.

Sorry for my bad English, I'm from Sweden. Thanks.

It's certainly possible.

You will, of course, take the "fine print" into consideration:

Disclaimer: The information in this document is provided in connection with Atmel products. No license, express or implied, by estoppel or otherwise, to any intellectual property right is granted by this document or in connection with the sale of Atmel products. EXCEPT AS SET FORTH IN THE ATMEL TERMS AND CONDITIONS OF SALES LOCATED ON THE ATMEL WEBSITE, ATMEL ASSUMES NO LIABILITY WHATSOEVER AND DISCLAIMS ANY EXPRESS, IMPLIED OR STATUTORY WARRANTY RELATING TO ITS PRODUCTS INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE, SPECIAL OR INCIDENTAL DAMAGES (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS AND PROFITS, BUSINESS INTERRUPTION, OR LOSS OF INFORMATION) ARISING OUT OF THE USE OR INABILITY TO USE THIS DOCUMENT, EVEN IF ATMEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Atmel makes no representations or warranties with respect to the accuracy or completeness of the contents of this document and reserves the right to make changes to specifications and products descriptions at any time without notice. Atmel does not make any commitment to update the information contained herein. Unless specifically provided otherwise, Atmel products are not suitable for, and shall not be used in, automotive applications. Atmel products are not intended, authorized, or warranted for use as components in applications intended to support or sustain life.

Will the Arduino be mounted in the passenger compartment? If not, I'd go after a custom design that uses the Atmega328P-15AZ which is rated over the widest temperature range.

http://www.digikey.com/product-detail/en/ATMEGA328P-15AZ/ATMEGA328P-15AZCT-ND/2477177

I would ensure it disconnects when the clutch pedal is pressed also, or somehow check that the car is in the proper gear.

Perhaps even look at commercial kits as a strating point to make installation more straightforward. http://www.jcwhitney.com/cruise-control-kits/c20224j1s17.jcwx

http://www.dakotadigital.com/index.cfm/page/ptype=results/category_id=477/mode=cat/cat477.htm

These two things do not fit well together:

I'm new to programming.

I'm planning on making a cruise control system for my car.

Even if you were an expert in coding and electronics and had hardware that was certified for use in automotive applications, it would still be a terrible idea. Bugs in the code could make you a danger to yourself and others.

As a practical concern, such a modification to your vehicle would likely render your insurance invalid.

There are plenty of safer fun things to do with an arduino.

Thanks for the fast replays!

The tip with the 328P-15AZ circuit was great, thanks! I didn’t know that arduinos wasn’t recommended to use in automotive applications as I’we seen the MPguino’s an such. Thanks.

I understand that it might not be 100% reliable to use in traffic.

My car do have a 2cyl 550cc diesel engine that produces about 12hp - 30Nm and it uses a CVT type transmission, therefore the clutch sensor won’t be needed. I thank you for the tip anyway!
And on top of that, the car is Registrated with a top speed of 45km/h.

I see it more like a system that makes it easier for me to drive in my legally 45km/h. And also a system to limit the speed on the car. I know that this sounds silly but with my 12whp i almost keep up with the rest of the traffic if I want to (Not on highways tho).

The second, and probably the most important, thing this Arduino setup would allow me to do is to limit the top speed to about 55km/h by coding a program to trigger a relay at a certain frequency. The relay will cut the power to the stop solenoid on the engine and act like a speed limiter.

Then i thought I could implement a cruise control system at the same time so i can rest my foot once in a while while driving around in 45km/h.

I appreciate your comment about that it could be unsafe, and I am aware of that it could be very unsafe many times if it goes wrong. But in this case I consider it relativly safe. But anything could happen, you never know.

But in this case even if the Arduino bugs and let’s say it will open the throttle max, the car would not accelerate very much until I’m aware of it and can safely turn the key off and stop at the side of the road. It would’ve been different with a normal car that could top 180km/h. You feel very safe at 45km/h.

And the board will probably be placed in the passenger compartment.

  1. Which board would you recommend?
  2. Could you use both the frequency counter library and the servo library at the same time? Don’t they use the same timers?
  3. Is there anything negative with the leonardo compared to the uno?

If i can’t get it to work with a Arduino i will buy a shiftlight and take that signal to cut the power to the stop solenoid. I think it would be better with a Arduino to do that tho. And Much more fun!

I like all kinds of critique :slight_smile:

  1. Any 328P based board is fine - I'd go with promini to be small, with an FTDI Basic for programming.
  2. There 6 timers, I am sure a compatible method can be developed. After all, 12 servos can be run at one time, so one servo and one freq counter shouldn't be too hard.
  3. Leonardo vs Uno - easier to migrate to standalone with '328P vs 32U4 with no USB stuff go get in the way.

My car do have a 2cyl 550cc diesel engine that produces about 12hp - 30Nm

Isn't that more of a small motorcycle with a seat and doors? I haven't driven anything that underpowered since my '67 Beetle that only had 3 cylinders working at times!

(Wow, I need to proof read a little more before hitting send - that last post is full of errors!)