# Hi, pretty basic question about a simple CMOS TTL circuit

#### Jed118

Apr 8, 2014
7
Hello everyone,

It has been a decade since I last used this stuff, and I was decently proficient at it in college.

Here's what I am trying to do: In my car's instrument cluster, there is a left turn indicator arrow, and a right turn indicator arrow which light up when the stalk is selected in that respective direction - They are not the European "one light" system as found in old Fiats and VWs but light up separately depending on what circuit is used (like 99% of cars today). The hazard switch flashes them both on and off. What I want to do is create a circuit using a LED to pulse red when the two arrows (activated at once from a hazard switch) illuminate. The easiest way to do this is to tap LSIG and RSIG into a spare 4081 AND gate and use the output to drive the LED. What I want it to do is alternate (be inverted from) the state of the two arrows, so when LSIG and RSIG are off, the red LED is on, and when LSIG and RSIG are on, the red LED is off. Easy enough, after running LSIG and RSIG through the 4081 AND, invert the output using a 4069.

BUT - The problem is that this means that when both signals are off, that red LED is on, and I don't want it to be unless the hazard light switch is depressed. Normally, I would just feed Vcc power to the 4069 inverter using a splice from the hazard lamp switch (which is a steady +12v when active) but that IC is being used to do some other things and needs to be on constantly.

I've narrowed it down to the two signals LSIG and RSIG going into an AND gate and coming out as one intermittent (flashing) signal, and one solid 12v signal from the hazard switch: Let's call them FSIG and SolSIG. Obviously I can't put those into a NAND or AND gate because one of the signals will be intermittent and therefore not feed a reliable signal to the LED (it'll always be off)

My question Is there a device that will take the SoSIG (I can easily reduce it to +3v or whatever this magic IC needs) and use the FSIG to "trigger" a constant signal until SoSIG is interrupted, cutting output to the LED?

It's been a while, but I feel the solution is quite a simple one. Tristate gates? Solid-State relays? Some creative use of a capacitor somewhere?

I can draw up a quick schematic if that'll help...

Last edited:

#### Arouse1973

Dec 18, 2013
5,178
Hi Jed

Something like this might work. OR maybe a three input AND gate with one input pulled high?

Cheers

#### Attachments

• LEDSWITCH.PNG
5.6 KB · Views: 205
Last edited:

#### kpatz

Feb 24, 2014
331
LSIG and RSIG into one AND gate (with pull-down resistors as needed).

Send output of that AND gate to inverter (or use NAND gate), then send the inverted output to one input of another AND gate. Feed the power signal from the hazard switch into the other input of the AND gate (with another pull-down resistor). Have the output of that gate drive your LED.

Now, the LED will only illuminate when the hazard switch is on and LSIG/RSIG are both off (to get the inverted effect you want).

Now, if either LSIG/RSIG or the hazard switch are ground-switched, the circuit will have to be changed appropriately, but we'll cross that bridge when we come to it.

I can draw a schematic later if you need.

#### Arouse1973

Dec 18, 2013
5,178
A schematic would be good.

#### kpatz

Feb 24, 2014
331
Here's one I just drew up, using a 4081 and a 4069. It could be made with one NAND IC as well, but if you already have 2 AND and one inverter available in your circuit, this will do the trick.

I also included a transistor to drive the LED, since the 4081 can't source much current and the LED would be dim driving it directly from the IC.

EDIT: I just realized, since the 2nd gate ensures that the LED only lights when the hazard switch is on, you could eliminate the 1st gate entirely and feed either RSIG or LSIG into the inverter.

#### Attachments

• signal.png
4.6 KB · Views: 1,767
Last edited:

#### Jed118

Apr 8, 2014
7
Here's one I just drew up, using a 4081 and a 4069. It could be made with one NAND IC as well, but if you already have 2 AND and one inverter available in your circuit, this will do the trick.

I also included a transistor to drive the LED, since the 4081 can't source much current and the LED would be dim driving it directly from the IC.

EDIT: I just realized, since the 2nd gate ensures that the LED only lights when the hazard switch is on, you could eliminate the 1st gate entirely and feed either RSIG or LSIG into the inverter.

Oh Jeez, that's so easy. I guess at 1:00AM my brain wasn't working properly... I also thought of using two AND gates and an inverter, I guess my brain was giving out on me at that time.

Also, bypassing the first gate with any signal will be quite necessary, as I have only one AND gate left.

I'm fairly sure the signals are not ground switched either

Last edited:

#### Jed118

