Aula 25 - Chaves, sensores e schimitt trigger - UDESC - CCT · Aula 25 - Chaves, sensores e...

25

Transcript of Aula 25 - Chaves, sensores e schimitt trigger - UDESC - CCT · Aula 25 - Chaves, sensores e...

Page 1: Aula 25 - Chaves, sensores e schimitt trigger - UDESC - CCT · Aula 25 - Chaves, sensores e schimitt trigger Prof. Renan Sebem Disciplina de eletrônica digital Departemanto de engenharia

Aula 25 - Chaves, sensores e schimitt trigger

Prof. Renan Sebem

Disciplina de eletrônica digitalDepartemanto de engenharia elétrica

Centro de Ciências Tecnológicas (CCT)Universidade Do Estado de Santa Catarina (UDESC)

Joinville-SC � Brasil

31 de maio de 2016

ELD0001 ‡ Prof. Renan Sebem ‡ Aula 25 1 / 25

Page 2: Aula 25 - Chaves, sensores e schimitt trigger - UDESC - CCT · Aula 25 - Chaves, sensores e schimitt trigger Prof. Renan Sebem Disciplina de eletrônica digital Departemanto de engenharia

Itens da aula

Avisos

Chaves

Eliminação de ruídos

Encoder

Avisos

Referências

ELD0001 ‡ Prof. Renan Sebem ‡ Aula 25 2 / 25

Page 3: Aula 25 - Chaves, sensores e schimitt trigger - UDESC - CCT · Aula 25 - Chaves, sensores e schimitt trigger Prof. Renan Sebem Disciplina de eletrônica digital Departemanto de engenharia

Avisos

I Entrega do desenho da placa do trabalho �nal dia 10/06/16;

I A aula de laboratório desta semana será sobre o trabalho �nal;

I Quem possuir laptop deve trazer para a aula de lab;

I Relembrando, ainda falta ∼ 50% da nota.

ELD0001 ‡ Prof. Renan Sebem ‡ Aula 25 3 / 25

Page 4: Aula 25 - Chaves, sensores e schimitt trigger - UDESC - CCT · Aula 25 - Chaves, sensores e schimitt trigger Prof. Renan Sebem Disciplina de eletrônica digital Departemanto de engenharia

Chaves

Push Button

I O push button possui 4 pinos;

I Os pinos estão conectados de 2 em 2.

ELD0001 ‡ Prof. Renan Sebem ‡ Aula 25 4 / 25

Page 5: Aula 25 - Chaves, sensores e schimitt trigger - UDESC - CCT · Aula 25 - Chaves, sensores e schimitt trigger Prof. Renan Sebem Disciplina de eletrônica digital Departemanto de engenharia

Chaves

Toggle switch

ELD0001 ‡ Prof. Renan Sebem ‡ Aula 25 5 / 25

Page 6: Aula 25 - Chaves, sensores e schimitt trigger - UDESC - CCT · Aula 25 - Chaves, sensores e schimitt trigger Prof. Renan Sebem Disciplina de eletrônica digital Departemanto de engenharia

Chaves

Conexões

ELD0001 ‡ Prof. Renan Sebem ‡ Aula 25 6 / 25

Page 7: Aula 25 - Chaves, sensores e schimitt trigger - UDESC - CCT · Aula 25 - Chaves, sensores e schimitt trigger Prof. Renan Sebem Disciplina de eletrônica digital Departemanto de engenharia

Chaves

Push Button & resistor de Pull Up

I Valor de saída normalmente em 1, usa-se resistor de pull-up;

I O push button sempre deve possuir um resistor de pull-up ou pulldown.

ELD0001 ‡ Prof. Renan Sebem ‡ Aula 25 7 / 25

Page 8: Aula 25 - Chaves, sensores e schimitt trigger - UDESC - CCT · Aula 25 - Chaves, sensores e schimitt trigger Prof. Renan Sebem Disciplina de eletrônica digital Departemanto de engenharia

Chaves

Push Button & resistor de Pull Down

I Valor de saída normalmente em 0, usa-se resistor de pull-down;

ELD0001 ‡ Prof. Renan Sebem ‡ Aula 25 8 / 25

Page 9: Aula 25 - Chaves, sensores e schimitt trigger - UDESC - CCT · Aula 25 - Chaves, sensores e schimitt trigger Prof. Renan Sebem Disciplina de eletrônica digital Departemanto de engenharia

Chaves

Push Button no Eagle

ELD0001 ‡ Prof. Renan Sebem ‡ Aula 25 9 / 25

Page 10: Aula 25 - Chaves, sensores e schimitt trigger - UDESC - CCT · Aula 25 - Chaves, sensores e schimitt trigger Prof. Renan Sebem Disciplina de eletrônica digital Departemanto de engenharia

Eliminação de ruídos

Bouncing noise

ELD0001 ‡ Prof. Renan Sebem ‡ Aula 25 10 / 25

Page 11: Aula 25 - Chaves, sensores e schimitt trigger - UDESC - CCT · Aula 25 - Chaves, sensores e schimitt trigger Prof. Renan Sebem Disciplina de eletrônica digital Departemanto de engenharia

Eliminação de ruídos

Bouncing noise

ELD0001 ‡ Prof. Renan Sebem ‡ Aula 25 11 / 25

Page 12: Aula 25 - Chaves, sensores e schimitt trigger - UDESC - CCT · Aula 25 - Chaves, sensores e schimitt trigger Prof. Renan Sebem Disciplina de eletrônica digital Departemanto de engenharia

Eliminação de ruídos

Debounce RC (eliminando ruídos)

Problemas:

I Demora na transição de estados.

ELD0001 ‡ Prof. Renan Sebem ‡ Aula 25 12 / 25

Page 13: Aula 25 - Chaves, sensores e schimitt trigger - UDESC - CCT · Aula 25 - Chaves, sensores e schimitt trigger Prof. Renan Sebem Disciplina de eletrônica digital Departemanto de engenharia

Eliminação de ruídos

Relembrando - Limites de tensão TTL

The meaning of the parameters above was seen in Section 1.8 and is repeated below.

VIL: Maximum input voltage guaranteed to be interpreted as '0'.

VIH: Minimum input voltage guaranteed to be interpreted as '1'.

VOL: Maximum output voltage produced by the gate when low.

VOH: Minimum output voltage produced by the gate when high.

The noise margin can then be determined as follows, where NML represents the noise margin when low and NMH represents the noise margin when high.

NML = VIL − VOL (10.1)

NMH = VOH − VIH (10.2)

For TTL, NML = NMH = 0.4 V results. This means that any noise added to the input signals, when having an amplitude under 0.4 V, is guaranteed not to corrupt the system.

10.4 Emitter-Coupled LogicThe last BJT-based family is ECL, which was developed for high-speed applications. Due to its perma-nent emitter current, it belongs to a category called CML (current-mode logic). In spite of its large power consumption and large silicon area (for transistors and resistors), ECL has the advantage of being the fastest of all logic circuits (employed, for example, in the construction of very fast registers, shown in Chapter 13).

An OR gate, constructed with traditional ECL, is depicted in Figure 10.8. The supply voltage is VEE = −5.2 V, and the circuit also contains a reference voltage of −1.3 V. The logic levels are also unusual, '0' = −1.7 V and '1' = −0.9 V. Its operation is based on a differential amplifi er (formed by BJTs with coupled emitters), having on the right side a fi xed input, VREF, and on the left side the input signals proper. In this example, it suffi ces to have one of the inputs high to turn the transistor on the right OFF, so its

FIGURE 10.7. (a) Supply and minimum/maximum signal voltages for the TTL family; (b) Corresponding noise margins.

10.4 Emitter-Coupled Logic 225

The meaning of the parameters above was seen in Section 1.8 and is repeated below.

VIL: Maximum input voltage guaranteed to be interpreted as '0'.

VIH: Minimum input voltage guaranteed to be interpreted as '1'.

