0

I plan to implement a cruise control system on my old car using an arduino, using info from the speed sensor it will control the gas pedal etc..

I know I known, safety first.. I will be doing a lot of testing and adding a safety button to make sure I can fully disable this system

Still.. if something goes wrong I'm thinking the worst than can happen is to get full throttle stuck. My car is manual so if for some reason it happens I can press the clutch and cut the engine power to the wheels. But... as for my knowledge the braking system uses the engine vacuum to help me brake, my question is, if I have the throttle full open with the engine revving at the limiter will I still be able to brake just fine or will have trouble because the vacuum in the manifold is reduced

Thanks

  • When you are driving normally what happens... – Solar Mike Jan 7 '18 at 14:11
  • 1
    What do you mean? When Im driving normally I usually don't floor it and brake ate the same time – lazyy001 Jan 7 '18 at 14:15
  • If you brake hard at say 80mph on the motorway, does the engine go to idle instantly? – Solar Mike Jan 7 '18 at 14:18
  • 2
    I suggest you buy an after-market solution as it will be safer for us... – Solar Mike Jan 7 '18 at 14:20
  • 1
    Brakes will not be enough to overcome the accelerator! This is a staggeringly dangerous idea! You'll rapidly overheat your brakes! Also, in some countries, your mods may actually be illegal until assessed. – Rory Alsop Jan 7 '18 at 17:29
2

Firstly, I would strongly disrecommend against building a cruise control unit for your car, without having experience and completely knowing what you're doing; overriding the throttle with a self-made construction may very likely cause your 'unaware' engine system to get unstable. Because it is not familiar with your construction, it will most likely try to compensate for it, go to limp mode, and throw all kinds of errors. But if you're determined to go through, here's my advice.

Learn about PID's and plausibility checks
Cruise control mechanisms make use of a PID: a Proportional Integrating Differentiating controller. This is a software closed loop system that applies more or less throttle depending on the vehicle's speed. It tries to keep the speed constant. The problem is that this system has to be very robust, i shouldn't be so that one glitch in the vehicle speed sensor triggers a full throttle, because your loop thinks it has to compensate that glitch. You would get a very unstable system. So, you have to do a lot of filtering and plausibility checks in your software. I recommend to google and learn about PID's, the Ziegler-Nichols method is a good start to get familiar with the PID. Try to find a program where you can test with a PID. There are some Excel's available online that can help you. You'll see that it's very easy to get a unprotected system unstable.

