Understanding optoisolators and MOSFETs - Page 1
Forum section: electronics / beginners

author: rthorntn
author_rank: Frequent Contributor
timestamp: April 13, 2022, 08:24:51 am
content: Hi,So I have just received a mains powered AC Infinity Cloudline PWM fan (for those interested I want to use it to exhaust warm air from my cathedral ceiling outside, via a loft exhaust in another part of the house), from my research the control cable is wired:Pin 1 is N/CPin 2 is a 8kHz PWM (10v)Pin 3 is groundPin 4 is a 10v DC output100% PWM is supposedly fan off and 0% is full on.So the forums are saying that to drive the PWM from a 3.3v MCU I should use an optoisolator and a MOSFET.Now I think I understand why, the MOSFET "boosts" the 3.3v MCU PWM voltage to whatever voltage you supply, in this case the 10v on pin 4.The optoisolator (in the event of a certain kind of catastrophic failure) is to stop the high-voltage parts of the fan frying the MCU and if it's ethernet connected then it could fry the network switch.I'm guessing this circuit only needs to be unidirectional?Can I use one of those YYNMOS-1 jobbies from Aliexpress (see attached image)?The wiring of the YYNMOS-1 is supposedly:1.DC+: device DC power positive2.DC-: device DC power negative3.PWM: signal input port (connects MCU IO ports, PLC interface, DC power)4.GND: signal negative port5.OUT+: output port positive (connects device positive)6.OUT-: output port negative (connects device negative)I guess what I'm asking is do I have the right idea, and is this YYNMOS-1 wired in such a way as to do what i want?I'm just looking for a neat little all-in-one board so I don't have to have a mess of wires and I can't really visualise circuits like this, if anyone could share a circuit diagram for this application that would be much appreciated.Thanks for looking.CheersRichard

author: Ian.M
author_rank: Super Contributor
timestamp: April 13, 2022, 09:21:17 am
content: Probably not. That sort of MOSFET module is suitable for switching power to resistive loads such as lamps and heaters, or with an external catch diode, inductive loads such as motors and solonoids. I believe its just a low side switch with nominally optoisolated gate drive (only actually isolated if you provide a separate isolated bias supply).Unfortunately I can't find an actual YYNMOS-1 schematic. If you have already bought one, please do the community a favor and trace one out.Probably the easiest option would be to use some sort of level shifter, e.g. a RRIO OPAMP configured as a comparator, powered from the fan 10V, with one input driven from your logic PWM output and the other from a potential divider giving half your logic Vcc. If you need isolation, look at logic output optocouplers . . .

author: John B
author_rank: Frequent Contributor
timestamp: April 13, 2022, 09:33:35 am
content: I would use something like a 6N137 digital optocoupler at those frequencies. A low speed opto can do 8khz but will have non linearities in the duty cycle transfer function as the turn off time is slow. You'd probably have to clean up the output waveform with a schmitt trigger buffer anyways.Is pin 4 a 10V power supply? If so you could generate a 5V rail from that. Also more info is needed on pin 2, you say it's 10V, does that mean it has it's own pull up resistor and it just needs to be pulled to ground using an open collector / open drain output? The 6N137 already has that as an output too.

author: Zero999
author_rank: Super Contributor
timestamp: April 13, 2022, 11:19:52 am
content: Does pin 4 output 10V, or is it for an external 10V supply?If so, a MOSFET isn't required. Connect a pull-up resistor between 10V (pin 4) and the PWM input (pin 2) and the output of the opto-coupler between pin 2 and ground (pin3). Drive the opto-coupler from the MCU via a suitable current limiting resistor.Here's a schematic showing how it can be done.

author: rthorntn
author_rank: Frequent Contributor
timestamp: April 13, 2022, 11:20:53 am
content: Pin 4 afaik outputs 10v

author: Terry Bites
author_rank: Super Contributor
timestamp: April 13, 2022, 01:34:32 pm
content: This is the schematic for the module. I drew this from a visual inspection fromhttps://michiel.vanderwulp.be/domotica/Modules/MosFetPwmModuleYYNMOS1/I'm sure he'll put me right if I slipped up. There are protective diodes to keep over voltage on the gate and across drain-source. Honsestly, the MOSFET wont switch fast enough for PWM.As Ian M points out, its switch designed for a static load. Its not fast enough for PWM.It would be better to use digital isolator with op drive for a MOSFET, eg TLP5705Hwww.mouser.co.uk/datasheet/2/408/Toshiba_TLP5705H_datasheet_en_20210903-2636055.pdfYou may even be able to bodge it on to the existing YYNMOS1. Lose the gate drive resistors. A couple of bits of wire, Job done.

author: Ian.M
author_rank: Super Contributor
timestamp: April 13, 2022, 02:12:58 pm
content: Thanks for posting that Terry.The FQD60N03L MOSFET's typ. 18 nC gate charge, and the 100K pulldown will result in a turnoff time of the order of a third of a millisecond, so with that optocoupler drive circuit, its obviously unsuitable for 8KHz PWM. Even a few hundred Hz PWM would be pushing it and would be likely to result in MOSFET overheating if significantly loaded.

author: Zero999
author_rank: Super Contributor
timestamp: April 13, 2022, 02:53:15 pm
content: The original poster's fan is mains powered. It uses phase control or VFD to alter the speed of the motor.Quote from: rthorntn on April 13, 2022, 08:24:51 amThe 10V PWM signal controls the motor drive and not the motor and is inverter by the motor driver. The circuit I posted will convert the MCU PWM to 10V and invert it.Quote

author: rthorntn
author_rank: Frequent Contributor
timestamp: April 14, 2022, 02:28:57 am
content: Thanks everyone, I posted this topic just before I went offline for the night.They call the motor "EC" (electronically commutated)https://www.acinfinity.com/blog/what-is-an-ec-motor/"it's a brushless motor that runs on DC voltage using an AC power supply to combine the best of both technologies"

author: rthorntn
author_rank: Frequent Contributor
timestamp: April 14, 2022, 05:46:39 am
content: I took the cover off to show the electronics.I thought I would see a small MCU in there, maybe its on the other side of the PCB or perhaps an MCU isn't required?