Apr 8, 2014
7
Hey, I'm just looking at this and picturing it work in my head, but doesn't the AND gate need to have both inputs to work high? Remember, the LSIG or RSIG are going to be intermittent (Ie they flash, like on the instrument cluster, to show you they're working) so it won't be a steady signal.

I need a way to make that intermittent signal to "trigger" the hazard light signal (like a relay or something) - Any ideas?

#### KrisBlueNZ

##### Sadly passed away in 2015
Nov 28, 2011
8,393
When the Hazard switch is OFF, you don't want the circuit to do anything, right? And when it's ON, an identical signal comes in on LSIG and RSIG, so you don't need to gate them together; you don't even need both signals.

You want your LED to illuminate when SolSIG is at +12V and LSIG (or RSIG, whichever you use - I'll assume LSIG) is at 0V. So, assuming that LSIG is firmly pulled to 0V by the low resistance of the indicator lights when they are OFF, you could just connect your LED (with a current limiting resistor and a diode to protect against reverse voltage) between SolSIG and LSIG.

Code:
SolSIG -----|>|-------\/\/\/\/-----|>|------ LSIG
1N4001        470R       LED

Last edited:

#### Arouse1973

Dec 18, 2013
5,178
Yeah Sorry I got a bit confused about what you wanted. The original post did jump about a bit. I think Kris idea is good but do you need to know if all inputs are working. What is the purpose of this circuit what's the end project. I might understand a bit more of what you want.
Thanks

#### kpatz

Feb 24, 2014
331
Hey, I'm just looking at this and picturing it work in my head, but doesn't the AND gate need to have both inputs to work high? Remember, the LSIG or RSIG are going to be intermittent (Ie they flash, like on the instrument cluster, to show you they're working) so it won't be a steady signal.
It sounds like you're getting confused about the intermittent signal. You said you want your LED to flash, but in the opposite phase of the actual indicators, right? So, indicators off, LED on, indicators on, LED off? Using the gate circuit (ignore the 1st gate in my schematic, for now assume LSIG is fed through the inverter to the 2nd gate), the output only goes high when both inputs are high; it's low for any other combination. So, the resulting output would be:

1. Hazard switch OFF, LSIG OFF: Gate sees high from inverter and low from SolSIG, LED is off.
2. Hazard switch OFF, LSIG ON: Gate sees low from inverter and low from SolSIG, LED is off.
3. Hazard switch ON, LSIG OFF: Gate sees high from inverter and high from SolSIG, LED is on.
4. Hazard switch ON, LSIG ON: Gate sees low from inverter and high from SolSIG, LED is off.

The end result is that the intermittent signal you describe gives you the effect you want, of a flashing LED. The inverter ensures the LED flashes out of phase with the indicators, while the gate ensures the LED stays off when the hazard switch is off, and passes the "flashes" through when the switch is on.

Kris's circuit is even simpler (no ICs required at all), and should work depending on how the hazard switch and indicators are wired. What kind of car is this going in? A recent model, or something older? Kris's circuit should work in an older car, but it might not in a newer one where everything is controlled by a module, or if the indicators in your cluster are LEDs rather than bulbs.

#### Jed118

Apr 8, 2014
7
1. Hazard switch OFF, LSIG OFF: Gate sees high from inverter and low from SolSIG, LED is off.
2. Hazard switch OFF, LSIG ON: Gate sees low from inverter and low from SolSIG, LED is off.
3. Hazard switch ON, LSIG OFF: Gate sees high from inverter and high from SolSIG, LED is on.
4. Hazard switch ON, LSIG ON: Gate sees low from inverter and high from SolSIG, LED is off.

.

That's essentially what I want it to do. There are other circuits on the cluster doing different things, but this one will only do that. It is going into a 1999 Matiz (with incredibly simple electronics - Put it this way, my 1987 carburetted Stellar CXL 2.4 has a more complex wiring harness) just for fun and to keep my interest and (lol) skills in electronics mildly afloat.

It uses bulbs, so the Diode between SolSIG and LSIG will be fine, if I can avoid gates altogether, that's awesome. I'll have to see exactly how the turn signals are wired on the back of the cluster, but I am 95% sure they're common negative (grounded with other dummy lights and gauges) and separate left and right signals go to them (+12V) - The lead coming from the hazard switch is a steady +12 when the switch is depressed only (key off state too).

The diode idea intrigues me, I will breadboard it later Thanks!

#### kpatz

Feb 24, 2014
331
Also, if you can locate the actual flasher unit for the hazards (it'll look like a relay and probably is clustered with other relays in the car--it's also what makes the "click click" sound when the flashers are on), you could wire the LED and resistor in parallel with the flasher--positive side of LED to the input of the flasher and the negative side to the output; the resistor can go on either side in series with the LED. Then, the LED will receive power only when the hazard switch is on, it'll be on when the flasher has the indicators off (the LED would be shorted/bypassed when the flasher is in the "on" cycle so the LED will flash opposite the indicators), and you would only have to run wires to one spot in the car instead of two.

#### Jed118

Apr 8, 2014
7
Not a bad idea, but the flasher is integral and houses both the individual flashing circuit and the hazard flashing circuit (not like the good old days of two separate thermal flashers hah) but you have given me some ideas. Next time I'm at the wreckers, I'll see if I can grab a spare flasher and pull it apart and play with it.

#### kpatz

Feb 24, 2014
331
If it's integral it probably has 6 pins: left signal in, right signal in, hazard in, left signal out, right signal out, and ground.

If you can find which pin is hazard in and either left or right signal out you can hook the LED between those two.

If there's only 5 pins it could be wired such that the hazard is triggered by turning on both left and right signals at the same time, in which case you'll need an AND gate or something like it, or just tap the power at the hazard switch.

#### Jed118

Apr 8, 2014
7
OK I tried it out tonight SolSIG -----|>|-------\/\/\/\/-----|>|------ LSIG method and it works great UNTIL you switch the key ON and then the LED lights up solid - Seems it's getting power from elsewhere and completing the circuit on me. Once you press the hazard switch, it flashes out of phase and everything.

I've modified the circuit by placing two diodes inline with LSIG and RSIG (isolating them from each other, but combining them on the other end of the diode to light up the LED - it was necessary as the properties of the circuit changed on key ON) and ran the other terminal of the LED to solSIG and it works just as well until you put the key ON, in which case the LED lights up constantly until you press the hazard switch, then it (again) flashes out of phase.

I'm going to try to run the LED directly to the flasher terminal, but something tells me that gets power on key ON because otherwise how would the individual left and right signals work?

Any ideas? I would really not want to complicate my circuit by adding two more ICs (I know a sure fire way to do it but it'll be very gate-wasteful and inelegant).

#### kpatz

Feb 24, 2014
331
Sounds like what you tapped for SolSIG is at +12V regardless of whether the hazards are on or off. Maybe you tapped the wrong side of the hazard switch? Check it with a meter.

#### Jed118

Apr 8, 2014
7
Sounds like what you tapped for SolSIG is at +12V regardless of whether the hazards are on or off. Maybe you tapped the wrong side of the hazard switch? Check it with a meter.

Here's what I did (attached schematic, forgive the crudity) - It works perfectly until the key goes to ON and then there is +12V at SolSIG - Circuit still works EXCEPT that the LED is on when the circuit is off (in key OFF the LED is off until the hazard circuit is engaged, otherwise works the same)

The circuit is designed this way to permit the operation of the turning signals only when the key is ON. Otherwise, the hazard circuit is always hot. I measured all the points at the switch, none were usable in ON. Same goes at the flasher (three terminal, IC controlled type), as I had thought previously.

I'm gonna think this over some more, but ultimately I don't see how I can solve this easily.

I might have to resort to in-phase flashing using an AND gate.

#### Attachments

• basic circuit.jpg
4.7 KB · Views: 183

#### KrisBlueNZ

##### Sadly passed away in 2015
Nov 28, 2011
8,393
That schematic won't work. I think you have the two diodes drawn backwards.

I agree with what kpatz said in post #15. The SolSIG signal, that feeds through the resistor to the anode side of the LED, must come from a signal that is only +12V while the hazard flashers are turned ON. At all other times, it must have 0V.

You seem to be saying that the point in the circuit that you are taking your SolSIG from goes to +12V as soon as the ignition is turned ON, even if the hazard flashers are OFF. You can't use a signal like that.

If there is no such point in the circuit, then is there any point in the circuit that changes its state when the hazard flashers are turned ON? If so, how does this signal behave in each case? (The states that I know of would be Ignition OFF, Ignition ON and hazards OFF, Ignition ON and hazards ON.)

#### kpatz

Feb 24, 2014
331
The hazard switch has to be switching something. Sure, one side would always be live but what about the other side? How many connections are there to the hazard switch? It could be something more complex than a SPST switch. Take a voltmeter, ground the negative probe and measure each connection to the hazard switch with the positive probe, in each of the various combinations of ignition on and off and hazard switch on and off. Make a table showing the voltage at each point of the switch for each combination. From there it should be possible to find a point that your circuit can use to "know" when the hazard switch is ON and when it is OFF.

I wouldn't be surprised if it was a SPDT or DPDT switch. Perhaps wired so that when "OFF", it feeds ignition power into the turn signal portion of the flasher, so that the turn signals only work with the ignition ON. And when "ON", it feeds battery power to the hazard portion of the flasher (since this generally works even with ignition off on most cars), and disabling the normal turn signals.

Maybe you can find a service manual and wiring diagram for your car?

Replies
57
Views
3K
Replies
1
Views
830
Replies
12
Views
1K
Replies
2
Views
1K
Replies
3
Views
1K