Cruise Control Variable Resistance switches

Thread Starter

davidm2232

Joined Dec 31, 2015
21
I'm doing a TDI engine swap on a toyota 4Runner. The 4Runner uses variable resistance switches for cruise control while the TDI is expecting full 12V signals. How can I take the varied resistance signal and make three on/off outputs? I took a digital electronics class in high school but this is a bit beyond my expertise. Diagram of toyota switch is attached. Basically, I want to make three outputs from the G-Y wire. Ideally, they should be 12v outputs to the TDI ecu. I'm probably explaining this terribly so please ask me questions and I can answer them.
upload_2015-12-31_11-51-2.png
 

Thread Starter

davidm2232

Joined Dec 31, 2015
21
The main switch can be used as one of the 12v outputs. That should work as is, correct? I think I can change the white/black ground to a 12v feed fairly easily.
 

BReeves

Joined Nov 24, 2012
410
Happy new year..
Can you take the switch assembly apart? If so you can remove the resistors and add wires to the individual switches. If I read what you posted correctly you will end up with 4 or 5 wires. The 5th wire is the one at the bottom #1 which may or may not be needed with the CC module you are adapting it to.
 

crutschow

Joined Mar 14, 2008
34,283
If you can't (or don't want to) modify the switch as BReeves suggested then here is a circuit consisting of one IC and three transistors that, I think, will do what you want.

The LM3914 has ten internal analog window comparators that are normally used to energize a 10-segment dot/bar display in response to 10% step changes of the input voltage level, but here the outputs are selected to generate the desired signals in response to the three voltage levels generated by the three cruise control buttons energizing the resistive divider (Vg-y in the simulation below).

The circuitry inside the box on the left is to emulate the cruise control switch and the sequential pressing of the three buttons with values for the resistor string derived from your measured values.

Note the addition of external resistor R12 to the switch string to give the desired input voltage to the LM3914 for the switch being pressed. The voltage levels were selected to be near to the center of their respective comparator window to minimize the effect of resistor tolerance on the output response, and the LM3914 is operated in a ratiometric mode to cancel the effects of normal battery voltage variation on the comparator relative trip points.

The LM3914 outputs are low (sink current) when active so this is converted to a positive output signal voltage by the PNP transistors (which can be just about any small PNP device).
P-MOSFETs can also be used if the base resistors are moved to be between the gate and source (source connected to positive voltage and the drain being the signal output).
Two LM3914 outputs are OR'd together for each signal (either output low gives a output signal high) to double the effective width of the comparator window for each step and further minimize sensitivity to component tolerances.

As can be seen in the simulation plot, the closing of a particular cruise control button results in a corresponding 12V output (for example, V[can] PB 5V high (switch closed) gives V[cancel] output 12V high), as desired.

It is shown configured so that the MAIN switch powers the circuit (which is set to the closed position for the simulation).

Curise Control.PNG

Edit: See below for update.
 

Attachments

Last edited:

Thread Starter

davidm2232

Joined Dec 31, 2015
21
Wow, took me a while to digest all of that but I think I understand the basics. The "Main" switch is momentary, so short of building a latch into the system, I would say just put 12v key power to it. I can't re-wire the switches as suggested by Breeves as it has a single wire coming from the buttons on the steering wheel. When I was in school, I had access to the paper and acid tank to make a PCB. I no longer have that access. Would anyone be interested in printing/soldering/assembling the above circuit? I have no idea how much to offer. It looks like about $15 in parts but no idea how many hours in labor. If anyone is interested, let me know.

Also, i was looking at the LM3914. This might sound crazy and pointless, but could I use that to make a "KITT" style gas pedal?
 

crutschow

Joined Mar 14, 2008
34,283
So to bypass the MAIN switch just apply the 12V key power to the lead labeled W-B.

Does the new ecu have a cruise-control ON/OFF input? If so is that a steady signal or a pulse?


If by KITT style gas pedal you mean it sequentially lights the LEDs then, yes you could do that, if the gas pedal has a an output voltage proportional to the pedal position.

It's a fairly simple circuit. Just build it on a Vector type perf-board.
 
Last edited:

crutschow

Joined Mar 14, 2008
34,283
Below is an update to the circuit.

I removed the MAIN switch from the loop.

Also I added base-emitter resistors to the transistors to bypass any OFF leakage currents from the LM3914 and/or the transistors which could be problematic at the high vehicle temperature that can occur on a hot day.

And I realized that series resistors between the transistor bases and the LM3914 outputs to control the base current are not needed since the LM3914 outputs are a constant (sink) current, determined by the value of R1 as stated in the data sheet.
The value of R1 sets the ON base current to be about 1/10th of the transistor collector current (0.12mA) for good saturation of the transistors.

Curise Control.PNG
 

Attachments

Last edited:

Thread Starter

davidm2232

Joined Dec 31, 2015
21
What is the cd4017b used for? Is that simulation only? I'm going to order the parts and try my luck at this. I'm thinking get two of everything in case a screw up? Do I need a chip socket for the LM3914? So I am changing the common side of the switches from a ground input to a 12v? That looks like it will be easy enough to do.
 

crutschow

Joined Mar 14, 2008
34,283
Yes, the 4017 is for simulation purposes only. It generates sequential signals to turn on the simulated switches.

I reversed the connection to the switches so that the MAIN switch could be used to provide a momentary 12V to the unit if needed.

Two (or more) of everything is always good procedure. The cost of the part is usually much less than shipping costs.

Yes, I would use a socket for the LM3914. Eliminates the chance of damage from soldering heat.
 
Top