# Generating pulses from linearly varying resistance

Discussion in 'Electronic Basics' started by Ed, Nov 11, 2005.

1. ### EdGuest

A part called the "throttle switch " for the early Jaguar V12 is no longer
available. Its main
function is to generate extra pulses to the fuel injection system when the
accelerator is
quickly pressed. The switch is mechanical, attached to a rotating shaft
attached to
the throttle capstan. A path to ground as makes and breaks as a rotating
contact arm
slides along serrated copper anth on a small circuit board. So basically, it
can be thought of
a switch that opens and closes 10 or 12 times (I've forgotten which, but I
can look it up)
as the throttle moves from idle to full open.

Later models of the same engine have a different electronic control unit
(ECU) which relies
on a throttle potentiometer instead of a switch. For several reasons it is
not practical to
switch to the newere ECU, but the thought has occured to me that I might be
able to
use the newer throttle pot to replace my switch. Mechanically, it fits
exactly in place of the switch.
All that would be required is a circuit that takes the linearly varying
resistance from the pot
and generate outputs that simulate the 10 (or 12) closures of the mechanical
switch.

I'm not prepared to launch this effort immediately, as I'm not sure current
running problems
are due to the throttle switch, but I would like to here some ideas on how
to approach this.

TIA

Ed

2. ### Tim WilliamsGuest

So you don't need the pot for anything but the extra injector pulses?

I don't think it would be too hard. First off you set up the pot to give
voltage as a function of position, then differentiate the voltage (with a
capacitor and resistor) to get rate of voltage change. This can operate a
multivibrator which supplies the required pulses, synchronized to crankshaft
rotation if needed.

Tim

3. ### EdGuest

Thanks, Tim.

Don't think so. I believe that the ECU needs only the pulses and indications
of idle and
and full throttle conditions.
So when the throttle is not moving the rate signal is zero and the
multivibrator is
not generating any pulses. Would the multivibrator pulse frequency be higher
when the rate of voltage change was higher?

Could a 555 IC be used as the multivibrator? I'm somewhat an amature, but
I have built some circuits using it.

ignition here.

Thanks again.

Ed

4. ### Tim WilliamsGuest

Ok, then you can commit the pot to your circuit.
You could do that, or you could just gate the pulses, so more pulses come
out when the dV/dt is higher- whatever you need.
Sure. Or you could use two transistors, or an op-amp, or a whole PIC...
Well, as I understand it, it's rather pointless to have the injectors
squirting against closed valves.

Unless the computer does later processing on the pulse signal.

Tim

5. ### EdGuest

Tim,

Don't understand... what dos "gate the pulses" mean?
This is a very early FI system. Although there are 12 injectors they fire in
groups
of 6, 3 on one bank and 3 on the other. These are indeed synchronized with
crank
position, so that a few cylinders are getting pulse a bit early and a few a
a bit late.
Anyway all of that is handled in the ECU, driven off a trigger in the
distributor.
The pulses generated by the throttle switch are extras, just enriching the
general
mixture in the manifold at the moment you hit the pedal.

Thanks again.

Ed

6. ### John FieldsGuest

---
So it sounds like you want something to generate 12 pulses as the
accelerator goes from idle to full open.

From your description of the switch it doesn't sound like the thing
needs to be conscious of how quickly the accelerator is pressed, it
just needs to output a pulse at each of the 12 switch points when
the accelerator is moving away from idle, true?

If that's true, then by far the easiest way to do it would be to use
a microcontroller with an on-board ADC.

Program a lookup table in the µC with the switchpoint voltages,
wire your pot like a voltage divider and scale its output to be
compatible with the µC ADC input, and keep track of whether the
input voltage is increasing or decreasing and whether it's equal to
the switchpoints in the LUT. Y pu can do both by monitoring the
output of the ADC and comparing it with the magnitude of the
previous switchpoint acquired. If the magnitude of the current
switchpoint is greater than the magnitude of the previous
switchpoint, output a pulse. If it isn't, then don't.

It sounds that since ground is what's being made and broken and it's
being done with a mechanical switch, you're doing low-side
switching, so I'd use a logic-level N-channel MOSFET with a low
channel resistance to simulate the device that's doing it now.

