# Tag Info

34

The suggested MOSFET is not well suited to this application. There is a severe risk that the result will be a smoking ruin :-(. Principally, that FET is only very very marginally suited to the task. It could be made to work if it was all you had but there are much much much more suitable FETs available, probably at little or no extra cost. The main issues ...

31

There are several issues effected by the PWM frequency when driving a motor: The pulses need to come fast enough so that the mechanical system of the motor averages them out. Usually a few 10s of Hz to a few 100 Hz is good enough for this. This is rarely the limiting factor. In some cases, it is important that whining can't be heard at the PWM frequency. ...

27

The MOC3021 is an optocoupler with a triac output. It's used to drive a power triac typically to switch mains operated appliances. Triacs can only be used in AC circuits. You need an optocoupler with a transistor output, preferably one with two LEDs in antiparallel at the input. The SFH620A is such a part. The two LEDs in antiparallel ensure that ...

26

The base terminal of certain phototransistor optocouplers is exposed to address specific design requirements, such as below. If those requirements do not exist, a part without the base pin might be a better choice - the latter are typically 4 or 6 pin parts as opposed to (usually) 8-pin parts incorporating the base pin: Usually cheaper, less space needed on ...

25

Converting to a "24 V signal" is missing the point. The real problem is driving a 24 V relay from a 5 V digital signal. Fortunately, that is easy. Here is one way: You didn't say how much coil current the relay draws at 24 V, so I picked an example part I had in my system (Zettler AZ8-1CH-5DSE). Figure the B-E drop of Q1 is about 700 mV. This means ...

18

A common optocoupler has a current output: you connect the output transistor to Vcc and the emitter will source the current. How much depends on the CTR, or Current Transfer Ratio. That's not very much, and is usually expressed as a percentage. For instance a CTR of 30 % means that you need 10 mA input to get 3 mA output. Use those 3 mA to drive the base of ...

17

Phototransistor This is the most basic variant. When there is an input signal, the phototransistor switches on like a normal transistor, i.e., creates a low-impedance connection between its collector and emitter (up to a certain current limit). However, a transistor optocoupler does not amplify signals as much as a normal transistor. Typically, the ratio of ...

15

This shouldn't be too hard: Vcc is the +5 V Arduino power supply, Vout goes to an I/O pin. Important parameter for an optocoupler is its CTR (Current Transfer Ratio), comparable to HFE for a transistor. But where HFE is often around 100 for a general purpose transistor, it's often less than 1 for an optocoupler, and therefore often expressed as a ...

15

First, a possibly more permanent link to this product is here. And the schematic is here. (Edit 7/29/2015: Ironically my two links are now broken and OP's Amazon link is still useful) Two reasons it makes sense to use optoisolators here: The controlling device might be very far away so that it doesn't share a common ground reference with the relay board (...

15

I actually have some relevant experience on this very subject. Many, many years ago I grabbed a bunch of PS2505 optoisolators which turned out to be PS2506s. No big deal right? It turns out the PS2506s are INCREDIBLY slow compared to the PS2505s. My friend and mentor, Don Shepherd, gave me this sage advice. Choose R1 so that about half of the available ...

15

Both transformers and opto-couplers can provide isolation between 'hot' and 'safe' regions of a circuit. The difference is that opto-couplers are very small, cheap, and can work on simple DC, so can shift a logic signal from one side to the other with no fuss and no or few other components. Transformers are big, expensive, and need AC to work, they cannot ...

14

In the answers to this question is explained how you can do that complete zero-crossing detection circuit with just U1, R12 and 2 series resistors on the 220 V side. One solution uses a common optocoupler, the other one a Darlington optocoupler, which needs less current to drive the optocoupler's LED, so that's less power in the series resistors (less than ...

13

If safety is a primary concern, rather than build that circuit up, you could consider purchasing a standard AC-input module for about $10-$15. They are UL, CSA, CE, and TÜV safety certified (it's still possible to go wrong and create a dangerous situation, especially if the wiring is sloppy, but less likely). Best to have someone knowledgeable look it over ...

12

Borges, there are isolated devices made specifically for digital isolation and even for SPI busses. Texas Instruments and Analog Devices both make these. It's capacitive or magnetic isolation instead of optical isolation. Here is a link to popular device: ISO7241C @ TI.com It's also available on digikey: ISO7241CDW @ Digikey

12

For high speeds other ways of coupling, like capacitive or magnetic, are often used instead of optical. There are 15 Mbps optocouplers, but most 4-channel types will not be 3+1. The Si8441 from Silicon Labs is the cheapest 3+1 channel, > 1 Mbps isolator at Digikey. The Si8441 can handle bit rates up to 150 Mbps. Alternatively you may use a 2+1 magnetic ...

12

Probably a number or reasons, but the most important being that it will prevent transient voltage from damaging the driving transistor. And depending on the application, it will help prevent AC noise from interfering in the rest of the circuit. You bring up some good points, however optocouplers are commonly used to isolate components from potentially ...

12

You have many options. If you need to connect very few optocouplers, you can connect them directly to the GPIO of your microcontroller (through a resistor), provided that: You do not exceed the GPIO output current. You do not exceed the total port current. You do not exceed the total gnd/vdd current. If you need to connect more optocouplers, you can try ...

12

The cheapest and simplest solution is just to buy a tiny mains-powered USB charger and wire up the USB +5 and ground lines to detect when the charger is powered by AC.

12

The diode is there to protect the opto-LED in the event of a reverse polarity connection. The HF11L datasheet states that the absolute maximum reverse voltage for the emitter (meaning the IR emitter, the LED) is 6 V. Typically a 5 V supply would be used for the MIDI driver but it's worth being careful. In your case pretty well any diode - including an LED ...

11

Summary: In optocoupler devices which are essentially identical apart from being either white or black in color, manufacturers'data sheets show differences in switching speed and thermal performance, white being superior in each case. The most notable physical parameter of the actual devices is a much lower capacitance for the white package. It seems ...

11

Do the math. The output is driving 16 V across 4.7 kΩ, so is passing 3.4 mA. On the input there is 5 V across 150 Ω and the LED. According to the 4N25 datasheet, the forward drop of the LED can be 1.5 V. The current is therefore ((5 V) - (1.5 V)) / (150 Ω) = 23 mA. You are getting a current transfer ratio of (3.4 mA)/(23 mA) = 15%. ...

11

That is not a very good illustrative diagram, and it's copied directly off the IL300 datasheet: Here is how it should be connected: The LED has an output that varies with temperature and decreases with time, whereas the photodiodes are quite stable with time and will track each other well. So one photodiode is used in a feedback loop to control the LED ...

11

A simple BJT like MMBT3904 or any switching BJT will do the job. You can get a reel of 100 for two bucks.

11

You've got three problems. 1: no current limit on the MOC3021 LED. With 5V there the LED inside the MOC3021 will not last long, so add 220 ohms in series with the input. 2: not enough voltage on the output. The output is is a phototriac which has a forwards voltage drop of 1 to 1.5V - to light the blue LED you want 3V or so and a resistor to limit ...

10

Your circuit acts as a 5 to 10 mA current source drive to the optoisolator. Somewhat less at lower voltages. The "trick" here is that the BFR30 is a JFET (Junction Field Effect Transistor) and NOT a more common (nowadays) MOSFET, and behaves fundamentally differently from a MOSFET. BFR30 datasheet here. It is essentially a "depletion mode" device that is ...

10

A standard way to do this is to use a second optocoupler (preferably on the same chip) to compensate the non-linearity of the first one. The example below is from Analog Devices AN-106. The principle is to put a current through the second optocoupler's primary such that it secondary gives the same result as the secondary of the first optocoupler. Then that ...

10

I strongly suggest to reconsider using your circuit in favor of detection without direct connection to mains voltage. Some examples are: Photodiode to detect light Coil-based current transformer to detect current Current transformer with Hall effect sensor to detect current All of the above have the benefit that they do not trigger if your light bulb is ...

10

You have two small problems: No resistor in series with the opto led. So the current is not limited, and will burn the opto if you try in real life A voltage source too low to light a blue LED. Such LED typically require about 3 to 3.5V. You have 1.5V on this side which is far from sufficient. With a 100 ohm resistor, something like 4.5V would give ...

9

There is not much difference than the standard BJT design and an optotransistor. The base can be left floating but it will severely reduce the turn off speed since any internal base capacitance cannot be discharges(which is why they gave you a direct connection to to the base. Optocouplers do not have this connection). The base picking up spurious EM ...

9

Optocouplers with Darlington output (like the 6N138) are very slow, especially when the output transistor should switch off. To get a sufficiently fast raise time of the output signal, the base of the output transistor needs a connection to ground (through a resistor) so that the base charge can be removed quickly. Any value between 4.7 kΩ and 10 kΩ should ...

Only top voted, non community-wiki answers of a minimum length are eligible