This is copied from

http://www.howstuffworks.com/singing-fish.htm

 

How Singing Fish Work

 

Lately it seems that every time you turn around, there's a fish singing a song to you! Boogie Bass, Big Mouth Billy Bass, Rocky Rainbow Trout and other variations have become enormously popular as novelties and gag gifts. You've probably seen one at a store in the mall, at the flea market or on television. Looking deceptively like a normal stuffed fish mounted on a plaque, it is actually a robot that begins to sing and move when someone walks up to it. As the fish swings his head out from the plaque, he lip-syncs to a prerecorded 30-second clip of a popular song or spits out a savvy one-liner. For the unsuspecting viewer, a singing mounted fish can be quite a humorous surprise, which seems to be the key to its charm.


Singing Bass

A Note to Our International Readers

If you live outside of the United States, you are probably unfamiliar with the singing fish we are discussing in this article. You may, in fact, think it is the most ridiculous thing you have ever seen! Like the Pet Rock of the early 1980s, the singing fish is a fad -- in true American fashion!

In the U.S. there is no escaping the singing fish right now. Sales are brisk, with many dealers routinely selling out. And it really is a neat little piece of engineering and creativity! In this edition of How Stuff Works, we will open up one of these fish and take a look inside. What makes him sing? How does he move? How does he know when someone is standing in front of him? We will answer all of these questions as we explore the robotic mechanism that brings these fish to life!


The fish is singing

 

Inside the Fish
The singing fish is actually a very simple robot. It has its own power supply, it senses its environment and acts autonomously on what it senses, it moves in fairly complex patterns (a singing fish is actually more complicated than some of the pick-and-place robots that you find in factories), and it vocalizes -- in other words, it meets all of the qualifications of a robot!


Foam padding is used to flesh out the framework.

In the following pictures, we have removed the latex rubber outer layer to look at the underlying mechanism. What you find is a surprisingly complicated articulated plastic framework driven by three small DC motors:


Plastic skeleton of the fish.

The fish's skeleton has three moving parts:

Here is a close-up of one of the motors:


This electric motor is used to move the jaws and simulate the singing.

When power is supplied to the motor, the lower jaw opens. As soon as the motor stops, a spring causes the jaw to close. By starting and stopping the motor repeatedly, the jaw opens and shuts, making it appear as if the fish is singing. All three of the motors work in this way -- applying power to them moves the associated body part in one direction, and the spring moves it back.


This electric motor moves the tail section in time to the music. Just like the motor operating the mouth, the tail motor causes the tail fin to move out away from the plaque and a spring makes the tail fin snap back when the motor stops

Inside the Plaque
Inside the plaque there are five different components that control the fish:

The photos below show these components in detail. Here is the logic board -- the "brain" of the fish:


The circuit board -- the "brain" of the fish

The circuit board contains an integrated circuit (IC) that controls the motors and also contains the songs in a digitized format (see How CDs Work for information on digital music storage). There is one minute of music on the chip, although it is not the highest quality. There are probably 8,000 samples per second at 8 bits per sample stored on the chip, or almost half a megabyte of data! The chip synchronizes the movements of the mouth, tail and body to the beats of the music. It does this by sending carefully timed, short bursts of power to the electric motors. The transistors that you see on the circuit board amplify the chip's signals so there is enough power to drive the motors (or the speaker).


This electric motor on the back side of the skeleton swings the entire front end of the fish out from the plaque, toward the viewer. Once again, a spring is used to return the front end to its original position once the motor stops. There is a photoreceptor cell near the bottom.

Whenever a person or object passes in front of the fish, light is blocked from hitting the photoreceptor. The photoreceptor then sends a trigger to the IC telling it to begin. Also wired into the circuit board is a manual pushbutton switch, located just above the photoreceptor. This switch does not cut power directly -- instead it sends a signal to the chip. If you try to turn the fish off in the middle of a song, the fish will actually complete the song before turning off!


This small speaker on the back of the plaque reproduces the music sent to it by the IC. The battery compartment contains four C batteries, and there is a plug for using an AC adapter.

It is true that a singing fish doesn't do anything useful, but even so it is a pretty amazing piece of technology!

 

 

This Hack is provided from

http://www.howstuffworks.com/framed.htm?parent=singing-fish.htm&url=http://www.ai.mit.edu/~vona/bass/bass.html

 

 

 

Boogie Bass Hack

Full Details (Boogie Bass version, Billy Bass version) of the hack are now available, including schematics and sourcecode.

     During the summer of 1999 I was living in Hanover, New Hampshire, with my friends Ben Guaraldi and Lauryn Zipse. One quiet sunny morning I woke up late and walked into the living room to find Ben dozing on the couch. At the sound of my entrance, he opened one eye and we looked at each other for a moment, each still experiencing post-sleep stupor. In an uncommon epiphany, it was suddenly clear to me that I could communicate to Ben the entire contents of my just-barely-awake mind with one single word:

Pork!

Yes, indeed, the other white meat. Try it. Even if you don't dig on swine.

Pork!
pork
pork?
pork
pork.
pooooork.

Clearly, a whole world of human experience can be expressed with this one simple word. Even if you don't agree, Ben did. So, on that quiet sunny morning in Hanover, we had a whole conversation using only the word pork.

     As time passed we became ever more impressed with the dynamic range of the p-word. And we began to get creative about how we communicated it. For example, Ben recently sent me a package of Pork Shake-N-Bake (unwrapped, with the address label and postage stuck directly to the back).

Then, while shopping at the local CVS, I stumbled upon the Boogie Bass.

     For those of you who are new to all this, Boogie Bass is one of several "talking fish" toys that have cropped up over the last few months. It looks like a life-size stuffed fish, complete with wall-hanging plaque. On the front is a small black button, which when pushed causes the fish to "come to life" and to talk to you. I am serious.

     As you can see from the description of talking fish on HowStuffWorks.com, the Boogie Bass is nothing short of a little animatronic wonder. Now who's put two and two together? Pork. Bass. Talking Bass. Christmas was fast approaching, and I as yet did not have a gift for Ben.

 

 

How To Make A Talking Fish Say What You Want


 

     In case you haven't gotten it yet, these two ingredients should complete the picture:

  1. The ISD 1420P solid-state "chipcorder" voice record/playback chip. Stores 20 seconds of telephone-quality voice. Nonvolatile, in-system-recordable. 28 pin DIP. Available from JDR Microdevices for about $9. Particularly well-suited for storing "special" messages inside talking Bass.
  2. The ATMEL AT89S8252 microcontroller. 8051 core. 8kB of serial-downloadable flash program storage. 2kB of data storage EEPROM. 40 pin DIP. Available from JDR for abut $7. Particularly well suited for storing "special" head/tail/mouth movements inside talking Bass.

     After removing the six screws that hold the back of the Bass' "plaque" (each cleverly hidden beneath a rubber mounting foot), I discovered that the inside of the plaque is mostly air. Plenty of room for adding some "special" circuitry. Clearly we would not want to destroy the existing circuit. We can hijack its power drivers for the motors. And besides, the messages it comes with are pretty hilarious. Especially after you have heard them over 100 times.

     A little investigation with an oscilloscope revealed that the control of the Bass' head/tail/mouth is extremely simple: energize the corresponding motor, and the head turns out, the tail extends, or the mouth opens. De-energize the motor, and the corresponding body part returns (by a spring) to its "rest" state. We've got binary actuators here folks. And it was clear that we could tie in to the gate inputs of the motor drivers with some simple diode-or circuitry.

     Here are some photos of the innards of the Bass, after the addition of "special" mode:

As you can see, there are three circuit boards involved. The one in the upper left (the green one) is the original board. The little one just below it holds some switches and things that make up a control panel for the "special" mode. The big one on the right holds the ISD1420, the AT89S8252, and an audio amplifier.

     Controls have been added to the rear of the modified Bass to facilitate switching between "normal" and "special" modes:

There is a toggle switch for changing modes, along with a trimpot for adjusting the volume in special mode, an LED for feedback (very useful during software development), and four DIP switches for setting the "special" sub-mode. There are currently five such sub-modes:

Record

This is the mode for recording a new message, up to 20 seconds long. Only one "special" message is supported at a time. When the button on the front is pushed and held in, any sound will be recorded until the button is let out (or 20 seconds is reached, whichever happens first). New "special" messages can be re-recorded as often as you like, and doing so will erase the existing "special" message (and reset all head/tail/mouth movements).

Record Mouth

In this mode the movement of the mouth can be recorded. Press and release the button on the front to start playback of the "special" message, along with any existing recorded tail and head movements. While the message is playing, press and hold the button to open the mouth. Release to close it. The mouth movements recorded here will be played back subsequently whenever the message is played in Play, Record Head, or Record Tail modes. It can be difficult to get the timing right, so it helps to have a digital stopwatch on hand. And you can of course re-record the movements as many times as you like (re-recording the movement does not erase the current audio or movements of the other body parts).

Record Head

This mode allows you to program the movement of the head (either flat against the plaque or turned to face you). Operation is similar to Record Mouth mode.

Record Tail

This mode is for recording tail movements. Operation is similar to Record Mouth mode.

Play

When the button is pushed and released in this mode the currently stored message is played back, along with any recorded head/tail/mouth movements.

     The front of the fish is unchanged, except for the addition of a small hole for the microphone:

 

 

Pork!


 

     After I got the circuits built and debugged it only took a few minutes to record my message: Five seconds of silence, during which the tail flops around a bit; the head moves out and pauses for half a second; the Bass says "Pork!"; the head moves back in and then five more seconds of silence with tail flopping.

     I wrapped the fish in its original packaging, with the mode switch left at "special" and with the batteries inserted. Ben's reaction when he pressed that button was as priceless as you can imagine. Which is quite priceless if you know Ben.

 

 

 

 

 

Hosted by www.Geocities.ws

1