Go Down

Topic: help connecting Arduino UNO to n-ch MOSFET via Optocoupler (Read 8 times) previous topic - next topic

dhenry

You should look at the datasheet for your device.

Generally, the If specification is between 5ma - 20ma - I typically do 10ma to maximize ctr. Your runs at ~20ma, so it is properly done.

The phototransistor side is not. The ctr is generally 50 - 150%, and I typically design for 50%. That means your phototransistor side's Ic is about 10ma - likely lower with earlier opto-couplers. At 10ma, your Vgs, fully on, is about 7v - not bad but not great either.

Outputting on the emitter is not common: it is often done for speed or to reduce ctr. Most of the times, the output is done on the collector - it produces sharper on/off behaviors. If you look at your datasheet, it shows that as well.

I would put the opto-coupler on the bottom and use a zener to protect the gate.

dhenry

I put this simulation together to get you a comparison between two approaches to switching.

The plot is about power dissipation on the mosfet, switching a 12amp / 24v load.

The emitter output approach dissipates about 14w over the mosfet 50% of the time. The collector approach dissipates 14w for about 2.5% of the time. That means that you can run the mosfet (to220) without heat sink in the 2nd approach but not the 1st approach.

So try not to output on the emitter.

Terraviper-5

#17
Dec 15, 2012, 09:10 pm Last Edit: Dec 15, 2012, 09:13 pm by Terraviper-5 Reason: 1
Thank you for explanation.
Sorry it took me so long to answer, I have been very busy and did not have much time for this project. Now I have assembled this:


But I still got problems: To test the circuit before I connect Arduino to it, I connected a 5V power supply where Arduino pins should be. It activated the motors, but when I disconnected, the motors were still on. They were also still on if I disconnected the main power and then reconnected it. Only after disconnecting the MOSFETs from Optocouplers did the solenoids return to off-state. Im probably missing something important that I do not see because Im a newb. I again ask for your help!

PS: I know that I should put separate resistors for each OC, but they will not be all online at the same time.

Thank you!

Grumpy_Mike

What a very confusing way to draw a schematic.

The emitters of the optos should be connected to ground, the -ve of your 24V source and the FET gates should be connected to the collector of the FETs.

Terraviper-5

#19
Dec 15, 2012, 11:23 pm Last Edit: Dec 16, 2012, 12:13 am by Terraviper-5 Reason: 1

What a very confusing way to draw a schematic.


Sorry, I have made very few schematics and am still learning how to make them better.

Quote

The emitters of the optos should be connected to ground


Do you mean to the - of the 24V? But that makes all three optos connected, if one opens all three FETs open.

Quote

the -ve of your 24V source and the FET gates should be connected to the collector of the FETs.


Isnt the FET gate same as opto's emitter, since the two are connected?
Do you mean drain by collector?

Go Up