DIY sound decoder

J911 Jul 23, 2016

  1. J911

    J911 TrainBoard Member

    497
    31
    10
    Update:
    The hardware is done. Now what is the hard part are the sound files. Will place a youtube link when complete from start to finish.

    Sent from my SM-G920P using Tapatalk
     
  2. ashu913

    ashu913 New Member

    2
    1
    4
    youtube链接?
     
  3. RT_Coker

    RT_Coker TrainBoard Supporter

    517
    33
    13
    I am very interested in your sound project. Just look at what DCC++ has already accomplished. Open-source experimentation is a great way to get improvements into the hobby, keep cost down, and most importantly bring new and younger people into the hobby.

    Just so happens that I have bought steam locomotive with a tender that is designed for sound installation. I plan on initially putting a cheap ($4) Bluetooth-sound-board in with the OS-DBTC hardware.

    Bob
     
  4. DougL

    DougL TrainBoard Member

    81
    46
    6
    Sounds like fun! (pun intended)
    I think the youtube link got munged - it shows Kanji characters

    For starters there are many libraries of sound effects. With more effort you might clip sound bytes from youtube. Not the decoder manufacturer videos, that would be wrong.
    -Doug
     
  5. Greg Elmassian

    Greg Elmassian TrainBoard Member

    325
    61
    15
    OK, I made my last comment in early August, 5 months ago.

    So, now you say the hardware is finished, so you can answer these questions:

    1. What "quality" of sound are you going after?
    2. Your system MUST be polyphonic to some degree, so how many independent channels are you using?
    3. What power output and type of amplifier are you using?
    4. What bit rate are the sounds running at?
    5. How do you handle changes in load being reflected in the sound?

    All of this is hardware, so I'd like to know, or did you really build a "glorified MP3 player" with no ability to change speed, attack rate, synchronize with speed etc.

    Greg
     
  6. Scott Eric Catalano

    Scott Eric Catalano TrainBoard Member

    205
    57
    6
    Was wondering what the status of this project is?
     
  7. gatrhumpy

    gatrhumpy TrainBoard Member

    705
    89
    17
    It has been a while. Methinks he ran up against a problem he could not solve.
     
  8. wvgca

    wvgca TrainBoard Member

    365
    172
    17
    i did a diy decoder with bemf a while ago.....no sound though ..
    curious about this one ??
     
  9. J911

    J911 TrainBoard Member

    497
    31
    10
    Hey All,
    I did NOT hit a wall. One member rubbed me the wrong way and I took my toys and went home. In addition I work in the medical field. I am a home hobbyist and a new father. I've ran into several old guard electrical theoriest of days long past that can't wrap their head around all the new possibilities out there. I'll post some stuff upcoming to help people along using open source. That way nobodys work goes to spoil. The most difficult aspect I can say in this project or anything to do with sound is the coding. Everything requires condensing. If you are looking for help with animations or sound, please PM me.

    Sent from my SM-G970U using Tapatalk
     
  10. sidney

    sidney TrainBoard Member

    331
    241
    8
    im not ho but interested in your work for sure. screw nay sayer's man build on . dont take your toys an go home we want to play with them too. hahahah:sneaky::ROFLMAO::D think positive man stay positive
     
  11. UnintegratedCircuit

    UnintegratedCircuit New Member

    2
    0
    1
    Quick bump to this thread (I hope it hasn't gone dead), you might wanna check out the Teensy 3.x/4.x for this. A beautiful Arduino library and Graphical User Interface (GUI) have been created for polyphonic audio. Also on the audio library page (see the link below), is a 40+ minute video tutorial that is very well-spoken and guides through the basics. In the video they use a 'shield' (think of it as an expansion board); however, this isn't technically necessary, assuming you can live with 12-bit mono audio (I'm guessing most locos would only require mono anyway, right?) which can be provided by the stock Teensy board from version 3.2 up (I believe).

    For $20 (€17.52, £14.62 at the time of writing), you get a beefy microcontroller that can handle polyphonic audio (and the real-time mixing thereof) in a relatively easy-to-implement manner, along with all the other features you could ever possibly want. Given that it can use the Arduino IDE, programming and coding is 1) relatively easy 2) free, and also the entire thing is 1.4" x 0.7" (approx 36mm x 18mm) This is not an advert for it, by the way, just seems like the right tool for the job.

    Oh, and the link: https://www.pjrc.com/teensy/td_libs_Audio.html
     
  12. wvgca

    wvgca TrainBoard Member

    365
    172
    17
    sound adds a whole world of confusion, there are many ways to go, just look at the commercial offerings out there ..
    when i did my home brew diy decoder, the original didn't have sound, so neither did mine..but all the coding [done by merg] fit nicely onto a five dollar pic, mine wasn't a whole world cheaper [around ten bucks], but gave the capability of adding extra functions [in my case it was firebox flicker through a smd LED]
     
  13. UnintegratedCircuit

    UnintegratedCircuit New Member

    2
    0
    1
    Ah yeah, the majority of DCC decoder-ing I think (emphasis on the think, I haven't actually tried yet) would be relatively easy. Worst case I could attempt to just replicate the function of CVs that are currently implemented. I already have code for pseudo-random number generation for flickering thanks to other projects of mine, PWM dimming is pretty easy to do on modern microcontrollers, etc.

    The tricky bits (for me at least) would come from stuff like motor torque compensation at low throttle settings and (obviously) sound; however, the Teensy would help hugely with the sound aspect, and also offers far more processing power for other various activities. A potential issue could stem from a lack of storage for the sound loops, although that could almost certainly be fixed with an external memory IC.

    I don't currently have the time going spare to chase this Teensy-based sound decoder, but others may do, and I may too at some point in the future.

    I've already had some pretty wacky ideas thus far, electronically speaking, although I have yet to pursue any properly... This was just one of many, and I only started looking into it today so it may turn out to be completely unfeasible, but hey, worth a try, surely?
     
  14. hawkdriver

    hawkdriver TrainBoard Member

    20
    56
    2
    Great outcomes have small beginnings.
     

Share This Page