Shop Learn
Model RailRoad DCC Projects - Page 2 — Parallax Forums

Model RailRoad DCC Projects

2»

Comments

  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2009-04-24 08:35
    I noticed the Xpress Net stuff. That is interesting too. I know there is a "LocoNET" personal edition but that is suppose to be for a non-commercial use. Why not open LocoNET? Basil, did you chose Xpressnet because LocoNET was closed more or because it was easier in hardware or they had a throttle you liked?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter, E.I.
    www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
    www.tdswieter.com
  • nohabnohab Posts: 96
    edited 2009-04-24 08:40
    Sure,·I'll post my raw loconet object, but for the moment it's just to raw to be published (e.g. comments in Swedish etc).

    Gimme the weekend and I'll back with some code.



    Added: The spec for LocoNet is owned by Digitrax. Everyone is free to use it for own use but for selling you need permission from Digitrax (and maybe some royalty)








    Post Edited (nohab) : 4/24/2009 8:46:23 AM GMT
  • BasilBasil Posts: 380
    edited 2009-04-24 11:13
    shanghai_fool said...
    I do not understand what S88 is supposed to do. Please explain.

    S88 is simply a system for gathering feedback from devices. It would not be used for normal operation, mostly for automation and monitoring. Just something I thought i'd add to the system.
    Timothy D. Swieter said...
    Why not open LocoNET? Basil, did you chose Xpressnet because LocoNET was closed more or because it was easier in hardware or they had a throttle you liked?

    A number of reasons.
    a) Xpressnet is basically RS485, so normal MAX485 drivers and software can be used. This also means its simple to multidrop, cabling is cheap and longish runs can be achieve without the need for proprietary repeaters etc.
    b) Xpressnet is developed by Lenz who originally created the DCC system and now work very closely with the NMRA to add new features. Take a look at the lenz website if you want to see up coming things [noparse]:)[/noparse] BiDi communication and asymetric control are on the list [noparse]:)[/noparse]
    c) Its open and the protocol made sense to me [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    -Alec

    Velden in N scale

    Post Edited (Basil) : 4/24/2009 11:19:42 AM GMT
  • John PJohn P Posts: 5
    edited 2009-04-24 14:49
    You can drive Tortoise switch motors between the outputs of two op amps, where one would go high and one low. You can run these off logic inputs if you set them up as comparators, comparing an input with (let's say) a 2 volt level. Even an LM324 quad op amp, which costs next to nothing, can do this job, and you'd be able to run two turnouts per chip.
  • BasilBasil Posts: 380
    edited 2009-04-24 22:28
    Agreed with John.
    S88 would be used when you want feedback to whatever automation system you are using for your layout (if any).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    -Alec

    Velden in N scale
  • nohabnohab Posts: 96
    edited 2009-04-25 22:20
    Being an open shift register, s88 can be sensitive to disturbanses.
    Futhermore s88 and XpressNet are polling systems (central device asks other devices for events) while LocoNet is a peer-to-peer network, thats the reason i prefer Loconet.

    (Please, I don't want to start a "war", just telling my experiences)
    ·
  • BasilBasil Posts: 380
    edited 2009-04-25 22:47
    Fair enough [noparse]:)[/noparse] I agree with all your points [noparse]:)[/noparse]

    This brings up an interesting concept.

    If we can all create objects which will function standalone (i.e. not rely on other objects except perhaps a central management cog) then it would be fairly easy to implement a modular type of DCC command center.
    That way someone could come along and pick and choose which features they want, and which bus protocols suits them, and just drop them into the code. If the user did not want to use S88 or Xnet, then they could drop them out and replace with say LocoNet.

    The use would only have to write central management object. The block diagram on my blog is my attempt to visualise the concept.
    There would need to be some standard for the central database which all of these modules interface into and each module would update or read from this database (bus system, DCC queue manager, user interface, automation system etc etc)

    What do you all think? At its heart I guess this is what objects are for so its not exactly a new concept [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    -Alec

    Velden in N scale

    Post Edited (Basil) : 4/25/2009 10:54:21 PM GMT
  • JoJo Posts: 55
    edited 2009-04-27 01:38
    Sorry for the long delay (real life interference). Anyway, attached is the DCC controller my son and I put together using the Propeller.
    Note that the programming is a bit redundant, but it was intended as much as a practical project as a teaching vehicle about programming etc.
    The zip archive includes schematic, instructions and all the required code. Configuration mode is not complete (as we can always configure the PropDCC by reprogramming the propeller), but operation and programming modes are complete, working and tested smile.gif

    This is a fully self-contained DCC controller supporting 4 trains (currently) with planned expansion for wireless throttles (using RFM12b transceivers; it is connected in the schematic, but not in programmed yet). NOTE that there may be some mismatches between the schematic and the program as this is a work in progress.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ---
    Jo
    DCC.zip 48.8K
  • shanghai_foolshanghai_fool Posts: 149
    edited 2009-04-27 02:31
    @ John P
    Thanks, I will try the opamps. That may save me a couple of inverter chips.
    @ Basil
    Your block diagram is pretty much what I had come up with also But I don't yet know enough about DCC protocol to fill in the blanks. I'll get there eventually.
    @ Jo
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2009-04-27 22:22
    Shanghai Fool - I have purchased through Digi-Key rotary encoder knobs that look like pots, but are in fact rotary encoders. I don't have the part number off the top of my head and the parts are sitting on my desk back in HK (I am traveling right now). If you are able to order through Digi-Key you could consider this parts instead of working with guts from the mouse.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter, E.I.
    www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
    www.tdswieter.com
  • shanghai_foolshanghai_fool Posts: 149
    edited 2009-04-28 00:49
    Tim,
    Yes, Digikey carries the less expensive Grayhill series 25L which have a max resolution of 36 steps for ~$5 but I would rather have more resolution than that. The good ones (128+) steps are over $30. Also shipping is $70+.

    The basic mouse wheel has ~60 pulse/rev but with mechanical link can have much more. I'm sure they have some made here but I am having trouble finding them.
  • jfeet28jfeet28 Posts: 3
    edited 2014-01-04 14:49
    I'm grateful to all of you here for sharing your ideas on DCC. I am a newbie to Model Railroading, never had the time to block out the old DC track plans. But now with DCC I am up and running an oval with plans for a 10 switch 4x8 layout. That will be the foundation for future expansions of my railroad, I have a huge downstairs I can use.

    I have been approaching my entrance into DCC a little differently. I find that you get into big bucks right away if you want to combine locos with accessories such as switches, sensors, signals, lights etc. on a single controller. I am exploring just using my Bachmann commander that came with my set for strictly loco and sound use. Later I will purchase something like a digitrax in order to do some CV programming and access more sounds. BUT I am exploring the use of Propeller for all accessories including switching. It looks like it's much more cost effective and 100% customizable and within my Prop experience (I think!). Just leave the controller to the locos and sound.

    I plan to stick with the grey ez track because it is very sturdy, sets up well in ballast and scenery, and is fairly realistic. It meets my needs. A DCC turnout is 40-50 bucks so that is out due to cost but also for reasons above involving commercial controller address count limitations. So, I have ordered an EZ track remote switch (Non DCC) for testing. My initial idea is to use four input pins on the prop to setup 16 automated routes (binary) controlling up to 11 switches on the remaining output pins. My first attempt will be to output to L293Ds - two switches for each. I am assuming 5 pinouts per L293D by sharing a common EN1,EN2 pinout from the prop for ea. L293D. My theory is if I set these low at the outset then if I activate only one switch on the L293D, the other (say 3A and 4A, having previously been set low, will not activate the switch they are hooked up to even if EN2 is enabled on the common EN pinout from the Prop to the L293D. My only question, which I hope to solve on my test with the ordered switch segment, is how does the non DCC ez track turnout behave with a direct run from an L293D? My assumption is that I would reverse the polarity (either H L to L H or reverse) on 1A and 2A to momentarily activate the switch, then set (L L) on all four (1-4A) and go low on EN1,2) to turn everything off. The L293Ds will be powered on their VCC2 with 16v DC.

    With 10 or 11 switches (eventually) I may not have enough current to cog out switches simultaneously so I may have to switch serially in the code, not the best use of the prop. Will see what the current draw is when I start ganging switches once I nail the driver and switch operation questions down.

    Quite frankly, I may not know what I'm talking about and may smoke the switch. If anyone out there can see I'm headed for a train wreck (pun intended), please let me know. I'm not so smart on components or the prop yet.

    For input, my intent was to test with a dip switch for the binary 4 bit input that gives me the 16 route options, but then go to production final with a membrane keyboard if i can figure out how to request a route using only one pin. On the dip switch, the prop would read and combine the bits from the four pins to determine which of 16 pre-programmed routes is requested. ( I can get fancy but I don't think i need a display, just LED indicators ). If there is a way to send a route request for unlimited (other than Prop mem space) nr. of routes using only one input pin, rather than the binary dip switch approach, I would be very, very interested.

    I will use a manual DPDT switch to go to a second Prop to a set of individual momentary switches, wired in parallel with the L293Ds, so that I can activate individual turnouts manually and configure a route on the fly.

    Am I anywhere near the right track here? (pun intended again).

    To summarize, I am not attempting to build a DCC controller. I am attempting to offload accessory management off of DCC and onto a platform I can customize completely without track power from DCC. Yes, that means individual wiring, but for me the tradeoff would be absolute control of accessories without huge cost and address count limitations.

    Thanks in advance for any help or advice. Again, I'm not an electronics genius. I am a 30 year HAM and understand the basics and RF etc. but driving motors and switches (turnouts) is not my forte.

    Thanks again, and keep charging on the DCC controller project. The idea of a modular approach should be adopted by this forum as a standard. In my opinion, that was a fantastic idea.

    John
  • After letting it sit, I'm finally working on my model railroad again (ALL CATS have been banned from the basement to allow this). I'm looking at building a realistic throttle/cab for my layout. It will only run one train, but will make the operations as realistic as possible, including the physics.
    I have a P.I. Engineering RailDriver that I use with the train simulator on my computer and want to make that the basis for the control unit. See Attached Block Diagram. I figure this development will involve several stages:
    1. Code to allow reading the RailDriver control settings and buttons.
    2. Code for basic train control on the DCC output.
    3. Code to input train data, eg. DCC engine number, train mass, engine performance, brake performance.
    4. Code to calculate train status and generate appropriate DCC output to mimic prototype behavior.
    5. Code to generate gage overlays on the engine camera monitor.
    I'll post photos/code/schematics as the development continues. This link will show the layout that I hope to run this on.
    https://www.facebook.com/rbrockmeier/media_set?set=a.1144633302789.2022145.1436215635&type=3
    1407 x 815 - 86K
Sign In or Register to comment.