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.

Before I lose my train of thought, one other possibility if you re-visit these modules. These low-cost RF modules appear to come in either 315 or 433 MHz versions...I think that's a SAW resonator on the TX side and I can read the frequency on the can.  It could be that one receiver is less susceptible to the MP3 harmonics/noise than the other.

 

I'm focusing on the what to do with the spare audio track right now, but my to-do list now has to hook up the 4-channel RF receiver to see if it plays well with the $1 MP3 player driving the 82 cent class-D audio amp.   My 4-channel TX is 315 MHz.

 

 

I have the 315mhz units as well.  Given the nature of the receiver, I can't see changing the frequency as being the primary solution.  If the filter doesn't do it on the MP3 module, maybe the alternate amp might be better.

 

Truthfully, I'm not as concerned about keeping the cost rock bottom, I'm more interested in functionality.  I don't want the cost to spiral out of control, but anytime you have to layout and build circuit boards, it's not going to be a $5 solution unless you're the Chinese and you're building 100,000 of them.

 

For either of these versions, I want to be able to play any one of the four sound files and also stop it on command remotely.

 

 

GNR and Stan,

Gentlemen, I am enjoying this thread immensely. Both of you are obviously well versed in the subject material. I am some 40 years removed from this level of electronic detail so my voice is very small in regards to this endeavor. With the knowledge that GNR has some plan "B", plural, to tinker with I would like to note that up until this point, from my outside aspect, a 20,000 foot birds eye view in you will, there seems to be a lot of Band-Aid fixes to this issue; would a foundational level review be in order? Unfortunately, I am left with leaving you with an observation and no clear solution, which goes against a post of this sort. In short, to me, there may be another angle to tackle this problem with less moving parts. IMHO  

David, we're all ears if you have a better idea.   There is obviously a more reliable way to do all of this, but it costs more money.  The object of the exercise is to leverage the stuff that we can get very cheap to do the job for a reasonable price.  I have some more involved ideas rolling around in my head, but I'm trying to come up with something with less total expended effort.

 

 

 

Stan, I did a new design of the RF version with the filters in place right at the connection of the MP3 board.  Once I bench test the filters, if that is a positive test, I'll consider cranking out a few of these boards to see how well it works.

 

 

 

Here's the trial run of the PCB topside, the MP3 module plugs in on the right, and the RF receiver plugs in on the left facing away from the board.  The board is 1 x 1.6 in size, with the receiver sticking out the end, adds about another inch.  Should fit easily into rolling stock.

 

 

Edited to remove obsolete drawing.

Attachments

Images (2)
  • RF-Link MP3 Interface PCB
  • RF-Link MP3 Interface
Last edited by gunrunnerjohn

GNR, I am so out of my league on this issue and my hat is off to you and Stan. That said, I would go with a larger and more expensive, probably, tried and true solution and then distill it down instead of starting with the most inexpensive solution with band aid fixes to get where you want. I think you are on the right track with an FM solution using the FM carrier wave with the two sideband (read stereo) frequencies to get where you want. You are able to take it down to the IC level which gives you the advantage to distill. At the risk of repeating what you already know as a resource, Mouser.com have many industrial solutions to a duplex communications issue in a very small form factor. There is a Zigbee line of solutions that may fit the bill and are not at all expensive in the big scheme.

1. DRC would catch it but your bridge ground is floating.

2. If I were doing it, I'd change your RC delay by increasing R and decreasing C.  Resistors stay same size and same cost irrespective of value, capacitors generally decrease in size and cost for values shown.  Ceramics IMO generally more reliable than electrolytics.

3. I'd change the inverter after the RC to one of the unused HC14 gates.  Don't know about cost but it might be cheaper and smaller pkg for a single NOR than a dual NOR.  Also, for the RC time-constant you really should protect against possible oscillation on that inverter so the HC14 hysteresis will handle that.

4. Presumably you'll hold off ordering boards till you do more testing, but I'd give a bit more thought to how-to isolate the RF receiver.  This could be a simple bead filter between power-supplies should conducted susceptibility be the issue.  I also can't help think of consumer electronic devices where, when you open it, the RF module/tuner/whatever is usually in a shielded can/enclosure.  In other words, different than shielding the MP3 electronics.

 

In any event, I am genuinely excited that you are still considering a general purpose approach rather than a TMCC-only version requiring a somewhat spendy ERR module.  I understand your comment about cost, but if in the end you do need to go with a $1 microcontroller, a lot of SPI code talking to JGL's a $1 2.4GHz module I still think the cost will be reasonable.  Actually my concern is that the general OGR readership "gets" the significance of what we're talking about here.   I don't know what to do about that aspect though.

 

IMO if you can pull this off - allowing connectivity with an ASC/AIU, this will have a greater impact on the hobby than your super-chuffer and LED board combined.

Stan, the DRC didn't catch that missing trace, I was just rushing it to put it up. However I managed to screw some much bigger things up, so I'll have to fix all of them.   I managed to swap the MP3 mounting connectors around, not a good thing, the sound board would not have had the right connections!

 

I didn't originally have that inverter, but that's an excellent idea.  I started with the design of the MiniCommander interface, and it's using opto-isolators in place of those inverters. I didn't think to change when I got the HC14 in the mix.

 

I was thinking about the time constant being too short, that was one thing I was going to play with on the bench before going with the values I have.  The little 10uf cap I have is a pretty cheap one, and as far as "going smaller", I have imposed a limit of how small I'll do SMT stuff.  I know they can assemble it, but if I can't hand solder it easily, it's a big problem.  All my resistors are now 805 size, and I keep the capacitors that large as well.  I made the mistake of specifying a 201 sized resistor on a board, I couldn't even see the little things!  I tried to solder it on for 20 minutes, and three or four ended up on the floor, lost forever!  I can manage the 603 sized components, but I prefer the next size up for easy of handling.

 

For the receiver, I was going to make a tinfoil box for it and see if that helps.  However, I figure if I can whack most of the EMI with the filter, that will make the receiver problem easier to deal with, and any shielding more effective.

 

The key to "pulling this off" is getting an MP3 solution that plays nice with the remote.  So far, this one has had the other attributes that I was looking for.

 

Edit:

 

I corrected the graphics in the previous post, still a work in progress, but each step we get a little closer.

 

I'm not ordering boards yet, the boards are just to see how everything fits as I go.

Last edited by gunrunnerjohn

I don't know if this is "good" news or just news but I tested the range of my MP3 player and class-D amp controlled by the LED remote system I showed on the other rolling stock thread.

 

ogr rf receiver with audio

I got 15 ft. reliably around a corner down the hallway.  But the key is the performance was the same whether turning ON or OFF.  The audio amp is class-D using the PAM8403 chip running at 260 kHz; there is no separate LC filter the board.  The datasheet claims the chip is a low-EMI design but who knows what that means relative to your module's amp.  But I can't imagine and class-D design having lower EMI than a class-AB style squeezing out battery-life is not an issue with rolling stock.

 

The LED controller remote uses a 3V coin battery with no external antenna so 15 ft. is pretty good.  The 4-channel remote uses a 12V battery and has the telescoping antenna which together almost seems like cheating compared to the LED controller remote!  I opened up the LED controller receiver and it appears to be a superhet design.  From various listings for the remote, it is 433.92 MHz and that crystal on the right (6.7458 MHz) matches what various single-chip superhet IC receiver datasheets say as the crystal to use for 433.92 MHz.  I could not correlate the "PP833L" chip marking on the so-8 receiver IC to anything.

So while I agree that you don't want to get in the business of designing RF receivers, this LED controller shows it's getting simpler with an 8-pin SO, a crystal, and maybe half a dozen 0603-sized passive components and no tuning-coil to mess with.

 

 

Attachments

Images (1)
  • ogr rf receiver with audio

Stan, the thought is always there, but I'd have to build both ends in order to have the complete package.  I certainly wouldn't want tuning coils, that raises the complexity and reliability I would expect.  It would make for a more compact package.  I'm eager to see what the EMI filter on the speaker does for the existing setup.  If that works well, I'll probably order the basic $30 worth of boards (minimum order) and build up one to see how it functions.

 

This board appears to use a BY8001-24SS chip to do the basic functions, there's an Atmel serial EEPROM, presumably for parameters, and then a 8 pin chip labeled MIX2002CN?4S0N, the ? is a number I can't read.  I find nothing on that chip in a search.  The mystery chip seems to most likely be the amplifier, it's next to the speaker leads.  Since two of it's pins are directly connected to the speaker, that's a good indication.

 

 

I've done a "trial run" of the RF version final assembly and PCB layout.  If anything jumps out at you, let me know.  As soon as I get to test the EMI filtering, I may pull the trigger on one of these if that's a success.  Of course, any comments welcome before we go to copper.

 

Edit: remove obsolete diagrams.

Last edited by gunrunnerjohn

John, what I would really like to have is a very inexpensive microphone and sound card run off a single AA that would pick up the wheel noise coming through the car body and convert the sound to prototype steel wheels sound with clank on a live basis. One in each frt. and passenger car would be awesome.

 

At least, I'de like to try it. Maybe one for locos first that rumbled. 

 

Ron H

I'd like to win the lottery, but that ain't happening either.

 

Everyone want's "very inexpensive", but if there's no potential for any profit, who's going to build it?  While it sounds simple, one only has to refer to my signature saying...

 

You want to do live digital sound processing on the wheel noise, and that's going to be "very inexpensive"?  I'll buy them if you get them to $10-15, but I doubt even the Chinese are going to do that!

 

Well, the Class-D EMI filter was a huge disappointment!  I soldered the little surface mount components directly to the speaker pins, that's better than they could be on a circuit board.  It didn't change anything that I can see with the remote control, it still starts the first sound great, but if that sound is running, you aren't going to trigger any others from more than about 5 feet away.

 

If this is going to work, I'm going to have to find a better RF remote control package I suspect.

 

If you still haven't given up on that 315 MHz 4-channel receiver, I'd look at conducted susceptibility over the power supply.  I take it you're still using the white prototype board albeit with receiver and MP3 modules separated by (at least) 6 inches.  One of those DCS 22uH inductors has 40K ohm impedance at 315 MHz.  I figure you only need maybe 10 mA max into the receiver so those cheap 1/4-1/2W inductors can handle the current.  I'd just put a 22uH on on ALL the lines to start including the 4 output lines.  Or just disconnect all but the 2 control lines to turn MP3 on and off.

 

Separately, since you apparently have multiple receiver modules all with the 0.1" square-pin headers, how about hooking up two receivers where one is completely electrically isolated (runs off a separate 5V supply).   So the 2nd receiver would maybe just drive some local LEDs or whatever's enough to show that it is decoding the commands.

 

If you have just the RF rcvr 4-pin module that comes paired with the bare tx module (99 cents), even that could be used to evaluate if/how the super-regen rcvr behaves when the MP3 player is playing if you look at the data stream output with a scope.

 

So the idea is to determine whether the MP3 module is just so darned noisy that it blows away anything in the same county that isn't even hooked up to it.  Yeah, all these high-school science projects take time...

 

-----------

 

Completely on a different issue, regarding the PCB.  I can't imagine anyone else trying to solder-up this circuit given the complexity.  I say this based on what guys will do/did for various LED lighting circuits.  That said, if going to the trouble/cost of making boards, I figure you'd just put in a 14-pin (or whatever) microcontroller.  Initially it could eliminate all the logic gates since it would be a fairly trivial program to do the inversion and the minor timing to pulse the 5th channel to turn off audio.  But obviously the next step would be decoding the RF packets using the cheaper receiver that is 1/2 the size of the 4-channel receiver.  Even if the board is just for yourself, I figure you probably want to be able to set the address of the board or else ALL you sound cars will respond to same RF controller.

OK, if you're a "glass half-full" person:

 

I used the basic $1 MP3 module + $1 PAM8403 class-D audio amp module powered by 5V. When powering a 4-ch 315 MHz receiver module with the same 5V supply, I get data loss whenever audio is blasting away. During MP3 silence gaps, data goes thru fine.

 

Then I powered the MP3/amp with a separate 5V power supply. No problem getting data thru even with audio blasting away.

 

Then I connected a wire between the grounds of the MP3/amp and RF receiver. No problem!

 

Even draping the un-filtered speaker wires 1-inch from the RF receiver...no problem!

 

My working theory: it's coupling thru the power supply.

Stan, I'll try some of the 22uh chokes in the power and ground.  I see the receiver already has a cap across the power/ground, so the addition of the chokes may be a winner.  FWIW, in order for this to work, I'd like the receiver to be plugged in to my board, so I do want it to work closer.  I'm thinking you may be on to something with the power, I was thinking about that my self.  I have a whole raft of the little 22uh chokes, so it's an easy test.

 

I also put in an order for a superhet 4-channel receiver to see if that has better luck.  It has the same pinouts as this one, so it would be a drop-in if it works better.

 

We'll see how the chokes in the power feed work...

 

I added a 78L05 right at what you call J1 to power the RF receiver separately. Let's just say the results were dramatic

 