VOL: Maximum output voltage produced by the gate when low.

VOH: Minimum output voltage produced by the gate when high.

The noise margin can then be determined as follows, where NML represents the noise margin when low and NMH represents the noise margin when high.

NML = VIL − VOL (10.1)

NMH = VOH − VIH (10.2)

For TTL, NML = NMH = 0.4 V results. This means that any noise added to the input signals, when having an amplitude under 0.4 V, is guaranteed not to corrupt the system.

10.4 Emitter-Coupled LogicThe last BJT-based family is ECL, which was developed for high-speed applications. Due to its perma-nent emitter current, it belongs to a category called CML (current-mode logic). In spite of its large power consumption and large silicon area (for transistors and resistors), ECL has the advantage of being the fastest of all logic circuits (employed, for example, in the construction of very fast registers, shown in Chapter 13).

An OR gate, constructed with traditional ECL, is depicted in Figure 10.8. The supply voltage is VEE = −5.2 V, and the circuit also contains a reference voltage of −1.3 V. The logic levels are also unusual, '0' = −1.7 V and '1' = −0.9 V. Its operation is based on a differential amplifi er (formed by BJTs with coupled emitters), having on the right side a fi xed input, VREF, and on the left side the input signals proper. In this example, it suffi ces to have one of the inputs high to turn the transistor on the right OFF, so its

FIGURE 10.7. (a) Supply and minimum/maximum signal voltages for the TTL family; (b) Corresponding noise margins.

10.4 Emitter-Coupled Logic 225

ELD0001 ‡ Prof. Renan Sebem ‡ Aula 25 13 / 25

Page 14: Aula 25 - Chaves, sensores e schimitt trigger - UDESC - CCT · Aula 25 - Chaves, sensores e schimitt trigger Prof. Renan Sebem Disciplina de eletrônica digital Departemanto de engenharia

Eliminação de ruídos

Relembrando - Limites de tensão CMOS

10.6.4 Fan-In and Fan-OutThe defi nitions of fan-in and fan-out were seen in Section 10.3 (see Figure 10.6). As mentioned there, LS TTL (Figure 10.5) is used as the standard load for fan-out comparison. Because an LS input can sink 20 !A or source 0.4 mA, while an HC/HCT output can source or sink 4 mA, the HC/HCT’s fan-out is 10 (which is the smallest of 4/0.4 and 4/0.02).

10.6.5 Supply Voltage, Signal Voltages, and Noise MarginThe supply voltage and maximum/minimum allowed signal voltages constitute another important set of parameters for any logic family because they determine the power consumption and the noise margins. For example, it was seen in Section 4.2 that the dynamic power consumption of a CMOS inverter is given by Equation 4.6, so any change of VDD highly impacts the power consumption.

It was also seen in Section 10.3 that the noise margins when low and when high are given by NML = VIL − VOL and NMH = VOH − VIH, respectively. For the HG family, these calculations are illustrated in Figure 10.11(a), where gate A communicates with gate B. The bar on the left shows the voltage ranges that can be produced by A, while the bar on the right shows the voltage ranges that are acceptable to B. The nominal supply voltage is VDD = 5 V, and the worst case (4 mA) allowed maximum/minimum signal voltages are VOL = 0.26 V, VOH = 4.48 V, VIL = 1 V, and VIH = 3.5 V. Consequently, NML = 1 − 0.26 = 0.74 V and NMH = 4.48 − 3.5 = 0.98 V result, which are listed in Figure 10.11(b).

Note that in Figure 10.11(a) it was assumed that gate A is sourcing/sinking a high current to/from gate B, so the output voltages are relatively far from GND and VDD (observe in Figure 10.10 that two sets of values were defi ned for VOL and VOH, one for low current, the other for high current). In case B were a CMOS gate (or several CMOS gates), A would operate with very small currents, so VOL and VOH would be at most 0.1 V far from the rail voltages, yielding higher noise margins.

