I am working on hacking a Big Mouth Billy Bass. I have an Arduino Uno, an Adafruit Motor Shield and an Adafruit Wave Shield. I did some research about pin conflicts and so I jumped the LCS, CLK, DI, and LAT to analog 0-3 respectively and CCS to 10. On the Motor Shield I cut the traces to pins 11 and 12 and jumped 12 to 2. (I did not bother jumping 11 since that is the control for M1 and I only need to use M2, M3, M4).
I put three .1uF capacitors on each of the motors to prevent noise and I added am powering the arduino separately from the motor shield. I am using 8 AA batteries on the motor shield which should provide plenty of voltage to power the three 6vdc motors in the Big Mouth Billy Bass.
I ran a test sketch and got the wave shield to play while motors moved. I tested each of the motor ports with success.
Then I connected all three motors from the BBMB to the motor shield. I ran the following sketch as a simple test to make sure I could control each motor.
- Code: Select all
#include <AFMotor.h>
AF_DCMotor mouth(2, MOTOR12_64KHZ);
AF_DCMotor body(3, MOTOR34_64KHZ);
AF_DCMotor tail(4, MOTOR34_64KHZ);
void setup () {
Serial.begin(9600);
Serial.println("Here we go!"); //initialize
mouth.setSpeed(255); //set mouth at full throttle
body.setSpeed(255); //set body at full throttle
tail.setSpeed(255); //set tail at full throttle
mouth.run(RELEASE); //disengage mouth
body.run(RELEASE); //disengage body
tail.run(RELEASE); //disengage tail
}
void loop () {
Serial.println("Moving mouth");
mouth.run(FORWARD); //run mouth
delay(1000); //wait 1 second
mouth.run(RELEASE); //disengage mouth
delay(1000); //delay 1 second
mouth.run(FORWARD); //run mouth
delay(2000); //wait 2 seconds
mouth.run(RELEASE); //disengage mouth
Serial.println("Moving tail");
tail.run(FORWARD); //run tail
delay(1000); //wait 1 second
tail.run(RELEASE); //disengage tail
delay(1000); //wait 1 second
tail.run(FORWARD); //run tail
delay(2000); //wait 2 seconds
tail.run(RELEASE); //disengage tail
Serial.println("Moving body");
body.run(FORWARD); //run body
delay(1000); //wait 1 second
body.run(RELEASE); //disengage body
delay(1000); //wait 1 second
body.run(FORWARD); //run body
delay(2000); //wait 2 seconds
body.run(RELEASE); //disengage body
Serial.println("All's quiet on the western front..."); //tell me that it is over
delay(5000); //wait 5 seconds
}
The way the BMBB works is when the motor is powered, it moves the part of the body until the power is removed and a spring brings back into place. For whatever reason, when I connect all 3 motors and run this sketch, only one part of the body will engage and stay engaged. It isn't controlled. For example, the tail motor (M4) will engage and stay engaged until I unplug the arduino or remove the power supply to the motor shield. If I then unplug the tail from M4, the same thing will happen but with the mouth (on M2). Finally, if I only leave the body motor (M3) plugged in, the same thing happens. It engages and stays engaged until I remove power.
I'm really not sure where to go from here. I have attached pictures of my setup. Please be merciful! I am a total rookie...
Here are the pictures. I did not include the wave shield since I have not had problems making that work. However, I can put them in a separate post if that would help.
[img]
[/img

