编辑: 哎呦为公主坟 2018-08-31

s input from damage due to reverse voltages and resistor R1 provides current limiting. The optocoupler output is normally high (5V) and goes low (0V) when triggered. With a load resistor of 10K (R3) we need a minimum current of 0.5mA to do drop the voltage

5 volts. From the 4N25'

s datasheet, the input current required is

10 times the output current, in this case 5mA. This is the minimum input current required to trigger the timer. The voltage dropped across the optocoupler input diode, Vf, is typically 1V and remains fairly constant regardless of input current. Therefore, the minimum input voltage necessary to trigger the timer is given by Vin = (Iin x R1) + Vf = (5mA x 1K) + 1V = 6V For lower input voltages reduce the value of R1. The maximum optocoupler input current is 80mA. Using the same formula above, the maximum input voltage is (80mA x 1K) + 1V = 81V. Of course you should allow for a safety margin, say

5 to 10mA. For higher input voltages increase the value of R1 or add an external resistor. Transistors Q1 and Q2 are used to operate the relay. At first glance you may wonder why TWO transistors were used when one would do. It'

s all to do with what happens on reset. On reset the microcontroller'

s I/O ports are configured as inputs (via internal hardware) and float high. If only one transistor was used the relay would be operated during reset. Of course the relay would be released after reset once the onboard software took over. However the relay would flick on momentarily C not what we want. Two transistors means we can use a low output to operate the relay and a high to release it - just right during reset! Note that the relay is connected to the V+ input supply. This reduces the current drain on the

7805 voltage regulator and also helps minimize any switching noise on the 5V supply to the micro........

下载(注:源文件不在本站服务器,都将跳转到源网站下载)
备用下载
发帖评论
相关话题
发布一个新话题