| Marsette Vona: | Billy Bass Hack |
The Billy Bass hack adds a 20 second re-recordable "special" message to the Billy Bass talking fish made by Gemmy Toys. The movements of the head, tail and mouth are also re-recordable, and the original factory messages are still available. The hack is built around three main components:
UPDATE 8/17/04: John Greene reports that some of the above suppliers no longer carry the listed parts, but that Futurlec currently carries all parts except the 4PDT switch and the MC34119 (which seems to be discontinued).
Photo 1 shows the layout of the inside of the hacked Bass.
|
|
||
| Photo 1: Hacked Bass internals. | ||
|
|
||||||||||
SW4 toggles the Bass between normal and special mode. In normal mode the Bass should behave as it always has. In special mode, the operation of the Bass depends on the settings of SW1..3, which set the current "sub-mode". There are currently six such sub-modes:
If you build the circuit according to the schematic, the Special Sub-Mode switches work like this:
| Special Sub-Mode | SW1 | SW2 | SW3 |
| Record | short | short | short |
| Record Mouth | open | open | short |
| Record Head | open | short | open |
| Record Tail | short | open | open |
| Play (button only) | open | open | open |
| Play (button or motion) | open | short | short |
There is also a trimpot for adjusting the volume in special mode (visible just above the 34119 in Photo 2) and an LED (very useful during software development).
The schematic diagram, parts list, and all necessary code files are available either as a GNU/Linux tarball or as a DOS zipfile.
The Bass is designed so that it can either be powered from four onboard C cells or from a wall-wart power transformer. The Bass actually comes with batteries (woo-hoo!) and with a female coaxial power jack for the wall-wart.
I had originally planned to use a 7805 regulator to supply power to my added circuit from either the batteries or the wall supply. However, I quickly discovered that the 6V available from the batteries does not leave enough voltage headroom for a regular 7805, especially when the motors are energized (because the high current drain causes the battery voltage to dip significantly). It may be possible to circumvent this issue by using an LDO (Low Drop-Out) regulator.
It turns out that a regulator seems to be unnecessary for this circuit when powered from the batteries. We do need to be a little careful because the specified maximum operating voltage of the 8252 is 6.6V, and freshly charged cells in some chemistries may surpass this. However, unless you get a regulated wall-wart (which are less common than the unregulated variety), regulation is necessary when using the wall-wart. So I moved the 7805 to the wall-wart jack. This way when the wall-wart is connected the Bass is supplied through the regulator, but when the wall-wart is not present the juice comes directly from the batteries. I found that a 9V DC 500mA wall wart from JDR Microelectronics (part tr09-DC) seems to work pretty well wall-wart-polarity.
Internally, the coaxial jack has three terminals. One carries +V in from the wall-wart, one is system ground, and the remaining one is battery ground. The terminal with the lone black wire going to the negative side of the battery pack should be battery ground, the one that connects to the outer conductor on the coaxial jack should be system ground, and the remaining terminal should be +Vin (it had a pink wire attached in my Bass). The jack has a switch in it that will automatically connect auxiliary ground to system ground when the wall supply plug is not inserted, and disconnect them when it is. This effectively isolates the batteries when the wall supply is connected. Be careful not to subvert this switch -- if you do, you could inadvertently cause the wall supply to drive current through the batteries, which could be A Bad Thing (before and after you finish your work, verify the proper operation of the switch with a continuity tester: when the wall-wart is inserted there should be no continuity from the negative terminal of the battery pack to system ground).
Photo 4 shows the 7805 mounted to the wall-wart input jack.
|
|
||
| Photo 4: 7805 regulator mounted at the wall-wart jack. | ||
Of course, as in any mixed signal circuit, you should keep separate power and ground nets for the analog and digital portions. Keep them separate until as close to the supply points as possible. If you have audio noise problems, especially if it only occurs when the motors are energized, then check your supply voltages.
The special circuit draws about 13mA when powered on. However, the 8252 is programmed to shut everything down after about 25 seconds of inactivity. In this low-power mode, the special circuit draws only about 0.3mA. C cell batteries typically have capacities in the range of 5000mA-H, so the Bass should be able to sit idle for months without draining its batteries. And when you do need to change the batteries, you will be happy to find that since both the memory on the 1420 and the EEPROM on the 8252 are non-volatile, you will lose neither the audio nor the motions of your carefully recorded special message.
The AT89S8252 is mostly backward-compatible with the original 8052 microcontroller mcs-51. All the code that runs on the 8252 is contained in the assembly language file bass.asm (included with the design documents).
I used the freely available assembler as31 to produce an Intel format hex file (bass.hex) from the assembly code. Before I run bass.asm through as31 I pass it through the C preprocessor, which allows us to define bit addresses as named symbolic constants (which as31 apparently does not handle well). Also this would allow for conditional assembly if needed. However, the C preprocessor is not an ideal solution. Unmatched single or double quotes anywhere in this bass.asm will make the C preprocessor choke (except if enclosed in C-style /* comments */), assembly-style ; comments on the same line after #define statements will misbehave, and when you get an assembler error the line number reported actually refers to the post-c-preprocessed file (which will be bass.p.asm).
I provide a makefile with the design documents, so if you are on a GNU/Linux system all you should need to do to build bass.hex (after you have installed as31) is type
> make bass.hexIt should also be possible to build bass.hex from bass.asm on any system where both the C preprocessor and as31 run, however I have only tried it on GNU/Linux so far. You can probably get the code to build with your own favorite 8052 assembler that isn't as31 if you make some syntax adjustments.
Of course, if you're not interested in playing with the code at all then you should be able to just use the Intel hex file that I provide you (bass.hex, included with the design documents), which you can send directly to a programmer.
Don't have a programmer? No problem. It's easy to build one that connects to a PC parallel port. That's the major reason I chose the AT89S8252 for this project (I didn't have a programmer either). Get yourself a 40 pin ZIF socket for the 8252 zif. Connect it as shown in the circuit diagram 89prog.pdf, which is included with the design documents.
Now you need a program to run on your PC that twiddles the bits on the parallel port in just the right way so that the contents of your Intel hex file get transferred to the 8252. A web search turned up a guy named Rob Melby wrote just such a program, called 89prog, for GNU/Linux. I added some improvements to it, for example now the timing should be independent of the machine you run it on, and it will now run under DOS as well as GNU/Linux 89prog-mod. Source code (89prog.c) and compiled executables (89prog for GNU/Linux and 89prog.exe for DOS) are provided with the design documents. Hook up your programmer to the parallel port, insert your 8252, and power up the programmer. Run 89prog, feeding it your Intel hex file like this:
> 89prog bass.hexIf your parallel port is not at the common address of 0x378 you will need to specify the address explicitly on the command line. Run 89prog without arguments to get a usage message that explains how to do this.
Be careful when you disassemble the Bass. It's easy to break wires off, especially at their solder points. See my little tirade below about strain relief.
It's tricky to mount the toggle switch, the mode switches, the LED, and the microphone in the Bass. You will need to get creative here. I recommend trying to mount everything on the rear surface of the Bass' plaque, so that from the front the Bass does not appear to be modified. Be sure to have some gap-filling superglue and some hot-melt glue on hand.
When attaching things that stick out the back of the plaque, keep in mind that if you want to be able to mount it on the wall then whatever you attach will need to protrude less than the mounting feet do. This can complicate things, for example in order to mount SW4 I ended up soldering a stiff wire loop to its knob so that I could mount the switch parallel to the back plate of the plaque. This technique is shown in Photo 5.
|
|
||
| Photo 5: Mounting technique for SW4. | ||
As shown in Photos 2 and 3, I used a JALPC-3 solderable perfboard from Hosfelt Electronics to build the bulk of the circuit. Point-to-point wiring is used throughout. Use sockets for each of the ICs, and complete all soldering and check everything twice before you insert them.
You'll find that there will be quite a few wires to connect the circuit boards and other parts together. Use stranded hook-up wire, and be very careful about strain-relieving it at each end. For example, when attaching a wire to the added board, you may want to slightly enlarge one of the holes xacto-reaming, pass the wire with insulation through the enlarged hole (from the component side to the solder side), and then solder the wire down. When connecting the head/tail/mouth control wires to the original board you will probably want to use plenty of hot-melt glue for strain relief. In fact, you should also put big blobs of hot melt around the solder points of all the original wires in the Bass. There will likely be a lot of playing around and rearranging things as you work and it will be really annoying if during all this you overstress some wires and break them off.
Please let me know if you complete any of these modifications, or if you think of any other good ones.
These pages have had over 100,000 hits since creation.
Please feel free to email me if you are interested in the Bass. I regret that I may not be able to reply personally to all email received.
I, Marsette Vona, have no relation to the manufacturer of the Boogie Bass, the Billy Bass, or to any other company mentioned on this page. Modifying your Bass as described on this page will likely void any warranty that it may come with.
THIS INFORMATION AND/OR SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS INFORMATION AND/OR SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
| vona@mit.edu | © 2008 Marsette Vona | Thu Oct 2 13:10:22 EDT 2008 |