I'm looking to understand how to convert between 3.3V logic and 12V logic, in each direction individually and bidirectionally. I know this question has been asked before, but I'm overwhelmed with the wide variety of possible answers. It seems like each of these have several different solutions.
Please consider that I'm using a 3.3V microcontroller (BeagleBone Black) on one side, and 12V relays on the other. This is not an automotive application. There will be about 50 different connections between these logic levels.
Ideally, a HIGH signal on one side would result in a HIGH signal on the other side. That is, I'd like to avoid inverting the signal.
3.3V to 12V
12V to 3.3V
- Voltage Regulator
- Resistors + Diodes
- Optoisolator
- Use one of the relays to simply switch the 3.3V signal
Bidirectional 3.3V ↔ 12V
Here it starts to get even more complex. I'd like to find a solution such that when either the 3.3V side or the 12V side is high, the other side goes high too. That means if the 3.3V side is logic 1, the 12V side will be logic 1 to match. When the 12V side is logic 1, the 3.3V side will be logic 1 to match. If either side is high, they are both high. If they are both low, then they'll stay low until one side changes. Almost like a logical OR.
- Some combination of the above.
- Specific bidirectional translators:
- 2 MOSFETs + Resistors per this application note
- Maybe this could be the MOSFET?
Which option(s) should I choose?
My head is spinning from all these options. I don't have enough knowledge to weigh these options against each other. I'm trying to avoid destroying the BBB by sourcing too much current. I'm also trying to be reasonable about cost (in terms of components and board space).
update:
It was clear from the feedback that I needed to provide more information. I thought it might be easier to correct a bad design, than to address this vague question.
I've created a "solution" to this problem here. I've requested feedback in that question. Any feedback there will address the intention behind this original question.