{"id":655,"date":"2020-02-15T22:09:33","date_gmt":"2020-02-15T21:09:33","guid":{"rendered":"https:\/\/next-hack.com\/?p=655"},"modified":"2021-04-24T09:19:10","modified_gmt":"2021-04-24T07:19:10","slug":"how-to-interface-a-3-3v-output-to-a-5v-input","status":"publish","type":"post","link":"https:\/\/next-hack.com\/index.php\/2020\/02\/15\/how-to-interface-a-3-3v-output-to-a-5v-input\/","title":{"rendered":"How to interface a 3.3V output to a 5V input."},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">Introduction<\/h3>\n\n\n\n<p>In a <a href=\"https:\/\/next-hack.com\/index.php\/2017\/09\/15\/how-to-interface-a-5v-output-to-a-3-3v-input\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"previous article (opens in a new tab)\">previous article<\/a> we dealt with the problem of interfacing a 5V output signal to a 3.3V system. In this article we cover the opposite problem: we have a 3.3V output and we need to drive a 5V system. <\/p>\n\n\n\n<p>This is a very typical situation in which we have a 3.3V system (e.g. most of 32-bit systems, such as <a href=\"https:\/\/shop.itaca-innovation.com\/epages\/186543.sf\/en_US\/?ObjectPath=\/Shops\/186543\/Categories\/IDProducts\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">uChip<\/a>), and we need to send data to an older 5V system.<\/p>\n\n\n\n<p>First of\nall, we need to consider which kind of 5V system we are interfacing. In\nparticular, we need to know:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>The low and high level input and\noutput voltages.<\/li><li>The input current.<\/li><\/ol>\n\n\n\n<p>For CMOS\ninputs, the input current is typically around 1uA or less, therefore there is\nno such a concern. For TTL devices, the input current might be even more than 1\nmA (see for instance 7400 datasheet). Therefore, when interfacing with TTL\ninputs, some additional care should be taken, as we will explain on a\ncase-by-case basis.<\/p>\n\n\n\n<p>Another,\nand much more important, aspect is represented by the logic levels. <\/p>\n\n\n\n<p>In fact, 5V TTL and 5V CMOS inputs have different logic levels, therefore some of the solutions we will present will be adequate for some inputs, but these could not work reliably for other inputs types.<\/p>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1187\" height=\"745\" src=\"https:\/\/next-hack.com\/wp-content\/uploads\/2020\/02\/Levels.png\" alt=\"\" class=\"wp-image-660\"\/><figcaption>Fig.1 Logic levels of a 3.3-V CMOS output, a 5-V TTL input and a 5-V CMOS input.<\/figcaption><\/figure>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<p>The main ways to interface a 3.3V output to a 5V input are:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Direct connection<\/li><li>Using a 74HCTxx gate (or other 5-V TTL-input compatible families)<\/li><li>Using a diode offset<\/li><li>Resistor Offset<\/li><li>BJT\/MOSFET inverter<\/li><li>Series MOSFET<\/li><li>Series BJT<\/li><li>Level Translator IC<\/li><li>Optocoupler\/Isolator<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">DIRECT\nCONNECTION<\/h3>\n\n\n\n<p>This is the simplest way. This solution \u201calmost always\u201d works, but with some important warnings.<\/p>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/next-hack.com\/wp-content\/uploads\/2020\/02\/directConnection.png\" alt=\"\" class=\"wp-image-671\" width=\"580\" height=\"248\"\/><figcaption>Fig. 2. Direct connection between a 3.3V CMOS and a 5V TTL device is possible.<\/figcaption><\/figure>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<p>First, when interfacing with TTL inputs, any \u201cmodern\u201d CMOS output will work, as the high level output voltage of a 3.3V CMOS is close to 3.3V (note! The actual output voltage depends on the output current. For heavily loaded outputs, the output levels might vary of 0.5V or more!), still the minimum high-level input voltage for a TTL is 2V. Similarly, if not too much heavily loaded, the low-level output voltage of a CMOS is lower than the maximum low-level TTL input voltages. <\/p>\n\n\n\n<p>We wrote \u201cmodern\u201d CMOS because older CMOS chips (e.g. CD4xxx series) have a very high output impedance, therefore they cannot sink\/source too much current (you generally do not want to sink\/source more than 0.5 mA). Trying to get too much current will make the output voltage shift too much. Older TTL chips have an input current, which might exceed 1mA. Almost all modern CMOS devices (e.g. the GPIOs of MCUs) allows driving a much higher current without problems.<\/p>\n\n\n\n<p>Second, when interfacing to a 5V CMOS devices, this <em>might<\/em> work, but not reliably. In fact, the high level input voltage of a 5V CMOS is 3.5V. This is even <strong><em>higher<\/em><\/strong> than the maximum output voltage you might expect from a 3.3V system (i.e. 3.3V). <br>Still, why this generally works ? The answer is due to the actual threshold logic level, which is 2.5V for a 5V CMOS. Any voltage above 2.5V would be read as 1, and any voltage below 2.5V would be read as 0. <br> However, the actual threshold level might shift with temperature and aging: operating between the two logic levels region is not safe. Any noise or disturbance might produce a glitch at the output. If your system must work reliably, then you need other solutions, as shown below.<\/p>\n\n\n\n<p>Furthermore care should be taken when driving a digital non hysteretic\ninput close to the logic level threshold, as current consumption would occur.\nIn fact, consider the simple CMOS inverter, shown below: when the input voltage\nis close to the VDD\/2, both MOSFETs are in the ON state, therefore a direct\npath current will flow from VDD to GND.<\/p>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"473\" height=\"506\" src=\"https:\/\/next-hack.com\/wp-content\/uploads\/2020\/02\/inverter.png\" alt=\"\" class=\"wp-image-674\"\/><figcaption>Fig.3. The internal circuit of a CMOS inverter. If the voltage at the &#8220;IN&#8221; signal is close to VDD\/2, then both MOSFET will be in the ON state, and current will flow between VDD and GND..<\/figcaption><\/figure>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<p>Advantages:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>No\nadditional components!<\/li><li>Fast<\/li><\/ul>\n\n\n\n<p>Disadvantages:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Reduced\nnoise margins.<\/li><li>Works\nreliably only with some logic families. <\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">USING A 74HCTxx GATE  (or any other logic family with TTL compatible inputs) <\/h3>\n\n\n\n<p>The 74HCTxx family series are CMOS devices with TTL compatible logic levels (all the other 5V logic families that have TTL compatible input levels will work too) . In particular, the input high-voltage level is 2V, which is well below the CMOS high output voltage. By inserting any logic gate (see examples below) with TTL-compatible input levels between your systems, you create a suitable voltage level translator.<\/p>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"949\" height=\"435\" src=\"https:\/\/next-hack.com\/wp-content\/uploads\/2020\/04\/Gate.png\" alt=\"\" class=\"wp-image-703\"\/><figcaption>Fig. 4. Any non-inverting logic gate with TTL compatible inputs can reliably perform as translator.<\/figcaption><\/figure>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<p>Advantages:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Fast<\/li><li>Works\nwith both CMOS and TTL devices<\/li><li>Need\nonly one power supply.<\/li><\/ul>\n\n\n\n<p>Disadvantages:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Requires\nan external IC (and possibly its decoupling capacitor)<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">USING A DIODE OFFSET<\/h3>\n\n\n\n<p>With the\ndirect connection to a 5V CMOS input, we saw that the main issue was the high\nlevel output voltage of the 3.3V output, which is not high enough to be just in\nthe safe region (3.3V at most, vs 3.5V minimum). Instead, the maximum voltage\nof a low level CMOS input is 30% of VDD, i.e 1.5V in a 5V system. Therefore, if\nwe could add small offset to the CMOS output, that would be great. For this\nreason, one could simply ad a diode and a pull-up resistor. <\/p>\n\n\n\n<p>However, in\nthis way, current will flow into the output protection diodes of our 3.3V\nsystem. Such current should be made as small as possible, to avoid damaging the\n3.3V system. <\/p>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"791\" height=\"455\" src=\"https:\/\/next-hack.com\/wp-content\/uploads\/2020\/02\/singleDiodeOffset.png\" alt=\"\" class=\"wp-image-672\"\/><figcaption>Fig. 5. The circuit above introduces a 0.7 to 1V offset (depending on R1 value). However, reverse current will flow into the output even when it is in the high state. This might cause issues on the 3.3V device.<\/figcaption><\/figure>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<p>A better\nsolution is to use an additional diode. Since the new diode is directly connected\nto the 3.3V rail (it does not have to pass through our IC), the current will\nflow preferably there.<\/p>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"845\" height=\"454\" src=\"https:\/\/next-hack.com\/wp-content\/uploads\/2020\/02\/diodeOffset.png\" alt=\"\" class=\"wp-image-670\"\/><figcaption>Fig. 6. In this circuit, when the output is high, the current will not flow into the output, but across D2.<\/figcaption><\/figure>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<p>Still, both\nthese solutions has an intrinsic problem: if the 3.3V system is really low\npower, then of course it will consume a very low current. If the total current\nconsumption is lower than the current flowing into the resistor, then\neffectively, the 3.3V rail will be powered by the 5V, through the resistor and\ndiode. <\/p>\n\n\n\n<p>This might\nbe an issue, as, if no enough current is drawn by the 3.3V system, the 3.3V\nvoltage might increase up to about 4.3V, which could damage the 3.3V system\nitself.<\/p>\n\n\n\n<p>A simple solution is to put a second resistor, which draws at least the current that would flow into D2 (about 1V\/R1. Therefore R2 should be 3.3 times R1 or less). <\/p>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"817\" height=\"507\" src=\"https:\/\/next-hack.com\/wp-content\/uploads\/2020\/02\/offsetBleed.png\" alt=\"\" class=\"wp-image-676\"\/><figcaption>Fig. 7. Adding R2, with a value at most 3.3 times larger than R1, we are sure that the current flowing into D2 will be &#8220;dissipated&#8221;, and will not increase the 3.3V voltage.<\/figcaption><\/figure>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<p>The value\nof the pull-up resistor should be calculated so that:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>It\nis low enough to grant us the desired speed.<\/li><li>It\nis much smaller than the input impedance (though in a CMOS device, this is not\nmuch an issue).<\/li><li>It\nis large enough, not to overload the CMOS output voltage, especially at low\nlevel. This is especially an issue on those CMOS output with relatively high\noutput impedance (CD40xx series).<\/li><li>It\nis large enough, to avoid too much current flowing into the 3.3V rail.<\/li><li>It\nis large enough, to keep current consumption at an acceptable level.<\/li><\/ul>\n\n\n\n<p>Advantages:\n<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Cheap<\/li><\/ul>\n\n\n\n<p>Disadvantages: <\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Much slower than other solutions.<\/li><li>Requires a careful resistor value selection: to avoid damage, to get a decent speed, and to keep the high and low voltage within the correct ranges.<\/li><li>Relatively high current consumption.<\/li><li>Requires 2 to 4 additional components.<\/li><li>Poor noise margins.<\/li><li>Requires a low impedance driving output.<\/li><li>Requires a relatively high input impedance<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">RESISTOR OFFSET <\/h3>\n\n\n\n<p>We can\nintroduce an offset also using a resistor divider too.<\/p>\n\n\n\n<p>This simple\nsolution is cheaper (but somewhat slower) than the diode-offset, and still has\nthe problem of current flowing into the output pin. <\/p>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"769\" height=\"466\" src=\"https:\/\/next-hack.com\/wp-content\/uploads\/2020\/02\/ResistorOffset-1.png\" alt=\"\" class=\"wp-image-678\"\/><figcaption>Fig. 8. A simple resistor divider will allow to add an offset to our 3.3V output.<\/figcaption><\/figure>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<p>A better solution is to add a dummy load to the output, that will adsorb the current coming from the 5V through R1 and R2. Another way to view this, is that, disconnecting the output, with the calculated value, R1-R2-R3 will form a resistor divider and the voltage across R3 would be 3.3V at most. The values indicated in the figures are expressed in terms or a generic \u201cR\u201d value.<\/p>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"809\" height=\"439\" src=\"https:\/\/next-hack.com\/wp-content\/uploads\/2020\/02\/ResistorOffsetBleeder.png\" alt=\"\" class=\"wp-image-666\"\/><figcaption>Fig. 9. Adding R3 will allow to shunt to ground any current coming from the 5V (instead to 3.3V through the output pin), when the output is at 3.3V. <\/figcaption><\/figure>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<p>When the output is 0, the voltage will be 5V * (R2\/(R1+R2)), i.e. 1V, which is below the 1.5V threshold. When the output is 3.3V, the voltage will be 5V * (R2\/(R1+R2)) + 3.3V * (R1\/(R1+R2)) = 3.64V. Better high-level values can be achieved &nbsp;by adjusting the R1\/R2 ratio, but you must take into account that the voltage should be smaller than 1.5V, when the output is at 0V.<\/p>\n\n\n\n<p>Note: we took 0 and 3.3V as the CMOS output voltages, when the output is low and high, respectively. While, this time, there is no problem (unless R3 is too low) about the high level voltage (as it is pulled up by R1+R2), the low-level voltage will increase according to the current flowing into the output.<\/p>\n\n\n\n<p>Advantages:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Cheaper\nthan diode offset.<\/li><\/ul>\n\n\n\n<p>Disadvantages:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Slower\nthan the diode offset solution, especially in the high-to-low transition, as\nthe current flows across R1 and R2, which will have a much higher impedance,\nwith respect to a diode.<\/li><li>Requires\ncareful resistor value selection, to avoid damage, to get a decent speed and to\nkeep the high and low voltage within the correct ranges.<\/li><li>Relatively\nhigh current consumption.<\/li><li>Requires\n2 to 3 additional components.<\/li><li>Poor\nnoise margins.<\/li><li>Requires\na low impedance driving output.<\/li><li>Requires\na relatively high input impedance.<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">BJT\/MOSFET INVERTER<\/h3>\n\n\n\n<p>As we did\nin the other article, a simple MOSFET\/BJT can be used, if an inverted signal\ncan be accepted or is desired. Otherwise, an additional stage can be used.<\/p>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"920\" height=\"537\" src=\"https:\/\/next-hack.com\/wp-content\/uploads\/2020\/02\/bjtInverter.png\" alt=\"\" class=\"wp-image-667\"\/><figcaption>Fig. 10. Simple BJT inverters. Cascading two of them will allow to achieve a direct signal, instead of a negated one<\/figcaption><\/figure>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"830\" height=\"537\" src=\"https:\/\/next-hack.com\/wp-content\/uploads\/2020\/02\/MOSETInverter.png\" alt=\"\" class=\"wp-image-661\"\/><figcaption>Fig. 11. MOSFET version of the previous figure. Less components, but more expensive. <\/figcaption><\/figure>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<p>Advantages:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Much simpler dimensioning, with respect to the diode offset.<\/li><li>Better noise margin, as both the low and high levels are close to the rails.<\/li><\/ul>\n\n\n\n<p>Disadvantages:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Requires\n2\/3 external components.<\/li><li>It\nis inverting.<\/li><li>Relatively\nslow low-to-high rise time.<\/li><li>The\nBJT implementation is actually relatively slower, with respect to MOSFET implementation,\ndue to the relatively slow BJT turn-off characteristics.<\/li><li>Relatively\nhigh consumption, when the MOSFET\/BJT is in the ON state.<\/li><li>Requires\na relatively high input impedance<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">SERIES MOSFET<\/h3>\n\n\n\n<p>In the\n5-to-3.3V article, we showed this little circuit, and we told that it is\nbidirectional. Indeed, it can be used for 3-to-5V translation too!<\/p>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"811\" height=\"502\" src=\"https:\/\/next-hack.com\/wp-content\/uploads\/2020\/02\/MOSFETTranslator.png\" alt=\"\" class=\"wp-image-662\"\/><figcaption>Fig. 12. Single MOSFET level translator.<\/figcaption><\/figure>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<p>The working\nprinciple is simple. When the output is at 3.3V, the MOSFET will be in the\nOFF-state, as VGS=0V, therefore the output is held at 5V by the pull-up resistor.\nIf the output is low, then VGS is 3.3V. Assuming a MOSFET with a logic-level\nthreshold (it should be fully-on when VGS = 2.5V), the MOSFET will turn on,\npassing the low-level value to the 5V input.<\/p>\n\n\n\n<p>Advantages:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Bidirectional<\/li><li>Relatively\nsimple solution.<\/li><li>It\ndoes not invert the input, as the single MOSFET\/BJT in common source\nconfiguration.<\/li><\/ul>\n\n\n\n<p>Disadvantages: <\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Requires\n2 external components<\/li><li>Relatively\nslow.<\/li><li>Requires\na low-impedance driving output to avoid overload.<\/li><li>Relatively\nhigh power consumption.<\/li><li>Requires\na relatively high input impedance.<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">SERIES BJT<\/h3>\n\n\n\n<p>This is the\nbrother of the previous solution, except it uses a BJT. The working principle\nis the same (as we also explained in the previous article). It shares the same\nbenefits of the previous circuit, but it also introduces some additional\ndrawbacks.<\/p>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"843\" height=\"502\" src=\"https:\/\/next-hack.com\/wp-content\/uploads\/2020\/02\/BJTTranslator.png\" alt=\"\" class=\"wp-image-658\"\/><figcaption>Fig. 13. Single BJT level translator.<\/figcaption><\/figure>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<p>Advantages:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Bidirectional<\/li><li>Relatively\nsimple solution.<\/li><li>It\ndoes not invert the input, as the single MOSFET\/BJT in common source\nconfiguration.<\/li><\/ul>\n\n\n\n<p>Disadvantages: <\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Requires 3 external components.<\/li><li>Relatively slow.<\/li><li>Requires a low-impedance driving output to avoid overload.<\/li><li>Relatively high power consumption.<\/li><li>Requires a relatively high input impedance.<\/li><li>The BJT saturation collector-to emitter voltage (V<sub>CESAT<\/sub>) is added to the low-level output voltage. This is normally not a big deal, though.<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">LEVEL TRANSLATOR IC<\/h3>\n\n\n\n<p>A dedicated level translator IC, such as 74LVC1T245, will do everything you need, with better performances with respect to discrete solutions, but at a much higher price. <\/p>\n\n\n\n<p>There are many variants, such as with more channels (74LVC8T245, 74LVC16T245), or different logic family (74ALVT162245), with different speeds (and prices).<\/p>\n\n\n\n<p>Use this solution when you require a high performance 3.3V to 5V level translation (typically in high speed buses, clocks, etc.)<\/p>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1027\" height=\"493\" src=\"https:\/\/next-hack.com\/wp-content\/uploads\/2020\/02\/translator.png\" alt=\"\" class=\"wp-image-673\"\/><figcaption>Fig. 14. A level translator will generally perform better with respect to the other solutions, especially in terms of noise margin and speed (except direct connection).<\/figcaption><\/figure>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<p>Advantages:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Fast (even though not as fast as the direct connection, as a small delay is added).<\/li><li>High noise margin.<\/li><\/ul>\n\n\n\n<p>Disadvantages:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Requires\na level shifter and possibly 2 decoupling capacitors (one per power domain).<\/li><li>Expensive.<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">OPCOUPLER\/ISOLATOR<\/h3>\n\n\n\n<p>As shown in\nthe previous article, this solution is \u201cany voltage-to any voltage\u201d translator,\ntherefore it can be used also for the 3.3V to 5V translation. There are 4\nconfigurations, depending on your requirements.<\/p>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1064\" height=\"1134\" src=\"https:\/\/next-hack.com\/wp-content\/uploads\/2020\/11\/Optocoupler_NINV.png\" alt=\"\" class=\"wp-image-1044\"\/><figcaption> Fig. 15. Non-inverting configurations using optocouplers. <\/figcaption><\/figure>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1058\" height=\"1182\" src=\"https:\/\/next-hack.com\/wp-content\/uploads\/2020\/11\/Optocoupler_INV.png\" alt=\"\" class=\"wp-image-1043\"\/><figcaption>Fig. 16. Inverting configurations, using optocouplers. <\/figcaption><\/figure>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<p>Beware that\nsome configurations require a strong low-level output driver (while nothing is\nrequested in terms of high-level output strength), while the other requires a\nstrong high-level output driver. <\/p>\n\n\n\n<p>Similarly,\nthe output will provide a strong pull-up\/down path (through the coupler), and a\nweaker one (through the pulldown\/up resistor, respectively).<\/p>\n\n\n\n<p>Instead of\nusing standards optoisolators, you can use more recent devices, based on capacitive,\ngiant magnetoresistive or magnetic couplings, even though these are much more\nexpensive, typically.<\/p>\n\n\n\n<p>Advantages:\n<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Electrical insulation.<\/li><li>Better safety.<\/li><li>\u201cAny voltage to any voltage&#8221; conversion.<\/li><li>You can optionally invert the signal.<\/li><\/ul>\n\n\n\n<p>Disadvantages:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Typically slow, except when high speed isolators are used.<\/li><li>Relatively expensive.<\/li><li>Quite bulky device.<\/li><li>High power consumption.<\/li><li>You have some constraints on the output and input impedances.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusions<\/h2>\n\n\n\n<p>We have shown some of the main methods of interfacing a 3.3V to a 5V system! We will keep updating this post if we find some other interesting techniques! For the opposite direction, i.e. 5V to 3.3V interfacing, refer to <a href=\"https:\/\/next-hack.com\/index.php\/2017\/09\/15\/how-to-interface-a-5v-output-to-a-3-3v-input\/\">this article<\/a>!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction In a previous article we dealt with the problem of interfacing a 5V output signal to a 3.3V system. In this article we cover the opposite problem: we have a 3.3V output and we need to drive a 5V&#8230; <a class=\"read-more-button\" href=\"https:\/\/next-hack.com\/index.php\/2020\/02\/15\/how-to-interface-a-3-3v-output-to-a-5v-input\/\">(READ MORE)<\/a><\/p>\n","protected":false},"author":2,"featured_media":660,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[28],"tags":[],"class_list":["post-655","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-logic-level-conversion"],"_links":{"self":[{"href":"https:\/\/next-hack.com\/index.php\/wp-json\/wp\/v2\/posts\/655"}],"collection":[{"href":"https:\/\/next-hack.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/next-hack.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/next-hack.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/next-hack.com\/index.php\/wp-json\/wp\/v2\/comments?post=655"}],"version-history":[{"count":20,"href":"https:\/\/next-hack.com\/index.php\/wp-json\/wp\/v2\/posts\/655\/revisions"}],"predecessor-version":[{"id":1242,"href":"https:\/\/next-hack.com\/index.php\/wp-json\/wp\/v2\/posts\/655\/revisions\/1242"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/next-hack.com\/index.php\/wp-json\/wp\/v2\/media\/660"}],"wp:attachment":[{"href":"https:\/\/next-hack.com\/index.php\/wp-json\/wp\/v2\/media?parent=655"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/next-hack.com\/index.php\/wp-json\/wp\/v2\/categories?post=655"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/next-hack.com\/index.php\/wp-json\/wp\/v2\/tags?post=655"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}