Peristaltic pumps MOSFETs and diodes for auto dosing system

N channel power MOSFET
TO-220 Package
Vds = 30V max
Max current = 62A
Vgs = 2.35V max
Rds_on = as low as 8.7 milliohm - depending on Vgs

It says input voltage Vgs = 2.35V max. So I need to PWM 2.35/5=0.47 47% of the time for ON. And then I'm using the MOSFET to PWM the motor aswell?

No. Vgs is the minimum voltage necessary to reliably turn it on. anything more than 2.35v and it is on, below 2.35 and it is indeterminate or off. Google "PWM" and do some reading. Basically, PWM adjusts the duty cycle.So for 47% PWM (or duty cycle) 53% of the time there will be no voltage and the other 47% of the time there will be full voltage for a given time period. PWM is used to scale Power not voltage because the voltage is either fully on or fully off.

seanz2003:
No. Vgs is the minimum voltage necessary to reliably turn it on. anything more than 2.35v and it is on, below 2.35 and it is indeterminate or off.

That is not correct. 2.35V is the value given on the datasheet for the maximum gate threshold voltage. This is the voltage at which the mosfet starts to conduct. If you apply this gate-to-source voltage, the mosfet will conduct at least 25uA (that's right, microamps). To be sure of turning the mosfet on fully, you need a higher voltage. To find out what voltage, look at the voltage(s) for which Rds(on) is quoted. For this mosfet, 4.5V is enough, when switching currents of 25A or less.

I understand the principle but the reason for the PWM was to give the motor a "soft start", if the PWM is turning the motor on and off rapidly isn't that also wearing out the brushes? Or is the MOSFET actually supplying a reduced variable voltage due to the PWM to the gate?

Anyway so if I want say 50% motor speed I use analogWrite(127) to the MOSFET gate pin (the middle one?). And then theres the wiring... I have a negative and a positive lead for the 12v supply I guess (cant use arduino's supply?) I don't know how that fits in with the diagram, does it go either side of the mosfet with the negative on the ground side?

Its confusing because I'm learning about PWM and MOSFETs at the same time.

is the MOSFET actually supplying a reduced variable voltage due to the PWM to the gate?

No, Power Mosfets are operated only in saturation- fully on or fully off.

Motor speed doesn't directly correspond to duty cycle; loading (along with other variables- efficency, friction, etc) plays a significant role in power requirements. A fully loaded motor will require more power to keep spinning then one with no load at all.
Check the datasheet for your FET's specific pin out; the gate pin is usually not the middle pin for power FETs. the Image you gave shows the correct schematic for wiring. The actual package pin out rarely exactly matches the schematic element depiction for ICs. You need to connect it like your schematic shows: +12v to positive motor terminal, negative motor terminal to Drain pin, and Source pin to Ground (-12v). this is called low side switching and it is used for N-channel fets.

Well I guess I don't really need accurate motor speed control, I just need to ramp the motor up to max over about a second.
Do I use the high frequency or the normal digital PWM pins?

Ah ok thanks. I didn't understand because it looks like the TTL's ground and the -12v ground are connected together, but the TTL will be replaced by the arduino pin right? So I don't want the -12v going to arduino ground right??

grounds must be connected

PWM does not automatically soft-start the motor. The idea is that you start with a very low duty cycle PWM and ramp up to a higher duty cycle over a second or so.

The PWM signal is on and off so fast that the motor does not appreciably speed up or slow down during a cycle.

Please help. I have the MOSFET's now I just need to know which diodes and power supply to use. When I look for "flyback diode" I don't get any information on specs/sizes and it feels a bit cheap using a wall wart to drive the pumps, any advice?

It looks to me that those pumps take less than 1A current, and you are not using a very high PWM frequency. So a 1N400x (for any x=1 thru 7) will be fine for the flyback diode.

Thank you. What kind of power supply can I use? I am guessing 12v 1000mA wall wart isn't enough supply current with a soft start PWM?

I think a 12V 1A supply may well be enough. The pump you originally linked to was 6V and specified 100mA no-load current. I doubt whether the current under a heavy load would be more than ten times that. And if you are using a 12V version of the same pump, the current should be halved.