The 22uH did NOT work in my situation but we do have a slightly different configuration.  In my case I was looking at the noise on the 5V supply to the receiver on the scope; it's low-freq audio noise from the current variations that I believe is messing up the receiver sensitivity.  The 22uH does not have enough of a low-freq effect.

 

This is one of those cases where I hope Your Mileage does NOT vary!


 RF-Link%20MP3%20Interface%20Schematic

 

BTW, not today's problem, but are you really using 10 or 12 mil traces on your power supply lines on the PCB.  Given the average current when pumping out a couple watts of audio, I'm thinking 25 mil minimum and the more the merrier...you have the room.

 

 

Attachments

Images (1)
  • RF-Link%20MP3%20Interface%20Schematic
Last edited by stan2004

Just curious, why did you run the 70L05 off the output of the main 5V supply?  It would seem to make more sense running off the input, and it would be further isolated by the little switching module.  I can certainly try that, it's easy enough to do.

 

I have plenty of room for a regulator, I won't be needing the speaker filter.

 

As far as trace widths, I have a 1/2A max supply, and the module draws about 100ma blasting out audio.  For a 500 ma current and 1mil thickness, required trace width is 4.55mil.  Since I don't see anything close to those currents, I think the trace width shouldn't be a factor.

 

Here's the Trace Width Calculator I'm using.

 

 

Yup, schematic revised. I was so busy trying to edit a pixelated image rather than a schematic...

 

Well, there's theory and then there's practice.  It's not a question of how much current a given cross-section of copper can carry, or right or wrong.  It's my opinion that if you have the space to run fatter traces for power you should do so.  It makes for more robust traces for prototyping (less chance of nicking or cutting traces as you fidget with modifications), it's easier to mod boards with resistors/caps as there's more copper area to solder to, there's less inductance per inch which reduces glitches for fast current edges, etc. etc.  But to each his own...

I'm going to give the separate regulation a try, that sounds like it may be a big help.  I think I'll stick the 'scope on the power and see what it looks like as well.

 

I hear you on the traces, nothing wrong with your thinking.  On my little motion sensing board, I did widen the traces to the relay contacts since they are capable of 5A if you want to use them that way.  I'm a ways from actually going to boards on this one, I just do the layout to see how things fit.  I'll revisit the trace widths when I'm actually ready to make a board.

 

I was thinking about your suggestion to use a processor for the logic, it has some interesting benefits.  One thing it would do is allow me to have both the TMCC and RF version as a single board.  The TMCC serial data would be used for the TMCC version, that could come from a variety of TMCC products.  By plugging in the receiver, I could receive RF data and operate from RF inputs.  That allows more flexibility from a single board design, not to mention minimize the costs of having two different versions.

Originally Posted by stan2004:

Then I powered the MP3/amp with a separate 5V power supply. No problem getting data thru even with audio blasting away.

 

Then I connected a wire between the grounds of the MP3/amp and RF receiver. No problem!

 

Even draping the un-filtered speaker wires 1-inch from the RF receiver...no problem!

 

My working theory: it's coupling thru the power supply.

When you're right.... YOU'RE RIGHT!  That's it exactly.  Powering them with a separate supply and all is well!  I tried a choke and a 220uf cap with a .1uf cap to cover all bases, but with one power supply, they still have an issue.

 

I looked at the power on my 'scope, and it does dance around with the audio playing, even with a 220uf cap.  That does seem to be the issue.

 

Time to move on, I think the noise issue is behind me.

 

Why use a DIP uC pkg if you have an ICD interface?  Presumably you'll be (re)programming  using the ICD so should never have to remove the chip.

 

So then I'm thinking if you have more space using a TSSOP, you can easily fit a 20-pin version to get another 6 i/o pins for, say, 50 cents more.  What to do with 6 more pins?!

 

I still think you need a solution to multiple addresses so you can have more than 1 receiver running per layout.  I'm hoping you're thinking this can be the first revision toward something you can sell to bring this to the masses.  Perhaps using the flash/EE on the uC, you can come up with some kind of "learning" mode where the receiver learns its address and stores it in non-volatile memory...rather than having a bunch of jumpers of DIP-switches to set the address.

 

A downstream option is to accept the 99 cent receiver module's 3-signals: 5V, GND, DATA.  Not so much the cost, but the space would be greatly improved for fitting into rolling stock if plug-in rcvr board was half the size of the 4-channel rcvr.  Yes, would require a bunch of code to decode the bit-stream.

 

I'm imagining some output pins to drive other functions besides sound.  Whether it be some LEDs, or a coupler coil, or a PWM'd hobby servo, or fill-in-the-blank.  Perhaps a gross violation of KISS...

 

I'm imagining at least one input pin to allow something to trigger a sound locally.  In other words it can be playing sound #1, but when it gets a trigger it goes to sound #2...or something like that.  Kind of half-baked in my mind, but I'm thinking of the animal sounds that trigger when there's motion.  eBay has low-cost motion/vibration detection modules. 

 

But I do grasp the rapid progress being made!  As you well know in a for-profit corporate world this would take forever.

Funny you should mention that, I was just looking at the addressing and thinking how I might address it.  I agree that allowing more than one working at the same time is a very desirable option, so that's got to be incorporated.  Looks like I'll have to have some connections to the unused pins on the receiver over to my board.

 

As far as triggering sounds locally, if there were a way to mix audio channels, that would be a more attractive option.  That's getting way beyond what I am going to do here.

 

One reason I went to the DIP was easy of hand assembly, I'm getting tired of soldering tiny little leads.  I'd probably with a surface mount, but not the TSSOP as that's pretty small.  I just added the ICD interface after I put the chip in, I was initially thinking I'd pull them out and program them on my debug board.  Then I decided to stick the ICD in, so it probably makes sense to go with a smaller footprint SMD option, the SOIC is probably good and pretty easy to handle as well.

 

I did think about other functions as well, but I'm leaning to getting the audio function working as a first step.  I'm not ready to spend the time to decode the bit stream since someone already did the work.  One thing that the 20 pin chip would do is allow me to have the TMCC serial input on the chip as well, but then I have to open that can of serial decodes.

 

Truthfully, I'm not too worried about the size of the module with the receiver plugged in, it'll be less than 3" long and 1" wide.  Even a small boxcar will fit that easily with a speaker.

 

Understood.

 

I think it be sloppy to jumper over multiple "address" lines from the 4-channel rcvr module to your PCB.  My 4-channel rcvr uses the SC2272-M4 decoder chip; the SC2272 comes in a few variants for latching, momentary, etc. operation.  If you look at the 4-channel rcvr compared to the barebones rcvr, it's pretty much "just" the SC2272 that makes it different.  Hence, one option is to use the barebones 99 cent rcvr and put the SC2272 on your PCB.  I can't speak to the incremental PCB cost for the additional real-estate but the chips themselves are insanely priced on eBay for about 25 cents!

