Question for you: What is the maximum authority of that cruise control system? I mean, if your control algorithm messes up or a wire falls off or whatever, and the control goes to its mechanical end stops, how much throttle are you going to get? My guess is that if you have enough authority to maintain cruising speed there's going to be a lot of throttle there, enough to get you into a lot of trouble if this thing throws a wobbler while you're driving.The alternative approach of putting an idle control valve on it, feels like a much safer bet to me. In fact, I think it's pretty certain that you already have an idle control valve since it's obviously a modern vehicle.
For the tach signal, you could put a magnet on the compressor pulley and determine rpm with a Hall Effect sensor. The other choice would be to use a Schmidt Trigger to get a square wave from your spark coil trigger circuit. Ideally, you need feedback from your throttle control, otherwise it will be difficult to regulate the throttling up and down. Without feedback you will probably get off-on type response instead of a percentage type response.
If it's only to be used when stationary then the only risk would be bouncing the engine off the rev limiter, which I assume you're happy with. (There's no reason to expect any great harm from that as long as you don't leave it like that for more than a couple of seconds.) You still need to ensure that there's no way for the idle control system to engage when you're driving. (On some systems, simply switching off the electrics isn't enough and the idle control valve has to be positively driven to a 'rest' position since they can creep over time if left powered off with the engine running.)The existing crank and cam position sensors will probably be MVR sensors. These produce a low voltage pulse as a metal tooth goes past the magnetic sensor. The signal from these is highly speed dependent and there's a risk that by putting another A/D on them in parallel with the one inside the ECU, you could pull the signal down to the extent that the ECU has trouble detecting the signal during cranking. Detecting the RPM off the ECU's tacho driver output would be 'safer' (from the point of view of possibly interfering with the operation of the ECU), if your ECU provides one. If the tacho is driven directly from the ignition low tension circuit then it's also possible to get an RPM signal off that but you'll need to do more work to clean up the signal, either in a hardware filter or in software.I suspect you will find the engine can be provoked into idle instability if you use a simple proportional control algorithm as you describe. I recommend using a PID control algorithm and play around with the PID components until you get a stable well-damped engine response.
There is a PID library or code in the "playground" I believe. One suggestion, fuse every connection that might hurt your vehicles electrical. By that I mean if you need 2 amps put in a 2amp fuse and not a 30. Your first test or two may not go right on the first try.
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16