help connecting Arduino UNO to n-ch MOSFET via Optocoupler

jwatte:

And what could I do to also allow PWM? Cooler or some better component?

The danger with your pull-down resistor being as low as 470 ohm is that the optocoupler may not be able to pull the gate high enough to fully turn on the MOSFET. There are two concerns with driving MOSFETs for high power:

  1. Get a high enough gate voltage to drive it all the way on. This is often a voltage that's twice the rated "Vgs threshold" voltage -- 10V is not uncommon. 7.5V can do it for many devices, too.
  2. Get enough current to turn it on quickly. You want ideally several amperes for a handful of nanoseconds in the really high-power cases. Working with milliamperes means it will take much longer to turn on the device, which is still often OK, as long as your duty cycle is long (so, no PWM in that case.)

The problem is that the photo transistors aren't high-current drivers. If you want to drive heavy loads with PWM, you want a dedicated MOSFET gate driver circuit, such as the International Rectifier series: International Rectifier - Product Information Power Integrated Circuits or ST microelectronics: http://www.digikey.com/product-detail/en/TD351IN/497-4440-5-ND/725331
Note that those drivers, in turn, ONLY allow PWM; they don't work well with prolonged 100% on cycles, because of the way the gate boost capacitor works.
Sadly, most of these chips are going obsolete, because power switching is going all surface mount and integrated controllers now. Something like the FAN7390N would make a nice driver chip, too.

The driver chips can replace both your opto coupler and your pull-down resistor.

Thank you for those insights, I will surely consider them next time I'm building something.

I can easily boost the voltage from 7.5 V to 9 V or 12 V. That would raise current from 16 mA to 19 mA or 25.5 mA, still well within range of 50 mA,

which is max. Of course I would have to account for voltage fluctuations from the adaptor, since those loads are very small, but that shouldn't raise the current to more than 32 mA (with those resistors).

The danger with your pull-down resistor being as low as 470 ohm is that the optocoupler may not be able to pull the gate high enough to fully turn on the MOSFET.

But isn't lower resistor -> more current -> better switching? Please, correct my logic. Or did you mean low current?

You want ideally several amperes for a handful of nanoseconds in the really high-power cases.

Wow, that's is high. Then again, when I checked the specs I was surprised when I saw

that allowed Gate -> Source current was 62 A.

Note that those drivers, in turn, ONLY allow PWM; they don't work well with prolonged 100% on cycles, because of the way the gate boost capacitor works.

If drivers cant work 100% on cycles and optocouplers are too slow for PWM, is there any way to have both, PWM and 100% on cycles?