Then you plug in the 4-pin (3-signal, 5V, GND, DATA) barebones rcvr and feed the DATA line to the SC2272....AND have access to the addressing pins on the 2272 to connect to address switches, jumpers, or even spare uC output pins (if you choose to save the address in the uC EEROM).

 

Edited=no direct links to ebay!

 

Just a thought....

Last edited by OGR CEO-PUBLISHER

At this point, I'd like to get something going.  It only costs me $36 to get a few PCB samples of a given layout, so I want to arrive at a workable solution and pick up a set of boards and get some miles on it.

 

I could engineer this forever, but we used to joke about that when I was actually working for a living.  If I let the guys go, they'd "improve" on the design forever, but we wouldn't have a product to ship, and the costs would go through the roof!  

 

FWIW, I have a couple of the bare bones transmitter and receiver sets, did you ever determine if they had as good a receiver as the 4-channel remote?

 

One thing I'm waiting on is I ordered one of the superhet 4-channel sets, if that's vastly superior in range, I'd probably want to use that.  It happens to be pin compatible with the 4-channel ones I have now, so I could just drop it in.

 

John,

 

Have you looked at Adafruit:

 

https://learn.adafruit.com/ada...sound-board/overview

 

http://www.adafruit.com/search?q=pam8302a

 

I bought a solder sucker from them a few weeks ago and their site has some interesting stuff.  One of the posters on the Free Rails forum gave me these links.  I was looking for steam sound but he said the sound was not adjusted by speed of the engine.  Still they may have something useful.

Bob, I haven't seen that before, but the MP3 module I have I get for $7/ea, and I can play up to 5 sound files, each with a single button press.  I can also connect a serial stream and control many more sounds.  It includes a 3W mono speaker amp and dual stereo headphone or external audio outputs.  Since the long sound files I'm going to be using for rolling stock are in the 40-50 megabyte range, the limited capacity of this board is too restrictive for my use.  This one accepts SD cards to allow any capacity I desire.

 

I don't know of anyone short of the actual model train folks that have sound synchronized to the speed of engines or rolling stock.

 

No, I have not compared the bare bones vs. 4-channel super-regen rcvrs.

 

In looking at the super-het 4-ch rcvrs I noticed some have "learning" mode.  Looks like OGR is now enforcing no eBay links but easy to find.  Is this the one you got? 

 

I figure you press the button and then send a command within x seconds and stores away the other 8 address bits (if it was a 10-bit address)....no address pin/jumpers/switches required.  Looks like an LED next to the button which presumably flashes to provide feedback on learning mode.  Makes sense and would eliminate running extra address wires to your board.  Presumably this uses the 2262/2272 chipset serial protocol or obviously would need to get the mating 4-button remote.

 4ch learning superhet rcvr

Attachments

Images (1)
  • 4ch learning superhet rcvr

Moving on then...here's my next issue.  Handling track power dropouts. 

 

With peak speaker currents of, say, 5V thru 8 ohms, that's over 1/2 Amp.  I was looking at your module pinout at it does not look like there are separate logic voltage and power voltage inputs.

 

Since I have a separate audio-amp module, I can split off (diode) the power to the audio-amp.  The MP3 electronics would have a cap with enough energy to ride-out a X second dropout without resetting or whatever.  Obviously the speaker output would dropout and there may be a pop or click on each transition.  Anyway that's my thinking right now.  I guess a big enough supercap is one approach but would need to run-the-numbers so to speak.  This dropout could obviously be from a direction change for conventional operation though I realize this could be a command-mode-only design.

 

What's your take on this?

 

I'm going to see what experience tells me, but track power interruption is certainly a potential issue.  I did look at how I could add a superCAP.  I'm thinking it could get a bit complicated to do this properly, probably a two-stage system.  Regulate track power down to 10 volts, put a couple of 5.2V 2.7F superCAPs in series to provide the power, then regulate down to 5V.  I don't think just putting the cap across the 5V output will cut it, though that might be a band-aid when I first try to run these.  I suspect it would provide a short time power bridge, but you need more voltage to use a decent amount of the stored energy.

 

I have no way to regulate the volume with the existing module, so I experimented with series resistors.  Right now, the volume with an 8 ohm speaker (ERR model) is pretty loud, maybe too loud for many applications.  I can say that volume won't be an issue!  I think the maximum power is used with a 4 ohm speaker, but I find the 8 ohm to be more than loud enough.  I'm adding a provision to use a resistor to control volume.  You could use a 50 ohm pot or just solder a selected 3W resistor directly to the board.  I found that 30 ohms dropped the volume by about 1/2 the apparent loudness, and was probably about as loud as I'd want it.

 

That looks like the superhet one I have coming, if it works out well, I'll consider that as the "standard".  I did observe that it has the learning provision.  One issue is how you do the transmitter, do you need a different transmitter for each of these receivers?  With the other one, you can change addresses at the transmitter side to address multiple units.

 

As far as addressing, if you look at the back of the super-regen receiver, you'll see they have already conveniently placed ground and 5V bus bare traces to easily jumper addresses.  For the first cut of this, that's going to be the addressing provision.

 

OGR is really starting to get a bit absurd, I think the commercialization is going a bit overboard.  The 'Bay links to stuff are a valuable resource.

 

Originally Posted by nvocc5:

When did they start the no e-bay link, this is the first I have heard of this.

I have no idea.  All I know is a link was removed by someone from OGR yesterday.

 no links censored

As it says on their terms of service:

 

OGR Publishing, Inc. reserves the right to delete any message, at any time, for any reason.

 

"for any reason" is clear to me and the OGR person at least had the courtesy to say "no direct links to ebay".  So be it, and I figure we should just leave it or else this entire thread might get deleted!

 

 

Originally Posted by gunrunnerjohn:

You could use a 50 ohm pot or just solder a selected 3W resistor directly to the board.  I found that 30 ohms dropped the volume by about 1/2 the apparent loudness, and was probably about as loud as I'd want it.

 

Yikes.  Perish the thought of having to add a 3W resistor!  The MP3 module I'm messing with has a non-volatile volume-control-button setting so I figure you set it once and forget about it.  But in your case I suppose you could complicate matters and add an external audio amp WITH volume control? 

audio amp with volume control

This would also then allow splitting the lower current "logic" supply from the higher current "power" supply.  So this could be driven by the DACR and DACL outputs. I understand KISS, but there is something un-American about just putting in a power resistor to simply convert excess volume into heat.  IMO that is.

 

I suppose one benefit is the spare audio channel is now buffered with higher current drive capability which could, for example, drive a motor or LEDs or who knows what. 

 

I was thinking more about your use of "just" a 7805.  So with 20V DC on the rectified bridge output, and (for the sake of argument) a 1 Watt audio load on the 5V regulator.  1 Watt = 5V x 200 mA average current...so the 7805 is burning 15V x 0.2A = 3 Watts. 

 

So further throwing KISS out the window, I suppose a 99 cent step-down regulator integrated with your PCB and maybe even a provision to charge a superCap as you suggested for the recent thread on the Dark Trolley station stop.

Attachments

Images (2)
  • no links censored
  • audio amp with volume control

If I do anything regarding the volume, when I round up the serial control specifications for the module I have, I'll just control it that way.  I've written the vendor I bought them from to get the serial interface specifications. 

 

Truthfully, I have no interest in adding yet another amplifier, even though it might be a way to solve this particular issue. 

 

As far as "just a 7805", look closer.   I'm using the Recom R-78E05 there, it's a small switching supply that is a replacement for the 7805T three-terminal regulator.  It will handle 200ma without breaking a sweat, it barely has any temperature rise with that current.  It costs about $2.50 in quantity, and it's the same one I use for the Super-Chuffer, so I buy them in quantity.  I started using that when I couldn't get enough power out of the 7005T without a heatsink.  I also figured that the total module power would be a lot less, and it is.  I'm not reluctant to spend a couple of bucks on a good solution for power like the Recom switching module, it's been very reliable for me on the Super-Chuffer and I haven't had any power issues.

 

I'm going to build a "simple" RF controlled MP3 player first, it'll be my test bed to work out any kinks.  I want to have a couple running around and see if my radio choices are really practical in the real world.  If that all works out, then I'll consider the larger 20-pin PIC part and do the TMCC serial, the RF interface, and the serial interface to the MP3 module for an all-inclusive module.  At that point I might consider moving the SC2272 onto the board in one of the SMT versions and using the small bare-bones receiver.  That would probably be the one that I'd try to make into a product, with enough flexibility, I may be able to get enough quantity to get them built.  I have to get to around 100 in an order to get the price down to a reasonable level, smaller quantities kill you for parts, PCB blanks, and assembly services.  

 

Originally Posted by gunrunnerjohn:
As far as "just a 7805", look closer.   I'm using the Recom R-78E05 ... the same one I use for the Super-Chuffer

Roger that.  Here I am holding your Super Chuffer board in my grubby hands and whadda you know!

At that point I might consider moving the SC2272 onto the board in one of the SMT versions and using the small bare-bones receiver.  That would probably be the one that I'd try to make into a product, with enough flexibility, I may be able to get enough quantity to get them built.

Sounds like a plan.  I believe the big opportunity is for general purpose (as opposed to just audio/sound) remote control of rolling stock.  So whatever you do I implore you to keep in mind all the animated/activated rolling-stock cars that , in today's world, only work when positioned on an activation track, or runs all the time, etc. etc.

I'll certainly keep the extra controls in mind, but it may not be as easy to do some of the stuff.  Lights or couplers are pretty easy, but stuff like animation would probably be all over the map.  I have used a couple of the model airplane servos for that task, but you have to tune the PWM to the specific application.  Unless I have a way to calibrate the output, that would be problematic.  Obviously, a simple digital on/off control is no problem, and perhaps several outputs that can control a variable speed motor would be useful.

 

 

John and Stan (and other contributors) - this - as usual - has been very educational and entertaining (and way beyond my electronics knowledge at this point).  But two (perhaps random) questions - at some level, it sounds like you two are reinventing DCC (a topic about which I know precious little at the detailed level).  I recall a few years ago seeing a video on the Yahoo S-gauge forum where the proud layout owner (and a nice layout it is/was) showed how he was able to operate different unloading cars essentially anywhere on his layout via a DCC system with the appropriate DCC hardware mounted in the various action cars.  The cars operated without need of the usual 'accessory shoe/rail'.

 

Now that I've said that - I think John said something earlier in the thread about using TMCC, which I guess would be similar.  Remind me - is the idea of using an RF control a more 'universal' solution - meaning those of us without TMCC or Legacy would be able to use it...??  Or is it more the problem of coming up with a robust TMCC kluge/hack?

 

A second question - a repeat of someone else's observation earlier in this thread - is it feasible to use a blue-tooth based system, with the advent of blue-tooth enabled speakers (or, presumably, rolling your own blue-tooth circuit board connected to a remote/mobile speaker)??  Might there be some advantage to having a 'fixed' audio source, with only the speaker end of the system mobile??

You are correct, since we're running command systems that are not compatible with DCC, so one solution is to use TMCC.  That would be compatible with TMCC/Legacy or DCS as they both run with straight AC track power.   The RF solution is the "universal" solution that can be used with DCS or TMCC, or indeed with conventional operation.  Currently, there is no DCS receiver capability to do a strictly DCS system, that's one significant hole in the MTH product line IMO.

 

I'm thinking in the near future that I'd probably merge the technologies and have RF and TMCC all in one package and be able to select between them.  I'm also waiting on several different RF packages with what may be higher quality radios for longer range, that will figure into what I end up building.

 

I saw the mentions of BlueTooth, but I want to have the ability to have perhaps five or ten pieces of rolling stock on one layout, all with unique audio files playing.  That seems like it would get a little tricky without writing a pretty involved BT application and having a computer to run it.  Of course, then you'd also have to have the BT host in the picture and be controlling the audio from that platform.  If I were only doing one channel, the BT might be a workable solution.  Even with multiples as I'm talking, I suspect it can be done with BT, but I know how to do it with the technology I'm using.

 

I've also seen other references to mesh networks like Zigbee, but having no idea of how complex that would get, nor the cost, I'm probably not going to invest time and energy in chasing that.

 

Originally Posted by richs09:

John and Stan (and other contributors) - this - as usual - has been very educational and entertaining

I'd say that hits the nail on the head. The hobby is great because it's a big tent. There are many ways to participate, enjoy, spend time (and money), etc.  I find the electronics aspect educational and entertaining, and no doubt there are countless times where I have "re-invented the wheel" so to speak. 

 

What's new are these insanely (low) priced electronic modules from Asia allowing  Lego-like construction of gadgets useful to our trains. It's not quite there yet requiring component-level "glue" to make them work together and that's how I see this particular project.  In some cases we need to change the glue, in other cases we need to change the pieces.

 

What's also new is forums like OGR to engage with like-minded folks. Not so long ago discussions like this were limited to the knowledge of the guys at the club, or to the Radio Shack clerk if you were lucky, or thru a snail-mail dialog with a magazine.  So keep your ideas (and questions) coming!

 

