1
\$\begingroup\$

We have developed in protoboard the following schematic for driving a DC motor with transistor for Arduino, but instead of using the PN2222 transistor, we are using a MOSFET IRF540, and instead of flywheel diode 1N4001 we are using 1N4007. Also we have a LED strip connected to Arduino.

When we were developing in protoboard we were able to control the motor kickback when switching off with an 1N5819, but when did the PCB the diode is not enough. Trying different diodes didn't solve the problem, finally we are using a 1N4007 but still having issues when the motor switches off. The issue is the LEDs animation is affected: we paint in one color but sometimes when the motor switches off, some LED is painted red and the code is not programmed for that. So I guess is something related to the motor. We can't connect the motor to an alternative power supply, and also we can't solve it because what we did to solve it when using a protoboard was using a diode, and we don't understand well the problem.

We have been researching, searching on the internet but we don't understand snubber schematics, we tried with ferrite and concluded is something related to the motor when switches off and we can't control with this diode. Also we have tried SR5100 because we saw here he is using an SB320 and when I bought the SB320 I received SR5100... also, reading in this web about this topic, I tried to develop an snubber circuit, but I don't understand this video so I can't try it.

Also tell you that the motor is a vibration motor, and when I set less power with a potentiometer it is not making trouble with LEDs. The difference between the first link and our project is also that the motor is not turning free, it is a vibration motor and the implementation of an ArduinoToBreadboard.

EDITED:

The diode is soldered in the motor and is not shown in the schematic because when tried it on the breadboard didn't work, only worked when put the nearest to the motor possible.

EDITED:

Added decoupling capacitor.

EDITED:

Moved decoupling capacitor to correct place (closest to MCU as possible).

Schematic

\$\endgroup\$
  • 1
    \$\begingroup\$ Your schematic isn't as clear as it could be. I have to follow the connections of the POWER connector to find that 2 = GND so 1 must be VCC. U1 has VCC unconnected??? Q1 is an NMOS but you do not follow conventions so it looks like a highside switch but it actually is a low side switch. How very confusing! Read: electronics.stackexchange.com/questions/28251/… to learn how to draw better schematics. \$\endgroup\$ – Bimpelrekkie Jan 14 at 11:04
  • \$\begingroup\$ Apparently the schematic doesn't match the constructed circuit either, since the diode is nowhere to be seen. (The body diode doesn't count!) \$\endgroup\$ – replete Jan 14 at 11:06
  • \$\begingroup\$ @Bimpelrekkie thank you! I have connected VCC and added labels on power supply pins. About Q1 I just followed what an IRF520 Module is doing. It switches ON/OFF with GND not with VCC, and that's they way I copied. \$\endgroup\$ – user54073 Jan 14 at 11:16
  • 1
    \$\begingroup\$ Where are your decoupling capacitors? \$\endgroup\$ – winny Jan 14 at 11:19
  • 1
    \$\begingroup\$ I think is that, amazing. Just need 1 decoupling capacitor the closest as possible to the MCU. Thank you all!!! \$\endgroup\$ – user54073 Jan 14 at 12:43
1
\$\begingroup\$

Looks like your circuit is missing a decoupling capacitor. If you have a motor in the circuit, you will probably trigger undervoltage lockout/brownout protection followed by restart.

The normal decoupling capacitor is a 100 nF disc capacitor for though-hole and MLCC for SMD. Place it as close to the IC as possible. Ground and Vcc planes are important too here.

Image taken from Connecting a decoupling capacitor straight to the ground plane

enter image description here

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy