Project tutorial

Animate a Billy Bass Mouth With Any Audio Source © CC BY-NC-SA

Use an Arduino Uno and Motor Shield to give a Billy Bass singing fish the ability to speak to you from any audio source.

  • 5,034 views
  • 2 comments
  • 24 respects

Components and supplies

About this project

About a month ago, an artist named Brian Kane published a viral video showing a Big Mouth Billy Bass novelty singing fish, seemingly voiced by Amazon’s Alexa virtual assistant. The internet went nuts for it, and so did I -- but mostly I just wanted to know how it worked so that I could make my own.

After seeing a number of Raspberry Pi projects that made use of Alexa, I initially assumed that Brian had created an Alexa-powered Pi project that doubled as a means to animate the existing Billy Bass hardware -- and that may be the case. I even posed this idea on my weekly YouTube show, Maker Update.

But after giving it some more thought, I figured the easiest hack would be a way to simply use the audio from a $49 Amazon Echo, and process it through an Arduino to drive existing motors.

I already had an Arduino and a motor shield handy (though this was my first time using the shield).

Next, I ordered the Billy Bass used on Amazon for around $15. I’m sure you can pick up a used one at a yard sale or Thrift store for less money, but I wanted one quickly. I also ordered the Echo Dot new.

With those ordered, I moved on to research. Two tutorials provided me with hope: this 2012 guide from sfool on using an Arduino to make a servo move to sound and this 2013 guide from Dotten on understanding the animatronics of a Billy Bass toy.

Understanding that the Billy Bass (much like a Furby) is essentially driven by two cheap 5v DC toy motors -- the problem then becomes simply how to make these motors twitch in response to sound. With a little trial and error, I found a workable solution. The code is far from perfect and there are a lot of other features I want to build in, but I wanted to get this up so that everyone can help make this better.

Materials Needed

  • Big Mouth Billy Bass Singing Fish (1)
  • Arduino Uno (1)
  • Arduino Uno power supply (1)
  • Panel-mount minijack (1)
  • Stranded hookup wire (multiple colors helps)
  • Amazon Echo Dot (though any audio source should work) (1)
  • Small rechargeable speaker of some kind (1)
  • Minijack (⅛”) audio cable (1)
  • Minijack splitter cable adapter (1)

Tools Needed

  • Small Screwdriver
  • Soldering Iron and Solder
  • Wire strippers
  • Snips
  • Drill and bits

Step 1: Prepare the Fish

For better or worse, by used fish was dead on arrival. At least I had no hesitation about opening it up and hacking it. For my hack, simply undo the screws on the back, open it up, and apply gentle pressure to unseat the cable harnesses so that the back can be removed completely.

To create more room for the electronics we’ll be adding, unscrew and remove the Billy Bass circuit board and piezo buzzer.

What you have left is one 4-wire harness sticking up from the fish. This includes two wires that animate the mouth (you can see them trail into the fish) and two wires that raise either the head or the tail depending which way direction you run the motor.

The last step in preparing the fish is to cut four equal lengths of different colored wire, expose and tin the tips, and insert the ends into each of the four sockets in the wire harness. In the next step, we’ll connect these to the Arduino motor shield.

Step 2: Prepare the Motor Shield

There are only 4 connections you’ll need to make to the motor shield, and only two of them are soldered. You can also hook up an additional two wires if you want to experiment with the tail/head motor.

Let's start with the soldering to get it over with. To create an audio input for your fish, take two equal lengths of different color wire, strip the ends, and solder one to ground, and one to Analog 0. Clip away any excess wire running through the board.

Now let’s run these wires to the panel-mount mini jack for our audio input. The jack I had was one of those fancy mono switch jacks with three possible connections. All that matters is that you create a mono input by running the wire from Analog 0 to the lead on the jack that makes contact with the tip of the audio connector. Then run the Ground wire to a lead on the jack that makes contact with the base (or sleeve) of the audio connector.

Next, to connect up the fish motor(s) to the shield, run the pair of wires leading to the fish mouth motor (black and orange) into the terminal blocks for motor 1 and screw them down. Optionally, you can run the tail/head motor wires (white and red) to the terminals for motor 2, though the code does not yet do anything with this motor (more on this in the next section). For my fish, the wire coloring on the terminal blocks goes black, orange (yellow in my case) for the mouth motor (M1) and white, red from for the optional tail motor (M2).

Finally, check that the motor shield has the jumper sleeve attached to the pins labelled VIN Jumper. I missed this initially and was scratching my head wondering why the shield wouldn’t power on. You should now be able to sandwich the shield onto the Arduino Uno, power up the Arduino, and see a power indicator LED light up on the shield as well. If the shield doesn’t light up, I’d check the jumper.

Step 3: Load the Code

So, the code’s a messy hack that pulls together elements of the DC Motor Test sketch (essentially the demo for the motor shield) and the Sound to Servo sketch by Cenk Özdemir (2012), included in that Arduino Sound to Servo Tutorial I linked to above.

The code in its current state does not yet animate the head/tail motor. I had one version that did, but it slowed down the responsiveness of the mouth movement. Ideally I’d like the mouth to remain responsive while the head and tail slowly cycle through their own animation, but this is the current limit of my Arduino coding capability. As soon as I figure it out or get suggestions from you guys, I’ll post updated code.

Step 4: Putting it all together

With the code loaded, and the audio cable connected to the jack, you should be able to make the fish’s mouth move just by connecting an audio source to the free end of the cable (I used my phone playing a podcast). If it’s working, drill a small hole somewhere on the plastic fish plaque, push the jack through and tighten it in place.

To get Alexa (or whatever you want) talking through your fish, connect the free end of the audio cable to the Y-adapter, the rechargeable speaker to the other input of the adapter, and then run the male plug of the adapter into the audio output of the Echo Dot.

Make sure your speaker is switched on and the volume is up on both the speaker and Alexa. Then, summon Alexa and ask her a question to get her talking (weather, jokes, news). You should hear her voice through the portable speaker while simultaneously witnessing your fish’s rubber lips flapping in time. The closer the speaker is to the fish’s head, the more uncanny the effect is.

If it’s all working out, the trick then becomes packing the speaker and Arduino into the Billy Bass enclosure and closing it up. Honestly, I’m still figuring this bit out.

Step 5: Where next?

There’s a lot left to do here, and I welcome all your suggestions on making this better. I'd love to post a version 2.0 for this in the near future.

1. I want the head and tail to animate. The connections are there and I’ve been able to get them working but not without sacrificing the responsiveness of the mouth, which is critical.

2. I want the speaker to be able to recharge from the Arduino. Seems simple enough, but I haven’t done it yet.

3. I want the Billy Bass red button (or a substitute) to toggle between a “speech” mode (more about mouth movement and the whole “talking fish” appeal, and a “music” mode that’s more about the fish flopping around in time to music.

4. Cleaner code. I’m certain there’s a lot of leftovers in the code from the mashup I did. I welcome any efforts to clean it up.

5. Use a smaller Arduino. The Uno and Motor Shield are totally overkill for what we’re using it for. I think that an Adafruit Feather and their 2-motor shield for the feather would be a nice alternative. Perhaps you can have one powering the mouth and a separate one powering the tail-head motor.

Code

SoundToDCArduino
/*
  Make a DC Motor Move to Sound.
  This example code is in the public domain.
   Created by Donald Bell, Maker Project Lab (2016).
   Based on Sound to Servo by Cenk zdemir (2012) 
   and DCMotorTest by Adafruit
*/
// include the Adafruit motor shield library
#include <Wire.h>
#include <Adafruit_MotorShield.h>
#include "utility/Adafruit_MS_PWMServoDriver.h"

// Create the motor shield object with the default I2C address
Adafruit_MotorShield AFMS = Adafruit_MotorShield(); 
// Or, create it with a different I2C address (say for stacking)
// Adafruit_MotorShield AFMS = Adafruit_MotorShield(0x61); 

// Select which 'port' M1, M2, M3 or M4. In this case, M1 for mouth and M2 for tail
Adafruit_DCMotor *myMotor = AFMS.getMotor(1);
Adafruit_DCMotor *myOtherMotor = AFMS.getMotor(2);

// Some other Variables we need
int SoundInPin = A0;
int LedPin = 12; //in case you want an LED to activate while mouth moves

// the setup routine runs once when you press reset:
void setup() {
  Serial.begin(9600);           // set up Serial library at 9600 bps


  AFMS.begin();  // create with the default frequency 1.6KHz
  //AFMS.begin(1000);  // OR with a different frequency, say 1KHz
  
  // Set the speed to start, from 0 (off) to 255 (max speed)
  myMotor->setSpeed(0); //mouth motor
  myMotor->run(FORWARD);
  // turn on motor
  myMotor->run(RELEASE);
     pinMode(SoundInPin, INPUT);
     pinMode(LedPin, OUTPUT);
  myOtherMotor->setSpeed(0); //tail motor
  myOtherMotor->run(FORWARD);
  // turn on motor
  myOtherMotor->run(RELEASE);
     pinMode(SoundInPin, INPUT);  
}

// the loop routine runs over and over again forever:
void loop() {
  uint8_t i;
  
  // read the input on analog pin 0:
  int sensorValue = analogRead(SoundInPin);
// we Map another value of this for LED that can be a integer betwen 0..255 
  int LEDValue = map(sensorValue,0,512,0,255);
  // We Map it here down to the possible range of  movement.
  sensorValue = map(sensorValue,0,512,0,180);
  // note normally the 512 is 1023 because of analog reading should go so far, but I changed that to get better readings.
  int MoveDelayValue = map(sensorValue,0,255,0,sensorValue);

  // maping the same reading a little bit more down to calculate the time your motor gets
if (sensorValue > 10) { // to cut off some static readings
   delay(1);  // a static delay to smooth things out...
// now move the motor 
   myMotor->run(FORWARD);
  for (i=140; i<255; i++) {
    myMotor->setSpeed(i);  
  
  }

//for (i=200; i!=0; i--) {
//    myMotor->setSpeed(i);  
//    delay(10);
//  }
  
  analogWrite(LedPin, sensorValue); 
         // and do that move in this delay time
  
  myMotor->run(RELEASE);
  myOtherMotor->run(RELEASE);
  delay(1);
} // Done.
   // turn off the led again.
      analogWrite(LedPin, 0); 
      // and this repeats all the time.
}

Comments

Similar projects you might like

Hacking My Toaster

Project tutorial by javier muñoz sáez

  • 362 views
  • 5 comments
  • 9 respects

Rickroll Box

Project showcase by slagestee

  • 1,294 views
  • 0 comments
  • 4 respects

Gyroscope Fun with NeoPixel Ring

Project tutorial by danionescu

  • 1,443 views
  • 0 comments
  • 5 respects

START: A STandalone ARduino Terminal

Project tutorial by Alessio Villa

  • 1,039 views
  • 0 comments
  • 6 respects

Music Reactive LED Strip

Project showcase by buzzandy

  • 406 views
  • 2 comments
  • 10 respects

Pavlov's Cat

Project tutorial by Arduino

  • 755 views
  • 0 comments
  • 2 respects
Add projectSign up / Login