Skip to main content

Originally Posted by gunrunnerjohn:
Originally Posted by nvocc5:

Dear Stan2005 and GRJ

 

If you two could give on line course in the wonderful world of electronic you gentleman would make a fortune.

Lots of sources as mentioned for some basic electronics training.  I started tinkering with electronics when I was around 10 years old, for the first years it was mostly disassembly, but by the time I got to my teens, I could actually build and fix stuff.  I say this to illustrate that the knowledge didn't come quickly, it took years and later more years of school to have a solid base to work with. Most of my working life I was also either doing software or hardware design, and many times a combination of both.

 

It's like any other skill, it takes time and dedication to learn it, as well as constant use.  I find after I haven't used something like the PCB layout package for a few months, I have to retrain myself on some of the things I learned and forgot.

 

Best advice I can give is to look at some of the basic electronics sites, and then try a few things.  Sure you'll get smoke occasionally, but you'll also find out that it's not that hard to do some of the simple electronic projects.

Sometimes I fail to consider that most folks are not born with a silver solider in their mouth, a hand holding a part in place and the other on the iron.  Yes, it will take years to  have a firm understanding that comes only with experience.  That shouldn't stop folks from trying to learn, if it interests them.  I do think the prevalence of these cheap modules from asia that need only Vcc +/-, Tx and Rx make what was once complex electronics now achievable for even the novice.  

Kris,

 

Here are a couple of youtube channels that you might like for learning more about electronics.

 

EEVblog - He has tutorials on different electronic components and circuit designs. And just about everything else electronic. A lot is over my head, but some of it is understandable, especially after following GRJ & Stan for a while. He explains some of the parts and circuits similar to what GRJ & Stan use here on the forum. May not be exactly as used here, but you will get the idea.

 

mjlorton - He does a lot with multi-meters among other things. I haven't watched this as much as the one above, but there is good info here too.

 

Now back to regular scheduled programming...

Speaking of modules from China, here's the completed project with one.  It passed it's track test with flying colors, though I did have to add one capacitor for the MiniCommander to trigger properly, the triac thing again.

 

Both the MC and the MP3 module are mounted on Velcro for easy maintenance if necessary.  I used the Lionel style 2.54mm connectors since I have the tool to crimp those contacts.  In the future versions, I may go to a smaller connector.

 

The second picture illustrates the placement of the MP3 module, just open the door and you can change the sound SD card or update the one you have.

 

The volume turns out to be pretty close to right, though in the future I want to have a volume control to crank it down a bit.  I figure if you had four or five of these running around, you'd probably want lower volume.

 

 

MC MP3 Sound Interface Car N1

MC MP3 Sound Interface Car N2

Attachments

Images (2)
  • MC MP3 Sound Interface Car N1
  • MC MP3 Sound Interface Car N2
Last edited by gunrunnerjohn

If you were to program the MiniCommander as a TMCC engine, you should be able to control it using the DCS controller.  That, of course, assumes you have a TMCC or Legacy command base connected to your TIU.  I have yet to try this, but it should work.

 

By request, here's a short video with the finished car.  I'm controlling this with my workbench CAB1, obviously it works with Legacy as well.  It's programmed as an accessory, though it can be set as an engine as well.  You won't see much motion as it's on a test track on the bench.  It sounds the same on the tracks, and I'm happy to report there was no issue at all with dropouts of the audio running around the loop.  We'll see on the much larger club layout, but I have high hopes that it will work fine there as well.

 

Several of the sounds I'm using are over 40 minutes long, and the roughly ninety minutes of audio is using 78 megabytes of the 2 gigabytes of storage on this rather small two gigabyte SD-RAM.  Clearly, you could have hours of MP3 files available.

 

 

Last edited by gunrunnerjohn

Stan,

 

That brief "hickup" is the 5th sound, it's my "null" sound.  Since the mode the player runs in has no way to turn off the sounds, I've reserved one sound file as the "turn off" sound.  I can make it more silent, I just didn't bother yet.

 

I actually moved the "turn off" sound to one of the primary four channels, it was more reliable that way.  To get to the 5th sound, you first click the "turn off" sound, then the second button.

 

The reason that's a bit of a kludge is because of the way the ERR MC works, there is no "pulse" mode on the two low power channels, only on and off.  Since I'm edge triggered, when I have one of them on, then turn the other on, it triggers the 5th sound.  It worked out better to put the "turn off" sound on one of the those channels and have the combo be one of the working sounds.

 

It has plenty of volume with the ERR speaker and baffle, I'm very pleased with the sound level!

 

 

Do you think we need a "standard" for dropout tolerance?  If a conventional operator presses direction, if the reserve requirement is, say, 0.5 Joules (100mA @ 5V for 1 sec), a 330uF won't cut it...even charged at full-command voltage.  And of course since we're talking conventional, there would never be 18V on the track.

 

I realize you're thinking TMCC/Legacy so command voltages, but curious is you've considered some "simple" way (e.g., just add a capacitor) to support conventional without unnecessarily complicating the circuit.  This would be, for example, if the user operated it with the eBay remote or TBD optical/magnetic location-based triggers vs. O-gauge command control.

Stan, I found a 560uf capacitor that fits the same footprint, so I figure as a start I can replace the 330uf with that one.  I was pleased that this car made it over several back-to-back O72 switches without an issue, so there is some drop-out resistance.  For other than conventional, I think a one second drop-out isn't too likely, and I suspect the larger capacitor would do the trick for command use.

 

Once I get the RF basic version working, and I am confident the radios give me the performance I need, then I'll do the all-in-one version.  At that point, I'm thinking of seeing how I could use super-caps to enhance the dropout resistance and provide for conventional operation.

 

One of the things I want for the all-in-one version is the ability to play more sound selections.  With the four channel remote, you actually get 15 combinations as you can press multiple buttons and get coherent multiple outputs.  I could have perhaps ten sound files and use three or four for aux functions, and finally perhaps the all bits for a reset that would stop any sounds and action.

 

So many possibilities...

Last edited by gunrunnerjohn

Just to let you guys know, I fixed the "null" sound with a second of silence, no more audio glitches.

 

Next up is to build up one of the RF controlled units and see how that works.  I have the boards coming, and of course I identified some fixes I'll have to do before I can fire them up.   I have a couple different radio packages coming to see if I can get decently long range from one of them.

 

I got one of the SuperHet radio receivers in today, so I decided to do some range testing to see which way to go.  I compared the new receiver with my existing Super-regen models, and I'm pleased to say that both have sufficient range.  I was able to activate either receiver from over 100 feet away and through at least three walls to the outside.  The receiver was at one end of my house on the second floor, and I was at the other end (house is 85" long), and out on the deck, both receivers were still working from that range.

 

Looking forward to the prototype of the RF board arriving.

 

Did you have a helper or do you have really good hearing?  I'm trying to imagine you 3 walls away pressing the remote listening for the sound!

 

Anyway since we're just flapping our jaws, tell me more about the economics of using an ERR module for the TMCC decoding (I am not a TMCC user so pardon my ignorance).  As I understand it, the cheapest ERR decoder is the EX for $25.  So are you picking off the TMCC serial stream and you're paying $25 for a module that demodulates an FSK 455kHz signal?  Or is the plan to take advantage of some of the ERR buffered outputs that can drive higher currents...and independently pick-off and decode the serial stream for sound triggering? 

 

Stated differently, I think it's hard to imagine seeing $2 eBay module (free shipping of course) hat demodulates 455 kHz.  So in terms of bringing universal remote control to the world (at a reasonable cost), in my way of thinking means you need to provide the 455 kHz FSK demodulation function - a few dollars in parts using a single-chip IF amplifer IC chips plus a 455 kHz ceramic filter.

I cheated and had my wife with a radio tell me when the LED lit on my little test board.  I was actually somewhat impressed with the range, I didn't expect it to work that well.

 

