Author Topic: level shifting +3V to -5V  (Read 846 times)

0 Members and 1 Guest are viewing this topic.

Offline vixo

  • Contributor
  • Posts: 49
level shifting +3V to -5V
« on: August 06, 2020, 02:06:50 pm »
what kind of chip would I need to level shift from +3.3V to  -5V? i need it to be fast - transition in about 0.2uS. It seems like most level shifters shift only to positive voltages - can't find any for positive to negative
 

Offline TimFox

  • Super Contributor
  • ***
  • Posts: 1732
  • Country: us
  • Retired, now restoring antique test equipment
Re: level shifting +3V to -5V
« Reply #1 on: August 06, 2020, 02:52:30 pm »
How about a simple PNP transistor with its base to ground, emitter through resistor pulled up to +3.3, emitter-resistor node to logic drive, and collector resIstor pulled down to -5?  If your requirements are not met by commercial device, a discrete solution may be required.
 

Offline vixo

  • Contributor
  • Posts: 49
Re: level shifting +3V to -5V
« Reply #2 on: August 06, 2020, 04:00:09 pm »
thanks, ive not tried such an arrangement although I previously had a PNP transistor with the base biased slightly negative and it didn't perform too well speed wise because of the capacitance of the device and pull up resistor.

ill try the arrangement but otherwise, what kind of IC do you suggest? I can only seem to find ones that translate positive voltages
 

Offline TimFox

  • Super Contributor
  • ***
  • Posts: 1732
  • Country: us
  • Retired, now restoring antique test equipment
Re: level shifting +3V to -5V
« Reply #3 on: August 06, 2020, 05:09:59 pm »
There used to be shifters between +5 V TTL (roughly +3V logic level) and -5.2V ECL (much smaller swing), but I'm not aware of any that fit your voltages.
Where have you looked?  What resistor values did you try?
 

Online fourfathom

  • Frequent Contributor
  • **
  • Posts: 394
  • Country: us
Re: level shifting +3V to -5V
« Reply #4 on: August 06, 2020, 06:03:53 pm »
How about a simple PNP transistor with its base to ground, emitter through resistor pulled up to +3.3, emitter-resistor node to logic drive, and collector resIstor pulled down to -5? 

With the 3V logic drive connected directly to the emitter you are going to essentially short your drive to ground through the B/E diode junction.  Instead, I would still use the grounded-base config, but drive the emitter through a resistor.  You do need the resistor from collector to -5V.  This can be fast enough for your needs, but that collector resistor value will need to be low enough to deal with the capacitance at that node.  You can adjust the output voltage swing by playing with the two resistor values, and these will depend on your logic levels / loads.  If your drive logic doesn't have symmetrical hi/low drive you may need to add that emitter pull-up.

I simulated this with a 2N3906 (pretty generic PNP), a 470 Ohm emitter resistor, and a 1K collector resistor, putting a 10pF capacitor at the collector to stand in for the -5V logic load.  It was showing about 0.02 uS rise and fall time. 
 

Offline TimFox

  • Super Contributor
  • ***
  • Posts: 1732
  • Country: us
  • Retired, now restoring antique test equipment
Re: level shifting +3V to -5V
« Reply #5 on: August 06, 2020, 06:11:06 pm »
I was thinking (before morning coffee) of an open-collector output from the device, so that the emitter resistor would set the current into the emitter.  For a constant-voltage CMOS output (as he almost certainly has), you are correct that the resistor should go between the output and the emitter. 
 

Online magic

  • Super Contributor
  • ***
  • Posts: 2523
  • Country: pl
Re: level shifting +3V to -5V
« Reply #6 on: August 06, 2020, 08:43:00 pm »
A 1k5/1k divider to the -5V rail and some kind of buffer or inverter?

The PNP thing will likely work too, though I think there is a possibility of overdriving the output above ground if the emitter resistor is too low and the collector resistor too high.
 

Online fourfathom

  • Frequent Contributor
  • **
  • Posts: 394
  • Country: us
Re: level shifting +3V to -5V
« Reply #7 on: August 06, 2020, 09:22:51 pm »
The PNP thing will likely work too, though I think there is a possibility of overdriving the output above ground if the emitter resistor is too low and the collector resistor too high.

Yes, the Vbe - Vce(sat) can drive the collector slightly positive by a few tenths of a volt.  Replacing the collector resistor with a 2-resistor divider can ensure this doesn't happen, but I think proper selection of the emitter and collector resistors should be adequate.
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 9042
Re: level shifting +3V to -5V
« Reply #8 on: August 06, 2020, 09:28:02 pm »
Saturation is slow to recover from anyway.  If you can, trade off a little output swing for speed and choose the emitter and collector resistors so it doesn't quite saturate.
 

Online BrianHG

  • Super Contributor
  • ***
  • Posts: 4281
  • Country: ca
Re: level shifting +3V to -5V
« Reply #9 on: August 06, 2020, 10:16:04 pm »
74HC4053 will give you 3 switches.

At 3v VCC supply and VEE of -5v, it will take around 30ns to switch.
You may optionally invert your logic on each of the 3 channels just by the way you wire the device.
Your output may be from any analog value between VCC and VEE on your chosen output.
Output impedance may be around 100ohm.
You may use a 5v VCC if you want an even larger output swing with a switch time in the 15ns area and a 50ohm output.  You may still use 3v to control the output with a 5v VCC (use 74HCT4053 instead).

Plus, 0 current input unlike BJT solutions and matched high and low drive current output with matched rise and fall time.

Also, near 0 current whether switched high or low unlike simple BJT solutions meaning battery friendly.

No additional resistors in circuit.

And, you may wire all 3 switches in parallel to give you a 34ohm @3v VCC to 16ohm @5v VCC roasting the BJT in at least 1 voltage direction if not both drive directions right to both rails.
« Last Edit: August 06, 2020, 10:34:00 pm by BrianHG »
__________
BrianHG.
 
The following users thanked this post: edavid

Online fourfathom

  • Frequent Contributor
  • **
  • Posts: 394
  • Country: us
Re: level shifting +3V to -5V
« Reply #10 on: August 06, 2020, 10:45:49 pm »
74HC4053 will give you 3 switches.

Interesting!  I've only used these as single-supply analog switches, but I see how this would work.  The switch input would be tied to gnd or -5V, depending on what you want for logic inversion.  Won't you need a resistor pull-up (to gnd) or pull-down (to -5V) at the switch output?
 

Online BrianHG

  • Super Contributor
  • ***
  • Posts: 4281
  • Country: ca
Re: level shifting +3V to -5V
« Reply #11 on: August 06, 2020, 10:58:12 pm »
Nope, it's a real A/B analog switch.

If you have A at GND and B at -5v, IE: VEE.
When you set the switch to A, the switch 'COMMON' will be shorted to GND (IE:A) with a 100ohm resistor.
When you set the switch to B, within around 30ns, the 'COMMON' will be shorted to -5v (IE:B) with a 100 ohm resistor.

It's also bidirectional as the mosfet technology simulates a real bidirectional resistor from 1 input to the common.

Note that the A may also be at 3v making your output swing between 3v and -5v.

The digital switch control input only goes between GND & VCC to switch, not VEE.

They are also available in DIP for breadboarding.

I used to use these analog switches in pre-amps to select audio inputs.  Actually, the 74HC4052 variant was perfect for 4 channel stereo input selector, or, 2x 74HC4051 for 8 channel stereo input selector.  The +/-5v range was great and if I went with the old 4052, the range was +/-15v.

Other fancy muxes exist where the on resistance goes down to 2 or 1 ohm, however, they arent 8 cents each (30 cents for 1 from a reputable source) and they aren't manufactured by something like 10 different IC companies, all compatible with each other.
« Last Edit: August 06, 2020, 11:30:37 pm by BrianHG »
__________
BrianHG.
 

Offline TimFox

  • Super Contributor
  • ***
  • Posts: 1732
  • Country: us
  • Retired, now restoring antique test equipment
Re: level shifting +3V to -5V
« Reply #12 on: August 06, 2020, 11:42:22 pm »
The 4050 series are good choices for this application.  Note that the logic drive is between "GND" (pin 8 ) and "Vcc" (pin 16), but the switched voltages must be between "Vcc" (+3.3 V for your case) and "Vee" (pin 7, -5 V for your case).  Pin names from the Toshiba datasheet.   CMOS devices connected in this way can latch up (sometimes destructively) if any pin goes outside of the range between "Vcc" and "Vee" (most positive to most negative) by a full PN diode drop, due to parasitic SCRs.  This can be prevented by small Schottky diodes from the power connections to your circuit ground.  The "GND" pin is actually an input, being the reference for the logic input.  Those pin names differ slightly from the original (higher voltage but slower) RCA CMOS CD4053, who used Vdd for the highest voltage, Vee for the logic ground, and Vss for the most negative voltage (same pin numbers).
This can happen if the positive and negative supplies do not come up together.  For example, the output of a 7905-type negative regulator connected to Vee will be a high impedance before the regulator is active.  Current flowing from the Vcc pin to the now almost floating Vee pin can pull it positive above circuit ground = power supply common through that resistance, but the Schottky will keep the voltage below the fatal 0.6 V.
 

Online BrianHG

  • Super Contributor
  • ***
  • Posts: 4281
  • Country: ca
Re: level shifting +3V to -5V
« Reply #13 on: August 06, 2020, 11:55:02 pm »
The 4050 series are good choices for this application.  Note that the logic drive is between "GND" (pin 8 ) and "Vcc" (pin 16), but the switched voltages must be between "Vcc" (+3.3 V for your case) and "Vee" (pin 7, -5 V for your case).  Pin names from the Toshiba datasheet.   CMOS devices connected in this way can latch up (sometimes destructively) if any pin goes outside of the range between "Vcc" and "Vee" (most positive to most negative) by a full PN diode drop, due to parasitic SCRs.  This can be prevented by small Schottky diodes from the power connections to your circuit ground.  The "GND" pin is actually an input, being the reference for the logic input.  Those pin names differ slightly from the original (higher voltage but slower) RCA CMOS CD4053, who used Vdd for the highest voltage, Vee for the logic ground, and Vss for the most negative voltage (same pin numbers).
This can happen if the positive and negative supplies do not come up together.  For example, the output of a 7905-type negative regulator connected to Vee will be a high impedance before the regulator is active.  Current flowing from the Vcc pin to the now almost floating Vee pin can pull it positive above circuit ground = power supply common through that resistance, but the Schottky will keep the voltage below the fatal 0.6 V.
Since the mux inputs are derived from the supply, this shouldn't be a concern.
Also, the 74HC405x series already have IO protection diodes on each mux port with a 30ma capability according to the datasheet.

The CD405x is obsolete unless you really need the +/-18v range.
__________
BrianHG.
 

Offline TimFox

  • Super Contributor
  • ***
  • Posts: 1732
  • Country: us
  • Retired, now restoring antique test equipment
Re: level shifting +3V to -5V
« Reply #14 on: August 07, 2020, 01:06:00 am »
This isn’t a problem with the mux inputs, but can happen with the Gnd pin connected to the ground plane and the Vee pin temporarily open circuit during power up.  At that instant, the Gnd pin can become positive with respect to Vee.
The original CD4052 is slow, but can handle higher voltage.  The modern 74HC series is otherwise preferable.  Usually, the Schottky on Vee supply will prevent latch-up.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 11662
  • Country: us
  • DavidH
Re: level shifting +3V to -5V
« Reply #15 on: August 07, 2020, 01:14:39 am »
How about a simple PNP transistor with its base to ground, emitter through resistor pulled up to +3.3, emitter-resistor node to logic drive, and collector resIstor pulled down to -5?  If your requirements are not met by commercial device, a discrete solution may be required.

That is the first way I would consider.

If the open collector output is undesirable, then various line receivers with push-pull outputs are available in quads and perhaps higher count packages.

Saturation is slow to recover from anyway.  If you can, trade off a little output swing for speed and choose the emitter and collector resistors so it doesn't quite saturate.

Use a small signal schottky diode to baker clamp the transistor, but even with saturation a general purpose switching transistor should be fast enough without it.

« Last Edit: August 07, 2020, 01:17:13 am by David Hess »
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 14472
  • Country: gb
  • 0999
Re: level shifting +3V to -5V
« Reply #16 on: August 07, 2020, 12:28:45 pm »
The 74HC4053 is a good idea.

Presumably you want 0V in, 0V out and +3.3V in, -5V out. A PNP common base arrangement would give the reverse: 0V in, -5V out, +3.3V in, 0V out.

How about a P-JFET? It needs to cut-off at well under -3V, of course. The J177, or modern replacement, MMBFJ177 will do.
[attachimg=2]
« Last Edit: August 07, 2020, 12:30:26 pm by Zero999 »
 

Online BrianHG

  • Super Contributor
  • ***
  • Posts: 4281
  • Country: ca
Re: level shifting +3V to -5V
« Reply #17 on: August 07, 2020, 02:37:58 pm »
The 74HC4053 is a good idea.

Presumably you want 0V in, 0V out and +3.3V in, -5V out. A PNP common base arrangement would give the reverse: 0V in, -5V out, +3.3V in, 0V out.

How about a P-JFET? It needs to cut-off at well under -3V, of course. The J177, or modern replacement, MMBFJ177 will do.
[attachimg=2]
So long as you don't mind the -5v drive is a weak 10K pull-down, damn that's good!  :-+  Something I would have completely missed yet should have thought up if the 74HC4053 didn't exist since I used to use J-Fets a lot...
__________
BrianHG.
 

Offline radar_macgyver

  • Frequent Contributor
  • **
  • Posts: 424
  • Country: us
Re: level shifting +3V to -5V
« Reply #18 on: August 07, 2020, 03:30:48 pm »
These are often needed to drive PIN diodes, here's an app note showing an example:

https://www.microsemi.com/sites/default/files/datasheets/Products/rf/APPENDIX%20D.pdf

I had used the attached schematic to do the same. It required 5V TTL inputs, you may be able to use it at 3.3V by swapping the zener for a lower voltage variant. The 74AC04 is driven by the negative voltage applied to pin 7 and pin 14 grounded. I used the 100 ohm to limit the current into the diode, you may not need it. These were used to drive a set of PIN diode switches, which are rated at ~50 ns switching speed, the actual speed was faster than my measurement resolution of 200 ns.
 

Online fourfathom

  • Frequent Contributor
  • **
  • Posts: 394
  • Country: us
Re: level shifting +3V to -5V
« Reply #19 on: August 07, 2020, 03:31:30 pm »
Yes, that P-JFET is nice.  Do we know what the OP intends to drive with this?   He wants 0.2us rise/fall time, so the and AC (and DC) characteristics of the load are going to matter.
 

Online BrianHG

  • Super Contributor
  • ***
  • Posts: 4281
  • Country: ca
Re: level shifting +3V to -5V
« Reply #20 on: August 07, 2020, 05:12:15 pm »
These are often needed to drive PIN diodes, here's an app note showing an example:

https://www.microsemi.com/sites/default/files/datasheets/Products/rf/APPENDIX%20D.pdf

I had used the attached schematic to do the same. It required 5V TTL inputs, you may be able to use it at 3.3V by swapping the zener for a lower voltage variant. The 74AC04 is driven by the negative voltage applied to pin 7 and pin 14 grounded. I used the 100 ohm to limit the current into the diode, you may not need it. These were used to drive a set of PIN diode switches, which are rated at ~50 ns switching speed, the actual speed was faster than my measurement resolution of 200 ns.
Another good one though the switch threshold may be in question.  Maybe use a 74ACT04/74HCT04 instead of the AC variant to shrink that input switch threshold.

« Last Edit: August 07, 2020, 05:15:38 pm by BrianHG »
__________
BrianHG.
 

Offline vixo

  • Contributor
  • Posts: 49
Re: level shifting +3V to -5V
« Reply #21 on: August 18, 2020, 12:03:55 pm »
is this (attached) what is meant? it seems to work fine except the collector always goes one diode drop above ground, i can't seem to change the resistor values so it doesn't happen

 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 14472
  • Country: gb
  • 0999
Re: level shifting +3V to -5V
« Reply #22 on: August 18, 2020, 12:28:38 pm »
It simulates perfectly for me.
 

Online magic

  • Super Contributor
  • ***
  • Posts: 2523
  • Country: pl
Re: level shifting +3V to -5V
« Reply #23 on: August 18, 2020, 12:36:32 pm »
Please draw positive voltages up, negative down. It's confusing the other way around.

Increase R1 to 560Ω and try again. The thing is, collector and emitter currents are almost equal here, so voltage across R2 is simply R2/R1 higher than voltage across R1, which is about 3.3V-0.65V.

edit
No, it's wrong. Disconnect R1 from 3.3V and connect the input signal there.

This scheme is problematic, though, because the accuracy of "high" output voltage will depend on the exact value of positive and negative power supplies and on temperature (the 0.65V part is the base emitter voltage of the transistor, and it varies 2mV/°C). Most other solutions shown here don't have this problem.
« Last Edit: August 18, 2020, 12:41:05 pm by magic »
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 9042
Re: level shifting +3V to -5V
« Reply #24 on: August 18, 2020, 03:23:57 pm »
It could be solved by adding a precision clamping circuit, but, keeping R1 at 470 ohms, even a BAT54C dual Schottky diode, common cathode pulled down to -5V by a 4.3K resistor, one anode to 0V (to stabilize the cathode potential one diode drop below ground) and the other to Q1 collector would make a major improvement, keeping the logic '1' level t within 20mV of ground over a wide temperature range.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf