Shop OBEX P1 Docs P2 Docs Learn Events
A bit of a long post but sound advice appreciated. — Parallax Forums

A bit of a long post but sound advice appreciated.

Mike DenchMike Dench Posts: 13
edited 2011-08-01 20:23 in General Discussion
I'll try and keep this as succinct as possible. I need to know if I'm wasting my time!

My understanding of a Basic stamp 'micro-controller' is that it is a switching device that can be programmed to carry out a number of operations via its I/O ports.

I became interested in this because I have some familiarity with Tiny Basic and so I thought that a modern chip would effectively be much like an old microcomputer (like the Sinclair) only a great deal smaller and quite possibly more powerful too.

My hobby of Lionel model trains makes me want to have some of the features on their high end stuff which runs over $1000 a loco, specifically sound and lights and smoke unit controls allowing one to emulate the real thing. I should put in a video clip so you can see and hear what I'm after.
http://www.youtube.com/watch?v=ZlnnwVFrM1Q&feature=player_embedded

So I thought perhaps investigating the capabilities of a micro controller and using it to control the output of sound chips by measuring the rotational speed of the wheels and switching from one to another sound set accordingly, I could duplicate the same effects without spending so much.

I've seen various applications like singing birthday cards that make it obvious these sound chips can be extremely small, there's not much space inside a steam engines boiler to fit all this stuff. I really don't have a clue how to go about this, for all I know there may be chips out there that can do all I want from their built in capabilities.

I don't even know where to start looking to find answers. Any useful advice would be much appreciated. If I'm wasting my time don't hesitate to tell me so just explain why its an impractical idea please.

Thanking you in advance.

PS:- Just for anyones further interest.
Lionel originally made a reasonably priced command control system known as TMCC. They have stopped making it and now sell a more expensive but more advanced system called Legacy. Trouble is, its too advanced. The old system was simple and Lionel claims they cant make it any more because the chips are no longer available. I find this a bit suspicious when the hoary old Z80 is still soldiering on and I wanted to see if I couldnt build my own system. I think there might be a market for it especially old duffers like me who really only want the basics anyway!

Comments

  • Kevin WoodKevin Wood Posts: 1,266
    edited 2011-07-21 07:05
    Have you considered using the Propeller instead? You could probably generate the sound you need directly, and it would easily handle the other tasks. It's little bit harder to get started with, but there's plenty of help available here.
  • Mike GreenMike Green Posts: 23,101
    edited 2011-07-21 07:13
    It's not an impractical idea at all, but you've got a lot of interesting learning and experimentation to do along the way. You might also consider the Propeller rather than the Stamp because the Propeller can produce quite complex sounds all by itself plus handling various sensors (wheel speed, ambient light level, maybe even commands sent through the tracks). For example, there's a program for the Propeller that's known as the Singing Monks that does 4-part harmony in stereo (with the voices strung out along the stereo axis). There are several program libraries that emulate various old video game sound chips.

    Wheel speed can be easily measured optically by attaching a tiny magnet to a wheel and a Hall-effect sensor nearby that produces a pulse whenever the magnet passes the sensor. The same thing can be done optically with a spot of reflective tape on the wheel and an LED and phototransistor arranged so the spot reflects the LED light into the phototransistor on every revolution of the wheel.
  • TtailspinTtailspin Posts: 1,326
    edited 2011-07-21 08:13
    You should have an easy time of fitting electronics into lionel size rolling stock, at least compared to N and HO scale.
    It allmost looks like the Prop Proto Board would fit in a large box car, So that would offer on board lighting and sound,
    The speed and and direction could also be controlled automaticly with the right sensors in place.
    An allmost endless list of detectors, switches, and throttle styles...
    The automation opportunities for model railroads is allmost unbelievable, with all the available accessories.
    Now you "run" the trains, instead of your control panel...

    My Ho layout is why I wanted a Microcontroller to begin with, only one problem though....
    The propeller delivers so many different things at once, It can be a bit overwhelming to design your Train layout.
    The prop takes DCC to a whole new level...
    You will see what I mean when you start drawing track, and you realize all of those reversing loops and stations stops can now be automated...

    -Tommy
  • Mike DenchMike Dench Posts: 13
    edited 2011-07-21 08:43
    Thankyou very much Kevin, Mike and Tommy. You have given me hope. Now I know what to start boning up on. Propeller docs here I come!
  • Mike DenchMike Dench Posts: 13
    edited 2011-07-30 07:38
    Ahle2 wrote: »

    Lots of interesting info on that thread. Thankyou for taking the trouble to find it for me. I have found several easy, cheap ways of getting the sounds I want by adapting or buying existing products but I still intend to have a go myself and experiment with the Propeller when I have the opportunity (meaning long winter evenings).

    If you are interested here is a link to an electrical engineers website who has reverse engineered the TMCC unit I mention at the end of my last post. I have very little knowledge about electronics, is it possible to use the Propeller to replace the chip they say is no longer available as shown in his articles?

    http://www.trainfacts.com/
  • GadgetmanGadgetman Posts: 2,436
    edited 2011-07-31 13:47
    Which chip is it thats no longer available?
    (I skimmed the article, but couldn't find a mention)
  • kwinnkwinn Posts: 8,697
    edited 2011-08-01 20:23
    I didn't see anything in the video that the prop could not do as far as sound goes, and as for activating lights, rail switches, and other mechanical devices the prop can do that easily.
Sign In or Register to comment.