Automobile Cruise Control Project

I'd like to develop an automotive cruise control using a 5.25" floppy stepper motor -- the general idea seems simple enough (particularly since I have no experience building computer hardware :wink: ) -- I'm a computer programmer who has also remodeled, rewired, and replumbed my previous house, so I'm comfortable with the overall project idea.
Has anyone already done this?

My general plan is to:
1 determine all the ways to instantly disconnect the device -- brakes, manual switch, etc.
2 build or obtain a clutching device that defaults to a physical disconnect.
3 figure out the interface required to interface with my tachometer signal or a single spark plug impulse (manual transmission, so I definitely don't want a speedometer connection!)
4 write or obtain arduino software to recognize current frequency of tachometer impulses.
5 modify arduino software to drive stepper motor to control throttle.

Bob.

Wouldnt you want to find vehicle speed instead of engine rpm?

You need to learn negative feedback and control mechanisms for the software part. There should be some stuff on the web or maybe on this site for negative feedback control algorithms.

Thanks for the tip on specific topics to learn -- they've been added to my research list.

Check out this article called PID Without a PhD

http://www.embedded.com/2000/0010/0010feat3.htm

Also a recent avrfreaks.net post has a PID control library

It is very unlikely that a small step motor will be able to operate the throttle of a car.
One of the several sub problems is to make a test rig to open an close the throttle with engine off.
Test the throttle with a fish scale to determine the force needed. That way you can be sure.

Also consider a DC motor with a pot for feedback.
Perhaps you can tap into the TPS which is a pot on the throttle shaft used by the Engine control computer.
Many older cruise units use engine vacuum to pull a cylinder for the throttle. Perhaps a junkyard trip is in order

If you keep the gear ratio low on the actuating motor it will return to idle by just removing power. Find a motor that you can spin the shaft by hand and test to see if the throttle return spring will back drive it.
Good luck

3 figure out the interface required to interface with my tachometer signal or a single spark plug impulse (manual transmission, so I definitely don't want a speedometer connection!)
4 write or obtain arduino software to recognize current frequency of tachometer impulses.

Bob, in the last couple of days I've been thinking about how to put together a robust datalogger for my car, capturing several engine parameters and interfacing with a GPS for position. Applications include (aside from generally geeking out) post track-day performance analysis, possibly lap timing (depending on the resolution of the GPS) and general position logging so I can go back and find those roads I loved on my last random drive through the countryside. Yesterday, I discovered the ELM323 OBD (ISO) to RS232 Interpreter. If your car was built after 1996 (I think), it's got a standardized on-board diagnostics interface which will tell you things such as throttle position, engine speed, and vehicle speed. It might save you some unnecessary hacking to pull back that data. I've bookmarked some OBD2 links on del.icio.us.

Good luck!
Brian

Just a few thoughts.. IF you go to any junkyard and look under the hood of a gm vehicle with cruise.. look for a black rectangle box on the firewall with a throttle cable attached to it.. Approx.. 4"X6"X2" Caprice,pickup truck,etc anywhere from 91's to 2004 probably has them.. when you get one, I can send you the schematics for the vehicle, but they are mostly the same anyways.. This will have all the hardware you want, including safety disconnect.. If your lazy, all you need is power,brake input,speed input and switch input to make it work, but you could still use an Arduino to run it if your looking to DIY.. This would give you a serious jump on the hardware.. I really don't think the stepper motor you describe is up to the task, there are usually 2 springs pulling on the throttle to close it and they have a bit of force..

An important part not to overlook is safety. Try to design your project so that it's intrinsically safe such that if there is a failure, make sure it fails in a safe state.

What happens if the micro experiences a hickup? What about noise on your signal lines? What if your micro ships with a stuck SRAM cell?

Address the inputs, outputs and include the software in between when considering failure modes.

In Automotive, the use sophisticated software and hardware safety mechanisms are used.

Wouldnt you want to find vehicle speed instead of engine rpm?

You can use either - assuming the tyres don't skid and there is no clutch slip there is a linear relationship between engine revs and speed on a car with a manual gearbox. It is different with an auto box.

You should monitor engine revs anyway and stop controlling when engine revs either change unexpectedly (clutch pedal depressed) or changes with no corresponding change in speed (skid, accident, flying over bridge etc).

This is an interesting project - one I have thought of doing many times. IMO, the hardware is the trickiest bit, so I would take the advice of seeing if you can get some hardware from a junk yard.

To the correspondent who suggested road speed instead of engine speed -- it's simpler and safer to have one interface that works, and by checking engine speed the only way to go wrong is if the idiot behind the wheel isn't in the gear used when establishing the initial 'speed'.
To the several folks who suggested going to the junkyard to pick up the actual throttle controller, my heartfelt thanks! That's definitely the way I'll be going -- with an Arduino board as the controller because it'll be more fun. I hadn't thought of the stepper motor as being so weak until I looked at the prices for more powerful stepper motors :slight_smile: Quick dose of reality there!

Thanks to all -- I'll be starting as soon as I get a little more time.

Bob.

To the correspondent who suggested road speed instead of engine speed -- it's simpler and safer to have one interface that works, and by checking engine speed the only way to go wrong is if the idiot behind the wheel isn't in the gear used when establishing the initial 'speed'.

Is this application targeted towards a manual or automatic transmission? Performance or Cruising?

Consider the cases when someone shifts into and out of gear. What happens? Is this the desirable behavior of cruise control? When someone is setting cruise, they are expecting to hold a constant speed, what makes RPM more attractive?

If you're using RPM, consider the VSS (vehicle speed sensor) because your pulse capture mechanisms will be very similar. Do you have any ABS sensors in the car you're trying to outfit this to?

Hey,
Sounds like a wild project. For fear of life and limb, I like the idea of starting by hopping up a golf cart and then perhaps do servo controlled steering too? wait... that's much more dangerous!

For what its worth, I've put a PID control application on the Playground that could be a good starting place. It's setup for temp control right now, but easily adapted.

http://arduino.cc/playground/Main/BarebonesPIDForEspresso

tim