Page 1 of 3

Sound cards

Posted: Wed Apr 26, 2023 8:26 am
by philipy
Not altogether sure where to post this, but this will do I guess. :D

In the past we have touched on cheapish ways to get loco sound, without going to the cost and complexity of MLS, etc. Pesonally I had some success with Rik's recordable greetings cards modules but thay do fail quite quickly. This morning, whilst looking for something else, I noticed this "Adafruit" module which seems to be almost exactly what we need.
https://thepihut.com/products/adafruit- ... 7gQAvD_BwE
Of course, it is more expensive than the greeting cards module but then again is likely to be longer lasting! There are apparently quite a few variations available and I doubt that we would need the twin amp/speaker version, https://learn.adafruit.com/adafruit-aud ... d_products
but they are all fairly small and self contained, needing only 5v power and a button to ground, to trigger the operation - it doesn't need any other microprocessor module, and they say that using a WAV file on loop there is only an imperceptible 20ms gap between repeats. I'm guessing that one of the Deltang outputs could provide the on/off grounding signal and since it can hold half a dozen or more sound files, whistles etc, might also be achievable.

They have apparently been around for over 10 years so dunno why we don't seem to have noticed them before, but maybe I'm the only one who has missed it!.

Re: Sound cards

Posted: Thu Apr 27, 2023 9:44 am
by -steves-
This looks a really good alternative, do we know if anyone has actually tried it as yet in a loco?

Re: Sound cards

Posted: Thu Apr 27, 2023 1:31 pm
by philipy
-steves- wrote: Thu Apr 27, 2023 9:44 am This looks a really good alternative, do we know if anyone has actually tried it as yet in a loco?
No idea, Steve. I only came across it by accident yesterday morning as a link, whilst looking for something else and thought it looked interesting. I'm thinking I might give it a try on my DeWinton, if and when I ever get that working.

Re: Sound cards

Posted: Thu Apr 27, 2023 4:46 pm
by ge_rik
Better value is the DF Mini Player - £3.50 off Amazon (or less than £2 from China on eBay)
https://www.amazon.co.uk/AZDelivery-PCM ... 9hdGY&th=1


DF Mini.jpg
DF Mini.jpg (58 KiB) Viewed 4331 times

Although it is often advertised as compatible with Arduino etc., it can play MP3 and WAV files with just the addition of a couple of buttons. If you add a few resistors to the buttons you can also get it to play particular tracks. See

https://wiki.dfrobot.com/DFPlayer_Mini_SKU_DFR0299

DF mini buttons.png
DF mini buttons.png (35.94 KiB) Viewed 4331 times
DF mini resistors.png
DF mini resistors.png (56.53 KiB) Viewed 4331 times



It has an output of up to 3W with a 4 ohm speaker. I used it in one of my experimental Bluetooth / Arduino builds and this is what it sounded like without any additional amplification. I think it's plenty loud enough for a garden railway loco.



I've not played around with it for simple rx triggers, push button or reed switch operation but it should be quite easy to use.

Rik

Re: Sound cards

Posted: Thu Apr 27, 2023 4:54 pm
by ge_rik
PS - If you don't want to mess around with micro SD cards then there's now the DF Mini Pro which has its own onboard memory. Files are uploaded to it through a USB cable. Like the DF mini, the sounds can be trigger by push buttons

I do have one but not had a chance to play with it yet.

https://wiki.dfrobot.com/DFPlayer_PRO_SKU_DFR0768

Rik

Re: Sound cards

Posted: Fri Apr 28, 2023 10:25 am
by -steves-
Hi Rik

I have ordered some of the little DF Players from China, £9.82 for 10 of them. I am however a little stuck for sound files, any clue as to where I could find some that would be useful for both steam and diesel outline loco's?

Re: Sound cards

Posted: Fri Apr 28, 2023 11:37 am
by philipy
-steves- wrote: Fri Apr 28, 2023 10:25 am I am however a little stuck for sound files, any clue as to where I could find some that would be useful for both steam and diesel outline loco's?
I tend to look on Youtube for a gricer who has uploaded some video of the real thing, whatever it may be, and then rip the sound track and trim out the bit I want.

Re: Sound cards

Posted: Fri Apr 28, 2023 1:39 pm
by ge_rik
-steves- wrote: Fri Apr 28, 2023 10:25 am Hi Rik

I have ordered some of the little DF Players from China, £9.82 for 10 of them. I am however a little stuck for sound files, any clue as to where I could find some that would be useful for both steam and diesel outline loco's?
I got the tractor sounds for the blue diesel off soundsnap. They have a lot of clips suitable for diesel locos (starting up, accelerating, slowing, running at a steady speed, stopping, switching off etc ) but you have to buy them. :?
https://www.soundsnap.com/tags/tractor

Rik

Re: Sound cards

Posted: Fri Apr 28, 2023 4:23 pm
by -steves-
ge_rik wrote: Fri Apr 28, 2023 1:39 pm
-steves- wrote: Fri Apr 28, 2023 10:25 am Hi Rik

I have ordered some of the little DF Players from China, £9.82 for 10 of them. I am however a little stuck for sound files, any clue as to where I could find some that would be useful for both steam and diesel outline loco's?
I got the tractor sounds for the blue diesel off soundsnap. They have a lot of clips suitable for diesel locos (starting up, accelerating, slowing, running at a steady speed, stopping, switching off etc ) but you have to buy them. :?
https://www.soundsnap.com/tags/tractor

Rik
Wow, that's not cheap is it, lol :D :thumbup:

Re: Sound cards

