Friday, October 2, 2026

Logic IC-Based Turn Signal / Hazard Flasher (CD4001 Quad-NOR)

 

This one is a proper automotive-style indicator (turn signal) and hazard flasher, built around a CD4001 quad NOR gate instead of discrete transistors. It drives two external lamp outputs independently (left/right), with built-in hazard (both-sides) mode and dashboard tell-tale LEDs. Here's the full breakdown.


Power Input Block: PWR + D3 + C2/C3

  • PWR (2-pin WAGO terminal) is the main 12V input: pin -1 is the incoming +12V, pin -2 is GND.
  • D3 (1N4004) sits in series right after PWR's +12V pin, acting as a reverse-polarity protection diode — unlike your earlier boards, this one actually has that protection built in.
  • After D3, the rail becomes the regulated logic supply (VDD) for IC1, filtered by C3 (1000µF/16V, bulk) and C2 (0.1µF, high-frequency bypass), both sitting between this VDD node and GND.

So the CD4001 runs directly off the ~12V automotive rail (minus one diode drop), which is well within its normal operating range, with the two capacitors keeping that rail clean against alternator noise and switching transients from the lamps.


Oscillator Block: IC1 gates A & B + R1 (1M) + R2 (680k) + C1 (0.68µF)

IC1 gates A and B are each wired with their two inputs tied together, turning each into a simple logic inverter. Combined with R1, R2, and C1 cross-connected between them, this forms the classic two-NOR-gate relaxation oscillator — the same role the 555 or the cross-coupled transistor pair played in your earlier flasher circuits, just done with CMOS logic gates.

  • Gate A inverts its input and feeds gate B.
  • R1/R2/C1 form the RC feedback network that continuously charges and discharges, flipping gate A's input once the threshold is crossed.
  • Gate B's output is the oscillator's usable output — a continuous square wave whose frequency is set by R1, R2, and C1 (roughly in the ~1 second per half-cycle range with these values, in the right ballpark for a turn-signal blink rate).

Left/Right Steering Logic: IC1 gates C & D + R3/R4 (10k) + D1/D2 + LEFT-RIGHT-SW