10.6.6 Low-Voltage CMOSAs mentioned above, modern designs employ almost exclusively low-voltage CMOS circuits. Even though their general architecture is still that seen in Chapters 4, 9, and again in this chapter, the sup-ply voltage was reduced from 5 V to 3.3 V, then to 2.5 V, 1.8 V, and 1.5 V. Recently, it was further reduced

10.6 CMOS Logic 229

FIGURE 10.11. (a) Voltage ranges for the HC CMOS family; (b) Corresponding noise margins.

10.6.4 Fan-In and Fan-OutThe defi nitions of fan-in and fan-out were seen in Section 10.3 (see Figure 10.6). As mentioned there, LS TTL (Figure 10.5) is used as the standard load for fan-out comparison. Because an LS input can sink 20 !A or source 0.4 mA, while an HC/HCT output can source or sink 4 mA, the HC/HCT’s fan-out is 10 (which is the smallest of 4/0.4 and 4/0.02).

10.6.5 Supply Voltage, Signal Voltages, and Noise MarginThe supply voltage and maximum/minimum allowed signal voltages constitute another important set of parameters for any logic family because they determine the power consumption and the noise margins. For example, it was seen in Section 4.2 that the dynamic power consumption of a CMOS inverter is given by Equation 4.6, so any change of VDD highly impacts the power consumption.

It was also seen in Section 10.3 that the noise margins when low and when high are given by NML = VIL − VOL and NMH = VOH − VIH, respectively. For the HG family, these calculations are illustrated in Figure 10.11(a), where gate A communicates with gate B. The bar on the left shows the voltage ranges that can be produced by A, while the bar on the right shows the voltage ranges that are acceptable to B. The nominal supply voltage is VDD = 5 V, and the worst case (4 mA) allowed maximum/minimum signal voltages are VOL = 0.26 V, VOH = 4.48 V, VIL = 1 V, and VIH = 3.5 V. Consequently, NML = 1 − 0.26 = 0.74 V and NMH = 4.48 − 3.5 = 0.98 V result, which are listed in Figure 10.11(b).

Note that in Figure 10.11(a) it was assumed that gate A is sourcing/sinking a high current to/from gate B, so the output voltages are relatively far from GND and VDD (observe in Figure 10.10 that two sets of values were defi ned for VOL and VOH, one for low current, the other for high current). In case B were a CMOS gate (or several CMOS gates), A would operate with very small currents, so VOL and VOH would be at most 0.1 V far from the rail voltages, yielding higher noise margins.

10.6.6 Low-Voltage CMOSAs mentioned above, modern designs employ almost exclusively low-voltage CMOS circuits. Even though their general architecture is still that seen in Chapters 4, 9, and again in this chapter, the sup-ply voltage was reduced from 5 V to 3.3 V, then to 2.5 V, 1.8 V, and 1.5 V. Recently, it was further reduced

10.6 CMOS Logic 229

FIGURE 10.11. (a) Voltage ranges for the HC CMOS family; (b) Corresponding noise margins.

ELD0001 ‡ Prof. Renan Sebem ‡ Aula 25 14 / 25

Page 15: Aula 25 - Chaves, sensores e schimitt trigger - UDESC - CCT · Aula 25 - Chaves, sensores e schimitt trigger Prof. Renan Sebem Disciplina de eletrônica digital Departemanto de engenharia

Eliminação de ruídos

Debounce - RC com bu�er

ELD0001 ‡ Prof. Renan Sebem ‡ Aula 25 15 / 25

Page 16: Aula 25 - Chaves, sensores e schimitt trigger - UDESC - CCT · Aula 25 - Chaves, sensores e schimitt trigger Prof. Renan Sebem Disciplina de eletrônica digital Departemanto de engenharia

Eliminação de ruídos

Debounce Latch

ELD0001 ‡ Prof. Renan Sebem ‡ Aula 25 16 / 25

Page 17: Aula 25 - Chaves, sensores e schimitt trigger - UDESC - CCT · Aula 25 - Chaves, sensores e schimitt trigger Prof. Renan Sebem Disciplina de eletrônica digital Departemanto de engenharia

Eliminação de ruídos

Schmitt trigger

ELD0001 ‡ Prof. Renan Sebem ‡ Aula 25 17 / 25

Page 18: Aula 25 - Chaves, sensores e schimitt trigger - UDESC - CCT · Aula 25 - Chaves, sensores e schimitt trigger Prof. Renan Sebem Disciplina de eletrônica digital Departemanto de engenharia

Eliminação de ruídos

Schmitt trigger

ELD0001 ‡ Prof. Renan Sebem ‡ Aula 25 18 / 25

Page 19: Aula 25 - Chaves, sensores e schimitt trigger - UDESC - CCT · Aula 25 - Chaves, sensores e schimitt trigger Prof. Renan Sebem Disciplina de eletrônica digital Departemanto de engenharia

Eliminação de ruídos

Schimitt trigger - entrada vs. saída

ELD0001 ‡ Prof. Renan Sebem ‡ Aula 25 19 / 25

Page 20: Aula 25 - Chaves, sensores e schimitt trigger - UDESC - CCT · Aula 25 - Chaves, sensores e schimitt trigger Prof. Renan Sebem Disciplina de eletrônica digital Departemanto de engenharia

Encoder

Encoder

O encoder óptico é formado por um fotodetector, LED e por um disco.

I Exemplo: disco furado;

ELD0001 ‡ Prof. Renan Sebem ‡ Aula 25 20 / 25

Page 21: Aula 25 - Chaves, sensores e schimitt trigger - UDESC - CCT · Aula 25 - Chaves, sensores e schimitt trigger Prof. Renan Sebem Disciplina de eletrônica digital Departemanto de engenharia

Encoder

Encoder - exemplo

I Exemplo: disco transparente pintado;

ELD0001 ‡ Prof. Renan Sebem ‡ Aula 25 21 / 25

Page 22: Aula 25 - Chaves, sensores e schimitt trigger - UDESC - CCT · Aula 25 - Chaves, sensores e schimitt trigger Prof. Renan Sebem Disciplina de eletrônica digital Departemanto de engenharia

Encoder

Encoder - circuito com Schimitt Trigger

ELD0001 ‡ Prof. Renan Sebem ‡ Aula 25 22 / 25

Page 23: Aula 25 - Chaves, sensores e schimitt trigger - UDESC - CCT · Aula 25 - Chaves, sensores e schimitt trigger Prof. Renan Sebem Disciplina de eletrônica digital Departemanto de engenharia

Avisos

I Entrega do desenho da placa do trabalho �nal dia 10/06/16;

I A aula de laboratório desta semana será sobre o trabalho �nal;

I Quem possuir laptop deve trazer para a aula de lab;

I Relembrando, ainda falta ∼ 50% da nota.

ELD0001 ‡ Prof. Renan Sebem ‡ Aula 25 23 / 25

Page 24: Aula 25 - Chaves, sensores e schimitt trigger - UDESC - CCT · Aula 25 - Chaves, sensores e schimitt trigger Prof. Renan Sebem Disciplina de eletrônica digital Departemanto de engenharia

Referências

[1] Volnei Pedroni. Digital electronics and design with VHDL. MorganKaufmann, 2008.

ELD0001 ‡ Prof. Renan Sebem ‡ Aula 25 24 / 25

Page 25: Aula 25 - Chaves, sensores e schimitt trigger - UDESC - CCT · Aula 25 - Chaves, sensores e schimitt trigger Prof. Renan Sebem Disciplina de eletrônica digital Departemanto de engenharia

Aula 25 - Chaves, sensores e schimitt trigger

Prof. Renan Sebem

Disciplina de eletrônica digitalDepartemanto de engenharia elétrica

Centro de Ciências Tecnológicas (CCT)Universidade Do Estado de Santa Catarina (UDESC)

Joinville-SC � Brasil

31 de maio de 2016

Obrigado.

ELD0001 ‡ Prof. Renan Sebem ‡ Aula 25 25 / 25