I am working on a project where I have 4 DC motors that is controlled by 2 L293D motor drivers. 2 of the motors act as the wheels of the robot, and the other 2 act as a mop.
The Arduino board is powered through the USB port. The DC motors are powered by the L293D motor driver through the 5V pin on the Arduino. Alongside the motors, an ultrasonic sensor and a water sensor is also using the 5V pin.
This is what the robot should be doing:
The robot will move forward. If it senses an obstacle through the ultrasonic sensor, it will turn right. If it senses water through the water sensor, the robot will stop moving and the mop will start spinning. After cleaning the water spillage, it will move forward again, just like what it did before.
It seems like the motors are not getting enough power, because whenever I place it on the floor, it doesn't move.
The base / platform of the robot is a plywood, which is heavy for the robot, and also which I think is a factor that affects the spinning of the wheels.
I also have a 9V battery, which I think could power the motors, but I don't know how to connect it. How am I supposed to connect it to the L293D motor driver? I think, I should connect the positive side of the 9V battery to the VCC 2 pin of the L293D motor driver. But, where should I connect the negative side of the 9V battery?