Author Topic: creating a switched circuit for turn signals using the parking light  (Read 2016 times)

0 Members and 3 Guests are viewing this topic.

Offline brolyTopic starter

  • Contributor
  • Posts: 48
  • Country: 00
Re: creating a switched circuit for turn signals using the parking light
« Reply #25 on: September 20, 2026, 02:41:22 pm »
i think i have finally gotten it to give something that is correct.

as it stands, the lights on the spoiler only get power when the parking light switch is on. so they will need a power source when the turn signal is on, but the parking light is off.

after quite a few metre-stick-on-the-top-of-the-hands, this is what it produced. the key points seem to be
  • creating an internal "S" line (whether the turning stalk is activated) from:
    • first detecting whether the T wire has been activated
    • sending that signal to the 100uF capacitor to 'store' this signal for a period covering the average frequency of a vehicle turn signal
  • feeding this new 'S' signal into NAND1 for inversion, which is then input to:
    • NAND2 with input P
    • NAND3 with input T
  • using the outputs of NAND2 and NAND3 as input to NAND 4
  • using the output of NAND4 to drive the mosfet gate
[li] using the other leg of the mosfet gate
[/li][/list]

since i'm new to mosfets, i assume the 3 legs connect to: main ground, the gate signal (output of nand 4) and the output that acts as the 'ground switch' that connects to the ground of the light

Code: [Select]
======================================================================================================================================================
                                              TRUE AUTOMOTIVE POWER OR-GATE & SYSTEM ROUTING BLUEPRINT
======================================================================================================================================================

 [RAW INTEGRATED VEHICLE INPUTS]               [DIODE POWER MATING FIELD]                             [LOW-CURRENT LOGIC SENSING LOOPS]
 ───────────────────────────────               ──────────────────────────                             ─────────────────────────────────

 (From Cabin Switch)                             Vishay 1N4007 [INPUT_P_DIO]
  P ───┬───────────────────────────────────────────────►|──────────────┐
       │ (High-Current Power Loop)                                     │
       │                                                               ▼
       └─► [1kΩ] ───┬───► [Conditioned P Logic] ───────────────────────┼────────► To Pin 6 (NAND 2 Input B)
                    │                                                  │
                 [Zener]                                               │
                    │                                                  │
                 [10kΩ]                                                │
                    │                                                  │
                   GND                                                 ▼
                                                                [ LED FIXTURE(+) ] ◄─── (The Unified Single Positive Output Power Lead)
 (From Turn Stalk)                                                     ▲
  T ───┬───────────────────────────────────────────────►|──────────────┘
       │ (High-Current Power Loop)                       Vishay 1N4007 [INPUT_T_DIO]
       │
       └─► [1kΩ] ───┬───► [Conditioned T Logic] ───────────────────────┬────────► To Pin 9 (NAND 3 Input A)
                    │                                                  │
                 [Zener]                                               │
                    │                                                  ▼
                 [10kΩ]                                         [1N4148 Diode]
                    │                                                  │
                   GND                                                 ▼
                                                                ┌──────────────┐        ┌───────────────────────────┐
                                                                │ 100µF UBW    │ ────►  │  INTERNAL SMOOTH S LINE   │
                                                                │ Cap Tank     │        └───────────────────────────┘
                                                                └──────────────┘              │
                                                                       │                      ├──► To Pin 1 & 2 (NAND 1 Inverter Inputs)
                                                                       ▼                      │         │
                                                                      GND                     │         ▼ (Processed Through Gate 1)
                                                                                              │   ┌─────────────┐
                                                                                              │   │ NOT S LINE  │ ──► To Pin 5 (NAND 2 Input A)
                                                                                              │   └─────────────┘
                                                                                              └──► To Pin 10 (NAND 3 Input B)
                                                                [ LED FIXTURE(-) ]
                                                                       │
 ──────────────────────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────────────
 [HIGH-CURRENT LOW-SIDE MOSFET DISCHARGE STAGE]                        │
 ──────────────────────────────────────────────────────                        ▼
                                                                        [M_Dr] (Hole C28)
                                                                               │
   [ FINAL CALCULATED LOGIC OUTPUT ] ──► [ Hole A11 ] ──► [ [R4] Resistor ] ──►║ GATE (Hole B28)
  (From CD4011BE Output Pin 11)                                                ║
                                                       [VISHAY 1N4007]         ║ IRFZ44N
                                                     ┌───[DIO_FLYBACK]─────────╢ MOSFET
                                                     │                         ║
   [ CONTINUOUS +12V MAIN BUS ] ───(Cathode Stripe)──┘                         ╚═══════╢
  (Powers CD4011BE Supply Pin 14)                                                      │
                                                                                       ▼
                                                                                [M_Sr] (Hole A29)
                                                                                       │
                                                                                       ▼
                                                                            [ VEHICLE CHASSIS GROUND ]
