3
\$\begingroup\$

I'm a beginner learning about electronics, currently trying to control a DC motor using a PWM signal. I got it to work, but want to understand what I'm seeing using an oscilloscope and optimize it.

I'm using an Arduino Uno to generate a PWM signal which is switching a Mosfet (IRF520) to drive a DC motor from a 9V battery. When I look at the PWM signal from the Arduino with an oscilloscope it's a square signal. The 9V PWM signal from the Mosfet though is anything but square.

As shown in the pictures below, it looks like the Mosfet takes too long to switch off to me. The datasheet mentions switch off times in the nanosecond scale though and my signal is only 60HZ. What is causing this behavior?

I'm using the circuit from the Arduino Starter Project "Motorized Pinwheel". I just got rid of the button and replaced the DC motor with an oscilloscope to see what's happening.

Schematic Arduino PWM signal Mosfet PWM signal

Circuit Photo

\$\endgroup\$

2 Answers 2

6
\$\begingroup\$

Without a proper load, there is nothingc to pull the drain high when you turn the MOSFET off, except the 10 megohms of your scope probe. That and the FET output capacitance give rise to the slow decay you see.

Make the same measurement with a resistor ( 1 kilohm or lower) in parallel with the probe, and observe the difference..

\$\endgroup\$
2
  • \$\begingroup\$ Thanks, that makes sense and looks much better. A short follow-up question if that's okay: When I put in a higher resistor (10 kilohm) the down times of the signal fluctuate, why is that? \$\endgroup\$
    – tobi
    Dec 7, 2014 at 22:14
  • \$\begingroup\$ Don't know. Possibly picking up a little AC mains hum. But then I'd expect to see the same with no resistor. If you're still holding the resistor, that would definitely account for it (you pick up quite a lot of hum) \$\endgroup\$
    – user16324
    Dec 7, 2014 at 22:14
0
\$\begingroup\$

What you might be seeing is the energy stored in the motor discharging back thru the diode when the mosfet turns off. When you look at it with an oscilloscope the parasitic capacitance of the mosfet (about 1nF) takes ages to discharge thru the scope's input impedance.

\$\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.