Switch analog signal going to car ECU to DAC-generated signal

Thread Starter

Kamool

Joined Dec 9, 2018
18
Hello,
I'm working on a project where I'd like to switch the signal from the car's throttle sensor to my DAC-generated signal going to ECU. CAR throttle sensor input signal is created using a potentiometer or hall effect sensor, so to simplify that I'm working with such cases:
1717934344247.png

Now I would like car to use either its sensor value or my signal so I have to switch between these two signals. I'm not talking about ordinary relays because I find them to slow in switching for that application(I'm looking for <5ms switching time). Then first option I see is using solid-state relay like AQW214EHAX:1717934435073.png
How is CAR_ECU input pin treated in that case? Is that a capacitive or resistive load? In mose MCUs datasheets I can find input pin capacity, so I guess it's capacitive? I'm a bit worried about leakage current and that it might mess with CAR_SENSOR_SIGNAL even when DAC_GENERATED_SIGNAL should be disconnected and vice-versa.
Second option I see is using reed relay - proper signals separation, but it shouldn't be used with capacitive loads (I found that information online):
1717934520818.png
Third option is using analog switch:
1717934542230.png

Of course these are just simplified circuits not taking into account that CAR_SENSOR_SIGNAL and CAR_ECU should be on NC channel, while DAC_GENERATED_SIGNAL should be on NO channel. I would like to figure best way to deal with switching these signals. What do you think about this approach?

Also there will be small delay when one signal is switched OFF while second one is still switching ON, so let's say that's 0.5ms. How can I ensure that in this brief moment voltage on CAR_ECU pin won't drop to 0? Some RC circuit in line with that pin?
 

LowQCab

Joined Nov 6, 2012
4,314
The question should be .............
What do You expect the result will be of trying to "fool" the ECU ?

This will not improve Engine performance in any way.

Doing this modification will simply result in poor Engine response, and possibly a "Check-Engine-Light".
It will also mess-up the Shifting of an Automatic-Transmission, ( if You have an Automatic ).
.
.
.
 

Thread Starter

Kamool

Joined Dec 9, 2018
18
I would like engine to use my DAC-generated signal as if it was reading throttle pedal.
It’s for a track-racing car project, where I would like to add auto rev-matching on downshifts, that’s why I need quick signal switching (mechanical relay is a no-go).
So sqeuence is as following:
1. Disconnect car throttle signal from ECU.
2. Connect DAC output to ECU (of course through some kind of buffer).
3. Run DAC to apply correct amount of throttle for a specific time.
4. Disconnect DAC from ECU.
5. Connect car throttle signal to ECU.

Obviously I would like to avoid check-engine to avoid limp mode - that’s why I’m asking for some kind of keep-the-signal circuit between signal source changes.
Also in case od hall effect sensor I would need some back-current protection for situation when DAC is already connected to ECU and Throttle signal is not disconnected yet.
 

JohnSan

Joined Sep 15, 2018
42
I created something similar a few years ago.

DAC used was MCP4725 attached to an Arduino Pro mini.

Arduino ADC inputs are 10 bit.
The DAC module is 12 bit.

But I would use an ESP32 variant these days....
It has 12bit ADC and 8 bit DAC on board.
If 8 bit is not enough, add the MCP4725.

Do the 'switching' in the MCU.
(Select which signal to route through to the DAC).
It takes 'no time at all' then.
 

LowQCab

Joined Nov 6, 2012
4,314
Please make clear what the purpose of your project is, right from the start,
it will save a lot of time and confusion ...........

The Micro-Controller-Route controlling everything is the way to go.

You may want to experiment with placing the Electronic-Throttle ahead of the Compressor,
instead of between the Compressor and the Manifold.

I haven't tried this, but in theory, running the Compressor under a vacuum will remove
almost all of the "Load" that it normally creates, which is always fighting against the Turbine.

This will keep the Turbo RPMs up during low-Load conditions.

