Unable to run my project on battery

I am using an Arduino Nano 33 IoT for a line following buggy using an L239D to power the motors.

The buggy works perfectly while connected via USB however when I switch to any form of other power using the Vin pin it does not seem to run the code. The lights on the Arduino and the sensors however glow just fine.

I am using 6 x 1.5V AA batteries connected to the Vin port. I have verified that I have 9.4V with my multimeter and didn't seem to get any significant voltage drop when I hit the reset button. To make sure there wasn't a problem with the batteries I also tried to power it using my bench supply again at 9V and still nothing but whenever I switch to USB either from my computer or a portable charger it works just fine. (Unfortunately the portable charger isn't mine so I can't use it permanently)

Any ideas? I'm pretty stumped at the moment.

Thanks in advance.

Does your code wait for the serial port to be ready?

Start with an empty sketch, or with blink, and then extend your program until it does not work any more, the last step is the one you need to look at.
Best Regards,
Johi.

Post a complete schematic showing all components and power supplies.

Do you connect the battery ground to Arduino ground?

How are you powering the motors? Directly from battery or from 5V?

Check your ground connections. If that does not work follow groundFungus request include all ground, power and interconnections in the schematic, not a frizzy thing. The schematic will answer most of the questions you are being asked.

The only thing that appears to be different (between working and not working) is how the power is supplied.
If you are powering the motors from the 5V (arduino VCC pin), then it may be the onboard regulator shutting down because you are drawing too much current. i.e.

  • When using the USB charger, you are supplying 5V directly.
  • But when using the RAW pin (with the battery pack) you are then using the onboard regulator to create 5V.
    You can check that voltage with the multimeter.

Perhaps trying using an external regulator (like a 7805) which can deliver up to 1amp, and supply that 5V to the arduino.
But essentially, don't power the motors from the arduino VCC pin.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.