1

Setup: I have wired up the arduino, motor and battery as shown. enter image description here (12 and 5 of L293D are not connected to anything) D11,D10...D6 means that those pins on the L293D are connected to digital pins 11-6 on the nano.

Problem: The motors spin for a while but then they slow down to a stop. If I unplug the battery, wait for 5 mins or so and then reattach the battery then the motors start spinning but after a while they stop again. Now if I keep the setup the same except I unplug the battery and connect the arduino to my laptop then the laptop manages to power not only my arduino but also my motors (although they spin a little bit less faster than with the battery). And when I do it with the laptop the motors don't stop spinning. Because of this I thought my battery might be faulty so I attached a fresh 9V energiser battery. Then the same thing happens. The motors spin for a while then stop and after I plug in the battery after a while they spin again. I tried this yet again with a fresh battery and the same thing happened.

Question What could be causing this? Why are all of my batteries incapable of powering the motor steadily and why is my laptop capable of doing this?

CODE: (all this does is make both motors spin) enter image description here

4
  • 3
    Please no code as image. You can copy and paste the code as text into the question and format it as code by selecting it and clicking the {} button or pressing control+K
    – chrisl
    Aug 8, 2021 at 6:06
  • 1
    your battery does not last very long ... what does that tell you about the battery?
    – jsotola
    Aug 8, 2021 at 6:57
  • Does it tell me that the battery does not have enough current? I tried to test this out and I used a series of AA batteries which (although there were 6 of them) output only 7V due to their usage in the past. These batteries made my motor spin faster and for way longer than my 9V duracell battery. So i think it might be because of current. Aug 8, 2021 at 11:06
  • @Sanchez2009 that is correct ... the 9 V battery contains six AAAA cells, same as when you created a 9 V battery from six AA cells, but with very small capacity to provide current ... try using larger cells, like size C or D
    – jsotola
    Aug 8, 2021 at 17:39

0

Browse other questions tagged or ask your own question.