Hi there,
I hope i'm posting this question in the right section. I wasn't sure if this belonged in the MOTORS section or the INTERFACING section, but i'm going to go ahead here.
I'm building an autonomous rover (i know, how creative!). My electronics knowledge is quite poor, so i'm almost certain the problem is with my wiring. I'm just hoping i haven't blown something up.
I'm using this motor driver/controller circuit:
http://www.ebay.com/itm/200659789109?ssPageName=STRK:MEWAX:IT&_trksid=p3984.m1423.l2649
To power these motors:
http://www.ebay.com/itm/4WD-Robot-Smart-Car-Chassis-Kits-car-with-Speed-Encoder-DC-3v-5V-6V-for-Arduino-/171122633517?pt=LH_DefaultDomain_0&hash=item27d7b42b2d
I've got 471pF ceramic caps across the leads of each DC motor. I was advised to do this to reduce the jerky-motion of the motors. (How accurate was this advice?)
and an Arduino UNO R3.
I realised that the motor controller that i had purchased only supported upto 2 DC motors, so i connected the two LEFT motors in parallel and the same on the RIGHT. I ran the two leads of each motor setup into the MOTORA and MOTORB inputs of the motor controller.
I decided to power the motor controller circuit (VMS) with a 9V battery and the GND to the -ve obviously. The 5V in was left empty. The ENA and ENB are connected to the PWMs of the Arduino Uno and the IN1,IN2,IN3,IN4 are connected to DIGITAL pins of the Arduino.
On the Arduino-end, i've got a 9V battery with a 2.1mm plug to supply power, and i created a common ground between the Arduino and the Motor Controller by connecting the GND pin on the Arduino to the GND of the Motor Controller on a mini breadboard (Am i doing this right?).
And i'm using the 5V from the arduino to power the Servo and the Ping(ultrasonic) sensor, with both their ground wires connected to the common ground at the breadboard.
I tried to run a small test code to see if the motors are working, but they don't seem to be:
This is the code:
int IN1=4;
int IN2=7;
int ENA=6;
void setup()
{
pinMode(IN1,OUTPUT);
pinMode(IN2,OUTPUT);
}
void loop()
{
analogWrite(ENA, 200);digitalWrite(IN1,LOW);
digitalWrite(IN2,HIGH);
delay(2000);
digitalWrite(IN1,HIGH);
digitalWrite(IN2,LOW);
delay(2000);
}
I used a multimeter across the DC motors while the code was running and i would get about 0.4V to -0.4V when the above code was executed. So i'm assuming that the motors aren't receiving enough power?
Any help would be appreciated,
Thanks in advance
Shreyas