I'm trying to drive 4 tiny vibrating motors which draw 100mA at a maximum of 5V. I need to control them using PWM from the GPIO pins and would like to accomplish this in the smallest form-factor possible as it's for a portible device. I've looked at other motor driver hats and see that most require external power supplies which turns me off as all I want to use is the supply that is powering my RPi.
I've been asking some friends what they think and I've been advised to use 4 BS170 MOSFETs each with a 1N4001 diode to protect against voltage in the wrong direction when turning off the motors.
I'm here essentially to verify that this is a good setup and hear other recommendations as I'm not super familiar with this level of hardware. I'd also love some help with diagramming out how I would go about wiring these (in regards to the MOSFET and diode) coming off the Pi.
Thanks for your help!