Motor with MOSFET resetting Arduino Nano at higher PWM values

Thread Starter

awwwt

Joined Aug 24, 2015
60
Hi everyone, I am looking for some suggestions on how to resolve an issue I have been running into when controlling a small DC motor with a high startup current using PWM and a MOSFET with a 3.3v Arduino Nano 33 IoT - the problem is that the Arduino resets when the motor is being driven at anything above a half duty cycle.

I attach my schematic and the data sheet of the motor. I am powering my circuit with 4.5V (3xAAA batteries).

Some notes:
- I have a flyback diode on the motor and a small .1uF capacitor between the leads.
- I have tried 1000uF to 3300uF electrolytic capacitors between the VIN and GND pins of the Arduino and the difference in improvement is small.
- I have tried this circuit with and without the button control circuit and there is no difference.
- The operation of the motor at a higher PWM is intermittent. When the motor does successfully run, it will run for a few seconds before resetting. Other times, it will reset directly after the Arduino tries to pulse the pin of the MOSFET.
- In addition to the issue occurring at a higher PWM, it also happens when I touch the head of the motor (obviously). I assume because the stall current is too high and creates a voltage drop?
- When driving at half PWM (analogWrite of 127) there is no issue.
- The issue begins to become noticeable at around an analogWrite of 170.
- The issue seems to persist as time goes on, as in, when I keep trying to switch the motor and it resets the Arduino, the time between resets increases until the Arduino is barely switching on when the motor turns on.

- When I power the Arduino through the 3V3 pin with a V-reg, the problem barely occurs - even without the high-value capacitor. It is only when I am putting 4.5V into the VIN pin. However, it is not good practise to power the Arduino through the 3V3 pin, as it needs more than that to function properly anyway.
- I have also tried a 5V Nano powering through the 5V pin and a 3.3v Trinket and the issue seems much less prevalent.

My first question is: Beyond changing the power supply or just operating at lower PWM, are there any components I could add to my circuit or change to try and solve this?

My other related question is: I understand that where possible when using MOSFETs to switch high current components like this it’s recommended to use a separate power supply. However, due to space limitations this isn’t possible for me.
I was therefore wondering if using a voltage regulator like I am doing in my circuit would do any difference in this respect? For example powering my motor (rated at 1.5-5V) with a 3.3v LDO?

Thank you so much!
A
 

Attachments

Last edited:

peterdeco

Joined Oct 8, 2019
155
I ran into this issue with a PIC micro. Make sure the diode on the motor is fast recovery and not a 1N4001. Put a .1uF disc and 10uF electrolytic on motor. In one case I had to put another .1uf disc on each motor lead and ground the other side to the motor case. Good luck.
 

Thread Starter

awwwt

Joined Aug 24, 2015
60
Can the voltage regulator output as much current as your motor requires?
Yes I think so, the one I am currently using is 3.3v and 1A. The issue also persists when I power the motor without the regulator.

EDIT: Also the Pin9 is connected to ground via a 10K resistor - I have updated the schematic, thanks for that
 
Last edited:

Thread Starter

awwwt

Joined Aug 24, 2015
60
I ran into this issue with a PIC micro. Make sure the diode on the motor is fast recovery and not a 1N4001. Put a .1uF disc and 10uF electrolytic on motor. In one case I had to put another .1uf disc on each motor lead and ground the other side to the motor case. Good luck.
Thankyou for this, would you recommend a fast recovery diode more specifically? I am using 1N4002...
 

danadak

Joined Mar 10, 2018
4,057
Bypassing, pay attention to bulk caps, their datasheets, and their ESR. Not all caps
are eqaul for the same capacitance value in ESR performance.

Polymer tants excellent bulk caps.

1588677307242.png

Also make sure lead length on caps are short, that minimizes their stray L
effects.


Regards, Dana.
 

Papabravo

Joined Feb 24, 2006
13,713
Sounds like a brownout due to the batteries not being able to provide the current. Does the same thing happen when you use a power supply?
 

Thread Starter

awwwt

Joined Aug 24, 2015
60
Sounds like a brownout due to the batteries not being able to provide the current. Does the same thing happen when you use a power supply?
Thank you, yes it improves a lot when I am supplying USB power. I just added another AAA battery so that the circuit is getting 6V and it basically eliminated the issue (apart from when touching the motor's head). Does this mean I sort of am limited in how to fix this if I don't want to increase my battery capacity?
 

danadak

Joined Mar 10, 2018
4,057
If running current exceeds regulation system capability yes you need
to add battery. But if motor current is a transient solution you can think
about bulk caps managing the transient power demand.

Regards, Dana.
 

Papabravo

Joined Feb 24, 2006
13,713
Thank you, yes it improves a lot when I am supplying USB power. I just added another AAA battery so that the circuit is getting 6V and it basically eliminated the issue (apart from when touching the motor's head). Does this mean I sort of am limited in how to fix this if I don't want to increase my battery capacity?
There are many types of AAA batteries. What kind are we talking about?
 

Thread Starter

awwwt

Joined Aug 24, 2015
60
If running current exceeds regulation system capability yes you need
to add battery. But if motor current is a transient solution you can think
about bulk caps managing the transient power demand.

Regards, Dana.
Thank you for this I hadn't realised I needed to be more careful with my cap choices. Will try some other ones and investigate this element of the circuit a bit further
 

peterdeco

Joined Oct 8, 2019
155
I don't know anything about Arduino, but again had same issue with PIC Micro. It has a brownout detect feature which when turned off, solved the problem.
 
Top