PS: If you're impatient, you may skip to THE_POINT below:
Basically, this is for various lights in a car - indicators, park/rear light, brake light. I want to convert the simple output from non-American cars to lights similar to the American standard - in other words:
- pure red rear lights where the brake light bulb also works as indicator
- side markers that are lit when park light is on, but turns off when the indicator light goes on, making them blink alternately from the indicators
- side markers still blink when the park light is off, but in this case they blink simultaneously with the indicators (but, I wouldn't mind if they would blink alternately)
In other words:
- BRAKE XOR INDICATOR
- PARK XOR INDICATOR
I've implemented this many times using Single Pole Double Throw relays. For normal light bulbs, you only need 4 SPDT relays converting the 12V or floating signal to proper 0V or 12V, one for each of right indicator, left indicator, park light, brake light. You connect ground to the Normally Closed pin of the relay 12V to the Normally Open and use the common pin as the new output.
- For the indicators in front, which uses double bulbs, you connect park to 5W and indicators for the 21W connector and ground to ground. This works even without the relays.
- For the side markers you connect park light to one side and the indicator to the other side of the bulb.
- For the rear blink/brake light, you connect the brake light to one side and the indicator to the order side, You can't a use double (5W/21W) bulb with rear light on the 5W connector because then there will be no light when both the indicator and brake light is on, not even rear light - which is wrong.
Now, this is all fine, but it further complicates things if you want to use LED light, and they obviously won't work with 12V on the wrong side, so I now need:
- 2 relays using brake light as one input and left/right indicator as the other input - the output goes to the red brake/indicator light
- 2 relays using park light as one input and left/right indicator as the other input - the output goes to both front (orange) and rear (red) side markers
It feels a but wrong though, to use relays that sometimes draw more power than the LED lights they drive, so I wish to do is using electronics instead.
What I'm looking for then is:
- (A) a circuit that have two inputs which are 12V when on and are floating when off, and outputs 12V if either of the two inputs are high, and 0V if both are low or both are high. This is exactly the same as a logical XOR gate - and yes, I'm considering to use one of those with a mosfet driver if it gets too complicated.
- (B) a circuit that takes a floating-when-off and 12V-when-on signal and turns it into proper 0V when off and 12V when on, and which can drive a couple of amps.
- (C) if it saves a few components on A, we could use B on all inputs and then deal with 0V instead of floating.
EDIT: Using the diode bridge trick, here's the circuit so far (exactly the same for the brake/indicator light - just replace the park light input with brake light. Obviously, there are two indicators, left and right, so the total number of relays is now 4 - Brake, Park, Left Indicator, Right Indicator What I'm looking at now is a way to replace the relays making the signals 0V/12V, for cost, size and reliability reasons.