designideas Edited by Bill Travis Oscillating output improves system security Jorge Marcos and Ana Gómez, University of Vigo, Vigo, Spain

any electronic-control sys- tems have digital outputs Figure 1 Mthat use transistors. One STATIC method of improving the security in VARIABLE these outputs is to use an oscillating sig- DYNAMIC nal to represent a logic-high state instead VARIABLE of a fixed voltage level (Figure 1). This LEVEL 0 LEVEL 1 LEVEL 0 type of signal, a dynamic variable, can drive the circuit shown in Figure 2. This circuit connects to the output transistor of the electronic-control system. The dy- You can improve the reliability of an electronic-control output by using an oscillating, instead of namic-variable signal connects to the steady-state, signal to represent a logic-high state. output transistor, whose collector con- nects to a pulse transformer. If the system 24V cannot produce pulses because of a fault, the relay deactivates. If a fault exists in the drive circuitry, the output system stays 1N5347B ZENER 3 V ϭ10V off. This solution guarantees the securi- Z 1 4 ty function when one fault occurs. How- 1N4002 RELAY ever, it does not guarantee the detection 1N4002 5 16 2 1 ␮F 1 of all faults. However, you can use a 6 DPDT relay and connect one of 9 Figure 2 TRANSFORMER NO1 the contacts to one of the elec- SKPT25B3 COM1 13 tronic-control inputs; thus, you can con- 11 NC1 FUSE 8 firm the relay’s activation or deactivation NO2 4 in the control program. COM2 6 NC2 The circuit in Figure 2 performs effi- D ciently if the system can generate a fre- GATE_MOS quency greater than 1 kHz to excite the MOS G IRFD110 S Oscillating output improves system security...... 85 Polarity protector outperforms A “dynamic-variable” signal drives the output relay in this circuit. Schottky ...... 86 pulse transformer. Many electronic sys- square-wave signal of a frequency that Circuit offers improved tems that use an output transistor can suits commercial pulse transformers. active rectification ...... 86 generate a dynamic variable. Many sys- This signal drives the MOSFET when the Build an adjustable high-frequency tems, such as PLCs (programmable-log- pulse detector receives pulses from the notch filter...... 90 ic controllers), have long cycle times and, PLC. Because the pulse detector can fail, thus, cannot generate signals of adequate you must duplicate the external circuit Bootstrapping allows single-rail frequencies. In these cases, you can ob- for redundancy. In this way, the final re- op amp to provide 0V output ...... 92 tain an appropriate signal using the low- sult is the same as that of Figure 2,ex- Filter allows comparison frequency dynamic variable from the cept that the safe output comprises two of noisy signals ...... 94 PLC. To accomplish that task, you must relays. Publish your Design Idea in EDN. See the use an external oscillator and a pulse de- What’s Up section at www.edn.com. tector implemented with a monostable Is this the best Design Idea in this multivibrator. The oscillator produces a issue? Select at www.edn.com. www.edn.com February 6, 2003 | edn 85 designideas Polarity protector outperforms Schottky diodes Mike Hovenga, BAE Systems, Austin, TX he polarity-protection circuit in (often Schottky). The circuit incurs a MOSFET devices because of their low Figure 1 is a high-performance al- much lower voltage drop than even the on-resistance. For the transistors in this Tternative to the usual series best . The circuit uses design, the combined on-resistance is 0.013⍀. With a 10A load, the voltage drop is 0.13V at 25ЊC. Compare this fig- Q1 Q2 Figure 1 IRF7822 IRF7425 ure with forward-voltage drops of sever- al hundred millivolts for Schottky diodes + under the same conditions.You must use