In fact, it may be a good idea to keep track of the Turbo-RPMs to make sure that the
Turbo doesn't "over-speed" and explode.

Less "Fuel-Dumping" may be required.

Now, as to whether or not this will have the exact desired effect that You are looking for,
I can't make that statement from experience in this particular case.
But it will, at the very least, reduce Turbo-RPM-Reduction during closed-Throttle-conditions.

~1200-PSI Water-Injection-Fog fixes damn near everything in a Drag-Car-Engine,
and will do it on ~87-Octane Regular-Pump-Gasoline,
at a casual ~13:1 AFR,
and, do it with a ~14:1 Compression-Ratio and ~30-Pounds of peak-Boost,
which equates to excellent Fuel-Mileage ( +~15% ) for casual cruising.
And the allowed Compression increase adds around ~5% more power, evenly, across the entire RPM-range.
The Water-Injection isn't useful under around ~50-kPa,
and is regulated to roughly ~50% of calculated-Fuel-Flow,
and is introduced directly into each Intake-Runner.
Water-Injection also reduces Turbo-Spool-Up-Time, and reduces all Operating-Temperatures.
A "Conservative-Tune" produces in excess of ~1000-lbs/ft of Torque from 3000 to 7500 RPM,
from ~427 Cubic-inches,
with Boost exceeding Exhaust-Back-Pressure under all conditions.

You may find the below Schematic interesting, it hasn't been built yet,
but it has been extensively simulated in Software.
.
.
.
ETC Electronic Throttle .png.
 

Thread Starter

Kamool

Joined Dec 9, 2018
18
But I would use an ESP32 variant these days....

...

Do the 'switching' in the MCU.
(Select which signal to route through to the DAC).
It takes 'no time at all' then.
That's what I would like to avoid - I would like to have that "disconnected" state and change signals only when needed. It's a DIY project, so anything can happen with the board really, and having a dead DAC, OP-AMP acting as a buffer, or the whole board might cause me to crash or just not be able to add any throttle. Switching signals just during down-shifts lowers the chance of unexpected behavior and even with fried board, I would be able to continue to race.
Do you know any existing circuit/schematic/layout that can help me power ESP32 from the car's 12V circuit? LDO won't be enough because of the power it needs to dissipate while WiFi is on, and I'm a bit worried about the buck converter with DAC on board. Maybe buck for 12V -> 5V and LDO for 5V -> 3.3V? I never designed a buck converter circuit, so I don't know proper parts placement for acceptable performance.


Please make clear what the purpose of your project is, right from the start,
it will save a lot of time and confusion ...........

The Micro-Controller-Route controlling everything is the way to go.

You may want to experiment with placing the Electronic-Throttle ahead of the Compressor,
instead of between the Compressor and the Manifold.

....

You may find the below Schematic interesting, it hasn't been built yet,
but it has been extensively simulated in Software.
Sure, I should have made that clear from the beginning. I'll do better next time :)
As for running everything through the microcontroller I mentioned above why I don't like that solution.
Also, I don't have to think about adding an electronic throttle because it's already there. I would like to work with the existing solution that is already in the car
 

JohnSan

Joined Sep 15, 2018
42
Well that's a jump.

Initially worrying about a relays switching time...
.. to worrying about Wifi power requirements.

Where did that come from?

Sufficient testing needs to be done to be confident that any hardware failures will be extremely low before it gets used on a car being driven, let alone for 'racing'.

The unit I made fitted into a box, not much larger than a 15 pin D type plug shell housing.
A second D type plug was made with just links in. The 'dummy' plug.
The links just shorted the relevent pins on the socket inputs to outputs, to enable a quick move back to standard.
It could't be done 'hot', but gave a useful solution if re-programming was needed or if a failure did occur.
Just unplug the module and replace it with the dummy plug.
Carry on driving.

