Thank you everyone!!!
To get started. Nobody will understand "nothing works". Explain how functions fail.
To controll DC motors PWM is very useful. Combined with logoc N-channel MOSFETs it works well. Drop the idea about a smotth dc. A normal FET might not work due to the low, 5 volt, max output from Arduinos.
If You only go in one direction MOSFETs can be used instead of H-bridges. I use a H-bridge for a fwd/bwd running DC motor and it was easy to get started.
Yeah, I'm sorry. That was just a: "The motor doesn't spin". What do you mean by "Drop the idea about a smooth DC"? You mean that capacitor+resistance are not that effective in averaging?
Say you have a pipe leading into a tank and a pipe leading out to a drain and you can put a valve on the incoming pipe or on the outgoing pipe and don't care about what happens in the tank we name Load.
Some FETs work well as top/in valve for a circuit and others work well as bottom/out valve... just mixing that metaphor.
On Youtube there is a channel named AddOhms belonging to a member here (The Bald Headed Engineer). He has a series of electronics tutorials, one covers MOSFETs. I had to take notes. I had to watch it enough times to have to take notes. If I need to check another MOSFET, I will need to watch it again since I lost those notes......
I bought IRLZ44N's.
The N tells me that this FET is better suited at the bottom dumping current to the drain/GND.
The L tells me that the gate is Logic Level (2 to 3V to open full) as opposed to 10V.
Thanks for the metaphor and the reference, I still am not totally confident with the "gate threshold voltage" which seems to be of logic order on my datasheet, but probably there is a difference between open and full open. I'll check the L and the plots on the datasheets in the future
Get rid of the capacitor.
Some good logic level MOSFETs:
Thanks for the link, but why should I get rid of the capacitor? Does the mosfet perform the averaging on its own? And why should I keep the resistance in this case?
And the connection to GND above it?
I see no protection diode. When the motor stops there will be a back surge. Might even get smoke!
If you PWM, you should use an H-bridge if only for the protection. H-bridges have different modes and the more efficient/smooth mode pumps the surge right back into the motor coils when the OFF part of the PWM happens. You don't get that with just a FET, but possibly a bit more circuit could do the same on PWM LOWs.
But if the motor is very small/low power then forget the H-bridge unless you want to control turn direction.
Yes I didn't added it mostly because I didn't really understood why it should help. Does the mosfet produce a reversed reaction when "turned off" (or when the PWM goes down if the averaging is not performed) that could damage the motor?
However yes the motor is pretty small, the current at 5V should be 200mA (even if I think it's if unloaded).
I even have few BJTs by the way, in particular 2N2222A. Do you think it's worth to try with them? Or should I definitely prefer mosfets over BJTs? Thanks!!!