D1 p- and n-channel transistors in series be- IN4002 R2 R3 cause of their intrinsic diodes. A photo- 2.2M 2.2M voltaic isolator provides the appropriate 7 865 OUTPUT TO gate drive to the MOSFETs. The per- R1 100k PROTECTED INPUT 1.2k formance is even better at lower currents. CIRCUITRY IC1 PVI5033 You can replace the two discrete transis- tors by a single-package, complementa- D2 14V FOR ry-MOSFET pair, such as an IRF7389, 15.5V OVP 1 23 4 which has a combined on-resistance of ⍀ 0.108 . Resistors R2 and R3 are necessary to turn off the transistors when IC1 turns 10k off. R1 provides a nominal 12V input. Ϫ Is this the best Design Idea in this This polarity-protection circuit incurs lower forward-voltage drop than the best Schottky diodes. issue? Select at www.edn.com.

Circuit offers improved active rectification Reza Moghimi, Analog Devices Inc, San Jose, CA ectifiers convert ac input is shown in red. Ͻ signals to dc. You can VCC If VIN 0V, the amplifier Rcombine a diode behaves as a comparator. Figure 1 VOUT1 VOUT2 and a load resistor to 3 Its negative input is at a + Vϩ create a half-wave , 1 higher potential than its VIN AD8591 provided that the amplitude 4 _ positive input, so its out- SD VϪ 1N4154 of the ac source is much larg- put,VOUT1, saturates to VEE. er than the forward drop of When the input again be- 5k the diode (typically 0.6V). VEE comes positive, the ampli-

Unfortunately, you can’t use VCC fier has to recover from sat- this method to rectify signals uration and respond as that are smaller than a diode quickly as its slew rate and drop. For these applications, saturation recovery time active using ampli- allow. This response takes fiers are available. The diode This circuit is a typical half-wave-rectifier configuration. some time, and the input is inside the feedback loop of may have changed by the Ͼ an amplifier (Figure 1). For VIN 0V, the conduct, the amplifier is in an open-loop time the amplifier is ready to respond to diode provides negative feedback, and the configuration, and VOUT2~0V. Figure 2 the positive input. The signals at VOUT1 output,V , follows the input (V ϭ shows the response of the circuit in Fig- (red) and V (green) clarify this point OUT2 Ͻ OUT2 OUT2 VIN). For VIN 0V, the diode does not ure 1. The output is shown in green; the (Figure 3).VOUT2 is the same waveform as

86 edn | February 6, 2003 www.edn.com designideas

in Figure 2. Note the change in scale fac-

tor. VOUT1 is a diode drop higher for pos- itive inputs and saturates to VEE for neg- ative inputs. The time delay in the response may result in a significant er- ror in the output. For example, an amplifier that has a slew rate of 2.5V/␮sec and saturates to Ϫ2.5V takes at least 1 ␮sec to get ready to respond to positive in- Figure 2 These signals appear at the input (red) and the output (green) of the circuit in Figure 1. puts. During this time, the fast in- put has changed, so rectification starts at the wrong part of the input. One way to minimize this error is to use a high-slew- rate amplifier, but this solution comes at the expense of high power consumption. Another option is to use an inverting- amplifier configuration and two diodes, followed by a unity-gain inverting am- plifier to obtain the noninverting recti- fication. This method appears in many textbooks. The circuit in Figure 4 repre- sents a one-stage, noninverting rectifier that improves the accuracy of the These signals are the waveforms at V (green) and V (red) in the circuit in Figure 3 OUT2 OUT1 rectification and reduces the pow- Figure 1. er consumption. In this circuit, an VCC AD8561 amplifier acts as a comparator. ϩ VOUT1 The AD8591 performs the rectification. 3 + V Ͼ 1 When VIN 0V, the output of the AD8591 4 _ AD8561 is high, and the AD8591 acts as SD VϪ 5k Ͻ VIN a follower. When VIN 0V, the output of V the AD8561 is low, and the AD8591 shuts CC VEE

down. This shutdown puts the output of Vϩ 3 _ 1 the AD8591 into a high-impedance state, 8 7 so it remains at approximately 0V,rather AD8561 2 5 + VϪ than saturating to VEE as it did in the pre- 4 6 vious circuit.When VIN goes positive, the

