Hi there, my group of friends and I are trying to create car with 4 motors, controlled by a raspberry pi. We are using this chassis and motor kit. And we are using a raspberry pi 3 model B. This is the GPIO schemtaic for the pi we are using. We are using the DRV8835 to control our motors. There are two motors on each side of our car, the positive/negative leads to each motors are tied together on each side, which means we are running 2 motors in succession on each side. The motor supply is currently composed of 6 AA batteries, giving us 9V for our motor power supply. Everything else is connected exactly as shown in this diagram: DRV 8835 Phase/Enable Diagram Connections. GPIOs 5 and 12 being used as the inputs for Motor A, and GPIOs 6 and 13 being used as the inputs for Motor B. 12/13 are PWM inputs, and 5/6 are direction inputs.
Our car was working fine. We used the libraries provided by Polulu to drive the motors, and we tested the motors. Each motor worked fine, forward, reverse, left turn, and right turn all worked fine. We then created functions for these and we were then able to control the car using a WASD input on the keyboard to move forward/backwards etc.
Our car was working fine until eventually the driver wasn’t giving power to one side of the car, so only one side’s wheels were moving at all. The driver is still giving the same output and we are unsure of what to do so that we don’t blowout any remaining DRV8835’s.
This is our first robotics project so we do not 100% know what we are doing correctly/incorrectly. We were just starting to get some autonomous control down, when our driver stopped working out of nowhere, so now we are scurrying to get our car working again. We have 3 extra DRV 8835’s so we really don’t want to mess up again. The problem did occur when we had an HC-SRO4 sensor attached to the pi, which was connected correctly because we were correctly sensing distance. I’m not sure if this could have been the problem or not. If any more information is required don’t hesitate to ask. Any help or advice is greatly appreciated as we have deadlines coming up, and we are amateurs in robotics, but we are completely willing to learn everything we can.
Here are pictures of how everything is connected, and some of the code we’ve used to test our motors:
This shows GPIOs 5/6/12/13 connected to PH/EN 1/2, VCC is going to 5v on the Pi, Mode is going to 3.3V on the pi. GND going to pis pin06, which is ground on the pi, both motors are connected to the proper locations, and battery positive and negative leads are connected to Vin/Ground on the DRV 8835.
This shows how we have our motors connected together on each side of the car.