DC Motors drawing too much current?

I’ve been troubleshooting this issue for a while now with no solution so I’m reaching out for some help here. Currently I have a circuit together composed an arduino nano 33 IoT, 2 small dc motors controlled by an l293d, and a gravity offline voice recognition module (link provided below). The goal is to have the motors run in specific directions and for a specific amount of time depending on the command given to the voice recognition module. Currently I have everything the circuit connected to the same power supply of 3 AA Lithium batteries and everything sharing the same ground. The issue is when I give my first command to the voice recognition module it executes perfectly, however, it will not perform and commands following that, even though the voice recognition module hears me giving its wake word and acknowledges that I gave it a command but will not translate that to the nano and hence the motors. When I disconnect and reconnect the power supply it repeats the process of taking the first command and no other following. I suspect that as the motors are running they draw too much current and perhaps the time keeping goes awry in the nano. Any help with this would be GREATLY appreciated.

A couple of things to note:

  1. I know this is not a code issue because I have ran this code before on a power supply from the wall outlet and it worked fine, only having these troubles when I have a DC power supply.

  2. I have tried putting the nano and voice recognition module on a separate power supply from the motors and I would either have the same issue OR the circuit would not work, as in the voice module would hear my command and nothing would happen.

Link to gravity voice recognition module: Gravity: AI Offline Language Learning Voice and Speech Recognition Module for micro:bit / Arduino / ESP32 - DFRobot

Do you mean you have three 3.7V batteries connected in series and connected to Vin?

Or three 1.5V batteries?

If the latter, it will never work. Minimum for Vin is 5V

  1. Remove every connection.
  2. Connect the power supply to the Arduino.
  3. Run a blink sketch.

What do you observe?

You mean non-rechargeable, 1.5V AA batteries? Similar to these?

So your 3 batteries provide a total of 4.5V?

This could be the problem. This is a very old design which suffers from a high voltage drop. There may be insufficient voltage getting provided to your motors. More modern motor drivers can have very little voltage drop, so almost all the voltage reaches your motors.

Ahh yes it is three 1.5V in series to Vin, I was under the impression the minimum was 3.3V. The voice recognition module has a max voltage of 5V however, is there a way I can get around this while adding more power to the nano and motors?

Yes those exactly, any recommendations for better motor controller that is similar?

Need the specs of your motors to provide a recommendation. "Small" isn't enough detail.

TB6612FNG or DRV8833 are examples, but need to check they are suitable for your motors.

But as @jim-p pointed out, you don't have enough voltage for the Arduino Nano 33 either.

Not sure if I will be able to get exact specifications as I pulled these out of an older remote controlled R2D2 toy, would providing pictures possibly help?

Use 6 AA to power the nano and 3 AA for the voice module.
How are the motors powered?

Also, if you know a solution for providing power to the voice recognition module from the same power supply to motors and arduino without exceeding the 5V maximum that would be amazingly helpful knowledge for me for future projects as well

Currently the motors, nano, and voice rec are all powered by the same 4.5V power supply by batteries mentioned above

If you still want to use AA and the motors actually on 4.5V then like I said you can use two three cell packs. connected in series. Connect the 4.5 output to the motors and voice module and the 9V to the 33 Iot.

Probably not.

What voltage batteries did the toy use?

Measure the motor winding resistance with your multimeter. (If you haven't not a multimeter, you need to get a multimeter.)

I do have one thankfully, I will test this when I get home thank you! I will keep updated.

I will try this circuit when I get home and keep updated. Thank you so much for your help!

In this topic

@Klaus_K provides some advice about powering the Nano 33 iot. He seems to say that the Nano can run at 4.5V, which contradicts the official Arduino page which says 5V. If that's true, your 3x AA should be ok to power the Nano and the voice module. We know that's true sometimes but as you wondered, perhaps when the motors run, the voltage drops a little too far and things go into a strange state.

If your motors can run at 6V, perhaps you could use 4x AA, power the Nano through it's Vin pin and power the voice module from the 3.3V pin of the Nano. The Nano's DC converter can supply 1.2A according to what @Klaus_K says, which would be enough for both the Voice module and the Nano itself.

You might consider adding some decoupling capacitors to your circuit. Motors often generate interference that can affect the running of the code.
See this:-
De-coupling tutorial

Especially the Pi configuration filters at the end of this.