Posted: Fri Apr 28, 2023 4:24 pm
by -steves-
philipy wrote: Fri Apr 28, 2023 11:37 am
-steves- wrote: Fri Apr 28, 2023 10:25 am I am however a little stuck for sound files, any clue as to where I could find some that would be useful for both steam and diesel outline loco's?
I tend to look on Youtube for a gricer who has uploaded some video of the real thing, whatever it may be, and then rip the sound track and trim out the bit I want.
This sounds like the sort of free thing I could do with, but I have no idea where to start. :? Not to worry, I will find something :thumbup:

Re: Sound cards

Posted: Fri Apr 28, 2023 6:51 pm
by philipy
-steves- wrote: Fri Apr 28, 2023 4:24 pm
This sounds like the sort of free thing I could do with, but I have no idea where to start. :? Not to worry, I will find something :thumbup:
Go to Youtube and put, f'rinstance, "manning wardle 0-4-0 " into the search box. That will bring up loads of 5" & 7 1/4" loco's, but scroll down and you'll find a real one eventually. Download the video, then you can get loads of free software to rip the sound track off it. Then use Audacity or VLC ( also free) to trim it and save it.

Re: Sound cards

Posted: Fri Apr 28, 2023 7:37 pm
by ge_rik
-steves- wrote: Fri Apr 28, 2023 4:23 pm Wow, that's not cheap is it, lol :D :thumbup:
I'm sure it wasn't that expensive when I downloaded them three years ago.
Just checked and they cost me $3 per clip ($15 for five clips). Looks like it's now gone up to $4.90 per clip ($49 for ten).
I'm sure they can't blame COVID or Ukraine for that price hike!!!!

Rik

Re: Sound cards

Posted: Sat Apr 29, 2023 12:23 am
by Phil.P
It will cost more for the electricity to keep the disks spinning, and the data centre cool..

It would be 'nice' if you were to ask, before ripping off someone's recordings.
I doubt many would object, but the copyright does technically exist.

Phil.P

Re: Sound cards

Posted: Sun Apr 30, 2023 9:44 am
by Trevor Thompson
This is all fascinating.

I have been pleased with the sound card I have fitted to my 3D printed "Welsh Pony" and wondered how I could do something similar with my model of the Wren. The sound card I bought for Welsh Pony is far too big for a small loco - and I don't want to couple it to a wagon for the sound.

I will try to record the sounds I might need when I visit railways this year - that will solve any copyright concerns.

I wonder it I could create a clip of one "chuff" and save it as a clip, then trigger it from a reed switch to synchronise it with the piston movement? Would it respond quickly enough?

Trevor

Re: Sound cards

Posted: Sun Apr 30, 2023 9:53 am
by philipy
Trevor Thompson wrote: Sun Apr 30, 2023 9:44 am

I wonder it I could create a clip of one "chuff" and save it as a clip, then trigger it from a reed switch to synchronise it with the piston movement? Would it respond quickly enough?
Something along those lines also crossed my mind. It was just a random thought and I never did anything about it, but I suspect the response time would be a prob, as you suggest. With Rik's original greetings card module there was a noticeable gap as it reset to the begining of the track. The Adafruit board suggests a 20ms gap for their larger and more sophisticated unit using a WAV file but 120ms gap for an OGG file

Re: Sound cards

Posted: Mon May 01, 2023 7:54 am
by ge_rik
philipy wrote: Sun Apr 30, 2023 9:53 am
Trevor Thompson wrote: Sun Apr 30, 2023 9:44 am

I wonder it I could create a clip of one "chuff" and save it as a clip, then trigger it from a reed switch to synchronise it with the piston movement? Would it respond quickly enough?
Something along those lines also crossed my mind. It was just a random thought and I never did anything about it, but I suspect the response time would be a prob, as you suggest. With Rik's original greetings card module there was a noticeable gap as it reset to the begining of the track. The Adafruit board suggests a 20ms gap for their larger and more sophisticated unit using a WAV file but 120ms gap for an OGG file
I found there was a negligible gap when using WAV files on the DF Player but it was noticeable when using MP3s

Rik

Re: Sound cards

Posted: Tue May 02, 2023 7:20 pm
by -steves-
Well I got my df player a short while ago and run a 5 second wav file on loop. Although there is only a short time between the loops it's enough that you can clearly hear it. Any suggestions? I could loop the file and make it a single longer file which might be enough to help but willing to take on any suggestions at this point.

I will try it as other file types tomorrow and see what happens. It does sound quite good with a decent speaker behind it.

Re: Sound cards

Posted: Tue May 02, 2023 11:08 pm
by gregh
I did a bit of work with these some years back and did post on this forum. This link might help if you can manage to read right through and follow its links.

https://gardenrails.org/viewtopic.php?f ... p3#p147610

Re: Sound cards

Posted: Wed May 03, 2023 11:19 am
by -steves-
Maybe one of you clever bods can help me with this issue.

I have either a 8.4v battery pack or a 12.6v battery pack and need to run the DF Player from > 5v. Sounds a simple enough thing to sort, but ideally I don't want to have to buy a full on regulator board for each one, I would prefer something really simple that I can solder/build up at home on the cheap.

Ideas please? Many thanks :D

I have just found that a 7805 regulator and a couple of capacitors might do the job, but finding the components at a reasonable price seems more difficult :oops:

Re: Sound cards

Posted: Wed May 03, 2023 12:49 pm
by Phil.P
Micron BEC, 5V 1A
A mere 11x14mm.

I am sure Andy will supply as a bare board. - Or I have some here..

Phil.P