Using any of multiple inputs as power as well as being able to test for them. - Page 1
Forum section: electronics / beginners

author: PoDuck
author_rank: Regular Contributor
timestamp: August 18, 2020, 08:50:20 pm
content: This question is hard to enter into a search engine, so hopefully it's not so hard to explain.I am wanting to make a sequencer for tail lights, but not in the way normally shown everywhere. I intend to use a parallel eeprom and a binary counter instead of a decade counter. Because of this, I have gotten myself stuck using CMOS level chips that don't take too kindly to being fed 12 volts. On the other hand, I still need to be able to run incandescent bulbs, and I want to run it from already existing wiring, which makes getting a separate 12V source a problem. The good news is, this vehicle originally had sequential turn signals, so the power to them is constant as long as the turn signals or brake lights are on.I have brake lights, and left and right turn signals, all that I need to sense. I can't combine the 12V lines or the 5V lines directly, because it will keep me from being able to sense which line the power is coming in on. Is there a way to have power pass through from any combination of lines to power a single circuit while still being able to sense which line the power came from? Doing this on the 12V side would be best, as I need 12V power whenever any line is active as well.I have attached a portion of the schematic to give an idea of what I'm trying to accomplish. It is only showing the low power side of things. The left, right, and brake inputs are simply run for understanding why I need to sense them. There is currently no way setup to power the circuit.

author: ledtester
author_rank: Super Contributor
timestamp: August 18, 2020, 09:33:57 pm
content: To have low-voltage logic chips sense higher voltage signals you can use an opto-coupler.Here is a tutorial on how to have low-voltage logic control higher-voltage signals, but the idea is the same for the other way around:https://www.instructables.com/id/How-to-Use-an-Optocoupler-to-Pass-Signals-Between-/And check out the "Digital Interfacing" section of this article:https://www.nutsvolts.com/magazine/article/optocoupler-circuitsAnd instead of an opto-coupler you could use a transistor, either BJT or MOSFET.

author: PoDuck
author_rank: Regular Contributor
timestamp: August 18, 2020, 09:54:02 pm
content: I'm afraid the problem seems as though it would be the same with an opto-isolator, which means I may not have explained my problem well enough.Imagine I have 3 inputs where any combination of them could be passing 12V. There is a circuit that needs to be run with 12V from those inputs to drive the tail lights, whichever input(s) they are. The problem comes in trying to figure out which input is being used so I can pass it to the CMOS level circuit which sends the signal that triggers the switches on the 12 volt side, while still being able to power the circuit. If I could figure out how to do the higher voltage side, I could figure out the lower voltage side.

author: PoDuck
author_rank: Regular Contributor
timestamp: August 18, 2020, 09:56:26 pm
content: Maybe this would be the better question. Is there a way to split a signal in two in a way that what is done to one net is not done to the other?

author: ledtester
author_rank: Super Contributor
timestamp: August 18, 2020, 10:14:57 pm
content: So you're trying to use the brake signal as your power supply (if it is turned on) or the left/right turn signal power (if they are active)? And if none of those are on then your circuit doesn't get any power?

author: PoDuck
author_rank: Regular Contributor
timestamp: August 18, 2020, 10:22:35 pm
content: Absolutely correct.

author: PoDuck
author_rank: Regular Contributor
timestamp: August 19, 2020, 12:43:15 am
content: I have finished up more of the rest of the circuit. Maybe someone can get me from the inputs at the top to where I need to be, now that it's mostly finished.

author: ledtester
author_rank: Super Contributor
timestamp: August 19, 2020, 01:24:20 am
content: Diodes might work, depending on what the light signals really are, e.g.:Code:brake ---|>|---+|left ---|>|---+----+ "12V"|right ---|>|---+If you use BJTs you'll need resistors on the D0-D5 outputs of the EPROM.

author: PoDuck
author_rank: Regular Contributor
timestamp: August 19, 2020, 02:13:22 am
content: You can look at the inputs as being straight from the car battery with switches on them. Putting diodes on them won't have much effect, although I was going to put diodes on all inputs and outputs anyway, just to protect things from the unknown.Anyway, I can get 12 volts that way, but I won't be able to distinguish which lines have 12 volts on them, and which don't, which is needed.As for resistors on the bjts, yes. The schematic has a good bit left to go. I just wanted to have something people can see so they get the idea of what I need.What I need is a way to split the 12 volts on each input. One direction gets combined in the way you showed, and the other line will only be high or low if the line was high or low originally.

author: ledtester
author_rank: Super Contributor
timestamp: August 19, 2020, 02:55:15 am
content: Quote from: PoDuck on August 19, 2020, 02:13:22 amThe diodes give you the power and the opto-couplers (or transistors) give you the sensing ability.Here's the general idea to translate the 12V signal to 5V. Q1 can be an opto-coupler or BJT transistor. If you use a MOSFET you'll want a pull-down resistor on the gate.Note that the signal will be inverted -- when the Brake signal is "high" the GPIO pin will be "lo".

author: ledtester
author_rank: Super Contributor
timestamp: August 19, 2020, 03:20:28 am
content: Note that automotive environments tend to be very noisy. Some relevant threads:-https://www.eevblog.com/forum/projects/requesting-advice-to-reduce-noise-in-car-audio-pcb/msg3090233/#msg3090233-https://www.eevblog.com/forum/beginners/sensing-automotive-12v-with-rpi-opto/msg823034/#msg823034-https://www.eevblog.com/forum/beginners/555-timer-in-a-car-cleaning-up-the-12v-supply/-https://www.eevblog.com/forum/projects/powering-atmega-dac-and-buetooth-module-in-car/More on automotive load dumps:https://www.powerelectronictips.com/automotive-load-dump-tvs-a-unique-transient-voltage-suppression-application/

author: PoDuck
author_rank: Regular Contributor
timestamp: August 19, 2020, 12:42:18 pm
content: It's been too long since I've worked with this stuff. My thinking on the diodes is brain dead. Of course the current doesn't go back up the diode. That is their purpose.For some reason I was thinking that they were meant to keep the power polarized, so that positive was on one side, while negative is on the other. In that scenario, current would be able to return through the diode.Anyway, I have my answer. I feel embarrassed now.Thank you very much.