0
\$\begingroup\$

I have designed a motor driver using a MOSFET that takes a PWM signal from an Arduino and boosts it to operate the motor, but I'm not sure why it works.

enter image description here

I placed the capacitor in parallel to block noise created by the motor and the diode to prevent back EMF, but I'm not sure how the MOSFET operates to boost the PWM signal or what the purpose of the resistors is.

Any help is greatly appreciated, thank you!

\$\endgroup\$
3
  • \$\begingroup\$ If you don't know how it works you didn't design it. \$\endgroup\$
    – JRE
    Apr 18, 2020 at 13:01
  • \$\begingroup\$ Make sure the MOSFET's ON resistance is specified for Vgs <= your PWM drive voltage. (i.e. read the datasheet). If you pick one where Rds(on) is specified at Vgs = 10V and you're driving it from 5V or less, it WON'T act as an on-off switch; it'll waste power, get hot, and won't drive the motor properly. \$\endgroup\$
    – user16324
    Apr 18, 2020 at 13:59
  • \$\begingroup\$ This question is a good reference on the needed circuit topology. To agument that, future readers might was to see the question on MOSFET selection for gate threshold voltage at electronics.stackexchange.com/questions/330999/… \$\endgroup\$ Dec 11, 2020 at 18:43

3 Answers 3

1
\$\begingroup\$

I'm not sure how the MOSFET operates to boost the PWM signal

The MOSFET is acting like an on-off switch changing from on to off as quickly as you switch your PWM waveform. So, if the PWM is 50% duty cycle then the average voltage across the motor is 50% of 4.8 volts = 2.4 volts. If the PWM was permanently a "1" then the motor voltage would be 4.8 volts.

I placed the capacitor in parallel to block noise

That doesn't work too well as a noise reducer because that capacitor is being switched on and off across the 4.8 volt supply at PWM speed. This means that large current pulses will flow through the capacitor and from the power supply and generate EMI. So, rather than acting as a noise reducer, it acts as a noise source. If you really want to reduce noise properly then there should be an inductor between the MOSFET drain and the circuit that connects to it. Then you would need to move the diode back to the MOSFET drain to prevent inductor back-emfs destroying the MOSFET.

what the purpose of the resistors is

The resistor from gate to source (usually around 10 kohm) ensures that the MOSFET turns off when the circuit is not connected to your Arduino. The series resistor (usually around 100 ohm) is to reduce stress on the Arduino output pin that drives the large gate-source capacitance of the MOSFET.

Any help is greatly appreciated

Noted!

\$\endgroup\$
0
\$\begingroup\$

The Mosfet is acting like a switch, the PWM output of the arduino should not be loaded with more than about 10mA, so for a tiny current spike at every switch on / switch off change, the mosfet can potentially switch 10's of amps.

Here it is driving the mosfet gate pin high and low, as its likely to be a logic level mosfet a voltage about about 3V will have it fully switched on and its resistance will likely be a fraction of an ohm between its source and drain pins

R17 is a current limiting resistor in effect, the gate of a mosfet is essentially a capacitor, so when the arduino's pin goes high or low it has to charge and discharge this capacitance, if that happens too fast it could damage the arduino or cause a big enough supply current spike that it may make it misbehave

R18 is there to pull the mosfet gate back to 0V, and thus open the switch, if your micro looses power, resets, or your codes not working quite right, this will turn the motor off, (assuming the PWM pin is not stuck high),

\$\endgroup\$
0
\$\begingroup\$

You need to gain a basic understanding of FETs. Using them by following other people's circuits is a good start but a basic understanding will greatly add to your capabilities.

In this application the MOSFET acts as and electronic switch.
When PWM voltage greater than the FETs turn on voltage is applied to its gate the FET provides a a low resistance path between drain and source.

Here, when Q3 is "on" current flows from V+ (4.8V) via the motor then via the FET to ground.
The motor operates.

When PWM voltage is about zero the MOSFET is off and current cannot flow to ground through it.
If the motor is rotating a "back emf" of opposite polarity to supply voltage appears across the motor. Diode D3 conducts and the motor "freewheels" until drive voltage is again applied.

R18 pulls the gate to ground and truns the FET off when there is no drive voltage. Not needed IF drive is always applied - high or low.

R17 reduces gate charge current somewhat but its main task is usually to damp gate ringing voltages which can occur during switching.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.