amplifier comes out of shutdown VEE Figure 4 and again follows the input. This This circuit greatly improves on the performance of the circuit in Figure 1. turn-on time (the time it takes to come out of shutdown) is much shorter than the saturation recovery time and slew- rate limiting that occurs in the previous circuit. Figure 5 shows the signals at the input (red) and output (green) of the im- proved rectifier circuit.

Is this the best Design Idea in this issue? Select at www.edn.com. These signals appear at the input (red) and output (green) of the circuit in Figure 4. Figure 5

88 edn | February 6, 2003 www.edn.com designideas

Build an adjustable high-frequency notch filter John Ambrose, Mixed Signal Integration Corp, San Jose, CA

lthough you can obtain universal, bandpass filter, you can construct a notch quired 6V.This supply span matches well

resistor-programmable switched-ca- filter (Figure 1). IC2, a TLC082 is a dual with IC1, an MSHFS6, with its 5V nomi- Apacitor filters that are configurable BiCMOS op amp, replacing the older nal operating voltage. Using half of the as notch filters, most cannot operate at JFET-input stage with lower noise CMOS TLC082, you can construct a third-order, bandwidths higher than 100 kHz. Fur- but retaining the bipolar output for high elliptic lowpass filter. ther, the typically 16- to 20-pin packages drive capability. The gain-bandwidth You set the passband ripple at approx- do not include a continuous-time, an- product of the TLC082 is 10 MHz, al- imately 5 dB to increase the out-of-band tialiasing filter to prevent spurious signals lowing you to use it for filtering at fre- rejection.You set the continuous-time fil- from appearing at the output. By using quencies as high as 1 MHz. The mini- ter for 800 kHz, providing greater than 40 Ϫ an eight-pin, dual operational amplifier mum (VCC VEE) span with the TLC082 dB of rejection at 12.5 MHz. Figure 2 and an eight-pin, switched- is 5V, unlike the older TL082, which re- shows the frequency response of the

5V VDD

47k 100 nF Figure 1

10k 8 + 3 4.7k NOTCH 8 5 IN 1 IC2A

+ FSEL TLC082

OUTPUT 4.7k IC 2.4k _ 2 2B GND SIGNAL TLC082 OUT 4 7 _ 6 IC 100k INPUT 1 47 pF 1k 470 nF 4 10k TYPE MSHFS6S VSS 10 pF 20 CLK VDD 100 nF 47k 10 pF 10 pF 4.7k

THIRD-ORDER, 800-kHz ELLIPTIC 10k 2.4k LOWPASS FILTER

V2 SUMMING STAGE 6.25 MHz 5V +

TUNABLE SIXTH-OCTAVE BANDPASS FILTER

An op amp and a switched-capacitor filter combine to form a highly selective notch filter.

edn021226di30991 Heather

This plot is the frequency response of the third- This Bode plot represents the passband of the Figure 2 Figure 3 order lowpass-filter stage. MSHFS6 filter.

90 edn | February 6, 2003 www.edn.com designideas

third-order lowpass filter using the ing the resistor and capacitor TLC082. The MSHFS6 switched- values. By summing the output capacitor selectable lowpass/band- of the bandpass filter with the in- pass filter with its 12.5-to-1 clock- put, cancellation of the input sig- to-corner ratio allows for distortion nal occurs at 180Њ phase shift in measurements to 6.25 times the the passband. Figure 3 shows the notch center frequency before Bode plot of the passband of the aliased signals cause measurement MSHFS6 sixth-octave filter set- error.With the TLC082 lowpass fil- ting. The output of the other half ter set at 800 kHz, you can measure of the TLC082 provides the distortion products as high as the notch-filter output. Figure 4 third harmonic. If the notch center shows the depth of the notch fil- frequency is always set lower than ter at Ϫ50 dB. 260 kHz (MSFS6 clock at 3.3 MHz), then you can set the continuous- Is this the best Design Idea in time lowpass filter corner to The circuit in Figure 1 delivers a Ϫ50-dB notch. this issue? Select at www.edn. Figure 4 a lower frequency by adjust- com.

