Large Scale Central

My idea to make a very inexpensive sound system with a Rasperry Pi Pico

A while ago I was thinking of a way to make a sound system without requiring the soundboards that are so very expensive. The engine I want to modify is a Rogers 2-4-2 because it works in 1/29 scale (see one of my previous posts for proof and details), is relatively strong with 2 motors, is a small engine that still has nice prototypical uses like passenger service, and also suits other personal preferences.

Nowadays microcontrollers like the Arduino and Rasperry Pi Pico are broadly available, and very cheap as well. The one I have in mind is 7$. Considering that budget sound boards are 100$, and aren’t complete kits, you may see where I am going here. (Edit: this post will not discuss soundboards which don’t actually have things like an audio amplifier and are incapable of playing sound files like computers do, e.g. the 2-4-2’s sound tender’s “artificial” chuffs.).

My idea is to wire a controller up using a circuit setup to get smooth DC from the track power. It will then power a speaker (by means of an audio amplifier) and also perhaps a smoke unit. A reed switch will detect quarter rotations by means of axle-mounted magnets.

With PWC, the engine can theoretically get power when the engine isn’t running at all. Credit to George Schreyer and his old blog page for details on this part. A diode rectifier, large capacitor, small 0.5uf capacitor, then connected to a buck converter (much more efficient than old regulators and also large current bonus since target VC is very low!) from which the microcontroller will be powered. MOFSET switches can be employed for the microcontroller to control high-voltage products such as the Seuthe unit.

Since the microcontroller itself is basically a mini-computer, this means we have access to flash storage via USB, audio handling, and anything else I’m willing to program. (Oh yeah, this all requires at least a basic level of programming. I have years of experience in the matter but nowadays there are many very easy-to-learn options as well such as, I dunno, CircuitPython). I really want to emphasize here that the sky is the limit, almost anything you can imagine is possible, and for a fraction of what any other option would cost.

Here are some basic schematics I drew. Not done very well, but it explains the idea just fine.

To get a rough idea of how much this will cost…

  1. Magnets + reed switch: ~$6
  2. Seuthe Smoke Generator (optional) $22 (+5$ shipping)
  3. optional pipes. 3$ or free if you improvise something out of scraps
  4. Diodes for rectifier, ~$2
  5. Capacitors, <$2
  6. Buck converter, $5
  7. Rasperry Pi Pico wireless with pre-soldered headers, 7$
  8. MOFSET switch, $2
  9. Amplifer, ~$7
  10. Speaker, ~$4 (I bought a pack of 4 for $15)
  11. Misc stuff I’m probably forgetting in this post, <$15
    Total: ~$60.

Plus maybe another $15 for testing stuff like breadboards, and more for tools like a soldering iron. These appliances are things that one would have in the house for all projects, so I’m not counting that towards this specific project. A person who scratch-builds one appliance is likely to want to scratch-build alternatives for other appliances.

Since the stock soundboards themselves aren’t complete kits, you will still spend a little money on speakers and such. Some require a rechargable battery which aren’t always cheap either. Let’s say we get the cheapest soundboard available which is about $100 and add 30 for its dependencies (including magnets/reed switch). $130 for a complete setup is a lot more than $60 or $70.

Edit/side note: in a battery powered setup, all you need is a microcontroller, amplifier and speaker. Reed switch and magnets are only needed if you want synchronized chuff sounds. Comparing a battery powered homemade solution compared to a soundboard and speaker solution… the micro controller, amplifer, and speaker all add up to under $20. The soundboard itself is still $100 alone so maybe $115 in a battery powered setup.

Additionally, I see the programming part as a plus; it means I have full freedom and control over the sound system and I can add pretty much any level of detail I want which you may only see in more expensive “premium” sound systems.

Sounds for things like air brakes, fire door opening, cylinder cock opening… Pretty much anything you can imagine can be added by simply adding the sound files and instructing the controller when to play what. The controller I am going to buy has wireless features so one may also remotely control it with some sort of computer. I plan on making software for my modded 3DS to control it, maybe implement motion controls for the whistle.

Anyway, this is just a plan as it is, I haven’t tested it yet so I cannot give any recommendations, so instead I am here to ask for your own recommendations. Please share any ideas, comments or feedback you have.

Thank you for reading :7

Max this sounds quite exciting. I hope you do a tutorial on your build.

1 Like

Good luck with your project. I’ve always wanted to play around with these mini controllers but never found the time to start.

Have you considered component size when using this building block approach? That could be a challenge in smaller locos.

1 Like

on smaller lokies, I put all the electronics in a trailing car…

1 Like

Thank you,

The rasperry pi is really, really tiny. In fact, I feel like fitting it into some HO engines would be very possible. It will most likely fit in an HO tender.

The rogers itself is also quite large and all the components are either really tiny or in the case of the speaker and the microcontroller, still very small (40mm speaker, 51mmx21mm microcontroller). I’m buying the one with the tender because it has 2 motors and overall better than the earlier make, so I will have to craft my own bunker, which also means more space for electronics (since the prototype was a tank engine)

Thank you! I’ll be sure to make one once I’m finished and it’s tested.

Really looking forward to see what comes of this Max. One thing I was wondering is can the RPi mix sound files, so the chuff won’t pause while the whistle blows etc if it has to swap between them. Not sure of the correct term but you’ll prob be onto a winner if they can do that.

Cheers
N

1 Like

In musical instruments it’s polyphony or polyphonic. The ability to play more than one note at a time. Early synths were not polyphonic.

With an amplifier and the CPU of the microcontroller it should be able to play multiple sounds simultaneously. The issue where it can’t is usually in non-computer based synthesized sound systems.

Max,
Very interesting. I’ve been working on a similar project using an Arduino ESP32-S3 and I2S (not I2C) class D amplifiers for the same low cost advantage.

I’m curious whether you’re using I2S for manipulating sounds and communicating with your amplifier(s) or had other software libraries in mind.

A 3W amplifier in a package the size of a nickel is hard to beat. And the Arduino isn’t much bigger, maybe the size of a quarter. Throw in a micro SD card reader and you’re all set.

Here are the ones I’m using:
MAX98357
ESP32-S3 “Super Mini”

Thanks for sharing your project. I look forward to seeing more on this.

1 Like