DFPlayer Mini Audio Stopping While Running DC Motor

Hi! I'm making this figurine that talks and moves, however when I have both the DC motor and the DFPlayer Mini (used for audio) running, the audio sometimes plays but most of the time does not. I noticed that when the DC motor stalls, the audio completely stops. I have both connected to the 5V pin of the Arduino which I think is why it's happening but I'm not sure how to make it stop. Any ideas?

Here's the wiring and such:
https://i.gyazo.com/175dbead6bb659afa57ac7ee40e5366b.jpg

https://i.gyazo.com/995e53724c497cb12ac801e0bd27593c.jpg

Thanks in advance! : )

The Arduino can only just supply enough power for the audio player. It can't provide enough power for a motor. It definitely can't provide enough for both. You risk damaging the Arduino by trying this.

If you want more detailed and useful advice, please provide detailed and useful information. You have told us what model of player you are using, so thanks for that, but you have not told us what model of arduino, what motor, what motor driver or what power supply you are using.

(I didn't look at your pictures because no one likes clicking on unknown links. Please attach your pictures to your post. You may have to read a few posts or post a few replies before the forum software will allow you to attach pictures).

Hi! Still pretty new to this forum, so I apologize for any concerns regarding the links. I'm currently using an Arduino Nano in my project. I, unfortunately, don't know the voltage rating of the DC motor as I obtained it from a discarded toy, but from the looks of it, I'd say it's probably a 5V DC motor. I'm using a 2N2222A transistor that essentially opens and closes to make the motor run. As of right now, I'm supplying power to the circuit via the USB connection though in the final result I plan on supplying power through 3 double A batteries (4.5 volts). I'm still a bit new when it comes to working with electronics so I do apologize for any confusion. Thanks in advance! : )

You're powering the project with V_usb (Vbus), yes?
If so, it's not a limitation of the Nano onboard linear reg.

Not all USB sockets are spec'd equally, universally (some 1/2A, some 1A, 2A), but that is your limitation. Perhaps you have a charger rated "2A" that you could try.

If that proves unsuccessful, perhaps your motor could do with some additonal noise-reducing capacitors (one positive to negative, one positive to case, one negative to case).

Measure the resistance of the motor windings with a multimeter. This will tell you what current will flow when the motor first starts up or is stalled, when supplied with a particular voltage.

You should be using rechargeable batteries wherever possible, and with NiMH cells, you will probably need a 4 cell holder. This will give around 5V which can supply the Nano via it's 5V pin.

You did not mention a flyback diode. This is very important to prevent damage to the transistor and to the Nano.

Interesting, I'll for sure try that out, thank you! However, could you elaborate on this:

You did not mention a flyback diode. This is very important to prevent damage to the transistor and to the Nano.

I was planning on using a diode on the final version to prevent the circuit from being damaged by reverse polarity, but what do you mean by using this particular diode on the Nano and transistor? I'm assuming one is needed for the Nano to prevent reverse polarity but what's the purpose of using one on the transistor that's being used as a switch or so? Thanks in advance!

Edit: Using a multimeter, I was able to get the following from the DC motor using a 5V 2A DC adaptor:

No load: ~50mA
Stall: ~650mA

Does this mean I have to have a power supply such as 5V 2A to safely power the whole circuit?

Did it work out better that way?

It does, in fact, it works surprisingly well even when the motor is being stalled! However, I want to use batteries for my project, not an adaptor. Any ideas on how I can make it work that way? Thanks in advance! : )

What sort of help do you need to make this a "batteries included" project?

Well, I was aiming on using 3 double A batteries, however, as @PaulRB mentioned, this won't be enough. So I plan on bumping up by one battery (unless there's a way to do it with 3 but I highly doubt it). Anyway, what I'm puzzled about is making a power supply that's at least 5V 1A (or 2A) such that everything can run smoothly. I was thinking maybe a boost converter could possibly work but I'm not sure. Any thoughts? Thanks! : )

Buck vs Boost.
There could be bickering.

Try a boost rated for at least 2A, doesn't cost a fortune. If that proves unsatisfactory, buy a couple more batteries and a buck module. Or the other way around.
Li-Ion or LiPo and a charger board.

1 Like

Reverse polarity of what? Incorrect connection of a PSU or battery pack? I am talking about protecting the circuit from the reverse polarity created every time the motor spins down when the current to it is switched off. A flyback diode allows that reverse polarity current to dissipate harmlessly.

Ok, but what about the measurement I suggested?

You need a power supply/battery that can supply the maximum current your components need and do that with a voltage drop that is small enough that it that doesn't cause unwanted side effects such as the Arduino resetting.

Why is your motor stalling? Can you use some sort of limit switch to prevent or minimise that?

I didn't say that. I said if you swap from primary batteries to rechargeable NiMH, the voltage of each cell will be lower which will probably mean you need 4 cells rather than 3.

On top of various diode protections, my usual advice here would be:
separate your chips, audio player,logic supply away from the supply to your motors by a small resistance (your logic chips won't draw much current so you likely wouldn't lose much voltage across 10 ohms or so.Then put a huge quanity of decoupling capacitors (10uF ceramics if you can afford plenty, they dod make them in through hole as well as SMD) between the logic chip's power rail (that is to say after the series resistor) and ground. The resistor and decoupling caps will ensure the logic chips keep geting full voltage for a while whenever the motor's current draw would have previously threatened to brown them out.

I found one on Amazon called MT3608. It seems like it will fulfill my need, however, I saw some extensive testing on this device and it appears that once it goes over one amp, it starts the heat up and the efficiency decreases. Is it worth trying?

A USB tester module. with the voltmeter/ammeter color display is inexpensive, and a valuable, easy-to-use tool.

Interesting, I didn't know this could happen. In that case, is that why I need to measure the resistance of the motor windings, and if so, could you elaborate on how this is done? I tried looking online at how to do this but got mixed results (not entirely familiar with using multimeters in this sense).

The motor won't stall but I'm just taking this into consideration in the case of some rare failure that causes the motor to stall.

My apologies, I miss interpreted what you said.

Thanks for the advice, I'll try this out! However, I'm slightly confused regarding the use of resistors for my logic chips and such, I get that the capacitors will filter out spikes caused by the DC motor, however, what would the resistors do (unless I'm misinterpreting something, in that case, I apologize)? Thanks in advance! : )

Not really, no. Measuring the resistance of the windings would confirm what the stall current should be. You said you measured around 650mA with 5V, so the winding resistance should be around 5/0.65 = 7~8 ohms. To measure the winding resistance, put your multimeter on resistance range and connect it across the motor terminals (disconnected from the rest of the circuit).

Ahh okay got it! Also, I checked and I got 7 ohms like you said. Thanks! : )

HI! I'm using an MT3608 step-up converter and it seems to supply enough voltage and current for both the DC motor and the DFPlayer Mini to run. However, in this circuit, I'm also using a sound sensor, particularly a "DAOKI High Sensitivity Sound Microphone Sensor." When I power the circuit (without the DC motor) via USB, the sensor seems to work, however, once I use it with the step-up converter and batteries (with or without the DC motor) it doesn't work. I tried using similar sensor modules and they all seem to be behaving the same way. Is there any reason why this behavior is occurring (I made sure that the connections are all correct)? Many thanks! : )