Introducing DCC++ ---a complete open-source DCC station and interface

Gregg Aug 25, 2015

  1. UK Steve

    UK Steve TrainBoard Member

    453
    683
    12
    Kevin,

    Thanks for your interest, I do hope you ordered the shield I pictured in my post. There are lots of similar looking products that will not work as I describe.

    Regards,

    Steve.
     
    Scott Eric Catalano likes this.
  2. jbsorocaba

    jbsorocaba TrainBoard Member

    47
    33
    13
    Hi Steve
    I am following your projects and the last one ( ESP 8266 ) works fine with the html code.
    Now I will try to make your next project with a TFT screen.
    When you think you will have the code. .?

    JB
     
    UK Steve and Scott Eric Catalano like this.
  3. KC Smith

    KC Smith TrainBoard Member

    109
    111
    12
    Hi Steve,

    Yes the boards look Identical, of course these are stock photos I'm sure.

    I ordered mine through a Canadian supplier, the exchange rate is better and I've always had great luck with this distributor. This is the one I purchased:
    http://www.ebay.com/itm/262136737960?_trksid=p2057872.m2749.l2649&ssPageName=STRK:MEBIDX:IT

    Looking forward to you posting your project on the "Links to DCC++" post.

    Regards,
    Kevin
     
    Scott Eric Catalano and UK Steve like this.
  4. UK Steve

    UK Steve TrainBoard Member

    453
    683
    12
    Hi Kevin,

    That's the one.

    On the project, I'm thinking of doing a full tutorial thread so all members no matter their ability can follow and refer back to.

    Saves me answering the many questions that will doubtless crop up.

    I also had an idea to port the code to an Arduino so people can test it without the need to commit to the Nextion display.
    One would substitute to the Serial monitor for testing. Gives me more time to come up with a presentable looking display.

    You could also play around with cheap Rotary Encoders, again just spending to ones budget, my CNC type is over $15US.

    Steve.
     
    Last edited: Jul 9, 2016
    Scott Eric Catalano and KC Smith like this.
  5. Curn

    Curn TrainBoard Member

    753
    500
    32
    I have a few of those ESP8266 shields with dip switches, a few more motor shields, and a clone Uno on the way from China.

    Once the WiFi shield arrives, I would drop the USB connection, and would like to only have to provide one power source to the system. Being I'm working in Z scale, a 2A 12v system is more than enough. Reading up on the Uno, the 2.1x5.5mm barrel plug should be supplied with 6-12v or 7-12v or 9-12v (depending on who's giving advice), the 5v regulator will drop it down to supply the 5v, and the Vin will feed the 12v up to the motor shield. Now many people don't advise this for long term use as the 5v regulator can get quite hot regulating down 12v to 5v. I also saw the observations that the Chinese motor shields L298 chips tend to get warm under continuous use, so I figured I would try some heat sinks. The Raspberry Pi heat sink sets are about the perfect size for these two components, they don't stick up high enough to touch anything on the shields above, and are pretty cheap. I reconnected to Vin trace on the motor shield and tested. The L298 chip stays below 35C and the 5v regulator isn't going over 45C. Probably unnecessary, but they are cool anodized blue.

    Heatsink.JPG
    Matt
     
    Scott Eric Catalano and KC Smith like this.
  6. Atani

    Atani TrainBoard Member

    1,474
    1,781
    37
    Finally I have my Mega 2560s and motor boards.. I am now officially converting over the remaining fleet of engines to DCC. One down and a bunch more to go once I have the decoders. Until then I will be running with a limited loco set.

    So far so good... Now to get my throttles finished up so I can control it as it goes around the layout without sitting at the PC typing in commands.

    pic of base station in part of the case, can't put the top on as the pins don't quite reach through :(
    https://goo.gl/photos/ySZovVgiG8pN5hYm7

    Will be trying other cases eventually, this was a cheap one from China that fits nice but doesn't work well for me exactly. I also have on order a couple other motor boards to work into boosters, going to split the layout into three power districts: upper deck, lower deck, helix. The helix will take the "MAIN" from the base station and PROG will be a siding on the lower deck with a pair of relays flipping it to MAIN when not needed for programming. I saw a request for this on github so will send a pull request with it soon.
     
    Scott Eric Catalano and KC Smith like this.
  7. Atani

    Atani TrainBoard Member

    1,474
    1,781
    37
    I have a set of similar ones that I picked up a long time ago for a PC upgrade that I never completed, they were for the RAM. If I can find them again I will be doing the same as I have a pair of the cheaper motor boards as well. Also looking at non-passive cooling options with a small PC fan that was supposed to fit to the northbridge heat pipe setup. I had a couple of them but can't find but one of them now.
     
    Scott Eric Catalano likes this.
  8. dimonic

    dimonic TrainBoard Member

    23
    15
    2
    That is some truly awesome work - thank you for sharing. I stand in the shadows of giants.
     
    Scott Eric Catalano likes this.
  9. esfeld

    esfeld TrainBoard Member

    443
    382
    17
    Out in California for a week ... can't wait to get home and catch up ...... having dccpp withdrawal.
     
    UK Steve and Scott Eric Catalano like this.
  10. Itzik

    Itzik New Member

    3
    3
    1
    HO Double reverse loop - Wiring Help !!
    Hi, hope that I’m in the right place to get some help.

    I’m in a stage of building (DCC) HO ‘Double Reverse Loop’ Layout (total track length: ~15m) with:
    2 reverse loop (loop A - ~5m / Loop B - ~6.3 m / Helix – ~4 m used as a main line between loops)
    I plan to run 2 locos at once and I intend to operate it using DCC++ (Arduino mega) that will be built later (big project!!)

    Based on what I’ve read in Trainboard forum & other Google source regarding my layout I plan to:
    1. use 2 separate auto reverse module (one for each loop)
    2. use 2 track feeder in each level of my helix (2 levels helix)

    My questions are:
    1. How to feed each reverse loop? (now I have only one track feed from the auto reverse module)
    2. Is there any project that used DIY auto reverse based on Arduino ?
    3. Is there any tips that i

    Enclose – my base layout plan (tracks & wiring)


    Thanks ,

    Itzik layout wirring.jpg
     
  11. jbsorocaba

    jbsorocaba TrainBoard Member

    47
    33
    13
    Hi Itzik
    You are in the right place but in wrong topic.
    This is DCC++ topic . Please post your question in " DCC and Electronic " and a lot of guys will help you.
     
    Scott Eric Catalano likes this.
  12. esfeld

    esfeld TrainBoard Member

    443
    382
    17
    UK Steve
    morning ... I'm just back from a week away and getting my head back into our projects. I can't find your post on the procedure for entering loco numbers into your throttle interface. I get a proper response from a loco coded into the sketch but not one I enter from the screen. If I remember correctly you had a specific order to input a loco number. Thanks
    Steve F
     
    Last edited: Jul 18, 2016
    Scott Eric Catalano likes this.
  13. UK Steve

    UK Steve TrainBoard Member

    453
    683
    12
    Hi Steve,

    Nice to have you back, I hope you had a great time in Cal.

    I guess you are talking about the twin slider html page. Long time since I had a look at that, but if I remember correctly (because I can't seem to find a copy of the open input type)
    you enter the number in the empty box, then click or tap on an inactive part of the page. Now assign to A or B in the normal way.

    Steve.

    Update; there is a copy on page 63 post #1241. The procedure described above works ok for me.

    Update 2; see post #182 here http://www.trainboard.com/highball/index.php?threads/dcc-hardware-throttles.90315/page-10
    top of the page is my latest development.
     
    Last edited: Jul 18, 2016
    Scott Eric Catalano likes this.
  14. esfeld

    esfeld TrainBoard Member

    443
    382
    17
    Steve
    Had a great time, thanks. Yes, the twin slider page ..... getting crazy response from the page ... sometimes only one throttle works and if I change the loco number it indicates the change but still controls the earlier loco .... I'll keep playing with it and see what's up. As I said before I left, I am anxiously awaiting the finalization of your latest development. Regards
    Steve F
     
    Scott Eric Catalano likes this.
  15. UK Steve

    UK Steve TrainBoard Member

    453
    683
    12
    Steve,

    When you load a new number to be controlled (loading a throttle if you like) as you know the corresponding number should be shown in the field with the black background.
    The command string routine derives the loco number from that very field and gets the other info from the last stored return string or the default whichever applies.

    Hope that will give you a better idea of what might be going wrong.

    Is your Wang Tongze shield back on the bench yet, mine is working great !
     
    Last edited: Jul 18, 2016
    Scott Eric Catalano likes this.
  16. esfeld

    esfeld TrainBoard Member

    443
    382
    17
    Steve
    Re: Wang Tongze ...... no, I never got passed configuring the ESP and put it aside ... would love to see what you did to get it "working great"! ......
    Steve F
     
    Scott Eric Catalano likes this.
  17. UK Steve

    UK Steve TrainBoard Member

    453
    683
    12
    Steve,

    Very simply, with your shield attached to an UNO or other Arduino, connect to a USB put all the DIP switches to on or 'up' if you like.
    Use a jumper to pull reset to GND (removes the UNO mcu from the serial line), you now have serial through to the ESP and you're in flash mode.
    Upload the server sketch.
    Remove the jumper and put switches 3 and 4 to off or 'down'
    Reboot (cycle power)
    You're done !

    Steve.

    Edit; Reset is marked RST on the shield, jumper to Gnd.
     
  18. esfeld

    esfeld TrainBoard Member

    443
    382
    17
    Thank you .... Just got 4 UNOs from China .... will try it and report as soon as I catch up on what a week away left me :)
    Steve F
     
    Scott Eric Catalano likes this.
  19. esfeld

    esfeld TrainBoard Member

    443
    382
    17
    Steve
    …. Back at it. I uploaded the base station sketch to a new UNO … could not upload the ESP sketch to the Wang Tongze the way you described (esp_open failed) and so uploaded the sketch using FTDI and an IP scan shows the presence of the ESP at the proper 10.0.0.11 IP. I am still plagued with a failure to connect with “WebSocket closed” errors …. attempts to reconnect immediately return a “Disconnected” ….resetting both boards does not help. Hitting "Exit Reset" just hangs at "Closing WebSocket". This has happened on other ESP stacks as well. Any ideas on solving the “WebSocket closed” errors?
    Steve F
     
    Last edited: Jul 20, 2016
    Scott Eric Catalano likes this.
  20. UK Steve

    UK Steve TrainBoard Member

    453
    683
    12
    Steve,

    I suspect there is a common device fault for all your issues. My thoughts are leaning towards your router as that ultimately controls what connects to what under which
    protocol, security etc. Do you have a spare one you could set up to run some tests on, obviously you wouldn't need an internet connection. Just plug in and connect your ESP's
    in there own mini WLAN. Don't set any encryption for now just run the whole system for a few days on it's own network. 802.11n if you can.
    I had a home router issue some months back plaguing me with a total and random loss of the WiFi signal.
    Overall modern routers are very reliable, I fixed mine by doing a factory reset to clear out some old rules that had been set years ago.
    The whole system has been fine since.
    And as I've said before your ESP's should be as reliable as any other device on your network.

    Steve.
     
    Scott Eric Catalano likes this.

Share This Page