Electronics-Related.com
Forums

Minimilist Level Shifting

Started by Ricky April 8, 2023
I'm tired of digging around looking for an optimal chip to level shift a pair of signals from 5V TTL (an RS-422 transceiver) to 3.3V CMOS.  There are too many devices, and no small number of them are impacted by the semiconductor shortage.  But resistors are pretty available, as are Zener diodes. 

So, I could use a pair of resistors to simply divide the TTL output voltage to something safe for CMOS.  But there's not much wiggle room, given that the TTL output is not well specified.  If the current through the divider is minimized, this slows the signal edges.  So a mA or two needs to be flowing when the output is high, but not much more, because of the power budget.  

Another option is to use a Zener diode.  Most Zeners are specified at 5 to 20 mA of current. Running at 1 mA is into the knee as best I can tell, not desirable, resulting in poor regulation. 

I'm thinking with the variation in output voltage from the TTL output, the Zener might not do much better than resistors. 

Any thoughts? 

-- 

  Rick C.

  - Get 1,000 miles of free Supercharging
  - Tesla referral code - https://ts.la/richard11209
On 4/8/2023 9:22 PM, Ricky wrote:
> I'm tired of digging around looking for an optimal chip to level shift a pair of signals from 5V TTL (an RS-422 transceiver) to 3.3V CMOS. There are too many devices, and no small number of them are impacted by the semiconductor shortage. But resistors are pretty available, as are Zener diodes. > > So, I could use a pair of resistors to simply divide the TTL output voltage to something safe for CMOS. But there's not much wiggle room, given that the TTL output is not well specified. If the current through the divider is minimized, this slows the signal edges. So a mA or two needs to be flowing when the output is high, but not much more, because of the power budget. > > Another option is to use a Zener diode. Most Zeners are specified at 5 to 20 mA of current. Running at 1 mA is into the knee as best I can tell, not desirable, resulting in poor regulation. > > I'm thinking with the variation in output voltage from the TTL output, the Zener might not do much better than resistors. > > Any thoughts? >
The common base shifter seems a good compromise between cost and speed/power consumption: <https://next-hack.com/wp-content/uploads/2017/09/A5I9.png> And there's Jim Thompson's variant on it if the naked topology edges are too slow: <https://electrooptical.net/static/oldsite/www.analog-innovations.com/SED/LogicLevelTranslator74HC14-RevA.pdf>
On Sat, 8 Apr 2023 22:22:44 -0400, bitrex <user@example.net> wrote:

>On 4/8/2023 9:22 PM, Ricky wrote: >> I'm tired of digging around looking for an optimal chip to level shift a pair of signals from 5V TTL (an RS-422 transceiver) to 3.3V CMOS. There are too many devices, and no small number of them are impacted by the semiconductor shortage. But resistors are pretty available, as are Zener diodes. >> >> So, I could use a pair of resistors to simply divide the TTL output voltage to something safe for CMOS. But there's not much wiggle room, given that the TTL output is not well specified. If the current through the divider is minimized, this slows the signal edges. So a mA or two needs to be flowing when the output is high, but not much more, because of the power budget. >> >> Another option is to use a Zener diode. Most Zeners are specified at 5 to 20 mA of current. Running at 1 mA is into the knee as best I can tell, not desirable, resulting in poor regulation. >> >> I'm thinking with the variation in output voltage from the TTL output, the Zener might not do much better than resistors. >> >> Any thoughts? >> > >The common base shifter seems a good compromise between cost and >speed/power consumption: > ><https://next-hack.com/wp-content/uploads/2017/09/A5I9.png> > >And there's Jim Thompson's variant on it if the naked topology edges are >too slow: > ><https://electrooptical.net/static/oldsite/www.analog-innovations.com/SED/LogicLevelTranslator74HC14-RevA.pdf>
Why not one resistor?
On Saturday, April 8, 2023 at 10:22:51&#8239;PM UTC-4, bitrex wrote:
> On 4/8/2023 9:22 PM, Ricky wrote: > > I'm tired of digging around looking for an optimal chip to level shift a pair of signals from 5V TTL (an RS-422 transceiver) to 3.3V CMOS. There are too many devices, and no small number of them are impacted by the semiconductor shortage. But resistors are pretty available, as are Zener diodes. > > > > So, I could use a pair of resistors to simply divide the TTL output voltage to something safe for CMOS. But there's not much wiggle room, given that the TTL output is not well specified. If the current through the divider is minimized, this slows the signal edges. So a mA or two needs to be flowing when the output is high, but not much more, because of the power budget. > > > > Another option is to use a Zener diode. Most Zeners are specified at 5 to 20 mA of current. Running at 1 mA is into the knee as best I can tell, not desirable, resulting in poor regulation. > > > > I'm thinking with the variation in output voltage from the TTL output, the Zener might not do much better than resistors. > > > > Any thoughts? > > > The common base shifter seems a good compromise between cost and > speed/power consumption: > > <https://next-hack.com/wp-content/uploads/2017/09/A5I9.png> > > And there's Jim Thompson's variant on it if the naked topology edges are > too slow: > > <https://electrooptical.net/static/oldsite/www.analog-innovations.com/SED/LogicLevelTranslator74HC14-RevA.pdf>
Maybe I'm missing something, but the transistor circuit seems to be equivalent to an open collector circuit. I suppose the transistor action on the rising edge in this configuration does pump current into the 3.3V side until the BE is no longer forward biased, so a speed up over a simple pullup. In this case the actual pullup just assures the signal stays high when the transistor is cut off. Still, that's two resistors and a transistor, so more circuitry than a pair of resistors or a resistor-Zener combination. I can get two Zeners in a SOT-363 package which is just 2 x 2 mm. Also, the two resistors are likely to draw more current that a simple resistor or Zener circuit. I can't say I understand the other circuit. Should I assume the inverter is powered from 3.3V? It would appear that R3 is important to the delay of the circuit and presents the same problems of current draw as the Zener or resistor circuits. The 74HC14 is 5V tolerant. Why not just use the inverter by itself? What am I missing? -- Rick C. + Get 1,000 miles of free Supercharging + Tesla referral code - https://ts.la/richard11209
On 09/04/23 11:22, Ricky wrote:
> I'm tired of digging around looking for an optimal chip to level shift a pair of signals from 5V TTL (an RS-422 transceiver) to 3.3V CMOS. There are too many devices, and no small number of them are impacted by the semiconductor shortage. But resistors are pretty available, as are Zener diodes. > > So, I could use a pair of resistors to simply divide the TTL output voltage to something safe for CMOS. But there's not much wiggle room, given that the TTL output is not well specified. If the current through the divider is minimized, this slows the signal edges. So a mA or two needs to be flowing when the output is high, but not much more, because of the power budget. > > Another option is to use a Zener diode. Most Zeners are specified at 5 to 20 mA of current. Running at 1 mA is into the knee as best I can tell, not desirable, resulting in poor regulation. > > I'm thinking with the variation in output voltage from the TTL output, the Zener might not do much better than resistors. > > Any thoughts? >
I use this arrangement: <https://www.digikey.com/en/blog/logic-level-shifting-basics? Works in both directions, speed-limited by the pullup R on one side.
On 4/8/2023 10:39 PM, John Larkin wrote:
> On Sat, 8 Apr 2023 22:22:44 -0400, bitrex <user@example.net> wrote: > >> On 4/8/2023 9:22 PM, Ricky wrote: >>> I'm tired of digging around looking for an optimal chip to level shift a pair of signals from 5V TTL (an RS-422 transceiver) to 3.3V CMOS. There are too many devices, and no small number of them are impacted by the semiconductor shortage. But resistors are pretty available, as are Zener diodes. >>> >>> So, I could use a pair of resistors to simply divide the TTL output voltage to something safe for CMOS. But there's not much wiggle room, given that the TTL output is not well specified. If the current through the divider is minimized, this slows the signal edges. So a mA or two needs to be flowing when the output is high, but not much more, because of the power budget. >>> >>> Another option is to use a Zener diode. Most Zeners are specified at 5 to 20 mA of current. Running at 1 mA is into the knee as best I can tell, not desirable, resulting in poor regulation. >>> >>> I'm thinking with the variation in output voltage from the TTL output, the Zener might not do much better than resistors. >>> >>> Any thoughts? >>> >> >> The common base shifter seems a good compromise between cost and >> speed/power consumption: >> >> <https://next-hack.com/wp-content/uploads/2017/09/A5I9.png> >> >> And there's Jim Thompson's variant on it if the naked topology edges are >> too slow: >> >> <https://electrooptical.net/static/oldsite/www.analog-innovations.com/SED/LogicLevelTranslator74HC14-RevA.pdf> > > Why not one resistor? >
One resistor from the 5 volt output to the upper clamp diode of the following 3.3 V CMOS seems OK for low speeds but RS-422 can go fast, do we wanna go fast? Don't know.
On Sunday, April 9, 2023 at 12:29:25&#8239;AM UTC-4, bitrex wrote:
> On 4/8/2023 10:39 PM, John Larkin wrote: > > On Sat, 8 Apr 2023 22:22:44 -0400, bitrex <us...@example.net> wrote: > > > >> On 4/8/2023 9:22 PM, Ricky wrote: > >>> I'm tired of digging around looking for an optimal chip to level shift a pair of signals from 5V TTL (an RS-422 transceiver) to 3.3V CMOS. There are too many devices, and no small number of them are impacted by the semiconductor shortage. But resistors are pretty available, as are Zener diodes. > >>> > >>> So, I could use a pair of resistors to simply divide the TTL output voltage to something safe for CMOS. But there's not much wiggle room, given that the TTL output is not well specified. If the current through the divider is minimized, this slows the signal edges. So a mA or two needs to be flowing when the output is high, but not much more, because of the power budget. > >>> > >>> Another option is to use a Zener diode. Most Zeners are specified at 5 to 20 mA of current. Running at 1 mA is into the knee as best I can tell, not desirable, resulting in poor regulation. > >>> > >>> I'm thinking with the variation in output voltage from the TTL output, the Zener might not do much better than resistors. > >>> > >>> Any thoughts? > >>> > >> > >> The common base shifter seems a good compromise between cost and > >> speed/power consumption: > >> > >> <https://next-hack.com/wp-content/uploads/2017/09/A5I9.png> > >> > >> And there's Jim Thompson's variant on it if the naked topology edges are > >> too slow: > >> > >> <https://electrooptical.net/static/oldsite/www.analog-innovations.com/SED/LogicLevelTranslator74HC14-RevA.pdf> > > > > Why not one resistor? > > > One resistor from the 5 volt output to the upper clamp diode of the > following 3.3 V CMOS seems OK for low speeds but RS-422 can go fast, do > we wanna go fast? Don't know.
They don't call me Ricky Bobby for nothin'! Yeah, I don't know if it is used much, but the RS-422 device is rated for 20 MHz or more and there's no reason for this circuit to slow it down. I don't recall the speed limitation inside the FPGA. Not because of logic delays, but there's a circuit to extract a clock from data transitions which can't run faster than a third the FPGA clock. Sort of a Nyquist like thing. I'll probably just use a couple of LVC inverters. It's probably just easier to do that, than to fuss over the limitations of a circuit that will be twice the size on the board. Generally, I like to optimize designs for costs in manufacturing, and of course, the board is going to be very, very tight. At least the parts shortages seem to be loosening up a bit. Right now, I don't have any parts in the design that I can't buy. That's a big plus! -- Rick C. -- Get 1,000 miles of free Supercharging -- Tesla referral code - https://ts.la/richard11209
On Sunday, April 9, 2023 at 12:04:51&#8239;AM UTC-4, Clifford Heath wrote:
> On 09/04/23 11:22, Ricky wrote: > > I'm tired of digging around looking for an optimal chip to level shift a pair of signals from 5V TTL (an RS-422 transceiver) to 3.3V CMOS. There are too many devices, and no small number of them are impacted by the semiconductor shortage. But resistors are pretty available, as are Zener diodes. > > > > So, I could use a pair of resistors to simply divide the TTL output voltage to something safe for CMOS. But there's not much wiggle room, given that the TTL output is not well specified. If the current through the divider is minimized, this slows the signal edges. So a mA or two needs to be flowing when the output is high, but not much more, because of the power budget. > > > > Another option is to use a Zener diode. Most Zeners are specified at 5 to 20 mA of current. Running at 1 mA is into the knee as best I can tell, not desirable, resulting in poor regulation. > > > > I'm thinking with the variation in output voltage from the TTL output, the Zener might not do much better than resistors. > > > > Any thoughts? > > > I use this arrangement: > <https://www.digikey.com/en/blog/logic-level-shifting-basics? > > Works in both directions, speed-limited by the pullup R on one side.
Yes, I've used that sort of circuit before, but with the switch inside a chip and 10 bits wide. It was always easy to buy and very cheap. So, of course, in this design I don't need it anymore. I do still need two bits. I was hoping to use a Greenpak device for this, but they have various capabilities in various chips. I can't find a chip that even includes two of the several jelly bean functions I'd like to include, of which this is one. These functions just are not compatible in a Greenpak device. -- Rick C. -+ Get 1,000 miles of free Supercharging -+ Tesla referral code - https://ts.la/richard11209
On 4/9/2023 1:00 AM, Ricky wrote:
> On Sunday, April 9, 2023 at 12:29:25&#8239;AM UTC-4, bitrex wrote: >> On 4/8/2023 10:39 PM, John Larkin wrote: >>> On Sat, 8 Apr 2023 22:22:44 -0400, bitrex <us...@example.net> wrote: >>> >>>> On 4/8/2023 9:22 PM, Ricky wrote: >>>>> I'm tired of digging around looking for an optimal chip to level shift a pair of signals from 5V TTL (an RS-422 transceiver) to 3.3V CMOS. There are too many devices, and no small number of them are impacted by the semiconductor shortage. But resistors are pretty available, as are Zener diodes. >>>>> >>>>> So, I could use a pair of resistors to simply divide the TTL output voltage to something safe for CMOS. But there's not much wiggle room, given that the TTL output is not well specified. If the current through the divider is minimized, this slows the signal edges. So a mA or two needs to be flowing when the output is high, but not much more, because of the power budget. >>>>> >>>>> Another option is to use a Zener diode. Most Zeners are specified at 5 to 20 mA of current. Running at 1 mA is into the knee as best I can tell, not desirable, resulting in poor regulation. >>>>> >>>>> I'm thinking with the variation in output voltage from the TTL output, the Zener might not do much better than resistors. >>>>> >>>>> Any thoughts? >>>>> >>>> >>>> The common base shifter seems a good compromise between cost and >>>> speed/power consumption: >>>> >>>> <https://next-hack.com/wp-content/uploads/2017/09/A5I9.png> >>>> >>>> And there's Jim Thompson's variant on it if the naked topology edges are >>>> too slow: >>>> >>>> <https://electrooptical.net/static/oldsite/www.analog-innovations.com/SED/LogicLevelTranslator74HC14-RevA.pdf> >>> >>> Why not one resistor? >>> >> One resistor from the 5 volt output to the upper clamp diode of the >> following 3.3 V CMOS seems OK for low speeds but RS-422 can go fast, do >> we wanna go fast? Don't know. > > They don't call me Ricky Bobby for nothin'! Yeah, I don't know if it is used much, but the RS-422 device is rated for 20 MHz or more and there's no reason for this circuit to slow it down. I don't recall the speed limitation inside the FPGA. Not because of logic delays, but there's a circuit to extract a clock from data transitions which can't run faster than a third the FPGA clock. Sort of a Nyquist like thing. > > I'll probably just use a couple of LVC inverters. It's probably just easier to do that, than to fuss over the limitations of a circuit that will be twice the size on the board. > > Generally, I like to optimize designs for costs in manufacturing, and of course, the board is going to be very, very tight. At least the parts shortages seem to be loosening up a bit. Right now, I don't have any parts in the design that I can't buy. That's a big plus! >
12 cent in quantity, makes it pretty easy: <https://www.mouser.com/ProductDetail/Texas-Instruments/SN74LV1T34DBVR?qs=8sOby8ZxZLE4ekkxA3S6Wg%3D%3D> That JT circuit (which was originally for 3.3 to 5) I think can be made to work at speed by running everything at 3.3 volts and putting 5 volts to the emitter, but it will be as you say hard to make low-power and it's a fair number of parts
On 4/9/2023 1:17 AM, bitrex wrote:
> On 4/9/2023 1:00 AM, Ricky wrote: >> On Sunday, April 9, 2023 at 12:29:25&#8239;AM UTC-4, bitrex wrote: >>> On 4/8/2023 10:39 PM, John Larkin wrote: >>>> On Sat, 8 Apr 2023 22:22:44 -0400, bitrex <us...@example.net> wrote: >>>> >>>>> On 4/8/2023 9:22 PM, Ricky wrote: >>>>>> I'm tired of digging around looking for an optimal chip to level >>>>>> shift a pair of signals from 5V TTL (an RS-422 transceiver) to >>>>>> 3.3V CMOS. There are too many devices, and no small number of them >>>>>> are impacted by the semiconductor shortage. But resistors are >>>>>> pretty available, as are Zener diodes. >>>>>> >>>>>> So, I could use a pair of resistors to simply divide the TTL >>>>>> output voltage to something safe for CMOS. But there's not much >>>>>> wiggle room, given that the TTL output is not well specified. If >>>>>> the current through the divider is minimized, this slows the >>>>>> signal edges. So a mA or two needs to be flowing when the output >>>>>> is high, but not much more, because of the power budget. >>>>>> >>>>>> Another option is to use a Zener diode. Most Zeners are specified >>>>>> at 5 to 20 mA of current. Running at 1 mA is into the knee as best >>>>>> I can tell, not desirable, resulting in poor regulation. >>>>>> >>>>>> I'm thinking with the variation in output voltage from the TTL >>>>>> output, the Zener might not do much better than resistors. >>>>>> >>>>>> Any thoughts? >>>>>> >>>>> >>>>> The common base shifter seems a good compromise between cost and >>>>> speed/power consumption: >>>>> >>>>> <https://next-hack.com/wp-content/uploads/2017/09/A5I9.png> >>>>> >>>>> And there's Jim Thompson's variant on it if the naked topology >>>>> edges are >>>>> too slow: >>>>> >>>>> <https://electrooptical.net/static/oldsite/www.analog-innovations.com/SED/LogicLevelTranslator74HC14-RevA.pdf> >>>> >>>> Why not one resistor? >>>> >>> One resistor from the 5 volt output to the upper clamp diode of the >>> following 3.3 V CMOS seems OK for low speeds but RS-422 can go fast, do >>> we wanna go fast? Don't know. >> >> They don't call me Ricky Bobby for nothin'!&nbsp; Yeah, I don't know if it >> is used much, but the RS-422 device is rated for 20 MHz or more and >> there's no reason for this circuit to slow it down.&nbsp; I don't recall >> the speed limitation inside the FPGA.&nbsp; Not because of logic delays, >> but there's a circuit to extract a clock from data transitions which >> can't run faster than a third the FPGA clock.&nbsp; Sort of a Nyquist like >> thing. >> >> I'll probably just use a couple of LVC inverters.&nbsp; It's probably just >> easier to do that, than to fuss over the limitations of a circuit that >> will be twice the size on the board. >> >> Generally, I like to optimize designs for costs in manufacturing, and >> of course, the board is going to be very, very tight.&nbsp; At least the >> parts shortages seem to be loosening up a bit.&nbsp; Right now, I don't >> have any parts in the design that I can't buy.&nbsp; That's a big plus! >> > > 12 cent in quantity, makes it pretty easy: > > <https://www.mouser.com/ProductDetail/Texas-Instruments/SN74LV1T34DBVR?qs=8sOby8ZxZLE4ekkxA3S6Wg%3D%3D> > > That JT circuit (which was originally for 3.3 to 5) I think can be made > to work at speed by running everything at 3.3 volts and putting 5 volts > to the emitter, but it will be as you say hard to make low-power and > it's a fair number of parts
Like it might be a more cost-effective hack if you had 20 lines to shift but if it's just two pair of differential send and returns probably best to just by the chip that does the thing, at that price.