Bootstrapping allows single-rail op amp to provide 0V output Jim Williams, Linear Technology Corp, Milpitas, CA any single-supply-powered ap- plifier, features a clock output. This out- fier clocking commences at approxi-

plications require amplifier-out- put switches Q1, providing drive to the mately midscreen. The circuit provides a Mput swings within 1 mV—or even diode-capacitor charge pump. The simple way to obtain output swing to 0V, Ϫ submillivolts—of ground. Amplifier- charge pump’s output feeds IC1’s V ter- allowing a true “live-at-zero” output. output-saturation limitations normally minal, pulling it below 0V, thus permit- preclude such operation. Figure 1’s pow- ting an output swing to and below er-supply bootstrapping scheme achieves ground. In Figure 2, the amplifier’s VϪ the desired characteristics with minimal pin (Trace B) initially rises at supply Is this the best Design Idea in this

parts count. IC1, a chopper-stabilized am- turn-on but heads negative when ampli- issue? Select at www.edn.com.

Aϭ5V/DIV Figure 1 5V

5V V+ 1k + ␮ Bϭ0.2V/DIV IC1 10 F LTC1150 _ CLOCK + OUT Q1 BAT85 VϪ 2N3904 39k 10 ␮F +

100k

5 mSEC/DIV

This start-up photo shows that the amplifier’s Figure 2 This configuration uses bootstrapping to allow a single-rail op amp to oper- VϪ pin (Trace B, midscreen) goes negative ate at 0V output. when the bootstrapping takes hold.

92 edn | February 6, 2003 www.edn.com designideas Filter allows comparison of noisy signals Mario Milberg, CNEA, Buenos Aires, Argentina 15V ϩ hen you need to compare the dc VHYS,where V is the voltage on the com- R3 Ϫ level of a noisy signal with 7.5k parator’s positive input,V is the voltage Figure 1 R2 a reference for further pro- 220k on the negative input, V is the noise W NOISE cessing, the output of the comparator 15V riding on the signal, and VHYS is the hys- changes in a chaotic way when the dc lev- R1 teresis accruing from the positive feed- 3.3k 5 3 VSIG + el approaches that of the reference. You 2 back to the positive input. LM339 have a choice of two classic solutions to 4 _ C1,R4,R5, and R6 form the highpass fil- 12 ϭ this problem: One is to add hysteresis to C1 ter, whose cutoff frequency is fC 0.68 ␮F ␲ ϩ the comparator, but, if the noise level is 15V 1/[2 C1(R4 R5)||R6]. The cutoff fre- R high, the hysteresis must be correspond- R4 6 quency should be lower than the lowest 270k 470k ingly high. In this situation, you face a frequency of the noise band. R1 and R2 es- R5 wide dead-band zone around the com- 100k tablish the still-needed small amount of

parison trip point. The second solution hysteresis. R3 is a pullup resistor for the is to add lowpass filtering to the noisy sig- open-collector output of the comparator. nal. This approach increases the response By presenting the noise signal to both inputs of The comparator circuit worked success- time, slowing down the system. This De- the comparator, this circuit can compare the dc fully in a system that processes the fluc- sign Idea proposes a third solution that levels of the signal and the reference. tuating current generated by an ioniza- avoids the cited drawbacks. In the circuit tion chamber in a neutron-flux meas- in Figure 1, the noise adds to the refer- ence between the two dc levels: urement system. ϩϭ ϩ ϩ Ϫϭ ence through a highpass filter, so the V VDCSIG VNOISE VHYS,V VDCREF Is this the best Design Idea in this ϩ ϩϪ Ϫϭ Ϫ ϩ comparator’s inputs see only the differ- VNOISE, and V V VDCSIG VCREF issue? Select at www.edn.com.

94 edn | February 6, 2003 www.edn.com