8 ch MP3 RC Sound Unit by Alan Bond
8 CHANNEL SOUND EFFECT UNIT
This project was designed to replay up to eight different recorded sound effects on radio controlled model boats, but will doubtless find application in other radio control projects. So far it has been used to great effect in several battleships to create various types of gunfire, sound horns and klaxons, make ASDIC 'pings', sound 'General Quarters', make aircraft and helicopter fly-bys etc. All the hard work is done by an embedded mp3 player module (available from Technobots) and the PICAXE chip simply serves to decode a spare (proportional) radio control channel to trigger the eight sounds.
The MP3 TRIGGER unit, as it is called, plays mp3 files stored on a micro SD card in high quality stereo. It has 18 pairs of pads, which if bridged play the track associated with the pad pair (ie shorting pads "TRIG3" will play the file "TRACK003.MP3" etc. It also has a serial interface, which if used can select up to 256 different tracks and a fast real-time volume control can be accessed too. However, this project confines itself to use of 8 of the trigger inputs. There is also a "navigation" switch on the module which can step forwards and backwards, stop and start ANY of the tracks on the card (over and beyond the eight radio controlled ones) - this could be useful in exhibitions to launch a lengthy "documentary" track describing the model. The smallest capacity micro SD card I could buy cheaply (less than £5) has 2Gbyte of storage which allows many hours of playing. The SD card has the files loaded onto it via a card reader (internal or USB gizmo) on your computer before fitting to the mp3 trigger unit. Be sure to study the documentation for the module which is available on this site. Importantly, the app note about protecting analogue outputs is the only place *anywhere* it tells you that the 3.5mm stereo jack socket audio outputs and common are sitting at 1.2vdc with respect tp 0v !!! A work-around is described.
There are a great many sound effect libraries on the web from which sounds may be downloaded, usually in WAV format, so a good sound editing package like Audacity (free!) is needed to convert them to mp3 format - it can also be useful to clean up lead-in or trail-out artefacts etc.
The PICAXE 18X chip used here has 8 outputs, which fixed the design at an 8 channel unit - though the user method of track selection I have developed makes 8 a realistic limit in any case. The (not very original) idea is to quickly 'jab' the joystick on a spare (proportional) channel N times and then hold to get sound number N. Releasing the joystick resets the joystick counter ready for further use. I chose to make the 8th sound a very brief period of silence asserted by jabbing the stick in the opposite direction thus effecting a 'cancel' command to instantly terminate any lengthy sounds playing. The first jab and hold sound should be assigned to your most frequent or important sound - like a horn for warning of collision.
Users prepared to modify their transmitters to assign a bank of switches to connect in resistance networks across the joystick potentiometers could at least double that number and enjoy very easy access to their sounds. The PICAXE 20X2 chip could then be employed as up to 17 of its pins can be assigned as outputs.
The PICAXE program is still subject to development/optimisation whilst user trials continue, so guidance on developing such a program for yourselves may therefore be questionable! I used the transmitter frame rate (50hz) as my timer element - so when the joystick exceeds the 'jab' threshold, I start counting the number of successive reads (frames) whilst the joystick remains above this threshold. If the count exceeds a value equating to eg 1/2 second I decide that the user has settled on a particular sound and jump to a decision tree to determine which it was (more of that in a moment) and send the appropriate pin of the PICAXE low to trigger the mp3 player accordingly. A second counter keeps tally of how many times the 'jab' threshold has been exceeded for periods of less than the (suggested) 1/2 second and it is this count that determines which sound the user has selected. If the joystick is stationary for somewhat longer than the typical pause between succesive 'jabs' then this counter is reset. This might sound a bit clumsy but seems to be working well in practice, once each user has tried the system a few times to become accustomed to it.
As can be seen from the pictures, the unit is easily constructed on stripboard and a 200mm servo lead is soldered in and strain-relieved with a tie-wrap to provide the input interface. The mp3 trigger module rides piggy-back on the stripboard and the trigger and 0v leads are soldered through to both make connection to the stripboard circuit and to physically secure the module. The module takes its power from the PICAXE circuit (which is in turn supplied by the receiver) by a small flying lead soldered to the module's power socket tag. I made the trigger connections using (signal) diodes to effectively turn the PICAXE totem-pole output stages into what we used to describe as open collector outputs (open drains?) This prevents the 3.3v trigger module inputs being driven up to 5v by the PICAXE outputs. Before you point out that ther spec sheet says inputs up to 5v are ok, this feels to me like a craftsman cabinet maker being made to watch a handyman hammer in screws - it may work but it makes me wince.
All the parts are available from Technobots except the micro SDcard. No provision has been made for programming the PICAXE chip in situ, so this must be done elsewhere in a slave rig.
mp3 Trigger v2 #2900-416
R1 - resistor 47k #2008-047
R2 - resistor 4k7 #2007-407
R3 - resistor 1M #2009-010
R4 - resistor 4k7 #2007-407
C1 - capacitor 100nF ceramic disk - #2013-100
Q1 - transistor BC337-16 #2300-412
Z1 - integrated circuit PICAXE18X #3803-115 pre-programmed chip
Z1 - ic socket 18 pin DIL #2700-018
D1 - diode 1N4148 #2100-030
D2 - diode 1N4148 #2100-030
D3 - diode 1N4148 #2100-030
D4 - diode 1N4148 #2100-030
D5 - diode 1N4148 #2100-030
D6 - diode 1N4148 #2100-030
D7 - diode 1N4148 #2100-030
D8 - diode 1N4148 #2100-030
200mm servo lead #3601-008
stripboard 95x64 #2700-110