Yes, it's my plan to use some Lionel board for the serial input.  I'm pretty sure that I'd have to license any receiver that receives the TMCC track signal, there has to be a reason that all the 3rd party TMCC folks were all using the R2LC in their designs.

 

I also don't want to re-invent that part of the wheel, as you not only have to receive the 455khz, but you also have to decode the incoming input data and generate the serial data output. I'd be glad to combine forces if you want to take a lash at that part.

 

It's the same reason I didn't relish the idea of trying to decode MP3, I've looked at doing that before.

 

I figured to use something like the dummy locomotive board and have the couplers and lights covered if I wanted to use them.

 

The good part about a modular design like I'm contemplating is that you can use the board without the TMCC component if you don't need it for your application.  You can just use the RF side and/or any RFID triggering or other independent triggers that I incorporate into the design.

 

My thought would be, rather than decode the 455KHz track signal, just take the serial data out of the command base, and build a transmitter at the base station that uses the same, or some other, frequency as the current remote.  This has been the model I'm using in various projects, using a raspberry Pi to interface between the TMCC base and 2.4GHz wireless modules in locomotives.  

I can understand the benefit of it being a stand alone unit, and if the price point is right, doing it that way, go for it.  My head always thinks on the cheap, hence having one add on to the command system that allows wireless communication to any number of other devices.  Ex, a module that connects just as a switch controller or such to the serial connection on the base, which pretty much just re-broadcasts the data on another, easier to use, frequency.  

Originally Posted by JohnGaltLine:

... which pretty much just re-broadcasts the data on another, easier to use, frequency.  

that's interesting.  so does the TMCC serial output from a R2LC board exactly mimic some accessible serial stream on the command base?  If that's the case then dump the whole 455 kHz thing, install a 315 MHz, 433 MHz, 2.4 GHz, whatever Hz RF link and it's got to be cheaper than using an ERR module (even with the few buffered outputs it provides).  This would be direct modulation and demodulation.  If you need to packetize the data as on the 99 cent 2.4 GHz 24RF01 module or whatever it is, then not apples-apples.

 

Is this what you mean?

Stan, I'm unsure, with out looking into it further, how the costs, and troubles balance out. the serial port on the tmcc base, (also legacy?) mimics the exact data that is sent over the track signal.  you still need to decode it to know which device is being addressed.  I do this with an ATMega microprocessor, but a PIC will probably do just fine for someone that knows what they are doing. ( not me, as of now.) As for packets and such, it depends what transceivers you decide to use.  I'm using NRF24L01 2.4GHz boards, which can be rather complex.  Fortunately other folks have released open source libraries for Arduino (ATMega) that do all the work for me.  There are 450Mhz boards out there very inexpensively that send a straight serial stream.  Also, slightly pricey bluetooth and standard 2.4GHz ones

many ways to do this.  i'm not familiar with the licensing issues of the R2LC decoder but i can't let go of the onerous cost burden on every piece of rolling stock to achieve remote control.  again, i know little about the tmcc system but it seems to me the MTH dcs system sends some kind of TMCC serial signal to the TMCC command base to talk to Lionel products.  That said, it seems this serial protocol (with the addressing) is a known quantity.  So a simple translator could convert TMCC packets (with addressing) into the eBay 315 MHz packets (with addressing).  This way you don't need TMCC 455 kHz decoders on each piece of rolling stock using just off-the-shelf low-cost eBay RF decoder modules.  Some of these even have relays on board for a few dollars.

 

The curious thing about this approach is a DCS user could talk to multiple rolling stock using TMCC addressing and NOT need an actual TMCC command base since the signal is being sent over RF and not over the 455 kHz signal.  I had previously pondered how to use the MTH TIU or Lionel ASC/SC2 accessory controllers to send the eBay RF signal but you'd quickly consume all available ports.  Using the TMCC addressing mechanism, this would allow a DCS user to address multiple rolling stock devices inexpensively without tying up one TIU relay port per rolling-stock function.

When you read the issues and answers on this forum, one thing becomes apparent, at least to me.  Many folks want something dirt simple, as in turnkey.  Also, starting out to build an RF link isn't something that I want to jump into, certainly not for the first generation of this idea.  As far as some of the more expensive ideas like BT and the like, for the money I might as well just use the TMCC solution that I already understand. 

 

All of these ideas sound really simple when you just write them down in a message, but when you actually have to design, build, implement, and debug it, it always seems to get a bit more complicated.  I'm trying to make something that I can produce in some quantity without too much of an onerous development cycle.  I realize that there's no way that you can please everyone, no matter what the end result is. 

 

One of the nice things about discussing it early here is different ideas get exposed, and maybe something gels.

 

Dear John and Stan

 

I have a question for both of you.  Here is the idea for the proposed build.

 

MTH Rail King 30-7711 NS Caboose that has lighting.

12 RF Wireless Remote

Mini Digital DC 5 V Amp

MP 3 Music Player

AC/DC to DC Buck LM 2596 set at 5V DC.

NE555+CD4017 Light Water Flowing Light LED Module DIY Kit (Knight Rider)

 

Instead of using a box car and then having to change the wheels for power pick up I opted for large caboose that already had power pickups at a great price.

 

Here is my question regarding power management.

 

I would like to also install LED light on the roof of the Caboose and marker lights. Would I need a GRJ special for the LED and marker lights or could I use the power provide by the AC/DC to DC Buck LM 2596 set at 5V DC power the Led and marker lights? Or I am pushing the limit what the AC/DC to DC Buck LM 2596 set at 5V DC can provide?

Given the hassles finding powered-trucks I see you went with a caboose after all as Norton suggested in the other thread

 

https://ogrforum.ogaugerr.com/t...-6000-gondola?page=1

 

So why do you need a 12 RF Wireless Remote?  Why 12 channels if that's what it is?

 

The LM2596 module will have more than enough power to drive additional LEDs - dozens of them including all the LEDs in the 555+4017 module if that's the one I see on eBay for a couple bucks.

 

Now that you have things more focused, perhaps start a new topic specifically on a remote-controlled Knight-Rider sound-light car or something like that.  There might be some confusion with GRJ's project as the underlying sound module is different.  Just a thought though...

 

For clarity

I have not grasped why folks want to change the TMCC/Legacy Operating system, but I have to believe it is a small, small market.  If they can build the operating system, they can build what they need to make John's MP-3 sounds work on their layout.

 

So seems like 2 versions if I have this correct?  The universal remote, which is cheap, universal, but introduces another remote device.

 

And the TMCC device, which operates in TMCC/Legacy, but drives the price up because of the R2LC type device required.

 

Or you have to try and build a R2LC from Ebay parts for cheaper than Lionel and try to get around licensing/patent.  G

My end goal is to have one board that will accept either the RF remote receiver or a serial input from a TMCC board.  That way you can have either version, and I only have to make a single board. You can also select the RF version and not need the TMCC capability or expense of a TMCC receiver.  For in individual, shopping for used parts on eBay is one thing, but if I'm going to make a bunch of these, I have to have a more reliable supply of parts.

 

The combined board will also allow access to more unique sound clips, I think I'm on the verge of working that out so I can access at least a dozen sound clips using the RF remote or TMCC.  It would be really cool to trigger some sounds using RFID sensors along the track.  Since the MP3 player has virtually unlimited potential for the number and length of sound files, anything's possible.

Well, progress.  The RF prototype is done and works great.  I get around 100 feet through several walls as far as range, more than I would have expected.  Clearly, I can get away with the RF module that I'm currently using.

 

This one has the same capability as the MiniCommander version, five sounds, but if you want to have a "shut-off", one of them has to be a null sound.  Obviously, that's not totally necessary, it could be a short clip of something that will run to completion and then stop.

 

