# Special "dual" pulse generator circuit help wanted

Discussion in 'Electronic Basics' started by Jag Man, Oct 10, 2004.

1. ### Jag ManGuest

I want to test an automotive ECU to be sure it's generating the correct
pulses to the fuel injectors.

Let me describe the wanted test pulses by telling you how the they are
generated in the car. A "trigger board" in the distributor has 2 Hall effect
transistors onboard,
at diametrically opposed positions. The rotor has a small magnet embedded
and is whirling around right above the trigger board, so each Hall effect
transistor
is fired once per revolution of the rotor. Three wires feed form the trigger
board
to the ECU, A B, and C. As a result of the Hall effect transistors, the
resistance
between A and C momentarily changes from infinite to 0, followed shortly
thereafter (i.e., 1/2 a rotor revolution later) by B and C doing the same.
Thus
the A, B, and C are seen by the ECU as dual normally open switches that each
momentarily close once per rotor revolution.

So the question is, what is the simplest way to simulate this, perhaps with
ICs?
I'm thinking of perhaps a pair of relays to represent the switches. A pulse
stream would be generated by a 555 timer IC, somehow feeding every other
pulse to alternating relays. I have a feeling a flip-flop could be used
beneficially, but can't quite see how to do it. We don't have to worry
about pulse width, as the actual width of pulses emitted by the ECU
are independent of the closure times seen on A, B and C.

I am coming at this as an amateur, but I have done some circuits using
the 555 timer IC.

Any helpful suggestions would be appreciated.

TIA

Ed

2. ### BrianGuest

Something you might try:
Set your 555 timer up to put out pulses near a square wave. Have this
pulse trigger two one-shots (something like a 74LS123). Have one of the
one-shots trigger on the positive going pulse of the 555 timer and the other
one-shot trigger on the falling side of the 555 timer pulse. Have each one
of the one-shots output drive a reed relay.

Brian

3. ### CFoley1064Guest