======================================================================================================================================================



and this is the logic diagram

Code: [Select]
===================================================================================================================
                                CONCEPTUAL HARDWARE LOGIC SIGNAL FLOW WITH FLYWHEEL
===================================================================================================================

  P ────────────────────────────────────────────────────────────────────────────────────────┐
                                                                                            │
                                                                                            ▼
                                                                                     ╔══════════════╗
                                                                                     ║    NAND 2    ║───────┐
                                                                                  ┌─►║  (Branch A)  ║       │
                                                                                  │  ╚══════════════╝       │
                                                                                  │                         ▼
                                                 ┌──────────────┐                 │                  ╔══════════════╗
                                      ┌─────────►│    NAND 1    │─────────────────┘                  ║    NAND 4    ║─► MOSFET GATE
                                      │          ║  (Inverter)  ║                                    ║ (Final Mixer)║
                                      │          └──────────────┘                                    ╚══════════════╝
                                      │                 │                                                   ▲
                                      │                 │                                                   │
                                      │                 └─────────────────────────┐                         │
                                      │                                           │                         │
                                      │                                           ▼                         │
                                      │                                    ╔══════════════╗                 │
                                      │                                    ║    NAND 3    ║─────────────────┘
                                      │                                    ║  (Branch B)  ║
                                      ├───────────────────────────────────►║              ║
                                      │                                    ╚══════════════╝
                                      │                                           ▲
                         [INTERNAL SMOOTH S LINE]                                 │
                                      ▲                                           │
                                      │                                           │
                               ┌──────────────┐                                   │
                               │  100µF UBW   │                                   │
                               │   Cap Tank   │                                   │
                               └──────────────┘                                   │
                                      ▲                                           │
                                      │ (Charges Tank)                            │
                                1N4148 Diode                                      │
                                      ▲                                           │
                                      │                                           │
  T ───┬──────────────────────────────┴───────────────────────────────────────────┘
       │ (Raw Pulsing Path)
       ▼

thoughts?
 

Offline SteveThackery

  • Super Contributor
  • ***
  • Posts: 3309
  • Country: gb
  • 50 year novice
Re: creating a switched circuit for turn signals using the parking light
« Reply #26 on: September 20, 2026, 05:12:39 pm »
Red rear turn signals are standard in all of North America.

Just FYI, in the UK it is illegal to show a flashing red light on any part of a vehicle, regardless of whether it flashes in time with the direction indicators. Red lights may only be fitted to the rear of a vehicle, and (of course) they must be continuously lit.

I believe the law has been altered to allow bicycles to show a flashing red light to the rear.
 

Offline brolyTopic starter

  • Contributor
  • Posts: 48
  • Country: 00
Re: creating a switched circuit for turn signals using the parking light
« Reply #27 on: September 20, 2026, 06:24:43 pm »
Red rear turn signals are standard in all of North America.

Just FYI, in the UK it is illegal to show a flashing red light on any part of a vehicle, regardless of whether it flashes in time with the direction indicators. Red lights may only be fitted to the rear of a vehicle, and (of course) they must be continuously lit.