Gates C and D are each wired as true 2-input NOR gates (inputs not tied together this time):

  • One input on each (I0) is the oscillator output from gate B.
  • The other input (I1) is a "enable" line — gate C's I1 comes from R3/D2/the LEFT-RIGHT-SW connector pin -1; gate D's I1 comes from R4/D1/the switch's pin -3.
  • R3 and R4 (10k) pull these enable lines up to VDD by default — so with no switch connection, both inputs sit HIGH, forcing both gate outputs LOW (a NOR gate's output is only HIGH when both inputs are LOW). No flashing happens on either side at rest.
  • LEFT-RIGHT-SW is a 3-pin switch (common pin -2 tied to GND) that, when flipped left or right, grounds either pin -1 or pin -3. Grounding one of these pulls that gate's I1 LOW, which lets the oscillator's signal pass through that gate (acting as an inverter of the oscillator when enabled) — so only the selected side blinks.

D1 and D2 are diode-ORs sitting between each switch line and a shared hazard node (explained next) — they let the hazard switch pull either line low independently, without the two switch inputs fighting each other.


Hazard Block: HAZARD-SW

HAZARD-SW (2-pin) connects its pin -2 to GND, and pin -1 to the shared cathode node of D1 and D2. When the hazard switch is closed, it pulls that shared node to GND, which — through D1 and D2 — drags both gate C's and gate D's enable lines low at once, regardless of what the LEFT-RIGHT-SW is doing. That enables both steering gates simultaneously, so both sides flash together at the oscillator rate — your 4-way hazard function.


Dashboard Indicator LEDs: LED1/R5 and LED2/R6

Gate C's output feeds R5 (1k) in series with LED1; gate D's output feeds R6 (1k) in series with LED2. These are simple dash-panel tell-tale LEDs that blink in sync with whichever side is active — pure visual feedback, not part of the switching path to the lamps.


Pre-Driver Transistors: Q1/Q2 (BC547) + R9/R10 (1k)

Gate C's output also drives Q1's base through R9; gate D's output drives Q2's base through R10. Q1 and Q2 are small NPN transistors with their emitters at GND, so when a gate output goes HIGH, the corresponding transistor turns on and pulls its collector down toward GND.


Power Driver Transistors: U$1/U$2 (2SB507, PNP) + R11/R12 (1k) + R7/R8 (680k)

  • Q1's collector feeds U$2's base through R11; Q2's collector feeds U$1's base through R12.
  • U$1 and U$2 are PNP power transistors with their emitters tied straight to the diode-protected +12V rail — so they act as high-side switches. When Q1/Q2 pulls the PNP's base down, the PNP turns on and connects +12V through to its collector.
  • R7/R8 (680k) sit as pull-ups from +12V to each PNP's collector/lamp node. Given the high value, these aren't meant to drive the lamp on their own — they're there to bleed the output node cleanly back up to +12V when the PNP switches off, which helps avoid a faint "ghost glow" if the connected lamp is an LED-type indicator bulb with its own internal electronics that could otherwise hold a small residual voltage.

Lamp Outputs: LIGHT-1, LIGHT-2 (WAGO terminal blocks)

Both use the same WAGO 2-pin footprint as the other connectors — these are where your actual external indicator lamp/bulb modules connect.

  • LIGHT-1 pin -1 → U$1 collector (switched +12V); pin -2 → GND.
  • LIGHT-2 pin -2 → U$2 collector (switched +12V); pin -1 → GND.

So each lamp module sits between its switched 12V output and ground — standard high-side lamp switching, same pattern as your earlier LED-module flasher but through a PNP power stage instead of a MOSFET directly.


How it all works together

  1. +12V comes in through PWR, passes through the reverse-protection diode D3, and is filtered by C2/C3 to form a clean logic supply for IC1.
  2. Gates A and B, with R1/R2/C1, free-run as a relaxation oscillator, continuously producing a square wave at the flasher rate.
  3. Depending on LEFT-RIGHT-SW's position, either gate C or gate D has its "enable" input pulled low, letting the oscillator signal pass through that one gate only.
  4. That gate's pulsing output does two things at once: blinks the matching dashboard LED (LED1 or LED2), and toggles its pre-driver NPN (Q1 or Q2).
  5. The NPN pulls the corresponding PNP's base low each time it turns on, switching that PNP (U$1 or U$2) on and off in sync with the oscillator.
  6. The PNP, acting as a high-side switch, connects +12V to its LIGHT-1/LIGHT-2 output terminal each time it's on — flashing the external lamp in time with the oscillator, on whichever side was selected.
  7. If HAZARD-SW is engaged, it grounds the shared node behind D1/D2, which forces both gate C's and gate D's enable lines low together — so both sides flash in unison, independent of the left/right switch position.

Points worth checking

  • R1/R2/C1 set the flash rate — if it comes out slower or faster than you want once tested, these are the three values to tweak (increasing C1 or the resistors slows it down, decreasing speeds it up).
  • D1/D2 need to be oriented so current can flow from the switch lines toward the hazard node (not the other way) — worth double-checking polarity on the physical board matches the diode-OR function described above.
  • The 2SB507 is an older PNP power transistor — worth confirming its current rating comfortably covers whatever bulb/lamp module you're driving (especially if it's an incandescent bulb with a higher inrush current than an LED module).
  • R7/R8 at 680k is a very light bleeder current — fine for LED modules, but if you ever drive an incandescent bulb directly off this output, that pull-up won't meaningfully affect it either way.

-

demo and files :

https://www.youtube.com/watch?v=EoGe26Is09A
direction indicator lamps.(signal light) 

No comments:

Post a Comment