Hi yall,
Recently on another post I was recommended to get a different motor driver than the one I was using here. The new one is the dual control version of the TB9051FTG chip found on pololu's website. After sodering everything on including the fuse that would enable the powering of the arduino from the driver,
The motor spins and does exactly what is expected of it. Until I pull out the upload USB cable. It stops functioning. Below is my connections (without USB Cable)
I have verified the connectivity of the motor wires as well as the 9V power supply wires.
However I cannot find a way for it to spin or move without the USB cable attached.
Below is my code:
int IN1 = 7;
int IN2 = 9;
int IN3 = 6;
int IN4 = 7;
void setup()
{
pinMode(IN1, OUTPUT);
pinMode(IN2, OUTPUT);
}
void loop()
{
// Rotate the Motor B clockwise
digitalWrite(IN1, LOW);
analogWrite(IN2, 255);
}
Upon further reading, I have also found this article that talks about possible lack of power. I have a 9V power supply unlike their 6V. I don't know if this is a problem. The leds on the arduino do light up when only using the 9V with USB not in. If possible, is there a way to see if it's not enough power getting to the arduino?
The fuse on the driver that would short the two pins to allow for powering of the arduino thru the driver is enabled as shown in the image.
Do you have a volt meter? if so measure the voltages with and without the USB. They should be the about the same.
This is not an answer but here is why I am asking. I have seen this before when an external power supply was used but the ground was floating. You are powering with batteries so that would not apply.
USB Only (no 9v): 4.9V
Battery + USB: 7.37V
Battery Only: 0.012V
I would like to note with both USB Only and Battery + USB cases, there is an indicator led to show there is indeed power. For Battery Only, this light was not on.
I don't think lack of power is the problem here, but if you guys think otherwise, please tell me how I can fix.
Another symptom:
I tried using the VIN pin on the arudino powered with a separate 9v power supply. The driver and uno are now two different powers. It does not output anything on the motor channels. However when driver is separate from the uno's power supply and the uno is powered using the USB, it works.
That would indicate the battery is not capable powering the system or is dead. Can you post links to each of the hardware devices such as the driver, motors, etc.
I found the problem. For some reason, these Unos I bought off amazon aren't working very well. I switched it to a conventional uno and it fixed itself.