Dear Arduino Community,
I am having trouble running a 12V DC peristaltic pump motor with the Adafruit TB6612 Driver and an Arduino uno.
Right now all that happens is that I hear sound coming from the motor, but no turning. I am not sure if it is my wiring that is wrong or whether it is my power supply(which is a 9V battery).
My goal is to vary output of the peristaltic pump via pressure of a fsr. This is my code thus far. Not sure if there is something wrong with the code either.
}
int fsrPin = 0;
int fsrReading;
//motor readings
const int pmw =3;
const int input1=7;
const int input2=8;
void setup(void) {
Serial.begin(9600);
pinMode(pmw, OUTPUT);
pinMode(input1, OUTPUT);
pinMode(input2, OUTPUT);
}
void loop() {
fsrReading = analogRead(fsrPin);
// Serial.print("Analog reading = ");
// Serial.print(fsrReading);
digitalWrite(input1, HIGH);
digitalWrite(input2, LOW);
analogWrite(pmw,255);
Serial.print(“Test scenerio 1 PWM 255”);
delay(10000);
// digitalWrite(input1, LOW);
// digitalWrite(input2, HIGH);
// analogWrite(pmw,125);
// Serial.print(“Test scenerio 2 PWM 125”);
// delay(10000);
// digitalWrite(input1, LOW);
// digitalWrite(input2, LOW);
// analogWrite(pmw,125);
// Serial.print(“Test scenerio BREAK PWM 125”);
}
I have attached a photo of the current way I have wired this.
Thank you guys for your time and help. I appreciate any input of what potentially I should change.