1
\$\begingroup\$

This is a controller I was going to make to operate a 2 wire LED as a side marker / turn signal light on my off road (so, no need to get bent out of shape about FMVSS and DOT requirements) Jeep. The problem is that it is wired from the factory with a single filament bulb and two powered circuits using a floating ground. The obviously won't work, because you can't reverse polarity through an LED like you can with a filament bulb. I have done the same thing before with some standard automotive diodes and relays, but I wanted a more elegant solution and this is more fun (not to mention this way is actually cheaper and takes up way less space). So, yes this is a complex solution to a simple problem, but I like doing stuff like this and learning along the way.

EDIT - I re-drew the circuit using the XOR gate. will it work properly as designed now? REVISION - (edited as recommended)

The idea here is that the marker and turn signal functions work normally when used separately, but when the marker is on the turn signal will cause it to "blink" off.

LEDlogic

I added diodes and capacitors in the power lines after reading the cautions on the product data sheets to do so in order to keep the gates and the relay more stable. They may not be necessary, but for a few bucks it's better safe than sorry.

I just wanted to see if the people on here thought it would function properly the way I have it drawn before I go prototyping it. THANKS!

schematic

simulate this circuit – Schematic created using CircuitLab

EDIT #2: here is the original seriously flawed schematic for discussion reference purposes -

schematic

simulate this circuit

\$\endgroup\$
  • 3
    \$\begingroup\$ This seems like a spectacularly complicated way of making a bridge-rectifier out of logic, etc... \$\endgroup\$ – brhans Jun 14 '17 at 19:00
  • 1
    \$\begingroup\$ I wouldn't try to power the NAND gate from the output of the OR gate, like you've done. The NAND has input clamping diodes that will pass input voltage to its supply rail when unpowered. Just a big 'no'. Please edit your question with a truth table (TURN&MARKER = 00, 01, 10, 11) showing what you want the circuit to do for all 4 cominbations of input voltage. Then we'll know what problem you're trying to solve. Thanks. \$\endgroup\$ – TonyM Jun 14 '17 at 19:03
  • \$\begingroup\$ That makes it clear so, yes, use a bridge rectifier as the others have said. With all that circuit, I thought there was some hidden complication I'd missed :-) \$\endgroup\$ – TonyM Jun 14 '17 at 19:39
  • \$\begingroup\$ If you really want to do this with digital logic, then the logic gate you're looking for is an XOR (exclusive or). Its output is high when its input are different, and low when they are the same - just like your truth-table shows. \$\endgroup\$ – brhans Jun 15 '17 at 3:07
  • \$\begingroup\$ Thank you! I will re-draw using that gate. What about the rest of the circuit? Do I need to use higher V rated components (over 16V)? Are the capacitors too large or the diodes too small? \$\endgroup\$ – LsD Jun 15 '17 at 10:24
1
\$\begingroup\$

It's pretty "brave" to connect (what I think are) 16V (18V abs max) logic chips directly to a 12V automotive supply. Automotive standards call for survival of transients much larger than that. At least you have a diode to prevent negative transients from zapping things.

Please give manufacturer part numbers not distributor numbers.

The NAND will get powered by the protection diodes whenever either input is high.

There is no current limiting- it's not for sure the wimpy little BAV21 diodes will survive charging the 10uF caps, nor is it clear what exactly discharges them.

There should be a series resistor on the SSR LED to limit the current.


I agree with @brhans comment- just stick a W04M in there and be done with it.

enter image description here

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
  • \$\begingroup\$ I'm confused again, there are two "filaments here. I am using a 2 wire LED to serve both functions. \$\endgroup\$ – LsD Jun 14 '17 at 20:33
  • \$\begingroup\$ So do I need to just use higher V rated gates? I edited my question and added mfc part#s. I dont know what you mean by "NAND will get powered by the protection diodes whenever either input is high". Would you suggest larger diodes or smaller capacitors (1 miro farad?)? Are you saying I need a resistor in the input line to the relay? \$\endgroup\$ – LsD Jun 14 '17 at 20:53
  • \$\begingroup\$ I may not be opposed to using a bridge rectifier, but I'm not seeing how. I have two possible inputs, and a single output. The inputs and the turn signal power and the marker power. The output is a LED light with only two wires (a positive and a negative). I want the output active when either of the inputs is active, but non active when nether is or both are. I do not have two lamps or filaments. I would still like to know what I did wrong in my original design and I may still build it just for funsies if I can figure out what is wrong and why and how to fix it. \$\endgroup\$ – LsD Jun 14 '17 at 21:16
  • \$\begingroup\$ note that the zener won't stop automotive transients. They can be pretty rough. Need MOVs or other TVS's. Many automotive "TVS" circuits simply disconnect when there's a spike, as it's too difficult/expensive to deal with it. \$\endgroup\$ – tyblu Jun 15 '17 at 18:24
  • 1
    \$\begingroup\$ I went ahead and ordered these components and will prototype and test this. Thanks for the help! \$\endgroup\$ – LsD Jun 20 '17 at 17:42
