I got one more question about freewheeling diodes. Both' FETs datasheets speak about body diode characteristics, so do these have freewheeling diodes built-in? Or should I add external ones as well? If so, which ones? I got loads of n4001 lying around, but I guess 1A is not enough, even though it will be only for a splitsecond, right? Or shoul I go for Zeners (which)?

Power MOSFETs happen to have body diodes as an integral part of their high-current handling structure.

If, and only if, you have a bridge with both high and low-side MOSFETs, each one can be the diodefor the other. If you only have a single switching MOSFET, the load will need a diode across it, sincethe MOSFET diode is no use in that situation.

For more efficiency you can add schottky external diodes.

[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

You don't need those diodes. Look inside the mosfet symbols to see the body diodes.

The resistors must charge the mosfet inherent gate capacitance quickly enough to support your PWM speed. The gate capacitance is complex but the datasheet should give you a headline number to work with.

What about the position of the resistor? From what I saw here: http://www.bristolwatch.com/ele2/mosfet_relay.htmthe ones on the HIGH Side are right, but on the LOW site, they need to go between GATE an SOURCE, is that correct?

I edited it on the right side in the new schematic, so you can see what I mean.

From what I gather, the higher the resistance, the slower the rise and fall times of the FET will get.

But there has to be a certain amount of resistance to protect the transistor in the opto isolator.

So, in order to be able to PWM it, resistance has to be as low as possible to make the FET as fast as possible.

The 817 transistor's maximum collector current is 50 mA. This means R = U / I ->> 12V / 0.05 A = 240 Ohm. But I don't want to drive the transistor at maximum, so I could double or quadruple and try 500 or 1k Ohm. Is that correct?

Try calculating the resistors the other way.You have 20mA (40mA absolute max) available from an Arduino pin.Vf of the opto's IR LED is ~1.3volt, so 5-1.3= ~3.7volt across the LED's current limiting resistor.CL resistor value is 3.7/0.02= ~185ohm.Standard value of 180ohm will do.

Worst case CTR (current transfer ratio) of a PC817 is 50%, so 10mA transistor current available.You want full swing of the collector at 12volt/10mA.Collector resistor minimum value with worst case PC817 = 12/0.01 = 1200 = 1k2.Let's hope the PC817s are not that bad, so use 1k.

Where to put the opto transistor. As in the diagram for Q3 or for Q4.Not conducting transistor is almost ideal open circuit, but conducting has a saturation voltage.Fet Vgs 'off' voltage range is small, but Vgs for 'on' can be anything between 6volt and 12volt.I think it's therefore better to have the resistors between gate and source, and the transistor between gate and ground/12volt.Leo..

Two Arduino pins instead of four.The opto LEDs for Q1 and Q4 can be driven by one Arduino pin, by connecting the LEDs in series.The single CL resistor for the two LEDs must be reduced to 100 or 120ohm to keep LED current the same.Same for the Q2, Q3 pair.

If the supply is at least 12volt, then you might be able to get away with only two optocouplers.Connect one opto transistor between the gate of Q1 and the gate of Q4.Gate to ground resistor for Q4 must have a slightly lower value than the gate to 12volt resistor for Q1.Because one is fet is logic level, and the other one is not. 470ohm+560ohm could be ok.Leo..

Two Arduino pins instead of four.The opto LEDs for Q1 and Q4 can be driven by one Arduino pin, by connecting the LEDs in series.The single CL resistor for the two LEDs must be reduced to 100 or 120ohm to keep LED current the same.Same for the Q2, Q3 pair.

Hey Wawa, thank you for your input! Woulnd I need another logic invertng transistor to do that? My understanding is, that the high side FETs conduct, when no voltage is applied, while the low side ones conduct when voltage is applied. So I would need to invert one, if I were to drive them diagonally with one signal. Anyway, it would safe me only about 50ct for optos and resistors and I got enough I/O pins to spare on the Nano. Another thing is what would happen if I were to use PWM in that configuration, since high and low side FETs have different characteristics, maybe it would mess up PWM even more...?My Idea was to turn on the High side and apply PWM to the other to avoid that.

Im hoping that I'll get the parts this weekend so that I can put it all together and do some mesuring on Monday.I will let you know how it turns out!

Where to put the opto transistor. As in the diagram for Q3 or for Q4.Not conducting transistor is almost ideal open circuit, but conducting has a saturation voltage.Fet Vgs 'off' voltage range is small, but Vgs for 'on' can be anything between 6volt and 12volt.I think it's therefore better to have the resistors between gate and source, and the transistor between gate and ground/12volt.Leo..

Ao you're saying i should rather do it like I drew it on O3 rather than how I drew it on Q4?

Thanks for that clarification! I edited my schematic accordingly. Maybe you could have final look, before I solder it all on a hole grid board

Oh, btw I left the diodes in there, because ... well I ordered them and I guess my teacher will like additional safety measures. I got SB530 which are in DO-201 packages, they're so huuuge!! I like components that look like they can take couple of Amps