Recommendations - Model Train Controller


Closed Thread
Results 1 to 40 of 102

Hybrid View

  1. #1
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by malc-c View Post
    Hi guys and gals,

    Just want to pick your brains over a project I'm looking at starting. I want to build a controller for a club layout and thought that I could use a PIC rather than traditional descrete components.

    The controler will initially have direct control (ie no simulated coasting and breaking), so I thought of two possible ways the PIC could be used, and wondered if you had any comments.

    The first is to use A/D to read the voltage on one pin, and then output a DC voltage to a FET / power transistor to drive the motor from a 12v supply.

    The second uses the same A/D to read the voltage on a pin, but the output is PWM (or more exact PPM), which is then used to drive the FET or power transistor in the same way.

    The reason I wanted to use a PIC was to add things later such as auto station stops (triggere by a sensor on the track) and simulated inetia, and programming the pick to to that might be better than loads of high value capacitors and the like
    Not 100% sure what it's called, but have you ever heard of DMC control (again, not sure what it really is)?
    As far as I know, you put DC power to the track, superimpose a digital HF signal over the top of the DC power (AC riding on DC). Each 'unit' has a receiver waiting for some sort of encoded sequence, whatever. 1000 different ways of doing it I suppose. Not sure how I'd do it if I had to. Maybe even IR LEDs spaced out everywhere along the track and IR detectors in each 'unit' to detect various codes and commands...

  2. #2
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    Thanks for the input

    Yes I'm awear of the "digital revolution" that is now appearing in the model railway world, however its not a possibility here for several reasons.

    1) - its a club layout, so we need to use "traditional" controllers so that members can run their own locos, and most don't use DMC

    2) - we're modelling in N gauge, and most of the modules are too large to fit is the intended stock

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by malc-c View Post
    Thanks for the input

    Yes I'm awear of the "digital revolution" that is now appearing in the model railway world, however its not a possibility here for several reasons.

    1) - its a club layout, so we need to use "traditional" controllers so that members can run their own locos, and most don't use DMC

    2) - we're modelling in N gauge, and most of the modules are too large to fit is the intended stock
    So, you have member A, with his regular ol' analog controller (big transformer, big pot, reversing switch, etc) running his loco on the same length (electrically and physically) of track (only for arguments sake) as member B who has his own controller and his own loco...

    And you want them to be able to control their 2 loco's independently...using those same controllers so the members don't have to go out and buy completely new stuff, but instead add new stuff to the output of their old stuff to make their old things do new things...

    And be able to fit these controllers inside an N gauge loco...

    Woof! Ya don't ask for much do ya

    Or have I missed something...(I probably have). I've got a few ideas (as I'm sure others do), but each one of them would require some sort of PCB to be added to each loco so it could decode what it needs to do. A small PIC based decoder with a MOSFET using bidirectional PWM drive shouldn't take up that much space (maybe 1 or 2 sq.inches. at most). I've got a 3 channel driver board that'll handle a few amps on each channel, has a 16F628A onboard along with a few other things and it's almost small enough to fit inside an N gauge loco. Take off those 'other things', redesign the board and it should fit...but again, I've probably missed something...

  4. #4
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post

    Or have I missed something...(I probably have).
    - yeah you've gone a little off the rails

    So, you have member A, with his regular ol' analog controller (big transformer, big pot, reversing switch, etc) running his loco on the same length (electrically and physically) of track (only for arguments sake) as member B who has his own controller and his own loco...
    No - the member will not be asked to bring their own controllers. The idea is that the club layout will have its own control panel with its own controllers, and as 96% of the membership don't have DCC type control the decision was taken to build "traditional" means of control so that on a club night any member can bring their own locos along and "play trains"

    As we need the option to control four trains at one time, I thought that the use of a PIC could reduce the amount of descrete components required (or use 2 pics if there aren't any that have 4 A/D ports - have yet to check the Microchip site) - especially when the controller gets developed a stage further and we build in delays to represent coasting, and simulated acceleration.

    Hope that makes it clearer

  5. #5
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Wink Good Engineering Exercise

    Hi, Malc

    Here you have THE Thing you look for ...

    just to translate from "Old" logical circuits to PIC ...

    All functions to program are clearly shown.

    Alain
    Attached Images Attached Images
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  6. #6
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    Nice !

    I was hoping for something with a component count in single figures

    Seriously though, thanks for the drawing - I'll have a study in detail later

  7. #7
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default the idea

    hopefully the attached image will try to get over my idea. By adjusting VR1 the resulting value is used to adjust the PPM output on RB0 which (via the power tranny) is fed to the tracks.
    Attached Images Attached Images  

Similar Threads

  1. Microstepper controller
    By aratti in forum Schematics
    Replies: 14
    Last Post: - 3rd January 2015, 16:52
  2. problem with the GSM controller
    By Dariolo in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 30th May 2009, 20:33
  3. Replies: 2
    Last Post: - 14th July 2008, 22:11
  4. Model Train controller - revisited
    By malc-c in forum mel PIC BASIC Pro
    Replies: 32
    Last Post: - 8th May 2007, 09:40
  5. Dedicated LCD Controller question
    By chuckles in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 27th February 2006, 14:44

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts