# TTL to +/- 12V conversion - what's a better way?

The context here is the pilot generator for a J1772 EV charging station. The specification calls for a 1 kHz +/- 12 volt square wave with varying duty cycle. The output is sent through a 1 k resistor on its way out the door.

So far, two different solutions to this problem have been presented by the OpenEVSE community at large.

Solution 1 is an LF353 op amp driven by an unregulated bipolar 12 volt supply. The problem is that the LF353 is not rail-to-rail, and so the output impedance has to be adjusted to account for the reduced voltage. That works, but it's not compliant with the specification.

Solution 2 is to use analog switches, such as the DG303A to select between regulated +12 or -12 volts on the output. That works very well indeed, but the BOM for that is about \$5 just by itself.

It seems to me that there ought to be a much, much simpler way to achieve it. The analog switch seems to me to be vast overkill given that we're simply selecting between two regulated voltage levels given a logic level input.

I've tried to use circuitlab to come up with BJT or FET based switching, but gotten nowhere. It seems to me like some kind of simple push-pull "amplifier" is exactly what the doctor ordered... isn't it?

One of my (perhaps laughable) attempts:

simulate this circuit – Schematic created using CircuitLab

• I'd look at adapting an existing RS-232C level converter circuit for a "hard" ±12V. Commented Mar 19, 2014 at 20:11
• You should show us the circuits that you have tried. It doesn't help anyone if we suggest ideas that you have already discarded. Commented Mar 19, 2014 at 20:53
• @JoeHass I know a picture is worth a thousand words, but an op amp wired as a comparator and an analog switch with a simple logic input wired to +12 and -12 don't seem like they'd be particularly illustrative to me. Commented Mar 19, 2014 at 20:56
• You said you used circuitlab to "come up with BJT or FET based switching". Show us those circuits. Commented Mar 19, 2014 at 20:57
• @tcrosley Yes. I have SMD 7812/7912s being fed from a +/- 15 DC-DC converter. The cost reduction I seek is "downstream" of that. Commented Mar 19, 2014 at 21:20

Use an RS-232 transceiver IC. You don't say what the 12V tolerance is, but you might be able to get rid of your DC-DC and linear regulators if the +/- voltage from a charge-pump IC (max232) is good enough.

Otherwise, just connect the supply directly to a non-charge-pump transciever. Use MC1488/SN55188/SN75188, which has a 300 ohm output impedance, so your added series resistance would be 700 ohms.

• Looking at the MC1488 data sheet, there's a pretty big drop from the power supply voltage to the output voltage, and it appears to have a fairly loose tolerance in that regard. The LF353 solution looks to be beating it, at least from what I see. Commented Mar 20, 2014 at 0:03
• That's the 300 ohm output impedance. The open circuit voltage is less than that. You can use the CMOS version (MC14C88/DS14C88/75C188) and wire all four drivers in parallel to get closer to the rails. But it will be better than a LF353 regardless. Commented Mar 20, 2014 at 0:54

I believe I figured out the way I was looking for. It's certainly cheaper than the switch IC. I basically started with the idea of designing a "high side" switch circuit and then basically tried to come up with the compliment. The real "aha" moment was in realizing that the "primary" side of the compliment was going to need to be an emitter follower from the logic "high" level.

• Since this answer was posted, I changed the design to use MOSFETs for speed. On the "left" pair the gate (formerly base) bias resistors are 0Ω, and there's a 10kΩ pull-up to +5 to protect against floating input (during controller reset). On the "right" pair, each gate has a 1kΩ resistor to source and a 10kΩ resistor resistor to the previous stage's drain. This makes each secondary MOSFET turn off quicker than turn on, which reduces transient current. The result is < 1µs rise/fall time to 90%. Commented Jun 28, 2016 at 16:32
• are you still around? Can you show your MOSFET circuit and which MOSFETs you were using? Commented Sep 20, 2020 at 23:28
• Commented Sep 22, 2020 at 0:50

I need something similar, but faster. See here: Can Bruce Abbott's inverting TTL to +/- 12V level shifter be improved to better frequency response and better matched impedance?

The proposed solution I simulate like this:

here is its performance at its bandwidth limit at 400 kHz.

I need 4 MHz upward to 16 MHz, so it isn't working for my needs. And the level converted IC isn't either. So now I need to see if I can build it with the MOSFETs I have available, BS250 for p-channel and BS170 or 2N7000 for n-channel.

Now here is the simulation for the MOSFET replacement, I removed resistors to make it respond to the 4 MHz frequency:

blue is the drain of M1, red drain of M2 and then cyan the output between M3 and M4. This is very educational.

Now let's see this at 16 MHz, first double to 8:

that's already getting stressed, and now at 16 MHz:

it breaks down.

So, this won't work for me even in this ideal simulated case with no parasitic resistances and capacitances.

Here one more view of the 4 MHz circuit with the currents to see if it's feasible. Peaking at 1.5 A to supply that big swing, but I supposed a good bypass capacitor can provide that.

First, thanks Nick for your work in this area! Very much appreciated.

I've tried the two connected bjt collector variant - only to learn, that this is not very stable in my case, and prone to kill unbalanced transistors easily.

I settled on a more complex design for a MOSFET capable J1772 driver, with two push-pull bjt drivers (totem pole) to restict Vgs of the MOSFET independently. This is to allow for different MOSFETs with various Vth and VGS(max) ranges. While the push-pull BJTs will quickly charge and also discharge most of the gate capacitance, there are 10k D-S resistors (R5,R6) to fully drain the gate in case logic-level MOSFETs are used with a Vth in the same magnitude as the voltage drop of a PN junction (0.6-0.8V).

Many small signal / low cost SMD MOSFETs have a VGS(max) of only 7..10V, driving them with a emitter-follower swinging from nearly +12V to -12V will not extend their life. Most Power MOSFETs have a VGS of around 20V, so driving with approx. +/-23V may be using their margins too... The driving voltage can be adjusted in this circuit by the ratio between R1/R3 and R2/R4 respectively, to go into the fully turned on region quickly, but not exceed the VGS rating. (For higher voltage dual-rail applications, a Zener may be a good idea to protect the MOSFET.)

The VDS will be at least 24V, with some inductive overshoot - the SAE spec prescibes at most 2 usec between 10%/90% or 90%/10% level - or a minimum 10V/usec slew rate. Many jellybean opamps are not really equipped for that slew rate, or to swing from a proper +12V to a proper -12V rail (or become expensive).

The benefit of using MOSFETs is that they have minimal voltage drop even when loaded - a fully saturated BJT collector-emitter can still have a few tenths of volts drop.

Also, as the output has to have a 1k output impedance anyway, I added a resistor network of 1k resistors (R10..R15), to limit the current of any potential shoot-through (e.g. in case one of the BJTs breaks) to no more than 24 mA.

While 6 BJT plus one NMOS and PMOS may seem like overkill, the parts cost is still favourable compared to sufficiently fast OpAmps (Comparators in that voltage range usually come with open collector, thus can not push the output high), or even special push-pull, high voltage comparators such as the TLV1805, which is used in a TI application note for building a J1772 EVSE.

Also, Analog Switches, as mentioned, are quite expensive parts.

Just found that these particular ratings work well for a +5 Vcc (logic), they may need some tweaking for +3.3V Vcc - just like when adapting to different MOSFETs.