7. ### EdGuest

Thanks, John.

That's correct. There should be more pulses per unit time if the throttled
quickly, which happens naturally in the existing device.

The only state the current device is aware of is which direction it's going.
A little backlash is built in between the throttle shaft and the wiper, and
there's
a double sided switch with some friction that tends to stay with the shaft.
Which
side of the switch is closed is indictive of the current direction. It is
used to
ignore the rotating switch during decelertion.
Sounds neat. I've never done anything with microcontrollers, but guess I
could learn. I'm aware there is PC based software for programming them.
Thanks again.

Ed

8. ### Tim WilliamsGuest

Holy shit John, I *joked* about using a PIC, you can't possibly be a real
professional and say this with a straight face!?

Tim

9. ### Jasen BettsGuest

run the signal from the pot into a DAC and adjust the circuit to give
whatever number of transitions on one of the DAC outputs,

it might be simpler to use a disc with holes drilled in it and an optical
sensor.

Bye.
Jasen

10. ### John FieldsGuest

---
Sure, why not? It's the best solution for the problem, which is to
generate a single pulse at 12 different accelerator positions when
the accelerator is moving _away_ from idle, but to generate none
when it's moving back toward idle.

To do it in hardware and get the same functionality you'd have to do
something like this:

V+
|
[RT]
VREF | +-------+
| V+ V+ +---|TH OUT|-->OUT
[R1] | | | |_ |
| [100K] [10K] +--O|D |
V+ +----|+\ | | | |_ _|
| | | >--+--[0.1µF]--+------|--O|T R|O--V+
[POT]<--+----|----|-/ | | +-------+
| | | V+ | [CT] 555
GND | [R2] | | |
| | [100K] | GND
| +----|+\ | |
| | | >--+--[0.1µF]--+
+----|----|-/ |
| | V+ |
| [R3] | |
| | [100K] |
| +----|+\ | |
| | | >--+--[0.1µF]--+
+----|----|-/ |
| | V+ |
| [R4] | |
| | [100K] |
| +----|+\ | |
| | | >--+--[0.1µF]--+
+----|----|-/ |
| | V+ |
| [R5] | |
| | [100K] |
| +----|+\ | |
| | | >--+--[0.1µF]--+
+----|----|-/ |
| | V+ |
| [R6] | |
| | [100K] |
| +----|+\ | |
| | | >--+--[0.1µF]--+
+----|----|-/ |
| | V+ |
| [R7] | |
| | [100K] |
| +----|+\ | |
| | | >--+--[0.1µF]--+
+----|----|-/ |
| | V+ |
| [R8] | |
| | [100K] |
| +----|+\ | |
| | | >--+--[0.1µF]--+
+----|----|-/ |
| | V+ |
| [R9] | |
| | [100K] |
| +----|+\ | |
| | | >--+--[0.1µF]--+
+----|----|-/ |
| | V+ |
| [R10] | |
| | [100K] |
| +----|+\ | |
| | | >--+--[0.1µF]--+
+----|----|-/ |
| | V+ |
| [R11] | |
| | [100K] |
| +----|+\ | |
| | | >--+--[0.1µF]--+
+----|----|-/ |
| | V+ |
| [R12] | |
| | [100K] |
| +----|+\ | |
| | | >--+--[0.1µF]--+
+----|----|-/
|
|
[R13]
|
GND

Not bad, but with four chips, 27 resistors, and a cap, the single µC
seems like a nice way to go. Of course, if you don't have the
skills and the tools you'll _have_ to go hardware...

12. ### Jasen BettsGuest

say it's an 8 bit DAC, running off a 5V supply, stick a variable resistor,
or resistors in series with the pot so that the pot only seex 75% of te
DAC'c Vref range. because the pot doesn't cover the whole range of the
DAC's input, for the full travel of the pot bit 0 will transition 192 times
for 96 pulses but bit 3 will pulse 1/8 as often - 12 times

At the time I posted that I hadn't read of the unidirectional requirement,

it's take something like an edge triggered latch and a gate in addtiton to
the DAC to do that...

Bye.
Jasen