1
\$\begingroup\$

If you would prefer a more robust circuit here is one that does not use any fragile CMOS chips and hence does not require much protection. D2/D3/R1/R2/Q1/Q2 are a discrete exclusive-OR gate driving the power MOSFET, much as @transistor's answer. The zener D1 protects the MOSFET gate.

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
  • \$\begingroup\$ That's odd, going from recommending a bridge rectifier to all this circuitry - what's the benefit over a bridge rectifier? No disrespect but was about to downvote it. \$\endgroup\$ – TonyM Jun 14 '17 at 19:59
  • \$\begingroup\$ A bit less voltage drop.. it's just a kind of fun exercise and a break from the current project with hundreds and hundreds of components. \$\endgroup\$ – Spehro Pefhany Jun 14 '17 at 20:01
  • \$\begingroup\$ I though it was you couldn't resist, it's a fun one to have a crack at :-) But I'll have to downvote so it's not mistaken as a plausible answer in the long run. \$\endgroup\$ – TonyM Jun 14 '17 at 20:06
  • 1
    \$\begingroup\$ @TonyM Gotta do what you gotta do ;-) - I think it's a good illustration of a 'complete' solution rather than a 'outline' that doesn't have protection etc. \$\endgroup\$ – Spehro Pefhany Jun 14 '17 at 22:11
  • 1
    \$\begingroup\$ +1 to any feasible suggestions with discretes, in the spirit of AoE :) \$\endgroup\$ – tyblu Jun 15 '17 at 18:17
1
\$\begingroup\$

I think we can simplify your schematic a little:

schematic

simulate this circuit – Schematic created using CircuitLab

Figure 1. The required XOR (exclusive OR) function is performed by the existing relay / switch logic on the left. Since lamp polarity reverses in operation a rectifier is required when converting to LED.

\$\endgroup\$
  • \$\begingroup\$ Yes, I know it is a complicated solution to simple problem. I am mostly wanting to do it this way to practice and learn (re-learn) logic circuits and for an excuse to build a PCB with SMD components. What I don't understand is why the two above circuits have two "lamps". Tis circuit is for one light on one side of the vehicle to operate as a marker and a turn signal and will be duplicated on both sides of the vehicle. And, yes the LEDs are designed for 12V automotive lighting applications. \$\endgroup\$ – LsD Jun 14 '17 at 20:30
  • \$\begingroup\$ The lamps represent the existing vehicle lamps on that side of the vehicle. \$\endgroup\$ – Transistor Jun 14 '17 at 20:55
  • \$\begingroup\$ That is not what I am trying to do. I am replacing 1 lamp (single filament bulb) with a sigle LED. I thought I explained pertty explicitly in my question, maybe I was unclear. \$\endgroup\$ – LsD Jun 14 '17 at 20:59
  • \$\begingroup\$ Your question is far from clear, I'm afraid. If you had drawn a schematic of the existing system it would have been much clearer. I've updated my answer. Anything more complex would be madness. \$\endgroup\$ – Transistor Jun 14 '17 at 22:02
  • \$\begingroup\$ When I get to work tomorrow I'll be happy to post the schematics of the original circuit. I will also post the circuit I built on the other Jeep. If I knew how my question was unclear I would clear it up. I would seriously also like to know what I did wrong that would kame my original circuit not work. This is a project or experiment for learning and trying new things just as much as it is a solution to a problem. Thank you all for your responses. \$\endgroup\$ – LsD Jun 14 '17 at 22:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.