I'm trying to connect an EM4095 to a cortex m0. The EM4095 requires an active high drive voltage of min 4V and has an internal pull down of 50K. Additionally it must be low during boot, otherwise it won't boot or something. yey.
How do you drive such a thing from 3V logic. All logic converter circuits i found rely on the sense pin to be floating or pull-up. Let's look at a couple.
I will call the 3.3V MCU pin LV and the 5.0V EM pin HV.
- all float: 3.3V on LV and ~3.0(minus drop) on HV
- LV pushes: same thing
- HV pushes: same thing, diode will protect from 5V on LV
- LV pulls: 0V on HV
- HV pulls: 0V on HV
sounds good, except it won't work because i need 4V high. Let's look at some other circuits:
This one is from a sparkfun i2c converter. The circuit is recommended for I2C and other open drain stuff, which i don't have.
- all float: both sides get voltage from their pullups.
- LV pushes: FET doesn't do anything, HV will get 5V from the pullup
- HV pushes: same thing
- LV pulls: FET closes and starves the pullup, so we get 9 on HV
- HV pulls: right through that diode so HV starves all the pullups.
since my HV thing is actually a pull-down, it will draw current when the fet isnt closed. And it will also draw current when it closes. So it will always waste current. But the worst part is, it'll be high before the mcu finishes booting to pull it, so the EM thing won't boot.
Ok so since everything i find on the internet for 'voltage translation/conversion/etc' is about open-drain pull-up, i am trying to come up with something else. I know its not allowed to ask for ICs on EE Stack so i'd like to ask what the correct discrete circuit is, so i can look up an IC later.
Fortunately i know the direction of all of the pins. They're uni-directional. So i thought this circuit might work:
The idea is that the transistor won't close when LV is high, so no current will flow and the internal pull up will pull HV high. I need to reverse the logic in software then. When LV pulls, +5V will be shoved into HV. This behaves acording to the spec of the IC i'm trying to use.
In the reverse direction, i can simply use a voltage divider to drop the voltage from 5V to something my MCU can deal with.
Will this work properly? Are there better ways to do it? And if this is a good way, whats a name of this circuit that i can google for to find an IC? (not enough space for discrete btw)