|
| 1 | +--- |
| 2 | +layout: two-cols |
| 3 | +--- |
| 4 | + |
| 5 | +# Why is the output not ideal? |
| 6 | + |
| 7 | + |
| 8 | +### The two corresponding voltage output levels are affected by: |
| 9 | + |
| 10 | +- power supply voltage |
| 11 | +- output current |
| 12 | +- temperature |
| 13 | +- variations in the manufacturing process |
| 14 | + |
| 15 | +:: right :: |
| 16 | + |
| 17 | +<br> |
| 18 | +<br> |
| 19 | +<br> |
| 20 | +<br> |
| 21 | + |
| 22 | + |
| 23 | + <img src="./d_output.svg" class="rounded"> |
| 24 | + |
| 25 | +--- |
| 26 | +layout: two-cols |
| 27 | +--- |
| 28 | + |
| 29 | +# ICs same voltage |
| 30 | + |
| 31 | + |
| 32 | +### Usually will work as is |
| 33 | + |
| 34 | +- usually, they will be compatible |
| 35 | +- conditions: |
| 36 | +> V_OH_transmiter > V_IH_receiver |
| 37 | +
|
| 38 | +<br> |
| 39 | + |
| 40 | +> V_OL_transmiter < V_IL_receiver |
| 41 | +
|
| 42 | +:: right :: |
| 43 | + |
| 44 | + <img src="./ICs_same_voltage.svg" class="rounded h 80"> |
| 45 | + |
| 46 | +--- |
| 47 | +layout: two-cols |
| 48 | +--- |
| 49 | + |
| 50 | +# VCC1 > VCC2 |
| 51 | + |
| 52 | + |
| 53 | +### Might work, might produce magic smock |
| 54 | + |
| 55 | +- if |
| 56 | +> V_OH_transmiter > VCC_receiver |
| 57 | +
|
| 58 | +<b> PROBLEM </b> |
| 59 | + |
| 60 | +### Solutions: |
| 61 | +- level shifter |
| 62 | +- resistor divider / voltage limiter |
| 63 | + |
| 64 | +Examples: |
| 65 | + |
| 66 | +<a href="https://www.optimusdigital.ro/ro/interfata-convertoare-de-niveluri/181-translator-de-nivel-bidirectional-cu-4-canale.html" title="Bi-Directional Level Shifter with 4 Channels"> |
| 67 | + Bi-Directional Level Shifter (4 Channels) |
| 68 | +</a> |
| 69 | + |
| 70 | +<br> |
| 71 | + |
| 72 | +<a href="https://www.tme.eu/en/details/tp240610/development-kits-accessories/total-phase/level-shifter/"> |
| 73 | + Level Shifter Multi-Channel |
| 74 | +</a> |
| 75 | + |
| 76 | + |
| 77 | +<br> |
| 78 | + |
| 79 | +<a href="https://www.adafruit.com/product/395"> |
| 80 | + 8 Channels Level Shifter |
| 81 | +</a> |
| 82 | + |
| 83 | + |
| 84 | + |
| 85 | + |
| 86 | +:: right :: |
| 87 | + |
| 88 | + <img src="./vcc1_larger_vcc2.svg" class="rounded h 80"> |
| 89 | + |
| 90 | + |
| 91 | +--- |
| 92 | +layout: two-cols |
| 93 | +--- |
| 94 | + |
| 95 | +# VCC1 < VCC2 |
| 96 | + |
| 97 | + |
| 98 | +### Might work |
| 99 | + |
| 100 | +- if |
| 101 | +> V_CC_transmiter close to VIH_receiver |
| 102 | +
|
| 103 | +<b> Might work in an intermittent mode - hard to debug!</b> |
| 104 | + |
| 105 | +### Solutions: |
| 106 | +- level shifter |
| 107 | +- resistor divider / voltage limiter |
| 108 | + |
| 109 | +Examples: |
| 110 | + |
| 111 | +<a href="https://www.optimusdigital.ro/ro/interfata-convertoare-de-niveluri/181-translator-de-nivel-bidirectional-cu-4-canale.html" title="Bi-Directional Level Shifter with 4 Channels"> |
| 112 | + Bi-Directional Level Shifter (4 Channels) |
| 113 | +</a> |
| 114 | + |
| 115 | +<br> |
| 116 | + |
| 117 | +<a href="https://www.tme.eu/en/details/tp240610/development-kits-accessories/total-phase/level-shifter/"> |
| 118 | + Level Shifter Multi-Channel |
| 119 | +</a> |
| 120 | + |
| 121 | + |
| 122 | +<br> |
| 123 | + |
| 124 | +<a href="https://www.adafruit.com/product/395"> |
| 125 | + 8 Channels Level Shifter |
| 126 | +</a> |
| 127 | + |
| 128 | + |
| 129 | + |
| 130 | + |
| 131 | +:: right :: |
| 132 | + |
| 133 | + <img src="./vcc1_smaller_vcc2.svg" class="rounded h 80"> |
| 134 | + |
| 135 | + |
| 136 | +--- |
| 137 | +layout: two-cols |
| 138 | +--- |
| 139 | + |
| 140 | +# Why Pull-Down R |
| 141 | + |
| 142 | +- Without pull-down – when the button is not pressed, it leaves the input pin floating. |
| 143 | +- The second design ensures that the voltage level has a well-defined state, regardless of the button's state. |
| 144 | +- R1 is called a "pull-down" resistor. |
| 145 | + |
| 146 | +:: right :: |
| 147 | + |
| 148 | +<br> |
| 149 | +<br> |
| 150 | +<br> |
| 151 | +<br> |
| 152 | + |
| 153 | + |
| 154 | + <img src="./pull_down.png" class="rounded" h="50"> |
| 155 | + |
| 156 | +--- |
| 157 | +layout: two-cols |
| 158 | +--- |
| 159 | + |
| 160 | +# Why Pull-Up R |
| 161 | + |
| 162 | +- Same reasoning |
| 163 | +- R1 is called a "pull-up" resistor. |
| 164 | + |
| 165 | +##Obs: |
| 166 | +- most microcontrollers have at least a pull-up resistor incorporated on GPIOs - that can be activated in software |
| 167 | +- some have both pull-up and pull-down |
| 168 | +- typically, these are sized for a 50 - 10 nA current consumption |
| 169 | + |
| 170 | + |
| 171 | +:: right :: |
| 172 | + |
| 173 | +<br> |
| 174 | +<br> |
| 175 | +<br> |
| 176 | +<br> |
| 177 | + |
| 178 | + |
| 179 | + <img src="./pull_up.png" class="rounded" h="50"> |
| 180 | + |
| 181 | +--- |
| 182 | + |
| 183 | +# Notes on output pins |
| 184 | + |
| 185 | +- most microcontrollers have a limit of around 10mA per output PIN |
| 186 | +- ! do not connect an LED without a resistor in series )to limit the current) |
| 187 | +- ! do not connect a motor / any type of inductive load |
| 188 | + |
| 189 | +## Solutions: |
| 190 | +- use a transistor |
| 191 | +- use an IC with incorporated Darlinghtons (eg: ULN2003) |
0 commit comments