I believe the law has been altered to allow bicycles to show a flashing red light to the rear.

i was going to ask you all if i could do this with bipolar leds but that third leg won't work on the PCB, which is already beat up

man this whole experiment is going to run around 200 loserbux (given i need watertight enclosures, some waterproof connectors, etc) ://

it looks right. but now with steve telling me about it being illegal in the UK, i don't want my handa to feel unwelcome anywhere :(

gonna have to make sure there's a clean bypass that's not a chore to access

anyone mind looking at those two diagrams to see if i'm missing anything?
 

Offline PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 3331
  • Country: au
Re: creating a switched circuit for turn signals using the parking light
« Reply #28 on: September 20, 2026, 09:52:57 pm »
it looks right. but now with steve telling me about it being illegal in the UK, i don't want my handa to feel unwelcome anywhere :(

It's not just the UK where this is illegal, see Reply #19.
It's pretty much only the north-america where this is considered legal.
 

Offline PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 3331
  • Country: au
Re: creating a switched circuit for turn signals using the parking light
« Reply #29 on: September 20, 2026, 10:01:48 pm »
and this is the logic diagram
thoughts?

That's a 2:1 multiplexer using NAND gates, with the monostable/timer as select, so that's broadly correct.
HEF4093 Schmitt NAND would be one choice.

However, the normal MOSFET connection has an inverting action (the bootstrap idea discussed elsewhere only applies to a dynamic switching signal)
so usually that means a P-Channel MOSFET as a high side switch, and that needs a low level on the gate to enable.
Thus another inverting stage is needed, which can be mosfet or transistor or another gate element.

Addit : Or you could use a controller IC, which has a positive logic EN signal and a charge pump included for external NMOS FET drive.
« Last Edit: September 20, 2026, 11:44:55 pm by PCB.Wiz »
 

Offline brolyTopic starter

  • Contributor
  • Posts: 48
  • Country: 00
Re: creating a switched circuit for turn signals using the parking light
« Reply #30 on: September 21, 2026, 12:32:45 am »
one sec wiz i will follow up.

thanks to countryman thackery, i opted to add some fallback wires in my wiring harness modifications.

as you can see, 4 fresh wires going to the spoiler plug (originally uses 3: parking light, brake, ground) for switched power and ground to each side

will be a total of 6 'useful' wires (brake light, ground for brake [now unused for the corners as we need a switched ground], and the new ground/power for each side). depending upon what connector is offered for this style of terminal, i'll go with 7 if i can.

i then created a nice little set of 4 wires at the main intersection, which would allow me to simply bullet-reconnect (that's what imma use here) the power/ground going to each light's multiplexer, to the parking light and ground, which would restore regular functionality without me having to tear the trunk lid cover and fiddle with the harness, since this intersection point is in a nice spot behind a door on the left trunk panel.

original/mocked up with SKATCH tape:
2927640-0
integrated:
2927636-1
close up:
2927632-2
2927628-3

edit: it wouldn't be our way if i didn't finish teh yob today, super 88 be damned. ill have to deal with looking at this clashing marsehdee tesa til tomorrow when i can get s'more
2927682-4
2927686-5
Yellow = turn signal R (g/y in reality, don't have this colour :/)
bleu = turn signal L (g/b in reality, don't have this either, surprisingly)
green/black = dedicated 12v for the boards (reverse circuit power, thus on when key is turned, but not on otherwise)

« Last Edit: September 21, 2026, 02:01:42 am by broly »
 

Offline brolyTopic starter

  • Contributor
  • Posts: 48
  • Country: 00
Re: creating a switched circuit for turn signals using the parking light
« Reply #31 on: September 21, 2026, 12:49:12 am »
and this is the logic diagram
thoughts?

That's a 2:1 multiplexer using NAND gates, with the monostable/timer as select, so that's broadly correct.
HEF4093 Schmitt NAND would be one choice.

However, the normal MOSFET connection has an inverting action (the bootstrap idea discussed elsewhere only applies to a dynamic switching signal)
so usually that means a P-Channel MOSFET as a high side switch, and that needs a low level on the gate to enable.
Thus another inverting stage is needed, which can be mosfet or transistor or another gate element.

Addit : Or you could use a controller IC, which has a positive logic EN signal and a charge pump included for external NMOS FET drive.

i believe it's recommending a controller IC< the CD4011BE (4 NAND gates https://www.digikey.ca/en/products/detail/texas-instruments/CD4011BE/67241), whose output is then fed to an N-CH MOSFET (IRFZ44NPBF-ND https://www.digikey.ca/en/products/detail/infineon-technologies/IRFZ44NPBF/811772)

at least i *think* the mosfet grounds upon being activated by the controller. i think this would be a low side switch?

ran out of super 88 :/ need to run two more cables for the turn signals lol

 

Offline PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 3331
  • Country: au
Re: creating a switched circuit for turn signals using the parking light
« Reply #32 on: September 21, 2026, 12:56:49 am »
at least i *think* the mosfet grounds upon being activated by the controller. i think this would be a low side switch?
Whether you need Hi or Lo side SW is determined by your wiring.
I was assuming positive logic Hi = On, if your wiring has LOW = On, you can use a NMOS to switch GND, but you still need another logic inversion in the MUX.
Basically, to maintain control sense, you need an even number of inverters in the chain.
« Last Edit: September 21, 2026, 01:09:54 am by PCB.Wiz »
 

Offline brolyTopic starter

  • Contributor
  • Posts: 48
  • Country: 00
Re: creating a switched circuit for turn signals using the parking light
« Reply #33 on: September 21, 2026, 01:55:55 am »
at least i *think* the mosfet grounds upon being activated by the controller. i think this would be a low side switch?
Whether you need Hi or Lo side SW is determined by your wiring.
I was assuming positive logic Hi = On, if your wiring has LOW = On, you can use a NMOS to switch GND, but you still need another logic inversion in the MUX.
Basically, to maintain control sense, you need an even number of inverters in the chain.

why do i need another logic inversion? i will go through the truth table again, but it seemed to me the output of the controller was correct.

so at that point i thought it was about amplifyig the weak output of the controller so that it can be used "like a relay", which is where the mosfet came in

what do you mean by control sense? the board will get, as input, both the parking and turn signals, plus another +12v to power itself (this third power wire is used to power the boards only)
 

Offline brolyTopic starter

  • Contributor
  • Posts: 48
  • Country: 00
Re: creating a switched circuit for turn signals using the parking light
« Reply #34 on: September 21, 2026, 02:32:17 am »
lol get this PCB.Wiz, this is what the AI said (it did say you were right)

it says because we're using a nand controller and all 4 gates, where the last gate inverts the inputs of NAND2 and NAND3, there is a "natural preservation"

in other words, the choice of controller, says the AI, avoids the need to worry about the control sense. it sort of makes sense, given that we're separately trying to manipulate two separate power wires on a ground side switch

what you think?
Quote

========================================================================================================
   FORUM BRIEF: DESIGN IMMUNITY TO CONTROL SENSE INVERSION IN ASYNCHRONOUS CD4011BE MATRICES
========================================================================================================

The warning from other members regarding the need for a "second inversion layer to maintain control sense" is a classic, highly valid piece of advice for asynchronous hardware architectures. However, this specific 4-gate CD4011BE circuit is entirely immune to this pitfall.
When designing with raw discrete logic, losing "control sense" (active polarity) means your output conditions accidentally end up inverted (Active-Low instead of Active-High). This would mean the output sits hot at +12V when it should be dead, and drops to 0V when you want it to trigger.
This topology maintains perfect active polarity naturally due to De Morgan's Laws and the physical characteristics of the low-side IRFZ44N N-Channel MOSFET.
1. The De Morgan’s Double-Negative Cancellation
On paper, cascading multiple NAND gates looks like it will scramble your control sense because every single stage introduces a logical inversion layer. Let's look at the algebraic progression through the chip pins:
  • Gate 1 (Inverter): Forces your smooth analog flywheel baseline into an inverted NOT S (~S) state.
  • Gate 2 (Override Branch): Computes the NAND of P and NOT S, outputting ~[P && ~S].
  • Gate 3 (Flash Payload Branch): Computes the NAND of raw pulsing T and smooth S, outputting ~[T && S].
  • Gate 4 (The Final Mixer): Evaluates the two incoming inverted sub-gate terms.
According to De Morgan's Theorem, passing two inverted inputs through a final NAND gate creates a native double-negative cancellation effect:

   Equation:  Output = ~( ~[P && ~S] && ~[T && S] )
   De Morgan Equivalent: (P && ~S) || (T && S)

Because NAND 4 acts as this final combinational mixer, it automatically un-inverts the sub-gate outputs. This transforms the final hardware layer into a true OR gate function, natively preserving an Active-High (+12V) control sense.
2. Silicon Gate Alignment (Active-High to Low-Side Switch)
Because your control sense is natively preserved, your logic signals drive your physical output silicon exactly the way they are supposed to:
  • When a Logic Condition evaluates to TRUE: NAND 4 Pin 11 swings hard to its positive rail (+12V). This positive voltage charges the isolated Gate pin (MGt) of the N-Channel MOSFET. The internal silicon channel snaps shut, dropping its resistance to a microscopic 0.0175 Ω, successfully grounding the 120mA LED array to turn the light ON.
  • When a Logic Condition evaluates to FALSE: NAND 4 Pin 11 drops to 0V (GND). This completely sucks the charge off the MOSFET Gate pin, breaking the internal channel open. The ground loop is severed instantly, turning the LED array OFF.
If you were to blindly add an extra "second inversion layer" (like placing another NOT gate directly after NAND 4 Pin 11), you would actually destroy your control sense. It would invert your final polarity, forcing the MOSFET to stay wide open and burn your LED arrays continuously when the car switches are off, and cut out only when you try to apply the brakes or blink.
The 4-gate matrix maps your mathematical constraints to the physical automotive environment perfectly with no extra components or inversion modules required.
 

Offline PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 3331
  • Country: au
Re: creating a switched circuit for turn signals using the parking light
« Reply #35 on: September 21, 2026, 04:32:22 am »

so at that point i thought it was about amplifyig the weak output of the controller so that it can be used "like a relay", which is where the mosfet came in

A simple single MOSFET used as a switch adds an inversion, so you need to include that in the chain.

Are your drive signals positive or negative logic?
 

Offline brolyTopic starter

  • Contributor
  • Posts: 48
  • Country: 00
Re: creating a switched circuit for turn signals using the parking light
« Reply #36 on: September 21, 2026, 04:55:59 am »

so at that point i thought it was about amplifyig the weak output of the controller so that it can be used "like a relay", which is where the mosfet came in

A simple single MOSFET used as a switch adds an inversion, so you need to include that in the chain.

Are your drive signals positive or negative logic?

what's a drive signal? my car operates by grounding the power wire for the corresponding function.

btw the AI said this about the simple single mosfet (i'm learning through all of this, so it's helpful for me to see why you are saying there is a missing inversion):

Quote
The forum member who posted that warning is thinking of a High-Side N-Channel switch or a low-side Bipolar (BJT) Common-Emitter switch, which absolutely adds an inversion layer to a circuit.However, because this design uses a low-side N-Channel MOSFET configured as a standard common-source open-drain switch, it behaves as a non-inverting buffer relative to the light fixture’s physical operating state.

 

Offline PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 3331
  • Country: au
Re: creating a switched circuit for turn signals using the parking light
« Reply #37 on: September 21, 2026, 05:12:20 am »

btw the AI said this about the simple single mosfet (i'm learning through all of this, so it's helpful for me to see why you are saying there is a missing inversion):

Quote
The forum member who posted that warning is thinking of a High-Side N-Channel switch or a low-side Bipolar (BJT) Common-Emitter switch, which absolutely adds an inversion layer to a circuit.However, because this design uses a low-side N-Channel MOSFET configured as a standard common-source open-drain switch, it behaves as a non-inverting buffer relative to the light fixture’s physical operating state.
:palm:
Maybe it is time to stop reading the AI mangling and confusion and actually build it and try?  :-//
 

Offline brolyTopic starter

  • Contributor
  • Posts: 48
  • Country: 00
Re: creating a switched circuit for turn signals using the parking light
« Reply #38 on: September 21, 2026, 11:32:27 am »

btw the AI said this about the simple single mosfet (i'm learning through all of this, so it's helpful for me to see why you are saying there is a missing inversion):

Quote
The forum member who posted that warning is thinking of a High-Side N-Channel switch or a low-side Bipolar (BJT) Common-Emitter switch, which absolutely adds an inversion layer to a circuit.However, because this design uses a low-side N-Channel MOSFET configured as a standard common-source open-drain switch, it behaves as a non-inverting buffer relative to the light fixture’s physical operating state.
:palm:
Maybe it is time to stop reading the AI mangling and confusion and actually build it and try?  :-//

i agree with you that i should build it and see what happens.

my focus on the inversion aspect is to ensure i have all the components i need if this situation arises after i built the board.

that is, what else would i add to my cart to handle the issue you've raised?

if i'm using the CD4011BE mux, where NAND4's output is routed to an IRFZ44N mosfet, what else would i need to add another inversion?

and where would this inverter go? before/after the output of CD4011BE?

 

Offline PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 3331
  • Country: au
Re: creating a switched circuit for turn signals using the parking light
« Reply #39 on: September 21, 2026, 07:23:59 pm »
Use a CD4093/HEF4093 as already suggested, that has identical NAND logic, but includes a Schmitt action, which is useful for the RC timing element you need.
The inverter goes at the NMOS gate, can be a 4093 gate, or a small signal transistor/mosfet with pull-up.
 
The following users thanked this post: broly

Offline brolyTopic starter

  • Contributor
  • Posts: 48
  • Country: 00
Re: creating a switched circuit for turn signals using the parking light
« Reply #40 on: September 21, 2026, 07:41:34 pm »
Use a CD4093/HEF4093 as already suggested, that has identical NAND logic, but includes a Schmitt action, which is useful for the RC timing element you need.
The inverter goes at the NMOS gate, can be a 4093 gate, or a small signal transistor/mosfet with pull-up.

the inverter you're referencing *is* the CD4093, right?
 

Offline brolyTopic starter

  • Contributor
  • Posts: 48
  • Country: 00
Re: creating a switched circuit for turn signals using the parking light
« Reply #41 on: September 21, 2026, 07:58:36 pm »
Use a CD4093/HEF4093 as already suggested, that has identical NAND logic, but includes a Schmitt action, which is useful for the RC timing element you need.
The inverter goes at the NMOS gate, can be a 4093 gate, or a small signal transistor/mosfet with pull-up.

the inverter you're referencing *is* the CD4093, right?

btw about the inverter, are you SURE i need this?

i think i understand now why you believe i need it, because you're assuming the power wire for the bulb is receiving voltage (regardless of whether it is on) because we miscommunicated on the ground-side control exchange.

to clarify my approach better:

  • as of right now: when the bulb is OFF, it does NOT have voltage at the power wire (even when the car is on).
  • its power wire is "dead" unless i flip on the daytime lights (NOT on by default)
  • this makes sense because each bulb has a ground wire that has no control, so the flow of power must be what's controlled (otherwise the bulb would be on all the time)

does this change your position on the addition of an inverteR? thanks for the cd4093 recommendation btw.
   i had just placed the digikey order 2 minutes before you wrote that :/
       - but in any case, i should be able to see if the concept will work and simply swap the 4093 in afterwards.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf