level shifting +3V to -5V - Page 1
Forum section: electronics / beginners

author: vixo
author_rank: Regular Contributor
timestamp: August 06, 2020, 02:06:50 pm
content: 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

author: TimFox
author_rank: Super Contributor
timestamp: August 06, 2020, 02:52:30 pm
content: 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.

author: vixo
author_rank: Regular Contributor
timestamp: August 06, 2020, 04:00:09 pm
content: 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

author: TimFox
author_rank: Super Contributor
timestamp: August 06, 2020, 05:09:59 pm
content: 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?

author: fourfathom
author_rank: Super Contributor
timestamp: August 06, 2020, 06:03:53 pm
content: Quote from: TimFox on August 06, 2020, 02:52:30 pmWith 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.

author: TimFox
author_rank: Super Contributor
timestamp: August 06, 2020, 06:11:06 pm
content: 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.

author: magic
author_rank: Super Contributor
timestamp: August 06, 2020, 08:43:00 pm
content: 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.

author: fourfathom
author_rank: Super Contributor
timestamp: August 06, 2020, 09:22:51 pm
content: Quote from: magic on August 06, 2020, 08:43:00 pmYes, 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.

author: Ian.M
author_rank: Super Contributor
timestamp: August 06, 2020, 09:28:02 pm
content: 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.

author: BrianHG
author_rank: Super Contributor
timestamp: August 06, 2020, 10:16:04 pm
content: 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.

author: fourfathom
author_rank: Super Contributor
timestamp: August 06, 2020, 10:45:49 pm
content: Quote from: BrianHG on August 06, 2020, 10:16:04 pmInteresting! 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?

author: BrianHG
author_rank: Super Contributor
timestamp: August 06, 2020, 10:58:12 pm
content: 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.

author: TimFox
author_rank: Super Contributor
timestamp: August 06, 2020, 11:42:22 pm
content: 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 pinnamesdiffer 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.

author: BrianHG
author_rank: Super Contributor
timestamp: August 06, 2020, 11:55:02 pm
content: Quote from: TimFox on August 06, 2020, 11:42:22 pmSince 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.

author: TimFox
author_rank: Super Contributor
timestamp: August 07, 2020, 01:06:00 am
content: 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.

author: David Hess
author_rank: Super Contributor
timestamp: August 07, 2020, 01:14:39 am
content: Quote from: TimFox on August 06, 2020, 02:52:30 pmThat 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.Quote from: Ian.M on August 06, 2020, 09:28:02 pmUse 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.

author: Zero999
author_rank: Super Contributor
timestamp: August 07, 2020, 12:28:45 pm
content: 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.

author: BrianHG
author_rank: Super Contributor
timestamp: August 07, 2020, 02:37:58 pm
content: Quote from: Zero999 on August 07, 2020, 12:28:45 pmSo 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...

author: radar_macgyver
author_rank: Frequent Contributor
timestamp: August 07, 2020, 03:30:48 pm
content: 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.pdfI 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.

author: fourfathom
author_rank: Super Contributor
timestamp: August 07, 2020, 03:31:30 pm
content: 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.

author: BrianHG
author_rank: Super Contributor
timestamp: August 07, 2020, 05:12:15 pm
content: Quote from: radar_macgyver on August 07, 2020, 03:30:48 pmAnother 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.

author: vixo
author_rank: Regular Contributor
timestamp: August 18, 2020, 12:03:55 pm
content: 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

author: Zero999
author_rank: Super Contributor
timestamp: August 18, 2020, 12:28:38 pm
content: It simulates perfectly for me.

author: magic
author_rank: Super Contributor
timestamp: August 18, 2020, 12:36:32 pm
content: 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.editNo, 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.

author: Ian.M
author_rank: Super Contributor
timestamp: August 18, 2020, 03:23:57 pm
content: 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.

author: pigrew
author_rank: Frequent Contributor
timestamp: August 18, 2020, 04:50:05 pm
content: It's probably an unpopular solution, but I would also look into digital isolators, such as theSI8620BB-B-ISR. This chip can handle 2.5 to 5.0 V.They're definitely more expensive, but are a robust single-chip solution. The input supply would be (3.3V,GND) while the output would be (GND,-5.0V). The Si8620 has propagation times of about 10 ns. You could also use the cheaper models, with longer propagation times.

author: Zero999
author_rank: Super Contributor
timestamp: August 18, 2020, 08:47:56 pm
content: I don't see the problem. With the generic BJT model, I got 230.6mV above ground, which is much less than a diode drop would barely cause the ESD diodes inside the IC to conduct. Changing R2 to 500R takes it down to very close to zero.With a real transistor model such as the BC327 or BC857 I got nearly a diode drop, but changing R1 to 560R brought it down to around -250mV. It also remains under a diode drop with models for similar small transistors and as the temperature is swept from -25 to 125oC.