Fun with hardware :)

Discussion in 'Unrelated Discussion' started by maxpowerz, August 14, 2015.

  1. maxpowerz

    maxpowerz Post Master General

    Messages:
    2,208
    Likes Received:
    885
    In an attempt to add high quality sound effects to my homemade laser tag kit for RC vehicles I ended up with this,,



    8 bit hardware cranking 8 bit tunes :)
    crizmess and cdrkf like this.
  2. cdrkf

    cdrkf Post Master General

    Messages:
    5,721
    Likes Received:
    4,793
    That is awesome :D

    Edit: Where did you get the music from?

    Edit edit: Sounds like you've got some nice reverb on there?
  3. maxpowerz

    maxpowerz Post Master General

    Messages:
    2,208
    Likes Received:
    885
    The song I used is an old keygen song I had laying around it's a modtracker based tune.
    I zipped it and uploaded it to this post so you can play with it , It should play in milkytracker or VLC media player..

    Here's what it looks like in it's raw form playing on a modtracker.


    I got it playing on the arduino by converting it to 8 bit 16khz PCM and placed the converted song onto an SD card.
    And im using one of the 8 bit timers to read the data off the SD card and play it back by modulating the output of one of the digital out pins.

    To get sound out of the speaker I'm using a transistor as an amp by connecting a speaker to 5v and the collector of the transistor, I connected the emitter to negative and the base connects to the pin creating the modulated output.
    This allows me to run higher wattage through the speaker without burning out the arduino.

    Example pic..
    wav player.jpg

    I ended up using a BD139 transistor as it has a much higher current handling capacity compared to the BC546b one in the pic.

    Attached Files:

    dom314, crizmess, cdrkf and 1 other person like this.
  4. cdrkf

    cdrkf Post Master General

    Messages:
    5,721
    Likes Received:
    4,793
    I never realised playing back audio like that could be so simple... :) I duno what I expected really, it's just the more you learn about electronics, the more astonishing it is that seemingly complicated procedures can be broken down into such simple component parts.
    maxpowerz likes this.

Share This Page