I think this version deserves to get a PC board update (which I need to correct some other issues) to allow multiple transmit codes.  That will allow you to separately control multiple sound cars on the same layout.  I was concerned about the range, but after my initial tests, I think that's a non-issue.

 

Yes Stan, you'll be happy to note that the power supply EMI from the MP3 board was obviously the major issue.  The separate regulator for the uP and the receiver solve that problem completely.

 

The next step is a big one, combining both of these capabilities into one board, that's going to be a longer timeframe...

 

 

RF MP3 Interface Module N1

RF MP3 Interface Module N2

RF MP3 Interface Module N3

Attachments

Images (3)
  • RF MP3 Interface Module N1
  • RF MP3 Interface Module N2
  • RF MP3 Interface Module N3
Originally Posted by gunrunnerjohn:
I think this version deserves to get a PC board update (which I need to correct some other issues) to allow multiple transmit codes.  That will allow you to separately control multiple sound cars on the same layout. 

Are you going to use a "learning" receiver to deal with the addressing? 

 

Would the user have to solder pins on the 4-channel transmitter to change/set the address?

The one issue with the learning receiver is it apparently responds to all of the 4-button remotes of the type above when it learns one of them.  Also, I have another set with a similar receiver, but it only recognizes it's own remote, not any of the others.  I have yet one more coming, but from the variability of them, I don't know that's a workable solution. 

 

I'm guessing it'll have to be the jumper trick as I don't think I want to get into screwing around trying to match transmitters and receivers.  I'd like to figure a cute way to have the transmitter be able to select multiple receivers.  I'm also thinking I could have different receivers available and just ship a numbered receiver with the unit.  It's the transmitter selection that I'd like to solve.

 

I'm making final changes to the PCB, things like the missing resistors, adding a more robust secondary voltage regulator, etc.  The TO-92 one gets pretty warm, only 55C-60C, but I'm somewhat of a conservative type, and I'd like it to have a bit more capacity.  The new one is surface mount with a tab do the PCB will soak up some of the heat generated.

 

I also stuck a little SMT LED on the board to indicate you are receiving data, the "busy" on the receiver was a perfect place to pick up that info.

 

Just so I understand how learning works, do you push the button on the receiver, then you have up to X seconds to send any code (1 thru 4) from the transmitter, and the receiver then stores away the upper address bits?  Or did you receive a small instruction sheet and if so can you post it or link it?

 

If it's using the 2262/2272 chip pair set, it could be the data-rate resistor is different for the pair that only works with each other.  That's the resistor with a value in the 500K to 1M range.  Same bit pattern and same 315 MHz carrier but at a slightly different "baud" rate.  The resistors must match on the tx and rx modules.  Just speculation though...as I suppose a smart learning resistor could auto-baud (remember that from the old-days?!) and learn the bit rate coming in as well as the address!

 

In any event, on the receiver learning side, if it responds to all 4-button remotes when it learns "one of them" then what is that learning?  I thought if you mod different transmitters to be at different addresses, then you would press the learn button and within X seconds press any key on the desired transmitter to pair that transmitter and receiver.  Then go to the next receiver, press learn, and within X seconds press any key on a different transmitter (set to different address).  Etc..  No?

 

Yup. Sure would be a hassle having to modify the transmitter remote with a multi-position slide-switch or whatever to select different addresses.  Re-packaging the board into a different case also seems impractical.  This one's a head-scratcher.  Maybe someone else has an idea.

 

And I'll say it again. Ignoring the TMCC licensing thing for a second, it sure would be neat if you can just decode the TMCC serial command with it's address and use that as the address sent over the 4-ch universal remote.  That way you use the TMCC remote (or DCS remote) to select the sound card address, still use the "learn" mode of the receiver; but this would require decoding the TMCC serial command to re-transmit it over the universal RF protocol.

 

 

Originally Posted by stan2004:

Just so I understand how learning works, do you push the button on the receiver, then you have up to X seconds to send any code (1 thru 4) from the transmitter, and the receiver then stores away the upper address bits?  Or did you receive a small instruction sheet and if so can you post it or link it?

 