You can think for yourself that it would be silly to fully depress the accelerator if you see that the speedometer suddenly reports 0 mph.(because it's broken) Software doesn't think like that. That's why there are loads of plausibilty checks needed before the software gets to depress or release the accelerator. Familiarise yourself with the term plausibilty checks and system robustness and you'll understand what i'm talking about.

Implement failsafe mechanisms in your design
In reality there are numerous fail safe mechanisms used; obviously the cruise control disables when either the clutch or brake pedal is used. Mostly shifting gear also disables the system. It's wise to put a switch on your dashboard that cuts off all your self-made wiring so that the engine system falls back to the state it would be entirely without your construction.

Engine management is made extremely robust, so chances are your engine management picks up the tasks you did override, and resumes without further problems. It's still dangerous though.

Get a full understanding of the brake booster
Regarding your question about the brake booster, at full throttle manifold vacuum falls to (near) 0. There's a vent on your booster to prevent air goind from the manifold to the booster. A charged booster allows you to brake 2-3 times after vacuum has been lost. If you ever get in a situation where your engine fails at high speeds and you lose vacuum, brake firmly(after checking your surroundings) and try to let go of the brake pedal as little as safely possible. Each depression of the brake further depletes the booster. Keeping the pedal pressed and still doesn't deplete it further.

The more closed/unpressed your accelerator is the higher the vacuuum, and the higher the rpm is the higher the vacuum. And vice versa. You can see it as a function Vacuum: V = - throttle% * rpm. (it's more complicated in reality) Check your manifold pressure while revving with an OBD scanner to get an idea.

Test with baby steps
If you're determined to try out your construction, i'd recommend to first extensively test it in first gear and not on public roads. In 1st gear, the engine won't be able to get you any faster than ~50km/h.

  • Hi @Bart, the car has a drive by wire accelerator all I plan to do is to intercept the wiring that goes to the ecm and control it with some variable resistor electronic. When the CC is on it won't be any different from me pressing the pedal to keep a steady speed. – lazyy001 Jan 8 '18 at 14:22
  • Thank you on the feedback on how to implement this. Most important thank you! for answering my main question, whether or not I would still have vacuum on the booster to help break at least once if the engine is at wide open throttle – lazyy001 Jan 8 '18 at 14:22
  • +1. I'd also like to add that PID controller has several tunable parameters, and tuning a PID controller is not a trivial task. There is overshoot, oscillation, etc. that needs to be avoided. Yet another reason to use a well-tested existing solution in this safety-critical application. – juhist Jan 8 '18 at 15:08
  • @lazyy001 So you plan to let your controller mimic your foot, instead of directly controlling the throttlebody? If done right, that may prevent errors from happening, but your accelerator isn't directly wired to your throttlebody. So your controller will have to deal with the ECU conditioning the signal you hijacked. And you don't exactly know how the ECU deals with the accelerator input. It won't react simply linearly. It may react unpredictably if you fire 'unhuman' signals at it. Let's say your controller unintentionally generates a step signal, the ECU may react with an error, or worse. – Bart Jan 11 '18 at 21:32
  • And @juhist also is right about the complexity of PID's, especially if you have to take into account the ECU's response. And the ECU is a black box for us here. It will most likely have a 1st or 2nd order proces for conditioning the accelerator input signal. If you don't even know the formula's used, it's very hard to create a PID that will manage to push a signal through that, while keeping a stable end response. And if you can, it will be a very slow system. I recommend to learn about 1st and 2nd order processes before proceeding. – Bart Jan 11 '18 at 21:38
3

To answer your question, it depends on the vehicle. If the vehicle has a lot of horsepower, it can overcome the brakes at high speed. As I stated in the comments, create a fail safe switch which will shutdown your system and allow you to gain full control of your vehicle. If you have a runaway situation where the vehicle goes to wide open throttle (WOT), kill your add-on system first, then press the brakes. Panic braking against a rogue throttle is not going to do you a bit of good. Think safety first for yourself and especially those around you. If you are unsure of your arduino prowess, don't even attempt this in the first place.

  • I actually very much disagree about brakes vs engine. See my answer if you'd like to start discussing it – Hari Ganti Jan 8 '18 at 3:22
2

If I read your question correctly, you're really asking about how a brake booster works. I can tell you I've noticed a difference in braking in my manual when the RPM is higher (producing a stronger vacuum) than when it's lower, but consider the ultimate case: No engine vacuum. Do you think you could apply the brakes when the engine is off and have the car stop?

Yes

As you mentioned, you can cut engine power to the transmission via the clutch (and for my automatic f[r]iends out there, shifting to neutral is largely equivalent), so we can really ignore the question everyone else has been discussing. It really doesn't matter if your brakes can overpower your engine.

However, I did recently look at brake horsepower vs brake horsepower. In a 2014 Corvette Stingray Convertible, with a 60-0 distance of 90ft, based on the curb weight of 1500kg and assuming a linear deceleration (which will actually set a minimum on the braking power), we get a braking time of ~2 seconds. The kinetic energy of the vehicle is ~546kJ. 546kJ dissipated in 2 seconds is 273kW or around 360 HP. The vehicle, at peak, makes about 460 HP, so it's quite possible for you to be operating in 5th gear on the highway, at 2500RPM, when suddenly the throttle flies wide open. Your engine is now producing peak power at 2500RPM and will, somewhat slowly because of the suboptimal gear selection, accelerate. If you realize this by the time you get to 3000RPM, your engine will only be producing ~200 HP (if you're in the Stingray). It's probably wrong to assume this analysis is 100% accurate, but it still shows that you're unlikely to be in a situation where your engine will significantly overpower full brake application.

Your brake booster is simply a way to make it easier to fully apply the brakes. They don't increase the maximum braking force.

That said

I think this is a terrible idea and, if you live in the US, is probably illegal too. If you developed a CAN/OBDII compliant device that interacted with the other ECUs in your car, then I might think otherwise, but I don't really think this is a good idea. If you decide to proceed, keep it off public roads, please.

  • Hi, as I understood from your answer a 300+ engine will still be able to break, mine as 100hp at 5900rmp at highway speed will be something like 50hp etc but it doesn't matter, as you said I can press the clutch... My real question was whether or not the engine at full throttle will mess with the breaking system and as I understood no. I knew a lot of you would say not to do it but really fail to see a scenario where this will be super super dangerous... Anyway this just a raw idea maybe there is a best solution I have to do seach yet – lazyy001 Jan 8 '18 at 11:24
  • It may not mess with the braking to be at WOT, but it definitely won't be healthy for your engine to be at WOT under no load for any extended period of time, I'd be careful along with thinking safety of yourself and the people around you, to also think about the safety of the components of your car – Ceshion Jan 8 '18 at 16:19
  • @lazyy001 My example pulls from possibly the best 60-0 braking distance, so, as always, your mileage may vary. In general, however, your brakes are likely capable of overpowering the engine. You mention you can't see a scenario where this is super dangerous? What happens if the Arduino pin suddenly latches high and your throttle flies open? Residual capacitance could easily keep the voltage high even with a kill switch since it's just a signal, not power transmission application. Consider (as I once dealt with) a faulty clutch master or slave cylinder. Now you've got a problem. – Hari Ganti Jan 8 '18 at 19:27
  • @HariGanti Yes things can fail, we can make it very unlikely to happen but still.. – lazyy001 Jan 8 '18 at 21:13
  • ignore the comment above, I hit enter before finish writing... – lazyy001 Jan 8 '18 at 21:23
0

I'd like to join others that have many times told you this is a really poor idea. If you want to still proceed with your idea, @Bart has the best possible answer that could be given.

However, one thing to note is that the system should disable itself automatically whenever the brake pedal is pressed, in addition to having a separate kill switch. At least the adaptive cruise control in my car is automatically disabled whenever the brake is pressed. So, two kill switches: the brake pedal and the separate kill switch.

I would not drive a car or be as a passenger in a car that has cruise control yet lacks this all-important feature.

If you find you are unable to detect application of brake pedal, stop right there! Get instead another car where you are able to detect the brake pedal application, or better yet, a car that already has an existing or aftermarket cruise control available.

Consider adding the possibility to disable the system as well when switching to neutral or pressing the clutch. If you cannot detect these otherwise, you should be able to monitor the engine RPM and how fast it increases and decreases. If the changes are rapid, chances are gear is in neutral or clutch pedal is used.

And as for your question: if there's even a minor vacuum leak in the brake booster system, you will have no brake booster when the engine is at wide open throttle. If the clutch pedal is not depressed and the gear is not in neutral, you are fighting against the full power of the engine, with no brake booster. A truly bad situation.

0

This sounds like a terrible idea.

The brake booster is just one problem. I don't think your ecu is going to like you intercepting and modifiying the throttle plate position one bit!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.