Fitting a mini MP3 sound system in a loco

What is your latest project?
Post Reply
User avatar
gregh
Trainee Driver
Trainee Driver
Posts: 566
Joined: Sun Apr 01, 2018 5:44 am
Location: Sydney, Australia
Contact:

Fitting a mini MP3 sound system in a loco

Post by gregh » Fri Jun 14, 2019 6:41 am

I have finally got around to fitting a miniMP3 player in my small #18 diesel. I had lots of problems that I finally tracked down to bad batteries.
It turned into a major exercise, having to replace the batteries, and then fit better speakers.
And it’s not particularly successful.

Loco 18 was given me by a friend of a friend and seems to be an LGB steam cab with a diesel hood added. Everything about it is so ‘unusual’, that I christened it ‘Ugly’.
When I received it, 8 years ago, I fitted six, NiMH batteries in every nook and cranny, incl 3 in the cab, 2.4GHz RC and one of my picaxe sound generating systems in the hood. The speaker was a tiny 1” Mylar type in the cab ceiling – the only place I could think of. It had an open doorway at the rear of the otherwise enclosed cab.
18 combined.jpg
18 combined.jpg (283.81 KiB) Viewed 3872 times

The sound was always ‘hopeless’ and since I am hoping to use it as the main loco in my still-dreamed-of indoor line, It was a natural for experimenting with the miniMP3 player and recorded sounds.
See the details of the mp3 player here https://gardenrails.org/forum/viewtopi ... 37&t=12308
So the old picaxe sound circuit was removed. I made a new board with the mp3 and another picaxe to control the mp3. The picaxe measures the motor voltage (speed) and plays five, different sound tracks, depending on motor voltage. It also controls the volume depending on whether the loco is accelerating or slowing. The playing of the sound tracks and volume are controlled by serial commands from the picaxe to the mp3, via a single wire. The mp3 includes quite a good amplifier.

There is an ‘engine starting’ track that only plays at power on. Then an ‘idling’ track, a ‘low speed’ track, a ‘medium speed’, and ‘top speed’ track.

I hoped that just three different sound tracks of engine speed (RPM) would be sufficient to sound ‘good enough’ and that the ‘jumps’ between the tracks would not be too noticeable. The tracks are all only about 5 seconds long WAV types and just ‘loop’ again and again, with no sound gap between tracks. There is a very short gap when changing between tracks.

My first installation just wouldn’t work, but I finally tracked it down to bad batteries which allowed low voltage dips to reset the mp3. So I decided on my first use of 18650 Li-Ion batteries. (I’ve used plenty of LiPo.) Two of them (2500mAh) replaced the six, 8 year old, NiMh 2300mAh cells. They are a bit larger than the AA cells so I had to hack the body about a bit. But least I could remove the three cells from the cab. (I learned that the 18 in 18650 refers to the dia and the 65 refers to the length.)
It still didn’t work.
After more experimenting, I found that the mp3 must have ‘enough time’ to start up before the picaxe starts sending commands. So a simple 1 second delay and finally the mp3/picaxe worked, but the sound was still ‘hopeless’ with the tiny speaker. Initially I had mounted a small oval (“laptop”) speaker in the cab ceiling. But the volume was not great and mounting a speaker directly against the ceiling causes the bass to be lost. How to improve the sound?

I had a couple of these small oval shaped speakers spare, 40mm x 20mm.
laptop speaker.jpg
laptop speaker.jpg (78.52 KiB) Viewed 3872 times

Two of them just fitted side-by-side in the doorway, and putting a wooden slatted gate in front didn’t seem to affect the volume. The cab provided a nice ‘enclosure’.The 8 ohm speakers are connected in parallel and provide much better volume.
speakers in door combined.jpg
speakers in door combined.jpg (355.93 KiB) Viewed 3872 times

Just for interest, this what the installation looks like from under the body. The batteries extend down into ‘battery cupboards ?’ under the running board.
loco 18 all installed2019.JPG
loco 18 all installed2019.JPG (452.57 KiB) Viewed 3872 times

Total cost about 25AUD or say 13GBP for the player, TF card, picaxe, 5V regulator and speakers.

So where did I get the sound tracks?
I searched for diesel loco or truck sound files on the web, making sure there was no mention of copyright. A friend supplied some more sounds from his own videos.
I then used the free program, Audacity, to mix various sounds together and to change the ‘speed’ of the files.

Would I do it again? Probably not in a loco. It’s a lot of work finding and producing the sound files and then writing the picaxe program. I’m still not happy with the higher speed diesel sounds – they are just a ‘roar’. The mp3 is probably better for playing lots of different sounds such as at a station.

More than likely, the original picaxe diesel sound generator would probably have been good enough if I had just upgraded the speaker.

Here’s the link to a video so you can hear it. At the end of the video, I show a similar small diesel with one of my picaxe sound generating systems, for comparison.
Greg from downunder.
The Sandstone & Termite's website: https://members.optusnet.com.au/satr/satr.htm

User avatar
philipy
Moderator
Moderator
Posts: 5033
Joined: Sun Jan 30, 2011 3:00 pm
Location: South Northants

Re: Fitting a mini MP3 sound system in a loco

Post by philipy » Fri Jun 14, 2019 8:10 am

Thats a lot of work Greg, but I think I agree with you that the final loco with original system sounds better.
Now that you've solved the battery installation and the speakers, is it worth replacing the original Picaxe?
Philip

User avatar
FWLR
Driver
Driver
Posts: 4262
Joined: Sat Aug 05, 2017 9:45 am
Location: Preston, Lancashire, UK

Re: Fitting a mini MP3 sound system in a loco

Post by FWLR » Fri Jun 14, 2019 2:55 pm

I actually think the MP3 is ok, but it's just ok. The picaxe though does sound far superior and not to much bass, which I think is wrong with the MP3.

Still it's far better than I could ever dream of doing, so well done Greg.

User avatar
gregh
Trainee Driver
Trainee Driver
Posts: 566
Joined: Sun Apr 01, 2018 5:44 am
Location: Sydney, Australia
Contact:

Re: Fitting a mini MP3 sound system in a loco

Post by gregh » Sat Jun 15, 2019 8:13 am

FWLR wrote: Fri Jun 14, 2019 2:55 pm ....The picaxe though does sound far superior and not to much bass, which I think is wrong with the MP3.
And I thought the bass was too weak! May be my old ears??

Philip - Maybe in the future I'll put the picaxe sound back in, but at present I'll keep it as a 'test bed' for if I find some better sound files.
Greg from downunder.
The Sandstone & Termite's website: https://members.optusnet.com.au/satr/satr.htm

User avatar
ge_rik
Administrator
Administrator
Posts: 6497
Joined: Sun Oct 25, 2009 10:20 pm
Location: Cheshire
Contact:

Re: Fitting a mini MP3 sound system in a loco

Post by ge_rik » Sat Jun 15, 2019 9:08 am

Do you think it's related only to the quality of the sound files Greg, or do you think the MP3 solution will never match up to the Picaxe version? I've not yet started experimentations with my MP3 modules. Just wondering if it's worth the effort.

Rik
------------------------
Peckforton Light Railway - Blog Facebook Youtube

User avatar
gregh
Trainee Driver
Trainee Driver
Posts: 566
Joined: Sun Apr 01, 2018 5:44 am
Location: Sydney, Australia
Contact:

Re: Fitting a mini MP3 sound system in a loco

Post by gregh » Sat Jun 15, 2019 10:16 am

ge_rik wrote: Sat Jun 15, 2019 9:08 am Do you think it's related only to the quality of the sound files Greg, or do you think the MP3 solution will never match up to the Picaxe version? I've not yet started experimentations with my MP3 modules. Just wondering if it's worth the effort.
Rik
The mp3 has very good sound when I used music files and the small speakers, so there is no problem with the player itself.
The problem is finding free sound files that aren't full of horns and bells.
I understand you probably want just a single engine running sound for your small diesel, so maybe you can get that to work. At least there are no 'looping' gaps in the sound. I am reasonably happy with the idle and slow speed sounds. Those two files are actually the same except I used Audacity to speed up the idle to make the slow speed file.
It's just the higher speeds that I think sound like a 'roar'.
Greg from downunder.
The Sandstone & Termite's website: https://members.optusnet.com.au/satr/satr.htm

User avatar
philipy
Moderator
Moderator
Posts: 5033
Joined: Sun Jan 30, 2011 3:00 pm
Location: South Northants

Re: Fitting a mini MP3 sound system in a loco

Post by philipy » Sat Jun 15, 2019 10:40 am

gregh wrote: Sat Jun 15, 2019 10:16 am
It's just the higher speeds that I think sound like a 'roar'.
Just thinking, I thought the tick-over sounded too tinny but the first gear sounded Ok, but then the faster ones kind of blurred ( your 'roar'?).
I suspect that we are all comparing apples with every other kind of fruit imaginable, based on our individual sound set up. i.e those listening on a phone compared with a tablet, a laptop, a desktop with or without added speakers, etc. Each variant will colour the reproduced sound files differently.
Philip

User avatar
gregh
Trainee Driver
Trainee Driver
Posts: 566
Joined: Sun Apr 01, 2018 5:44 am
Location: Sydney, Australia
Contact:

Re: Fitting a mini MP3 sound system in a loco

Post by gregh » Sun Jun 16, 2019 1:54 am

philipy wrote: Sat Jun 15, 2019 10:40 am Just thinking, I thought the tick-over sounded too tinny but the first gear sounded Ok, but then the faster ones kind of blurred ( your 'roar'?).
I suspect that we are all comparing apples with every other kind of fruit imaginable, based on our individual sound set up. i.e those listening on a phone compared with a tablet, a laptop, a desktop with or without added speakers, etc. Each variant will colour the reproduced sound files differently.
Exactly. It does sound better 'in the flesh'. Videos taken with my newer camera sound terrible - overloaded I think. So used my older camera.
The sound has been through the gamut of: orig files>audacity massage and save>played in loco>recorded by camera>converted to youtube>played back through YOUR device.
Who knows what others hear! :?:
Greg from downunder.
The Sandstone & Termite's website: https://members.optusnet.com.au/satr/satr.htm

User avatar
FWLR
Driver
Driver
Posts: 4262
Joined: Sat Aug 05, 2017 9:45 am
Location: Preston, Lancashire, UK

Re: Fitting a mini MP3 sound system in a loco

Post by FWLR » Sun Jun 16, 2019 7:48 am

Well Greg, it's your'e loco and if your'e happy with it, who cares what others really think. I am sure you will get it to your liking and running on that wonderful line of your's. I can't wait to see and hear it.
You know I am an admirer of what I think is a superb line. But there is no hope of me ever seeing it in the flesh I'am afraid.... :( :(

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests