Model Boat Mayhem

Please login or register.

Login with username, password and session length.
Pages: [1]   Go Down

Author Topic: Digital sound modules for models.  (Read 2248 times)

xrad

  • Full Mayhemer
  • *****
  • Offline Offline
  • Posts: 602
  • Keeper of the Sun Dried Tomato
  • Location: Ohio USA
Digital sound modules for models.
« on: October 15, 2016, 02:45:30 am »

Thought you would like to hear about a cool product. Adafruit FX sound module. Really cheap, super small, super easy to program. 2mb memory. Can load 10 different sound tracks, each with 4-5 sounds.  you can use ten switches to activate the sounds, or play them in random. Many different options. Easy drop and load via USB.  Just add an amp. can run it all off 7.4 2s lipo.  I have a background loop running on closed 'ground,' and then this is interrupted by a 'laser fire' sound. Only drawback is that one loop has to finish before the next can play, unless you wire like I did with C-NC switch.


Here is my current project for a 'laser blaster.'   

 https://www.youtube.com/watch?v=Q1YbbmdHNFc


Logged

C-3PO

  • Full Mayhemer
  • *****
  • Offline Offline
  • Posts: 1,107
  • I thought that hairy beast would be the end of me
  • Location: Outer Rim world of Tatooine
Re: Digital sound modules for models.
« Reply #1 on: October 15, 2016, 09:19:37 am »

There is another product you might want to consider Sparkfun Wav Trigger - slightly more expensive (approx £40 in UK) - but it delivers way more functionality - it can play 14 tracks simultanesouly at 44.1khz CD quality sound.

This product was created by Jamie Roberston -  https://www.youtube.com/watch?v=K9vM_JQtero , his credentials speak for themself  (Disney sound engineer). This video is fascinating - grab a coffee and have a watch....

Some links:
Sparkfun : https://www.sparkfun.com/products/13660
Example of sound quality and multi track playback https://www.youtube.com/watch?v=UUkcs_XL5x0 ( at 2:45 on video) - video states 8 tracks but current new version handles 14 tracks all at the same time!!
How about this CRAZY MUTLI TRACK playback example - https://www.youtube.com/watch?v=HJ4qzxSFKHk the sounds are all coming from the Sparkun Wav Trigger
And this looks like real fun - https://www.youtube.com/watch?v=jlEQ4MxA5DE (jump to 6:00 to get sound) NB The whole pin ball machine is controlled by an Arduino

Whilst these examples are mainly used playing musical notes each sound is an individual .WAV file. These could equally be a Siren, Horn, Engine Sound, Seagulls, Anchor Chain noise, MayDay call, morse code  etc etc etc .

  • Supports up to 2048 uncompressed 16-bit stereo WAV files up to 44.1kHz – CD quality
  • Polyphonic! Play and mix up to 14 stereo tracks independently and simultaneously (not 8 as stated in video - product has been enhanced)
  • Real-time playback rate control and MIDI Pitch Bend
  • Can be controlled by serial commands - triggger tracks / control each tracks volume / fade in / out etc etc
  • The WAV Trigger supports both SDSC (up to 2GB) and SDHC (up to 32GB) type microSD cards
  • On-board sample rate conversion allows for smoothly changing playback speed/pitch from 0.5x to 2x. in real-time - explore this if you want to play around with throttle control of an egine
Clearly to get the most out of this product you would need a way to trigger the sounds from your RC handset - this can easily be achieved using an Arduino.

Arduino's cost as little as £6 . . .

Regards
C-3PO
Logged
I think it's the way I have learnt most of my stuff - getting very stuck first...

xrad

  • Full Mayhemer
  • *****
  • Offline Offline
  • Posts: 602
  • Keeper of the Sun Dried Tomato
  • Location: Ohio USA
Re: Digital sound modules for models.
« Reply #2 on: October 15, 2016, 01:18:16 pm »

Sparkfun does have some great products.   C3PO: You will love my E5 blaster when done!
Logged

xrad

  • Full Mayhemer
  • *****
  • Offline Offline
  • Posts: 602
  • Keeper of the Sun Dried Tomato
  • Location: Ohio USA
Re: Digital sound modules for models.
« Reply #3 on: October 23, 2016, 10:11:39 pm »

Made some more progress.  I needed a timer for the laser so that it stays on for about 1/2 second, matching the 'fire' sound. I could have used a 555 timer circuit, but I did not have enough room, AND it would not be easily adaptable.  For example, if I wanted a longer or shorter light blast, I would have to calculate resistors, or use a POT. Or I could go all digital and write a new program whenever I want to.  So I went with an Adafruit 'trinket' 8mHz which is a 2mb programmable mini processor. It is super small.  Needs 5v, plugs into desk top via USB port for programming.  These are great little programmable units but they do have some limitations. You can use them for all sorts of LED lighting, counting, timers, sampling, running servos, motors, etc...


They have bigger ones than 2mb with nearly the same footprint.  You can use Arduino IDE to program them with c, c++, etc. It took a bit of effort to find the correct steps in my program. Some corrections will have to be made to get everything to work.  For example, you will need to set the input and output pins, and download Adafruit trinket specific software so that the arduino IDE can 'see' the trinket. Pretty straight forward.  My program takes about .8mb.

If you have not checked out Adafruit website, give it try. Their prices are very low for what you get.  It was 7$ for the trinket. plenty of online resources.


https://www.adafruit.com/

When the gun trigger is pulled, the Trinket will instantly turn on the output pin #1 and keep it hot for 100msON, 10msOFF, and repeat this cycle 4x and then turn off until triggered again (unless the trigger is held, then the cycle repeats.


BUT, there is only 20ma of 5v current at the digital output pin #1. So I added a transistor, resistor , diode to allow more current to the laser. Got the parts at radioshack and built the little board bottom left in top pic. 


So now the Trinket triggers the mini power board, which then runs the wide beam laser at about 4v. Perfect! I am still fitting the modules, which include Adafruit WAV board (which has been programmed with 2 WAV files which I revamped myself on 'Audacity' freeware (if you don't have it, you will need it for the programming). This allowed me to cut, add, amplify, fade, echo, and otherwise make this sound exactly where I want it for the background and 'fire' sounds.


Other modules/parts include a very steady 5v supply, mini on/off toggle board, LED 'running' module adapted from Vellman kit, 3.3v regulator, 20w amp (for x2 10w speakers), volume control, 1300ma 2s lipo, and momentary DPDT.....


Had to machine the plastic housing to accept all the parts, and remade the side of the housing so that the running 'blue' lights could show, and somewhat increase the chamber volume for the larger speaker.  A few extra 3mm screws and locknuts hold it all together.  Had to machine two aluminum housings for the laser, more like adapters so that it sits nicely into the original clear plastic light housing.

VID:

https://www.youtube.com/watch?v=hMQmSUYmvN4

More to come......
Logged

xrad

  • Full Mayhemer
  • *****
  • Offline Offline
  • Posts: 602
  • Keeper of the Sun Dried Tomato
  • Location: Ohio USA
Logged
Pages: [1]   Go Up
 

Page created in 0.091 seconds with 22 queries.