Subject: Special "dual" pulse generator circuit help wanted
Hi, Ed. Here's something that might work well for you, and that will have your
well-tempered 36 degree pulses at 0 degrees and 180 degrees (view in fixed font

.----o A
VCC VCC |
| | |
.-. V~~ |/
| | VCC VCC VCC -~~ -|4N32
| | | | | ___ | |>
'-' | | | .-|___|----' |
| .--o-o--. .---o-----. | '----o B
o--. | 8 4 | | Vdd | ___ |/
| | | | | "1"o-|___|- -|2N3904 VCC .----o C
.-. '--o7 | | | 10K | |> | |
| | | 3o----oCLKEN | .-. | V~~ |/
| | | | | | 10K| | GND -~~ -|4N32
'-' | 555 | | 4017 | | | ___ | |>
| .-o6 | .-oCLK | '-' .-|___|----' |
| | | | | | | | | '----o D
| o-o2 | | | | ___ GND|/
.-. | | | o-oVss "6"o-|___|- -|2N3904
| |<-o | 1 5 | | | | 10K | |>
| | | '--o--o-' | '---------' .-. |
'-' | | | 10K| | GND
| | | | | |
o---' | | '-'
| GND GND |
--- GND
---
|
GND
created by Andy´s ASCII-Circuit v1.24.140803 Beta www.tech-chat.de

Your 555 is set up with a pot to give you 10X the maximum rotor RPM you want
(if, say, you wanted 5000 RPM max, which is 83Hz, you would set the 555 so it
would have a max frequency of 830Hz. The ouput of the 555 goes to a 4017 CMOS
counter, which has 10 separate outputs for 0 thru 9. You would get your signal
from "1" and "6", for sake of discussion. When you have the 555 set for
maximum rate, the "1" will pulse for 1.2 ms, then 6 ms. after the beginning of
the "1" pulse, you'll get a 1.2 ms pulse out of the "6". 6 ms after the
beginning of the "6" pulse, the "1" output will pulse for 1.2 ms., and so on.
This has the advantage of sequencing the pulses properly, no matter what the
simulated rotor speed.

Now you have those two outputs driving transistors which drive optoisolators.
These will give you the isolated "short" for the pulses, and "open" for the
rest of the period. The 4N32s don't have very high current gain, so be sure to
set the resistors so you're getting a full 20 mA through the LEDs. You might
also want to try a H11G1, which is an opto darlington. It's fast enough, and
will give you good current gain. The only problem is, there's 1V across the
optodarlington when it's on. That shouldn't really matter for most
automotive-type applications, though.

I like optoisolators better than reed relays primarily because most reed relays
have a typical open time and close time of greater than 0.5 ms. In addition,
if you use diodes to protect the transistors from inductive kick, that will
lengthen the open times by quite a bit. At fast speeds, things might get a
little messy. Also, I'm not sure exactly what you're switching. If you've got
a capacitive-type load (any more than a couple of dozen pF), you will probably
get some relay arcing, which might cause the reed switches to stick (weld) shut
at these speeds of operation. If you insist on reed relays, use zener diodes
along with the standard diodes to shorten the recirculating current time on
shutoff. The 2N3904s above are rated for 35V or so, which would lead you
toward 24V zeners as a first cut.

The circuit above is fairly straightforward, and even though it requires 4 ICs
and a couple of transistors, it should work fairly well at various speeds.
Post back if you'd like more detail.

Good luck
Chris

4. ### Jag ManGuest

Thanks, Brian!

Guess I'll have to do some reading up on the 74LS123
to see how to tell it what side to trigger on.

Ed

5. ### Jag ManGuest

Chris,

Thanks a bunch! It may take me a while to implement since I'm
a bit of a novice, but I understand what you are doing and think

Ed

6. ### BrianGuest

Hi Ed,
The 74LS123 is much like the 555 timer, if you understand one, the other
will be easy to learn. To show you how easy it would be, I drew the
schematic for you. You can see it at http://www.fncwired.com/SignalEx

Brian

7. ### Jag ManGuest

Chris,

I'm going to try to implement this now, so I have some questions.

1. First, am I right that the purpose of the counter is to get a pulse
out of the counter at every 5th pulse out of the timer, with these pulses
going alternately between the two transistors? Could I use outputs 0 and 5
or 2 and 7 just as well?

2. My crankshaft speeds range from 750 to about 5000 RPM, and the
rotor is going at half the speed of the crank, or 375 to 2500 RPM. Based on
this,
I have calculated that if I use a 10 uF capacitor I should have R1 and R2
about 100 ohms and 125 ohms respectively, and a 1k ohm pot. Does that sound

3. I see that 555 circuits typically put another cap between 5 and ground,
0.01 uF. Should I do
that in this application?

4. You specify 10k ohm resistors at the base of the transistors, but don't
specify any values
for those connected to the LED of the 4N32 optoisolators. From your
discussion I gather that
these have to be selected by experimentation, measuring the current. Do

5. to match the actual interface on the car I will have to tie the outputs
(emitters?) of the
optoisolators together. Do you see any problem with that?

6. With the resistances I came up with for the 555, based primarily on
frequency, the
on time/off time coming out of the optoisolators will be roughly equal,
i.e.,
a duty cycle of 50-60%. However, I believe the Hall effect transistors
output a smaller duty cycle, i.e., more of a blip. I don't think the ECU
will care,
but is there any way to get a lower duty cycle?

Thanks.

Ed

8. ### Jag ManGuest

I think I've answered some of these questions myself now. For one thing,
I now see that the pulses out of the counter are 1/frequency wide, having
to nothing to do with the pulse width out of the timer. This same pulse
width then propagates to the outputs of the optoisolators. So forget
I asked questions 1 and 6. I also have a good handle on the R1, R2, and
C values needed at the timer, so forget question 2.

I think I understand the issue with regard to question 4 now. The resistor
has to be such that the current between pins 1 and 2 of the 4N32 is
close to 20 mA. With a supply voltage of 12-13.5 volts, and a 1 volt
drop across the LED, the resistor s.b. 500-550 ohms, or so I believe.

I still need guidance on question 3 and 5, plus a new question. When I
went to my electronics store, a big and busy place that looks like
it caters to a lot of electronics pros, they did not have the 4N32.
They sold me a single NTE3083 as an equivalent, taking a back order on the
second. The I read the spec sheets for the 4N32 and NTE3083.
They both seem to have Darlington transistor outputs. What's confusing me
is your discussion implies that the 4N32 is NOT a "photo Darlington,"