what I have read on the subject tells me that controlling a 12V MOSFET with a 5V gate leads to... Bad things. That is my first question -- what will happen if I flat out try to do this?
The drain-source voltage rating of a MOSFET doesn't give you any clue about what gate-source voltage it requires. A logic-level MOSFET will work even with 3.3V drive, for instance, and may be drain-source rated for 20V or more.
How can I create a circuit that will allow my Arduino to control the 12V MOSFET using a 5V, 4-to-40 milliamp current, while still having the MOSFET reacting quickly enough to allow for PWM to reach the motors?
Indeed, the bigger problem you'll face is the limited current a microcontroller GPIO can sink or source - this current is what charges and discharges the MOSFET gate capacitance and controls how fast the device turns on or off.
What you'll need to use is a MOSFET driver - this is a circuit which will take the low current drive signal from the Arduino and stiffen it sufficiently to drive the MOSFET. There are literally hundreds of monolithic driver ICs on the market from a multitude of suppliers, which work very well and are quite cost-effective.
I have used analog approaches with voltage control successfully in production (10k/mo) and never had a regulator problem. Simple this 1U high 19"rack was pure analog with an OEM 180W supply that UL dictated a "coke-spill" sealed top, I chose a tiny thermistor epoxied to the SMPS hot-spot to bias a switch to drive the fan ON, above 45deg C. I computed the values and gain in a spreadsheet so the gain was 0 to 100% from 45 to 55'C.
You might find the PWM will work best but alias at some rates with some vendor fans, so test them with a pulse gen. and avoid that PWM rate if using a 2 pin fan.
The problem I had was after a few shipments, fans started to get "stuck" and needed a tiny spin to start up, otherwise they would dither back and forth a couple degrees or simply looked dead. This had nothing to do with analog or PWM control, as I recognized the process design fault as misaligned Hall sensors in the fan. the reason being the max fan power is controlled by sensor magnet alignment and commutation closest to reversal ( before top dead center ) was like a backfire in a piston which made it go back/forth so fast, it stood still. in only 1 or 2 stop positions. So I made a quick fan fail tester with 1 second only 4 seconds off to stop and tested every fan start angle 30 seconds, then after 1 hr found 5 failed in 150 fans. rejected the units. accepted the 145 and sent 1 thousand fans fan to supplier and emailed the Test Design to Distributor& Factory and said if we get 1 more fan failure , they lose our business. That worked. No more stuck fans.
It took me less time to put out this Stop ORder and test 150 fans and send the design procedure than to write up this answer.
Your driver is not linear on V+ high side, and you might want a low side with N type. i.e. the Source to Gnd and Drain to fan(-) and fan(+) to 12V or some other switch. Consider slow startup at 5V for cool and quiet.
Max power dissipation of the fan reduced to 50% at half power and RPM
where the driver dissipates the same power, so clamp with isolation to
a heatsink or frame. In my case it was only a few Watts out of 5W or use PWM if you prefer 3 pin fans and the thermistor speed control bits and pieces cost me ~$2 added cost to cheaper two-pin twin turbo 1.75" fans. 2 much !
Best Answer
It does 2 things:
I would add a small base resistor so you don't burn up your transistor.