Results 1 to 5 of 5

Thread: ESP32 Based Web-Controlled Servo Turnout Control

  1. #1
    Join Date
    Jan 2019
    Location
    Williamsburg, Virginia, USA
    Posts
    15
    Thanks
    0
    Thanked 34 Times in 12 Posts
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default ESP32 Based Web-Controlled Servo Turnout Control

    I just spent two weeks in a Chicago hotel while doing training for work. Every night I put some time into writing code based on the ESP32 module to control servos through a webpage. I shot a video while I was working on it to show some progress.

    https://youtu.be/HkO9X_CsMnE
    Jason Rausch
    N Scale (Mostly)
    BNSF, N&W, Conrail, PRR and NS
    RPC Electronics, LLC (Model Railroad Electronics)
    rpc-electronics (dot) com

  2. The Following 2 Users Say Thank You to KE4NYV For This Useful Post:


  3. #2
    Join Date
    Mar 2016
    Posts
    74
    Thanks
    63
    Thanked 67 Times in 44 Posts
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default

    Interesting project. I can see how using the wireless comms of the ESP32's will make hooking up multiple 'controllers'. I've been developing Arduino 'servo control' code. Setting the 'servo' end points is a critical function that needs to be 'easy' to configure - and as you mentioned each servo is potentially 'unique' and hence needs to be calibrated to some degree. I use a second Arduino as a Configure Master using the I2C interface to setup each servo.

    I would also suggest considering controlling Relays for the frog power, and other pins for indicating the turnout state. This can be where you start to run short on pins. Another 'want' is to be able to link multiple servos together for controlling crossovers etc.

    Happy programming!

  4. #3
    Join Date
    Jan 2014
    Location
    Leavenworth Ks
    Posts
    719
    Thanks
    2,539
    Thanked 1,869 Times in 471 Posts
    Mentioned
    22 Post(s)
    Tagged
    0 Thread(s)

    Default

    I have 7 Arduino mega's with sensor shields controlling over 55 servos on my layout now, and in the process of adding 4 more mega/shields for another 47 servos as I write this. 6 of the mega's are/will be used for yard throats, with 10 to 16 servos on each. I'm using rotary switches to control them in the yards. For single servos, I use a dpdt switch and one side control's the servo and the other side indicates on the control panel with LEDs. The mega and shields are cheap enough that I'm using them any place that I have a large group of turnouts. I have a small staging yard that I'm using a Uno with a sensor shield. That one just has 6 servos on it. The longest signal wire that I've run so far is about 10 feet and it's 18 gauge wire and seams to work OK. I use a 5 volt buss that I wire all the servos power and ground to and just a signal wire that goes back to the Arduino. The longest activate wire I've run so far is about 15 to 18 feet. I used 18 gauge 12 conductor shielded cable on them and have had no problems so far.


    Quote Originally Posted by MDB View Post
    I would also suggest considering controlling Relays for the frog power, and other pins for indicating the turnout state. This can be where you start to run short on pins. Another 'want' is to be able to link multiple servos together for controlling crossovers etc.
    Just to keep costs down, I use a small limit switch on the 3D printed servo mount to power my frogs.
    Rodney

    Here is my build of my n-scale railroad
    https://www.nscale.net/forums/showthr...-50-8-quot-%29

  5. The Following User Says Thank You to Rodsup9000 For This Useful Post:


  6. #4
    Join Date
    Feb 2014
    Location
    Oklahoma, USA
    Posts
    415
    Thanks
    380
    Thanked 924 Times in 252 Posts
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)

    Default

    Quote Originally Posted by MDB View Post
    Another 'want' is to be able to link multiple servos together for controlling crossovers etc.
    Depending on your Arduino control method, shouldn't this be pretty straightforward? My present turnout solution is a JMRI - Arduino connection, and setting something like this up as a route in JMRI would be pretty easy.

    Sam

  7. #5
    Join Date
    Mar 2016
    Posts
    74
    Thanks
    63
    Thanked 67 Times in 44 Posts
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default

    Sam

    I haven't 'yet' gone the JMRI route - that is something for the future. As I have the written my own Arduino code, is it easy enough for me to program the desired functionality which I guess is the essentially the same as 'programming' a JRMI route.

    My comment was more aimed as a functionality suggestion for Jason's project as it was something that I've needed.

Similar Threads

  1. Switch Board for Servo Based Turnouts
    By KE4NYV in forum Turnout Control Devices, Signaling, & Detection.
    Replies: 6
    Last Post: 1st Oct 2019, 09:36 AM
  2. Servo Turnout Control w/ DS64 and ECOS
    By Chicago Rail in forum Turnout Control Devices, Signaling, & Detection.
    Replies: 9
    Last Post: 4th Jul 2017, 04:23 AM
  3. Servo turnout control
    By iwlf in forum Turnout Control Devices, Signaling, & Detection.
    Replies: 4
    Last Post: 18th Jan 2016, 09:13 AM
  4. Remote turnout servo control
    By Webbcreek in forum Turnout Control Devices, Signaling, & Detection.
    Replies: 46
    Last Post: 30th Dec 2013, 09:39 AM
  5. Installing a servo to control a c55 turnout
    By seanm in forum Tutorials
    Replies: 19
    Last Post: 27th May 2012, 12:19 PM

Posting Permissions

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