I am making a phone-controlled RC car for my school science fair using:
Arduino Uno
L293D Motor Driver Shield (AFMotor.h library)
HC-05 Bluetooth Module
4 BO Motors with 4 Wheels
7.4V (2 x 3.7V) Li-ion Battery Pack
On/Off Switch
Cardboard Base
HC-05 connections:
VCC to + on the motor shield
GND to - on the motor shield
TXD to D0 (RX)
RXD to D1 (TX)
Software:
Arduino IDE
Adafruit Motor Shield Library (AFMotor.h)
Serial.begin(9600)
Problem:
Bluetooth connects successfully to my phone.
The motors work when connected directly to the battery.
Arduino Uno and motor shield LEDs turn on.
The motors do not run with the motor test code.
Sometimes, when I remove and reinsert the yellow PWR jumper, two motors briefly run at full speed.
After switching the battery off and on, sometimes one motor briefly runs, then nothing happens.
What I already checked:
All motor wires are secure.
Each motor works individually with the battery.
Battery is charged.
Motor shield is firmly attached to the Arduino.
Yellow PWR jumper is installed.
I tried both Bluetooth code and simple motor test code.
My question:
What is the most likely cause of this problem? Is the issue with the L293D chip, the yellow PWR jumper, the battery connection, or the motor shield itself?
Since the motors do not run even with the simple motor test code, I would probably first focus on the motor supply side rather than on the Bluetooth part.
One thing I would check first is the voltage directly at the motor terminals while the motors are supposed to run.
The fact that the motors sometimes briefly react when reinserting the yellow PWR jumper could possibly point towards a power supply or contact issue, but measuring the voltage at the motors during operation would give a much clearer picture first.
Thank you. I do not currently have a multimeter to measure the voltage at the motor terminals.
Since the motors work when connected directly to the battery, and they only briefly spin when I reinsert the yellow PWR jumper, does that suggest the issue is most likely with the motor power supply path, the yellow PWR jumper, the L293D chip, or the motor shield itself?
Thank you. I will test each motor individually, then in combinations of two, three, and four motors, and report which combinations work and which do not.