The power supply was picked up from one of the sensors which were being used.
Many car sensors are on a 5V clean supply and have an analogue output of 0.5 to 4.5V
So the 5V was used for the Arduino and DAC power.
The MCP4725 DAC has a rail to rail output so can clone the original signal.
It is also possible to simulate failures by sending a value below 0.5V or above 4.5V
Very useful if you know how the ECU control will respond.
 

Thread Starter

Kamool

Joined Dec 9, 2018
18
Initially worrying about a relays switching time...
.. to worrying about Wifi power requirements.

Where did that come from?
A few years back I tried to design a circuit with LDO-powered ESP32 with 12V power. It failed because of power that needed to be dissipated on LDO while in BT or WiFi mode. I didn't think about powering the board from sensor 5V because I didn't want to mess with sensor power as well, I used switched 12V which is common in car electrical circuits. The idea of a "dummy" plug is something I've done in the past several times. Also, MCP4725 part is understandable to me.

Going back to the original question - which type of switch will work best in that situation? For SSRs, I'm worried about leakage current, for Reed/Signal relays I'm worried about the capacitive load, for analog switches I'm worried about everything because I never worked with them. Regardless of the solution should I use buffer (OP-AMP) before or after the switch?
 

LowQCab

Joined Nov 6, 2012
4,314
Get a better Transmission, or run an Automatic-Transmission like I do.

Yes I know it's complete blasphemy to utter such words,
but my 4L80E-Automatic does exactly what I want at all times,
and will do it Automatically, or with Paddle-Shifters, or with a floor-mounted Ratchet-Shifter,
and it scoffs at 1500-Horsepower all day.
So what if it weighs ~200-pounds, it's low, and in the middle, so I don't care if it's heavy.
And I never have to lift for a shift, up or down.
And it shifts-smooth at part-throttle.
My Ricky-Racer-days of speed-shifting a screaming 4-banger were long past done ~40-years ago.
It's amazing that I'm still alive.
.
.
.
 

LowQCab

Joined Nov 6, 2012
4,314
To get what You want to actually work as precisely as You need is extremely difficult.
The best solution is to change nothing, and have your synchronizers replaced once a year.
And I'm not joking or being a Smart-A**.
If your Transmission can't take a high-RPM down-shift,
it's time to look for a Transmission better suited to racing conditions.

I used to have hilarious conversations with my son about this,
he was a total die-hard, "Real-Men-Shift-their-Own-Gears", kind of a guy,
and on one hand, I totally get where he's coming from,
I spent many (poor) years driving a "Rat-Rod" Datsun-Pickup-Truck with a sawed-off shift-lever ( ~6-inches )
and used to thrash that truck, unmercifully, over and over again, until I finally broke the Crankshaft in half.
The synchronizers would always grind from the day I bought it, until it died, but it never broke the tranny,
even with ~8000-RPM downshifts.

Then I got a used Camaro with a Turbo-400-Automatic-Trans with a full-Manual-Valve-Body,
now I wouldn't even consider owning a Manual-Transmission Car or Truck.

Tip: never use the Engine for Braking, only use the Brakes for Braking,
and while you're braking, take more time, and even pressure, putting the Trans into the next lower gear,
the extra time to get the Clutch-Disc up to speed is what will save your synchronizers.
Spend as little time in neutral as possible, spend more time firmly "pushing" into a lower gear.
Using the Engine for Braking will ultimately make You slower, even f it is "fun".
You don't have a "Dual-Clutch" Transmission so you'll just have to make some realistic compromises.
Getting the Engine to instantly match RPMs with the Clutch-Disc is virtually impossible,
and highly problematic for a variety of other reasons.
That's why the Dual-Clutch-Transmission was designed,
and they're still working-out the bugs.

I originally thought that Your Thread was about maintaining Turbocharger-Boost during shifts.
That's something that is doable and practical.

Sorry, but I can't help You any further with this particular endeavor.
In my opinion, You are wasting your time, and You might break something expensive while doing it.

I hope You found my reminiscing entertaining.
Good-Luck.
.
.
.
 
Top