I now step down from the soap box.

GRJ, regarding your separate 5V supply, I notice the uC powered from U2 rather than the main 78E5.  Yes, the uC draws little current and should be relatively quiet on +5 but I'd think whatever RF module you end up with would be better off with a dedicated supply.  Stated differently, unless you're using some analog functions on the uC, I don't think it will be bothered by the 5V audio-side noise.  Just a thought...

The uP doesn't draw much, and I figured I'd rather not have it seeing the rather large swings I saw on the 5V supply with the MP3 player.  Note that I haven't powered the MP3 board with the switching regulator I'm using yet, I have to do that and see how well it regulates.  I think I have a better chance of it working well without the uP on the noisy MP3 supply.

 

I do note that with an 8 ohm speaker, the MP3 module is only drawing around 100ma on average, so I'm not getting nearly 2-3 watts to the speaker.  That's fine as it's already too loud using the little 1 1/2" ERR speaker and baffle.  Since I get one of those with each ERR RS-C I buy, and I don't often use them in the installations, they're piling up and will be just the right size to put into rolling stock.

 

I did go in and change the trace width from .006" to .01", that's twice the trace width "required" for half an amp of current, so I think it's conservative enough for what's going on here.  Let's be pessimistic and say we have 200ma, the computed trace width is 1.28mils, and I'm at 10mils.  Even allowing for parallel runs that increase the requirements, I think it's pretty conservative.  In addition, as I said, I really only see around 100ma to the board, so there is only about 1/2W of power available.  I suspect virtually all of it goes into the audio.

Regarding dropouts, if 200mA is indeed pessimistic then maybe a single 5V superCap might be OK (vs. stacking 2).  So at 0.2A, a 1F cap will discharge at "only" 0.2 Volts/sec - and a 2.7F less than 0.1 V/sec.  Your MP3 module says operation down to 3.6V and surely any modern uC will be fine at 3.6V.  So if you can get it charged up to anywhere near 5V, you have several seconds over which volume will fade slowly but I'd think imperceptible for short-time dropouts over dirty rail/switches etc. 

 

Your regulator datasheet specifies a max load capacitance of 220uF which I'm guessing is for load stability in its feedback loop.  So if I were designing in a superCap on the output, I'd want to know a bit more about why and hence the effect of isolating the capacitance with, say, a charging resistor which is what you'd probably use.  Also, I if you're isolating the superCap I figure the incremental cost of a Schottky diode may be be worth it to get another 0.4-0.5V of starting voltage.

 

Another idea is now that you have a uC in there, perhaps you could use its Brown-Out detect circuit at ~4 Volts or whatever and send a command to the MP3 module to mute.  I know you're not trying to squeeze every last penny out of the design but those superCaps are somewhat spendy relative to the other devices.  In which case a lower cost electrolytic maybe on the input side of the regulator could store enough energy to handle 0.2A of 5V audio for, say, 0.1 sec after which audio volume is cut reducing current to, say, 0.02A (10%) keeping the digital logic out-of-reset for a while longer in anticipation of voltage recovery so that the song doesn't reset/restart. 

 

Let's see. 1000uF cap charged to 20V = 0.2 Joules.  Let's say 60% of that is available after the step-down switcher so 0.12 Joules.  At "pessimistic" full-current load you need 0.2A @ 5V for 0.1 sec = 0.1 Joules.  So it's at least in the ballpark.

 

Are we having fun yet?

 

 

 

 

I did a brief measurement of the MP3 player at full volume on the bench, it varies between 100 and 110 ma on the 'scope.  That's playing an audio file with a rather high percentage of "noise", some of the quieter files actually run in the 70-80ma range, and I'm using an 8 ohm speaker.  When I insert some resistance (the only method without serial communication to the module) in the speaker leads, the current drops way down in the 50-60ma range.  I find a 30 ohm resistor still gives me probably as much volume as I'll want for most applications.

 

Given those power figures, let's do some calculating.  Figure the switching regulator at around 80% efficiency, which is below it's lowest specification.  We have at least 20 volts on the input with the rectifier and the cap.  So with the existing 330uf cap, we have about .066 Joules.  If I figure 100ma load for .1 second, that's .05 Joules.  So, the way I see it, I already have some protection against dropouts.  If I drop the volume as I suspect I'll have to do in most practical installations, I have even a bit more margin.
I know that the Super-Chuffer has only 1/2 wave rectification, and I can draw 100ma from that supply with a cab light, headlight, and the smoke motor, etc.  It has no problem with dropouts running normally, so I think I'm probably not going to have that bad a time with it.

 

In the future when I have serial communication to the MP3 module, I can do something a bit fancier.  I'm still looking for information on serial communication to the BY8001 module, that's a pacing item.

 

Yep, we're having fun!

 

GRJ, what about going back to the most common denominator and thinking inside of the box.

With all of the effort expended to use a remote, why not use Rare Earth Magnets (REM,o)oriented for effect, strategically placed on the track. A reed switch with equal orientation, triggered by passing over the (REM,o)  could supplant a remote. After all, using a remote, there are just four functions, in your design, at this time. One is an OFF function that stops any other sounds. Three others are regional sounds' on the track, like Station sounds, Mountain sounds and use your imagination sounds. Others could take advantage of this angle by placing the REM,o magnets wherever they want and tailor their sound-scape to the present 4 channel application.

 

I sense that I am going to be fired from this forum for posting this. Since I will miss all of you guys more than you would miss me; and I will miss you all for sure, I will leave my account open in case John & Stan didn't completely finish me off.

 

 

Originally Posted by Up with UP:

GRJ, what about going back to the most common denominator and thinking inside of the box.

With all of the effort expended to use a remote, why not use Rare Earth Magnets (REM,o)oriented for effect, strategically placed on the track. A reed switch with equal orientation, triggered by passing over the (REM,o)  could supplant a remote. After all, using a remote, there are just four functions, in your design, at this time. One is an OFF function that stops any other sounds. Three others are regional sounds' on the track, like Station sounds, Mountain sounds and use your imagination sounds. Others could take advantage of this angle by placing the REM,o magnets wherever they want and tailor their sound-scape to the present 4 channel application.

 

I sense that I am going to be fired from this forum for posting this. Since I will miss all of you guys more than you would miss me; and I will miss you all for sure, I will leave my account open in case John & Stan didn't completely finish me off.

 

 

Having been keeping up with this thread from the beginning, but not having anything to offer that wouldn't add complexity, haven't had anything to say.  This post by Up with UP got me thinking, however, that a little complexity might be fun.  

 

Rather than using the radios, or the simple magnetic switches, you could use a RFID reader and and place RFID tags where you want sounds to start and stop.  I thought of using this a while ago for other uses, but it had not occurred to me to use RFID tags to turn on and off sounds.  this would allow a practically limitless number of files to be used once you have the serial data figured out.  and furthermore to allow the sounds to be played at the appropriate location on the layout.  

 

As for radios, I'm partial to the very inexpensive 2.4GHz type, but these get a bit tricky in the coding end if you plan to use more than 6 devices.  

I'm sure the concept can be expended in the future, but I'm concentrating on the remote aspect right now. 

 

When I manage to get the serial data specifications for the MP3 module, then I could have practically limitless sound clips.  I actually have some RFID stuff that I was playing with here, that would allow you to trigger specific clips at a chosen place on the layout.

 

Truthfully, a combination of location triggered sounds and remote triggered sounds is the best of both worlds.  While we're at it, maybe an accelerometer to trigger curve specific sounds.

 

One of the hardest part is getting appropriate sound clips for all the things you might like to do with the sound modules.  I might have to have a website to start collecting all the various sounds.

Just found and read through this topic this morning. I have been considering a project like this for well over a year now, but have no where near the electrical experience or time to get deep enough knowledge to make it happen. The possibilities that these kinds of projects open in the world of O gauge are HUGE. Even larger if down the road you introduce logic circuits into a board like this. I believe there is a market for this product and I also believe that the core board is not the only marketable part of the product. I'm interested to see where this goes.

It'll be interesting to see where it goes.  I've been thinking about something like this for some time as well.  Recently, as the quality MP3 player modules started showing up, it seemed like a more practical project, so I decided to jump in and do some tinkering.

 

In the long run I see this having a core microprocessor and multiple activation methods.  I like the RFID idea, that allows position dependent triggering of the sounds.  The remote triggering gives you ad-hoc sounds wherever you are on the layout.  Finally, other sensors can be used, as I mentioned above, for specific sounds on curves or when running or stopped.  I'd like to have it compatible with TMCC control as well as the RF option.  That allows it to be used for TMCC/Legacy, DCS, or even conventional operation.

 

As you say, endless possibilities.

 

Originally Posted by gunrunnerjohn:

It'll be interesting to see where it goes.  I've been thinking about something like this for some time as well.  Recently, as the quality MP3 player modules started showing up, it seemed like a more practical project, so I decided to jump in and do some tinkering.

 

In the long run I see this having a core microprocessor and multiple activation methods.  I like the RFID idea, that allows position dependent triggering of the sounds.  The remote triggering gives you ad-hoc sounds wherever you are on the layout.  Finally, other sensors can be used, as I mentioned above, for specific sounds on curves or when running or stopped.  I'd like to have it compatible with TMCC control as well as the RF option.  That allows it to be used for TMCC/Legacy, DCS, or even conventional operation.

 

As you say, endless possibilities.

 

 This thread has been very interesting to me.  I have done 4 cars now with sounds, but I am limited to one sound per speaker - because that is the technical knowledge I can work with.  with some of the plans you have here my sound car fleet will get much more impressive

Originally Posted by Up with UP:
I sense that I am going to be fired from this forum for posting this. Since I will miss all of you guys more than you would miss me; and I will miss you all for sure, I will leave my account open in case John & Stan didn't completely finish me off.

 

Not at all!  This is what this forum is all about. 

 

You could simply bypass the RF portion of circuit and trigger the MP3 module with your oriented reed switches.  So now you can start (up to) 4 unique sounds based on postion on the layout.  There would then be a 5th reed switch orientation that stops any sound.

 

As I see it, in the big scheme of things it's the recent availability of these DIY insanely (low) priced MP3 modules that is the windfall to O gauge trains.  The engine manufacturers have done a pretty good job with sound quality but the accessories and rolling stock have just not kept up.  And not just the sound quality but the length of sounds.  For years the "standard" was a set of IC chips with greeting-card voice-quality sound that came in increments of like 10 seconds.  A 2 minute chip was "big" and had a big price.  Now you get hours of music-quality sound for less $.

 

But beyond the triggering there are many other details that GRJ has worked out to install the sound module into a piece of rolling stock...such as managing the whole power supply issue and that pesky AC-voltage used in O gauge. And he openly shares how he is doing it so anyone can decide if it's something they want to undertake or use as the basis for their own project.  That's a real contribution to the hobby.

I guess price point matters.  These cars have been available.  RS and Crew Talk Cabooses and stock cars, Diners.  It was just a matter of how far and what types of sounds to install.

 

I really wonder how big the market is though.  You have  a whole group that don't want sounds and talk on engines.  So I doubt they would buy these items.

 

Seems like this would be easy peeze for the manufactures to do, with remote control via their systems.  Yet they chose not to.

 

I still go back to the MTH Coors train.  Remote control sounds, animated features and smoke, all controlled via the DCS system and the PS-2 board talking to the auxiliary cars.   Why no follow up with working railroad cars is beyond me.   G

George, I'm not really worried about the market, I started this project, as with others, for my use.  I'm not a major manufacturer, and I don't think like one. 

 

I would point out that the VL tank cars are scarce and expensive.  Also, the VL PFE Reefer sets are all sold out in advance, and now you pay a big premium over MSRP to buy the VL tank car sets, and I suspect after a spell, the VL PFE Reefers.  Obviously, someone must like the sounds.   Lionel is also bringing back the Station Sounds Diners as well.

Last edited by gunrunnerjohn

I don't have any sound cars, but I really like the idea of having additional sounds. I also like the crew talk, and other sounds we have available now, but they are somewhat limited. Even with the current sound cars offered, you are still stuck with whatever they want to put in them and also how much they want to have in them. Having your own, whatever you want and as many as you want would really be a great addition.

 

As far as the folks posting here to estimate demand for sound, I wonder if we don't just hear from the ones that don't like the sounds a lot more than we hear from the ones that do? I would bet there are many more sound users than folks turning it off, especially if kids are involved or promotion of the hobby is the goal.

I'm not really worried about the naysayers, I know some folks don't like the sounds, and others do.  I don't routinely use the crewtalk on most locomotives because it's usually kinda' lame.  OTOH, more "natural" or entertaining sounds coming from a number of cars in the consist is pretty cool, so I'm all for that.

 

Clearly, as I stated before, the fact that most of the sound equipped rolling stock sells quickly and many times at a premium speaks for itself.

 

Originally Posted by rtr12:

...with the current sound cars offered, you are still stuck with whatever they want to put in them and also how much they want to have in them. Having your own, whatever you want and as many as you want would really be a great addition.

This feature is the key in my opinion.  Yes, there's at least one supplier that you can send in your sound and they will program it onto a sound module.  But now you just program whatever you want using your PC/laptop/tablet and your rolling-stock or accessory is playing that sound right now!

 

Plus, the major manufacturers will never be able to provide real music because they can't afford the licensing fees.  But for your personal use, the sky's the limits.  Let's see.  The train stops, the boxcar door slides open, there's a band, hey it's the Rolling Stones!, music starts playing Can't get no Satisfaction in MP3 quality sound, song finishes, door slides closed, train pulls away.  You're limited only by your imagination.

 

The length (hours not seconds) of sound with these MP3 players opens new opportunities.  So for station sounds you can literally go to Grand Central Station or wherever and record hours of actual station sounds and play them back on your layout.  Imagination becomes the limiting factor...

I'm going to take a train ride on a local RR company's freights and I have a couple of USB stick audio recorders.  I'll Velcro them to locations on a couple of cars for each direction of the run, then I'll edit the mess and see what I get.  Real freight car sounds!

 

Stan, I did see that I forgot one detail in my design.  The BY8001-16P only accepts a 3.3V input, for 5V inputs you need a 1K resistor in series with the outputs of the uP.  I don't know if I'll change the processor for 3.3 or insert the resistors.  Either way, it's a little 'OOPS".  The MiniCommander one has the same issue, but there's only one location where 5V logic goes to the MP3 player, easier to fix.

 

 

I think this whole project is a great idea myself. I really like your (stan2004) idea about the bands playing when the boxcar opens up, very good idea and would be pretty neat to have on one's layout. People that don't currently like the crew talk and announcements will probably also be interested, once they see this in action.

 

Along with GRJ's sound website he was talking about earlier for gathering sounds to play, an idea section for how to use the sound modules on that site would be great to have as well. I bet the grand kids will be able to come up with some interesting ideas too (probably a lot better than any of mine will be).

 

This is a very exciting project and I am also very glad it is being shared with all here on the forum. Although once GRJ gets things perfected, I will probably just try to get one (or more) of his. That is if he decides to offer them to others.

Last edited by rtr12
Originally Posted by gunrunnerjohn:

I'm going to take a train ride on a local RR company's freights and I have a couple of USB stick audio recorders.  I'll Velcro them to locations on a couple of cars for each direction of the run, then I'll edit the mess and see what I get.  Real freight car sounds!

 

Now that's what I'm talking about!  What strikes me is how with "hardware" it can be difficult to explain how to change a 5 cent resistor or capacitor to change the behavior of some widgit.  Soldering can be a royal pain. And of course that 5 cent part requires a $5 shipping charge or waiting a month from China.  If you make something like this available, we can share/email MP3 files to completely change the behavior.  IMO this is a game-changer.

 

Either way, it's a little 'OOPS".  The MiniCommander one has the same issue, but there's only one location where 5V logic goes to the MP3 player, easier to fix.

 

Below the radar!

 

 

BTW, I have one of these ~$6 DTMF (touchtone) decoder modules on order 251600411636

 

$_12 

This is to decode the spare MP3 stereo channel to embed up to 4 channels of animation motor/lighting control.  I'm going to use the $1 MP3 player to test this but I'm thinking if you make your module available I'd want to let the DIY ambitious join the party. To that end, on your next revision how about bringing the unused audio channel, +5V, and GND to a 3-pin header on a board edge to make it easier to connect? 

 

Attachments

Images (1)
  • $_12

I wasn't being a naysayer, just pointing out observations when others said how much of a market there is for this.

 

I realize John and Stan are doing this as a hobby and much of it for themselves.

 

But I don't think Lionel and MTH would leave money on the table if there was a high demand, and both companies have the tech to do this.

 

No need to shoot me for a simple comment.

 

Sure odd off passenger cars are always in high demand, same with the Vision Line set.  but crewtalk cabooses and stock cars DID NOT sell well.  Folks complain about $70 stock cars, $120 just don't sell.  Which is why I mentioned price point.

 

A hobbyist can do this for less then what a manufacture can with direct access to these components.   G

Originally Posted by GGG:
I realize John and Stan are doing this as a hobby and much of it for themselves.

Exactly.  It's about having fun!

 

I only speak for myself but, for example, we both have built a DIY O-gauge motorized Oscar Mayer Wienermobile car.  I for one am imagining mine rolling down the track playing "Oh I wish I were an Oscar Mayer wiener..." and "My best friend has a first name, it's O-S-C-A-R..."

 

wienermobile

I haven't seen one of their TV commercials in a long time, but I believe they still drive those things across the country and it's said to be a great summer job for a college kid!

 

Attachments

Images (1)
  • wienermobile

I think we just slapped you around a bit George, we didn't shoot you.   I agree there's a big difference between doing this on a shoestring and doing it in a corporate environment. 

 

Stan, I need to save up all these ideas and see about adding stuff.  I think when I do the microprocessor version with serial data for TMCC and serial out for the MP3 control, that would be a good time to add some digital controls and bring out both of the analog stereo channels.  I'll want to use some smaller connectors so they don't take up a ton of space, I have a few of the 1.25mm ones that Lionel uses in a few places.

 

FWIW, I have what might represent sort of a document on the BY8001-16P command set.  I've pieced together a bunch of documents, did a few Google translations of Chinese stuff, and then cut-n-pasted together a composite that may be enough to use the serial protocol.  The translation wasn't perfect, and a few places got weird overlayed text, but pretty close.  I'm going to dust off my old serial protocol analyzer and see if any of these command sequences work.

 

Document attached.

 

 

Attachments

Originally Posted by stan2004:
I for one am imagining mine rolling down the track playing "Oh I wish I were an Oscar Mayer wiener...

 

<...snip...>

 

I haven't seen one of their TV commercials in a long time, but I believe they still drive those things across the country and it's said to be a great summer job for a college kid!

 

Stan, mine does sing the theme song.

 

I just saw one the other day, they're still driving them around.  I believe it was last winter when this one crashed.

 

 

Then there's this one, but not much damage.

 

Last edited by gunrunnerjohn

The first prototype is in the can.

 

Here's the ERR MiniCommander ACC first prototype.  Other than a missing resistor that I had to cobble in, and making a mistake on the size of the two IC chips, all is well.  I violated my self-imposed limit on chip size, and they were a giant PITA to solder on.  Before I build any more of these, I'll be changing those to the slightly larger packages.

 

That's all behind me, and I'm happy to report that it works as intended!  I'm going to install it into a boxcar for it's first road test.

 

 

MC MP3 Interface Module N1

MC MP3 Interface Module N2

MC MP3 Interface Module N3

Attachments

Images (3)
  • MC MP3 Interface Module N1
  • MC MP3 Interface Module N2
  • MC MP3 Interface Module N3

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.
×
×