I am on a challenge to build a cruise control for under 30 USD. My car(chinese microvan!) has a electronic gas pedal (TPS=throttle position sensor). It has two pins that send a voltage from 0 to 5 volts to the engine computer. Here is the plan and what I need help with is at the bottom.
Read wheel/axle rpm with hall sensors(solved and coded)
Interupts for brake and clutch (solved and coded)
When I press "set" the arduino UNO R3 will read the TPS voltage, match it with PWM or ADC converter, Throw two relays to replace the gas pedal(TPS) signal with mine. Adjust voltage to maintain wheel RPM till brake/clutch/cancel input when the relays open and you are back to foot control!
My only problem is to make sure that the voltage I supply is tied to the same ground as the car. The cars computer system operates on a 5 v bus. The TPS supplie 5V, ground, two outputs and two more wires I am not sure of.
WHAT is the best way to tie my arduino ground to the car's computer ground. All of the signals are very low current.
walttheboss:
WHAT is the best way to tie my arduino ground to the car's computer ground.
By connecting a wire between the two of course, why?
That should be the easy part. The hard part will be to make sure that the cruise control (i.e. the gas pedal) will disengage 100% of the time with absolute certainty whenever it has to. So not only do you have to test your software very very well (using a proper test setup), you also have to test all our sensors very very well and make sure they are fully reliable.
You also will have to make sure your rpm sensor is 100% reliable as the last thing you want is it drifting and you suddenly start to speed up as your computer thinks you're slowing down and goes full throttle. A rear-end collision at highway speeds sounds like a recipe for mayhem.
Check with your automobile insurer before you start messing with the control system for a vehicle that is used in public.
IMHO if you have to ask questions about how to implement this project then you are not sufficiently expert to do it safely. I doubt if a real cruise control can be had for $300, never mind $30.
Electronic cruise control can easily be built for under USD 10 in parts. The rest is for software, testing, etc - the part OP won't include in his final cost.
wvmarle:
Electronic cruise control can easily be built for under USD 10 in parts.
Perhaps.
But when you buy a system you also pay for all the safety testing and the knowledge that you can sue the manufacturers if someone gets killed or injured because it does not work properly.
And it would be wise to check with Atmel to see if they approve their products for automotive applications.
Indeed.
As it's automotive I would guess they also have to go through some form of certification before it's road legal.
OP got himself a nice little challenge - but not likely it can be tested only on the track, not on the public road.
Thanks to all of you for your replies. I appreciate the concern. I am a mechanical engineer and Math and Science teacher. I will build in triple redundancy for cutoffs such as brake clutch over revving and accident avoidance. I will be the only one using it and will be super careful to do all the testing.
I will be counting engine RPMs and Wheels RPMs so that if either of them change too fast based on basic dynamics calculations the system shuts off.
I wouldn't attempt this on safety grounds .
When you say you have redundancy - is this multiple Arduinos and a voting algorithm ? Have you looked at fail safety ( e.g. Does the throttle driver always fail to close if a component dies ?)
As said if your car kills someone , you could be liable and be very poor for the rest of your life.
You're in a pretty sad moral state if the risk of being sued for damages is what stops you from risking killing other people. I thought it should be that you simple don't want to risk killing someone.
A cruise control is a great challenge, lots of interesting engineering aspects, but without third-party certification it's not something you should take on the public roads, period. Such experiments belong on the test track, in a car with independent kill switch (e.g. a physical button to cut the power to the fuel pump). There you work out the bugs, you do your stress tests, and when that's all done you can with a clear conscience say you did the best you could to make sure nothing goes wrong.
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.
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.
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.
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.
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!!