That's pretty much it.  There was no instruction sheet, I just had to experiment.

 

If it's using the 2262/2272 chip pair set, it could be the data-rate resistor is different for the pair that only works with each other.  That's the resistor with a value in the 500K to 1M range.  Same bit pattern and same 315 MHz carrier but at a slightly different "baud" rate.  The resistors must match on the tx and rx modules.  Just speculation though...as I suppose a smart learning resistor could auto-baud (remember that from the old-days?!) and learn the bit rate coming in as well as the address!

 

The one that didn't work is one of the learning ones with the button, so I thought it was going to be compatible.  I'm still learning about these.

 

In any event, on the receiver learning side, if it responds to all 4-button remotes when it learns "one of them" then what is that learning?  I thought if you mod different transmitters to be at different addresses, then you would press the learn button and within X seconds press any key on the desired transmitter to pair that transmitter and receiver.  Then go to the next receiver, press learn, and within X seconds press any key on a different transmitter (set to different address).  Etc..  No?

 

I honestly can't say what exactly it's "learning". as it does indeed respond to all the buttons, and even properly as well.

 

Yup. Sure would be a hassle having to modify the transmitter remote with a multi-position slide-switch or whatever to select different addresses.  Re-packaging the board into a different case also seems impractical.  This one's a head-scratcher.  Maybe someone else has an idea.

 

Until I come up with a better idea, I'll just plan on numbering the transmitters and use them like the Lionel LionChief stuff, one transmitter for each car.

 

And I'll say it again. Ignoring the TMCC licensing thing for a second, it sure would be neat if you can just decode the TMCC serial command with it's address and use that as the address sent over the 4-ch universal remote.  That way you use the TMCC remote (or DCS remote) to select the sound card address, still use the "learn" mode of the receiver; but this would require decoding the TMCC serial command to re-transmit it over the universal RF protocol.

 

Maybe in the future.  One thing I"m thinking of doing is try to do the serial transmission to the MP3 module and then use combos of the 4 buttons to trigger more sounds, and perhaps even an optional servo output.  The packet interface to the module looks pretty simple, I'm going to dig out my protocol analyzer and shoot some packets at it and see how it works out.  You have a total of 15 combinations possible, and I figure at least one would be a reset.  I could have more sound clip possibilites, that's certain to be useful.  Maybe an input telling me the car was moving?

 

I'm still thinking on those ideas...

 

 

 

I've come up with a tentative "final" configuration for this board.

 

Since these little 4-channel controls allow combinations of keys, here's my plan.

 

I'll have the board run with modes, each mode is selected with a two key combo.  Given that scenario, there are six modes I can select.

 

AB, BD, CD, AC, AD, and CB.  After you select a mode, then you can press single keys to select one of four functions available in that mode.  I figure that perhaps three of them would select sounds, that would give me a dozen sounds.  If I allow two PWM servo outputs, that would be one mode for the two extremes, open and closed.  I could also possibly have one of the servos slew slowly and allow manual positioning by how long you hold the respective key.  One mode would be to activate aux outputs, lights, couplers, etc.  The final mode would be used to calibrate the end points of the two PWM servos.

 

I've also been thinking about how to allow conventional operation without running up the cost and complexity too much.  One thought I had was the Lionel solution, use a 9V Alkaline battery for temporary power during direction changes.  I could add the battery on the input side of the regulator with diode isolation so it would only provide power when power was removed from the primary supply and the filter cap discharged below the nominal 9V available after the diode drop.  The bridge provides isolation from the track impedance when the voltage falls.

 

One issue is how to cut off the battery after a few seconds so we don't simply run it flat.  I'm thinking of a hopefully simple circuit that when the battery is supplying current that after a few seconds delay it cuts off the power.  I haven't worked that out yet.  This would allow me to just add a connector for the 9V battery as it wouldn't be needed for command operation, it would be an option.

 

 

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