That's one simple reason for using an optocoupler. If you've used a socket for the optocoupler chip, always a good idea, then replacing it only takes a moment. The Bad Stuff won't jump across the gap between the LED and the photo-transistor. If you did that, then many mistakes you could make would only ruin the quite cheap optocoupler. If you weren't sure that circuits you wanted to connect to an input were "safe" for your relatively expensive microprocessor, you could connect the microprocessor to the optocoupler as above, and use your circuit to turn the LED on and off. (I have discussed putting optocouplers on outputs further down the page.)Ī simple reason? You could use an optocoupler if you were uncertain about what you are doing. Why put an optocoupler on an microprocessor input? Since that time, I have created a "bigger, better" four channel opto-coupler board, with (optional) LEDs so the user can see the state of inputs and outputs at a glance. The link will take you to the details, including prices and how to order. Some time ago, I created a small PCB to "carry" MCT61-type optocouplers. (We'll talk about sending signal out of a microprocessor though an optocoupler later.) Breakout board You might well set up an optocoupler as above with an input line of a microprocessor, e.g. At the green blob, you will get a high voltage or a low voltage, depending (indirectly) on the state of the LED, itself determined by the state of the switch. (In fancy optocouplers, the phototransistor may be replaced by something else that "switches on" when the LED illuminates it.) In the following, I've drawn the optocoupler in black, things you might attach to it in blue. The LED and phototransistor are not "connected", but when the LED is on, light from it strikes the phototransistor inside a little pocket of air inside the opaque "bit of plastic", and the phototransistor conducts. ![]() The following eight pin DIL package would have two independent optocouplers in it, for instance. Often that "bit of plastic" will hold more than one optocoupler. Simple optocouplers consist of an LED and a photo transistor, embedded within a bit of plastic. In this page, we will consider how optocouplers can be useful both on inputs and on outputs. If it dies, you just drift to the side of the road and stop. Consider your car: The engine is "fail safe". And they are "fail-safe": If something goes wrong, your system won't work, but things should just stop rather than moving in a bad direction. Optocouplers are elegant little devices with very little about them to "go wrong". This page concentrates on how optocouplers can help in low voltage digital circuits. It really doesn't matter if you are using an Arduino, a Raspberry Pi, a PIC. This page introduces optocouplers to hobbyists, etc. Optocouplers, also known as optoisolators.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |