Iss Reads 2,5 Volts With Key on

If your introduction to digital electronics came more years agone than you lot'd care to mention, the chances are you did so with 5V TTL logic. Above 2V but usually pretty close to 5V is a logic ane, below 0.8V is a logic 0. If you were a keen reader of electronic text books you might have read about different voltage levels tolerated past 4000 series CMOS gates, but the chances are fifty-fifty with them you'd take notwithstanding used the familiar v volts.

This happy state of never encountering annihilation but 5V logic every bit a hobbyist has not persisted. In recent decades the demands of higher speed and lower ability have given the states successive families of lower voltage devices, and we volition at present commonly also come across 3.3V or even sometimes lower voltage devices. When these different families demand to coexist every bit for case when interfacing to the current crop of microcontroller boards, care has to exist taken to avert damage to your silicon. Some means of managing the transition betwixt voltages is required, so we're going to take a look at the world of level shifters, the circuits we apply when interfacing these different voltage logic families.

Do You Fifty-fifty Need A Level Shifter?

Information technology might seem odd to offset a treatise on level shifting this way, but the first question for the designer when looking at making a three.3V function talk to a 5V part should be this: Exercise I even need a level shifter?

If the 3.3V office is an output and the 5V one an input, the lower voltage part tin can hardly damage the college voltage one with overvoltage. And you are not likely to encounter a logic input that might demand then much electric current that it would damage your output (If you exercise, utilise a buffer!). If you are lucky the logic voltage ranges of the 2 devices may even coincide. For example 3.3V TTL logic shares the 0.8V and 2V thresholds for logic 0 and logic 1 transitions with 5V TTL logic, so a iii.3V TTL output tin can drive a 5V TTL input without any extra hardware required.

In the other direction, driving a three.3V input from a 5V output you might expect that a level shifting excursion would be required, and in many cases you would be right. Simply before reaching for that shifter it's worth taking a await at the detailed specifications of your three.3V input. Many devices are designed to exist 5V tolerant, and you might exist lucky plenty to find that your excursion could use one and avoid the extra circuitry. For instance the 74LVC series contains a range of 5V tolerant 3.3V versions of many 74-series ICs.

CMOS And TTL: A Level Shifting Cautionary Tale

Comparison of TTL and CMOS logic thresholds with comparison to 3.3V output. NXP application note 240.
Comparison of TTL and CMOS logic thresholds with comparison to iii.3V output. NXP awarding note 240 (PDF).

When directly driving logic you lot'd normally employ at 5V from a three.3V output there is one cautionary tale of which to take listen, a personal confession of an electronic failure. CMOS logic defines its logic thresholds equally a percentage of supply voltage, which with a 5V supply puts the logic i threshold of 70% well above the 3.3V logic 1. Some CMOS ICs such equally the 74HC4053 analogue switch I used in a Raspberry Pi project don't quite follow this standard and volition piece of work from a 3.3V TTL output, so I was lulled into a imitation sense of security and reached for another 74HC part to connect to my Raspberry Pi with a new design. As you might expect information technology failed to work, and of form I wasted time looking everywhere else but my defective selection of role. If there is a moral to this story information technology is to e'er read the datasheet advisedly, and use the TTL-compatible parts such as in this case 74HCT, when they are bachelor.

If your three.3V device inputs are non 5V tolerant and your 5V inputs lack 3.3V compatible thresholds then sadly you won't be able to interface them across voltage levels without a shifter circuit. There are many choices available to you including a whole host of dedicated level shifter devices such as these ones from TI, simply bated from personal preference some of them volition be dictated by your awarding. Will it be a step-up, a pace-downwardly, or do you lot demand a bi-directional level shifter? If yous decide non to utilise a dedicated part or a 5V tolerant gate in your design, here are a few of the many alternatives.

Step-down level shifters

A simple resistive downshifter.
A simple resistive downshifter.

The simplest possible step-downwards excursion is a resistive divider. Drive your 5V output into a chain of resistors, from which you tap your 3.3V logic input. A chain consisting of a 2.2k and a iii.3k resistor should produce a 3V output from an applied 5V input. It does not preserve the fan-out characteristic of the 3.3V output and you need to be aware of whatever capacitances that may besides reside in whatsoever logic is connected to it and the upshot they may have along with the resistors on fast rise times, only information technology should suffice for most simple level downshifting tasks facing a hobbyist. There are variations on this circuit that apply diodes instead of a resistor to accomplish the required voltage drop.

If the divider is not suitable for your application and yous notwithstanding eschew a dedicated shifter, take a look further down the page at bidirectional shifters.

Step-up level shifters

A diode logic level step-up circuit. From Microchip app note DS41285A.
A diode logic level step-upward circuit. From Microchip app note DS41285A (PDF).

For stepping up from iii.3V logic to 5V logic and bold you are not safely inside the TTL thresholds every bit described above such that you lot can practice without a shifter, you lot will require something a lilliputian more complex than the resistive divider in the previous section. The simplest circuit uses a pair of diodes with careful biasing and choice of series resistor equally shown in the diagram to the right. The application note information technology comes from advises that the resistor should exist significantly less than the input impedance of the 5V gate, to avoid its being part of a resistive divider with that impedance having an consequence on the output voltage.

An inverting MOSFET logic level step-up circuit. Yet again, from Microchip app note DS41285A.
An inverting MOSFET logic level stride-upwards circuit. All the same over again, from Microchip app notation DS41285A.

A rather more obvious circuit uses a MOSFET or bipolar transistor as a switch, driving the gate or base with the 3.3V logic and taking the 5V logic output from the drain or collector. This is very similar to using a gate with an open up-collector output in the aforementioned application. This is a elementary and reliable circuit, but it must be borne in mind that it inverts the 3.3V logic level.

Bi-directional level shifters

The bidirectional MOSFET level shifter.
The bidirectional MOSFET level shifter.

The circuits in the previous two sections are both just suitable for unidirectional logic lines, but not in the case of a bidirectional bus. As before there are enough of off-the-shelf bus level shifters from a range of semiconductor manufacturers to choose from, simply if these are not suitable for your pattern and so a handy alternative can be made with a MOSFET and a couple of resistors. It'due south likewise worth pointing out that this doesn't have to be used on a bidirectional bus, information technology tin serve as a general purpose level shifter for the price of a 2N7000 or similar, indeed this is a personal favourite for this application. Y'all tin can readily buy this circuit on a breakout board from several electronics suppliers if building it yourself doesn't appeal. For more data on its performance take a read of the Philips application annotation AN97055 (PDF), which examines its use on an I2C omnibus.

It can be a worry, when you first have to ensure that unlike logic levels are safely interfaced. Volition my 5V Arduino harm this 3.3V sensor? We promise that afterwards reading this piece you lot'll have some more conviction, and we've equipped you with enough to brand some sense of the topic. We've not covered every possible technique, merely if you read some of the attached application notes so search the web for real-world usage they should fill in any gaps.

steeleturet1944.blogspot.com

Source: https://hackaday.com/2016/12/05/taking-it-to-another-level-making-3-3v-and-5v-logic-communicate-with-level-shifters/

0 Response to "Iss Reads 2,5 Volts With Key on"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel