Skip to main content

I've been doing some looking at various remote control sound options for rolling stock, I've tried several audio modules, and I have a couple different types still in the pipeline that I have yet to receive.

 

I started with the WTV020-SD-16P, but it was a disappointment.  It's factory programmed for a specific function set, and they have all been for an MP3 player with just forward space, backspace, etc.  I want one that I can select specific sounds.  It also required AD4 files, so I had to go through a conversion raindance.  The audio output was pretty weak, so I'd probably need an amplifier as well.  If you are thinking of this application, I'd pass this one by.  It's only positive attribute is that it's cheap, and you really do get what you pay for!

 

 

 

I then tried the BY8001-16P, and this one works much better.  Not only is it a better quality board, but it has a better micro-SD slot and tons better audio!  It has five pins that you can selectively ground and play any of the first five sounds on the SD card.  It also accepts pretty much any MP3 file without any problems.  You can move some function selection jumper resistors and change it to a computer controlled module, that will probably be the next experiment.  With the computer control, you have access to any sound on the SD card, potentially thousands of them!

 

BY8001-16P

 

Having a worthwhile sound module, I set about pairing it with the wireless transmitter so I could remotely trigger sounds.

 

I already have a couple of these 4-Channel Wireless Remote packages, so I used one of those.

 

4-chan Remote

 

In order to interface these, I need a logic inversion as the remote receiver puts out a high signal for a button press, and the sound module expects the pin to be grounded to trigger a sound file play.  I started by testing two channels, so I just added a transistor to invert the button press and trigger the sound module.  Obviously, for the "production" unit, I'd probably use a single chip open collector inverter, but I didn't have one handy...

 

Here's the test setup.

 

Sound Module First Test

 

Some observations...

 

The module is pretty bulletproof, it's a very nice and well behaved unit.  If you need high quality sound, this will certainly do it, and it will pump out all the volume you need as well.

 

The remote is OK, but I'm somewhat disappointed with the range.  I found that both the transmitter and receiver needed a lot longer antenna for any decent performance.  With my "clip lead" antenna extension on each, I got about 30 feet reliably, and spotty performance at 40-45 feet.

 

I'm still in the development stage, but I can see that this can work.

 

Any ideas for better transmitter/receiver options are welcome.  Obviously, it has to be small as this whole rig is intended for rolling stock.  My next step will be to put this rig into a boxcar and see how it behaves at the club layout.

 

Attachments

Images (3)
  • BY8001-16P
  • 4-chan Remote
  • Sound Module First Test
Original Post

Replies sorted oldest to newest

I think I know why the transmitter doesn't have decent range.  When the MP3 module is actually playing a song, it's stomping on the RF signal to the receiver!  It works great to start the first sound, but if I want to change the sound from the transmitter, I have to be pretty close to the receiver to get it to work.

 

Although I wasn't initially going that way, I think I may try mating an ERR MiniCommander ACC module to this sound board and have TMCC control directly.  I was hoping for better range from the RF solution, but there's more than one way to skin this cat.

 

Originally Posted by Bob Rumer:

Wow! Great idea Gunrunner. I can visualize a boxcar with an open door, a figure setting and holding a guitar. The sound would be Jimmy Rogers singing Train Whistle Blues!

 It would be really cool if I used one of my RC servo units and opened the door under remote control.

 

Last edited by gunrunnerjohn
Originally Posted by sinclair:

I would look at getting a unit if I could use it to open doors.  Also, what about using a reed switch and cam/magnate on an axle to trigger sounds, kinda like the VL sound reefers and tankers?  I would so love to add those kinda of sounds to my freight cars.

Now you're launching into computer control and more complex audio effects.  In order to duplicate what the VL tankers have, you have to mix audio channels.  It's certainly possible, but not nearly as simple as triggering discrete sound clips to play.  I seriously doubt I'm going to launch into that kind of development effort here.

 

After getting a basic rig running, I do plan on introducing the processor to expand the capabilities, that will be the next step.  I want to get some experience with the sounds and build a few cool projects first.

 

 

The opening doors is not that difficult, but it will require the addition of the processor.  The model airplane servos I use are PWM controlled with one input.  You can have the door move at any reasonable speed just by controlling the PWM output.  Arranging it to open the door is pretty simple, and the servo has plenty of torque to do the job, if the door sticks, it's liable to pull it off the slides!

 

I shielded the MP3 player board with a tinfoil box, didn't seem to make much difference in the range problem.  That being said, I decided to go a different way and do it with TMCC anyway.

 

Here's the new interface, this will go between the ERR MiniCommander ACC board and the MP3 player module.  The opto isolators are not technically correct as TinyCAD didn't have any AC opto component, but you can get the idea. 

 

Basically, the four channels of the MiniCommander connect to the four optocouplers.  Since two of them are negative in respect to ground, this seems to be the easy way, and it's 100% bulletproof.  The output of the optocoupler is filtered  by the 22uf cap to eliminate the AC ripple from the input side.  The resultant signal is sent to the MP3 module to trigger one of four sound selections.  The MP3 module takes a connection to ground (or at least a logic zero), so when the output from the Opto is active, that's what I get.

 

If the breadboard works as I expect, I will probably immortalize this in a PCB so I can install them in more than one car.  Hand wiring a bunch of these ain't in the cards!

 

 

Edit: remove old schematic.

Last edited by gunrunnerjohn
Originally Posted by gunrunnerjohn:

When the MP3 module is actually playing a song, it's stomping on the RF signal to the receiver!  It works great to start the first sound, but if I want to change the sound from the transmitter, I have to be pretty close to the receiver to get it to work.

 

Well, there's a clue.  More than likely the module uses a Class-D switching amplifier so when driving audio to the speaker you have 5V pulses radiating EMI courtesy of the huge antenna of the long speaker coil winding.  I notice in your prototype photo that the speaker is conveniently placed next to the RF receiver to maximize the stomping.

 

So first move the speaker and wiring away from the receiver.  That might do something.  If you have one of those ferrite cores/toroids to wrap you own inductors, place it near the module output and wrap the speaker wires thru it.  If that shows improvement but not enough, google "class-d emi filter" or something like that and install an engineered L-C filter right on the module.

 

Yes, I'm imagining how easy the job is...but IMO the greater contribution to the hobby would be if this was not dependent on using an ERR module to gain remote control...which would leave out conventional, DCS, DCC, etc. users.  

Stan, I moved the speaker way away, and had the receiver and MP3 module 6" from each other.  I also shielded the MP3 module totally with a little tinfoil box, trying grounding the shield to a variety of places, negative, earth ground, etc.  No joy with anything I tried, the range didn't change much, if at all.  I think I've expended about all the effort on getting that RF solution to work.

 

While the TMCC solution isn't for everyone, part of this exercise is for a solution that I can use.  Being somewhat selfish, I'd like something that can work for me.  If a different module works better (I have several more coming), I may revisit the RF solution.

 

 

 

I ended up rethinking a bit of the logic for the MiniCommander to solve one vexing issue I had.

 

I have four outputs, so I can trigger four sound files.  One issue is that with the MP3 module, there is no easy way to stop it playing without using the serial computer interface.  Since I'm simulating push buttons, I can't stop the audio.

 

I figured a way, I put a 5th audio file that's just a short silent recording on the SD card and I can trigger that to stop the sound.  Of course, that brings up another problem, how do I get a 5th output from the MC?  I think I've solved that one with the following additions to my interface board.

 

Since the LC1 and LC2 outputs toggle on and off with discrete keys, they're normally used to turning on and then turning off the output for the sound you'd like to play as the MP3 module is edge triggered.  In order to trigger the 5th output, I turn on LC1 and LC2, this normally would just play the last one selected.  However, with the addition of a couple of gates, I generate a slightly delayed pulse to the 5th input to play the 5th song, which is the short silent one.  That results in the sound module being silenced.

 

I could have also just used three sound files and had the 4th be the silencing one, but I'd like to support as many different sounds as possible.

 

Yet to be determined is if I need a delay for the logic circuit to insure the 5th trigger really does the trick, but the logic seems right.

 

 

 

MiniCommander MP3 Module Interface

Attachments

Images (1)
  • MiniCommander MP3 Module Interface
Last edited by gunrunnerjohn
Originally Posted by gunrunnerjohn:
With my "clip lead" antenna extension on each, I got about 30 feet reliably, and spotty performance at 40-45 feet.

 

Originally Posted by gunrunnerjohn:

I think I know why the transmitter doesn't have decent range.  When the MP3 module is actually playing a song, it's stomping on the RF signal to the receiver!  It works great to start the first sound, but if I want to change the sound from the transmitter, I have to be pretty close to the receiver to get it to work.

So to be clear, you got 30' "reliably" for which functions / under what conditions?

 

I understand you back-burnered the direct RF remote for now, but in the context of an O-gauge layout what would you (or anyone else following along) consider to be decent range?

 

I like the door-opening idea as it fits with so many other rolling-stock accessories where you trigger it, the door opens, something happens, the door closes.  Is anyone else following along?  If there is really interest in mating some kind of mechanical action to the sounds, I've been messing with the idea of using a stereo MP3 module to put sound on one track and mechanical commands on the other track.  For example a series of audio bursts can be sent not to a speaker but to a 25 cent bridge-rectifier to create the DC pulses to drive a PWM hobby servos that GRJ mentions.  Maybe someone has done this already but that would be one way to synchronize sound and motion without requiring a processor chip and writing software.

If the audio isn't running, when I key the first sound file, whatever it is, I can usually trigger it from 25-30 feet away in the next room.  However, once the audio is playing, 4-5 feet is about all I get.

 

When I get a chance, I downloaded a couple of detailed filter descriptions for Class D EMI filters, maybe that will make a difference.

 

That's an interesting thought with the stereo, the little module I'm testing with has stereo output.  You could really just record the PWM data stream on one channel and the audio on the other.  With a simple gate you could square up the PWM data from the tape and feed it directly into the model servo.  I don't know if you could use the on-board amp to play the audio channel, as it being mono, I assumed it was mixing the two channels.  That may be a false assumption.

 

Here's the pinout of the module I'm using right now.

 

 

 

 

BY8001-16P Pin Descriptions

Attachments

Images (1)
  • BY8001-16P Pin Descriptions
Originally Posted by gunrunnerjohn:
When I get a chance, I downloaded a couple of detailed filter descriptions for Class D EMI filters, maybe that will make a difference.

 

...

I don't know if you could use the on-board amp to play the audio channel, as it being mono, I assumed it was mixing the two channels.  That may be a false assumption.

 

Well, easy for me to say, but how about connecting an 8 ohm resistor (or whatever your speaker impedance) right at the module output so as to create an equivalent load.  Then when you start a song does the RF range decrease?  I really believe it's the Class-D hi-frequency modulation radiated over the speaker wires killing your RF as I'm quite certain the RF receiver uses a super-regenerative front-end which is a vacuum cleaner of EMI (as opposed to, say, a super-heterodyne design).

 

As for the stereo stuff, it's hard to imagine taking advantage of stereo sound in a piece of rolling stock given the size.  That said, why not take advantage of the spare audio channel.  I'd think your DACR and DACL outputs are low-current outputs and you have a mono amp on board?  Otherwise you'd think they would have provided two speaker outputs.  But the DACR and DACL may actually be PWM'd output full-scale 5V - as opposed to a true linear DAC which is expensive to fabricate on an IC.  This, to me anyway, is the key to keeping the circuitry simple.  That is, the PWM DACs or Class-D amplifiers put out 5V pulses even for small audio signals; it's just the duty-cycle that changes.  It makes is so much cheaper to "square up" full-scale pulses than to amplify analog signals up to the right amplitude.

Stan, I did try the experiment with an 8 ohm resistor, the range was still affected the same when a sound was playing.  I suspect you're right about the RF circuit, it doesn't have the components that I'd expect for a superhet receiver.

 

I wasn't suggesting taking advantage of the stereo in the rolling stock, that's why I figured one channel would be available for the control function. 

 

I took a look at the signals coming out of one of the DAC channels, they look like normal audio.  If they're generated with PWM, they have added filtering before the outputs.  I went pretty high frequency and didn't see evidence of full voltage excursions that I'd expect with PWM.  Here's a few samples of my test sounds at the left DAC output, I assume the right would be similar.

 

Coal loading into tender

Scope Coal Loader Sounds

 

Reefer Compressor

Scope Reefer Compressor Sounds

 

Track Running Sounds

Scope Train Track Sounds

Attachments

Images (3)
  • Scope Coal Loader Sounds
  • Scope Reefer Compressor Sounds
  • Scope Train Track Sounds
Originally Posted by gunrunnerjohn:

I did try the experiment with an 8 ohm resistor, the range was still affected the same when a sound was playing.

Geez.  You're probably thinking I've sent you snipe hunting .  Well, maybe time to give the direct-RF remote a rest and focus on the TMCC version since that's what you need. If you do come back to it, there's more snipe hunts available to the hunting enthusiast - conducted susceptibility via the power or i/o lines.

 

I remain convinced that a low-cost remote "system" to activate rolling-stock anywhere on the layout is something O-gauge could really use.

I took a look at the signals coming out of one of the DAC channels, they look like normal audio.  If they're generated with PWM, they have added filtering before the outputs.

That's pretty slick if they integrated the filtering on the chip and/or module.  As I recall, some microcontroller chips that feature "analog" output pins are BYOF (bring-your-own-filter).  Of course for this hack of using the spare audio track as a control channel, I'd rather have the digital pulses but that's tomorrow's problem.  Thanks for taking those scope shots, I can see the 1/2 scale DC offset on the DAC channels. 

 

As you may recall, I'm fiddling with the barebones $1 MP3 module plus external amplifier module. I'm finding each O gauge application has some quirk to work out.  For example, in the case of servo PWM, to get the pulse timing resolution to smoooothly rotate the mechanism, let's say you want 1 part in 100 resolution.  Since the pulse width varies about 1 millisec for full servo swing range, that means a pulse resolution is 10 microsec.   Back-of-envelope says that requires a sample rate of at least 100 kHz.  Well, for example, I see your MP3 module specs a max sample rate of 48 kHz...and I'm sure my MP3 module is no better.  So then you start playing games...or as the saying goes all ideas eventually degenerate into work.  I'm just learning about how the MP3 compression algorithm and these low-cost MP3 chips handle DC-coupled digital pulse streams.

 

 

 

I did more reading on class-D EMI suppression, it's obviously NOT a simple topic!  Boy, some of the stuff I've found is really deep!  Many of the discussions get into to EMI stuff I used to do for avionics, however I don't have the equipment or testing facilities that I had available back then.  When you had OPM to buy all the toys, it was a lot easier to work on some of these issues. 

 

Many of the references were to using ferrite beads and small capacitors across the speaker leads to minimize the problem, including some specific application examples.  With that in mind, I ordered some trial components to see if adding filtering right at the MP3 module might improve the situation.  No certainty, but it's worth a shot.  I do agree that having a generic capability without TMCC in the mix would be a good thing, but it's getting there that's the issue.  I think I may be able to stomp on much of the higher frequency EMI from the amp, we'll see when the parts arrive.

 

Another approach would be NOT to use the amplifier that's on the MP3 module, but rather incorporate a separate amplifier chip on the interface board.  The TI LM4861 Class AB chip would probably generate a lot less EMI.  That's what might have to happen in order to solve the EMI issue, after I try a filter I'll know.

 

There are also modules that play WAV files, which would solve the problem of dealing with MP3 files.  The module I'm using is one of those.

Add Reply

Post

OGR Publishing, Inc., 1310 Eastside Centre Ct, Suite 6, Mountain Home, AR 72653
800-980-OGRR (6477)
www.ogaugerr.com

×
×
×
×
Link copied to your clipboard.
×
×