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

Gregg Aug 25, 2015

  1. Gregg

    Gregg TrainBoard Member

    237
    311
    18
    Putting another loco on the track at the same time is a very clever idea. Should solve the problem.

    You could also manually program CV17 followed by CV18. Each would show a fail but would still work.
     
    Scott Eric Catalano likes this.
  2. esfeld

    esfeld TrainBoard Member

    442
    382
    17
    Gregg
    Arduino Mega with Arduino Motor shield:
    I know this is basic but I am trying to get my head (train of thought) back
    into the project after a month away traveling ....... compiled/uploaded the new Base Station Oval track sketch
    ... everything starts and connects on Com 4 .. (on the motor shield I do have pins 5/12 and 10/13 connected)but can not get the software power button to respond.
    I have 15V confirmed into the motor shield input .... all the buttons in the software respond (cab#, tracks, menus) except the power button. Any ideas?
     
    Scott Eric Catalano likes this.
  3. Gregg

    Gregg TrainBoard Member

    237
    311
    18
    Can you operate the throttle once you select a cab (just the slider itself, not necessarily whether or not any trains move)?
     
    Scott Eric Catalano likes this.
  4. esfeld

    esfeld TrainBoard Member

    442
    382
    17
    NO, I can select a cab and ignite it's functions but I can not move the throttle (the curser disappears).
     
    Scott Eric Catalano likes this.
  5. Gregg

    Gregg TrainBoard Member

    237
    311
    18
    Okay - that suggests Controller is not speaking to the Arduino (it's also why the power button does not work). When you first launch Controller, are you getting a status message at the top that says the Base Station was found? If not, hit "s" to open the communication window, then click the SCAN button. You can then scroll through the ports and select the one corresponding to the Arduino. Hit CONNECT and after a few seconds you should get a status message at the top of the Controller window indicting success (or fail if the connection could not be made). If you do get a fail, check the baud rates -- Controller and Base Station both are programmed to 115200. If you changed the bad rate on the Arduino, you'll need to set it back, or change the baud in the Controller to match. Also note that you can't connect if the Serial Monitor Window on the Arduino IDE is open --- serial only allows for one connection at a time on the same port.
     
    Scott Eric Catalano likes this.
  6. UK Steve

    UK Steve TrainBoard Member

    453
    683
    12
    Coming soon, Mobile plug-in for the ESP8266 WiFi WebSocket Server

    Hi Everyone,

    Further to my posts on the Ethernet and WiFi thread.

    I'm nearing completion of a demo version of my WebSocket Server solution for a simple Throttle control on mobile devices.

    Here's a preview of what it looks like so far. I've just the get the logic 'wiring' done, and tested on a few devices. Then I'll post for you guys to tinker with.

    If you don't like the colors, they are fully customizable :)

    Steve.

    DCC++MCBeta - Copy.JPG
     
  7. esfeld

    esfeld TrainBoard Member

    442
    382
    17
    Gregg: Thank you, again, I found the problem late last night ......... prior to leaving for my trip I had been working with the Ethernet shield ...... when I uploaded the base station sketch I forgot that, and neglected to change the config.h back to the serial port ...... all is well and I have control of Power etc.
     
    Scott Eric Catalano likes this.
  8. rniefert

    rniefert TrainBoard Member

    15
    14
    3
    I figured out the problem I was having. I was using locomotive with the address of 021. When I put this in with my withrottle app it shows as long, when I look at my wi throttle server its showing it as a short. I believe that JMRI is removing the leading zeros from the address.
     
    Scott Eric Catalano likes this.
  9. rniefert

    rniefert TrainBoard Member

    15
    14
    3
    New problem seems to be when I try to program on the main. It gives me "Stopping due to error: Timeout talking to command station (306)" this is happening when I try to read type from decoder on the "new Loco" button.
     
    Scott Eric Catalano likes this.
  10. Gregg

    Gregg TrainBoard Member

    237
    311
    18
    I don't know the details of JMRI, but the DCC++ BaseStation will treat 021 as 21 and send commands to the loco using the short address mode only. It would be possible to add a parameter to force a long-address call if this proves problematic.
     
    Scott Eric Catalano likes this.
  11. Gregg

    Gregg TrainBoard Member

    237
    311
    18
    Are you trying to read from the Main? Only writing is allowed on the main - and since there is no feedback, there shouldn't be anything to time out.
     
    Scott Eric Catalano likes this.
  12. rniefert

    rniefert TrainBoard Member

    15
    14
    3
    I was in fact trying to read from the main. Thanks for your quick response. This system is amazing. Thanks for all your hard work.
     
    Scott Eric Catalano likes this.
  13. felmue

    felmue New Member

    1
    1
    2
    Hello Gregg

    Thank you for developing DCC++. My current setup consist of a CS2 and RocRail. Although it's nice to have some manual controls CS2 offers it is largely overkill when trains run automatically controlled by RocRail. Therefore I am looking for a replacement and stumbled over your nifty project (I read about it on the RocRail forums). So I am currently testing a setup with DCC++ and RocRail and so far I can control my trains and switch tracks. However to automate things I'll also need to get the existing S88 feedback hooked up again. And I was wondering if you have plans to integrate S88 into DCC++? Maybe integrate this solution: http://pgahtow.de/wiki/index.php?title=Lok_Rückmeldung Arduino Simpel S88 Interface (sorry German only). Please let me know what you think?

    Cheers
    Felix
     
    Scott Eric Catalano likes this.
  14. UK Steve

    UK Steve TrainBoard Member

    453
    683
    12
    Hello All,

    After 4 weeks of research and some considerable hours trying to make a contribution to this project. I am getting a bad feeling that absolutely no one is even slightly interested in what I've been working on.

    To that end it seems pointless to me, to be wasting any more time here.

    Good day Gentlemen.
     
    Scott Eric Catalano likes this.
  15. HVT

    HVT TrainBoard Member

    74
    93
    15
    Steve,
    With the help of many dedicated and skilled individuals such as yourself this DCC++ project that Gregg started with his small N-scale has grown into a significant train control system with current technology that is light years ahead of all the 20 year old DCC systems out there.

    Sorry that you feel that way. I have been following your every post over on the WiFi/Ethernet thread, but I must admit most of what you describe is above my pay grade. I am in the very early stages of bench work and track laying and have only connected JMRI to the DCC++ Base Station once to experiment with multiple H-bridges triggered by a single DCC signal.

    My hope is that there will eventually be 9 Megas on the layout in 3 power districts using Dave Bodnar's high-power H-bridges and two auto reverse sections. The trains will need to be controllable remotely by grandkids using a video DVR to see what is happening, and locally by other guests using smartphones/tablets. If I interpret correctly what you are doing with your project, it would allow someone via a browser window to access a throttle UI that is served from your board without downloading/installing special software or apps, and then run trains from there. Is my understanding close? Is the throttle window you posted above based inside your board?

    I have used JMRI with a Digitrax Zephyr on a previous layout to control signals, turnouts and receive detection. Trying to do that with Gregg's Controller would cause a huge learning curve. Connecting hardware to Arduinos and uploading sketches is doable for me. Can you see any advantage to the project you are working on in my application? If so, how would be the best way to proceed?

    Still waiting for more knowledgeable hobbyists in this group to work the bugs out of multiple Megas, and a couple of hand held wireless throttles for guests.

    Please know that I appreciate what you and so many others have done for the project and am certain there are many quietly watching who feel the same way.

    Warmest Regards,
    Dave Merrill
     
    Scott Eric Catalano, ISCOLD and oleoj like this.
  16. mayhaw9999

    mayhaw9999 TrainBoard Member

    27
    28
    5
    Steve,
    I'm one of the lurkers and have been reading every post you have made. I am just learning a lot of this - my first experience with DCC. And my coding skills are at the 1st grade level. My knowledge of this area of electronics is also very minimal. I recently bought an Adifruit Huzzah module and plan on adapting it using the information you have provided. I'm with Dave Merrill in that we really appreciate what you are doing. This is a truly unique and exciting project and you are adding to it in an exciting way.
    Sincerely,
    David Ulmer
     
    Scott Eric Catalano, ISCOLD and HVT like this.
  17. DJ79

    DJ79 TrainBoard Member

    36
    25
    14
    Hey, Steve, I also hope you'd reconsider and keep us posted on your Esp8266 or any other development. While I haven't specifically commented, I followed your posts with great interest, although I'd do a few things differently. I also played a little with the chip myself and find it quite interesting. As a matter of fact, the first time you brought it up, I made a few photos and a video of a little side project of mine (remote controlled Christmas train), but by the time I figured out how to post it, the discussion had moved into a different direction, so I never did -- that was before the topic was split into subtopics. In this project I connected the motor shield directly to the ESP12. The ESP chip is a lot more powerful than the Arduino, and one can build a very sophisticated system with it. I also think it would be interesting if someone tried to port this to a different platform. For instance, you can get a $5 Raspberry Pi Zero, which can run a full-featured operating system, so you can have a complete system, JMRI included, running on a single tiny board. The possibilities are endless, and we'd like to keep seeing them coming.
     
  18. UK Steve

    UK Steve TrainBoard Member

    453
    683
    12
    Well Thank You Guys, those kind of comments make for some great encouragement.

    I know the thread was being read, but the lack of comments was most disconcerting. A few things you might be interested to know.

    Around seven weeks ago I had never heard of Greggs DCC++. I'd also not got into this new exciting era of micro-controller for the hobbyist systems. In fact the last time I was building circuits was around 30 years ago when I was playing with the likes of a 4017 cmos ic. I'm rusty to say the least !

    So a very steep learning curve ahead, and what I'm trying to say is, I could do with a hand from a few of you guys to take my ideas in the right direction. I'm a complete novice at all this but I can see some huge potential in Greggs system.

    Today I can load a sketch to an Arduino and an ESP8266. I've some ways to go before I can call myself a programmer. I've now got a basic understanding of modern Html so have constructed my first webpage. Bring all those together and we can at the very least, interface with Greggs brilliant system from a Web browser. So far it will switch the power on/off and control 2 trains forwards/backwards. Simple beginnings, but hey it's start. The main advantage here though, is that you don't need a computer tethered to the system to get this working. And where next? WiFi satellite stations, accessory controllers, I don't know but it seems feasible. For now a $5 chip and some software gets you a working wireless throttle, interesting?

    Just chime in please, I'm just learning too.

    Kind Regards

    Steve.
     
    Last edited: Mar 9, 2016
  19. HVT

    HVT TrainBoard Member

    74
    93
    15
    So Steve, as you read through the description above of how my system will (hopefully) be set up how can your ESP8266 project be applied? Or are we looking at different applications? Do you have pictures of your assembled project to share?

    I bought an Adafruit Huzzah CC3000 wifi shield earlier on but IIUC this is a different project?

    Thanks,
    Dave Merrill
     
    Scott Eric Catalano likes this.
  20. UK Steve

    UK Steve TrainBoard Member

    453
    683
    12
    Hi Dave,

    I sounds like you're building a huge and impressive project there. I'll be watching with great interest as you bring that to fruition.

    It's hard to say at this stage where WiFi will feature as a component of a system. I like to think it has some legs at least in some part. If you think about it, WiFi was little understood only a decade ago and now we would be hard pressed to do without it. I remember being one of the first adopters to install it in my home and it aroused a great deal of interest with the guys at work.

    I know on some of the other threads a lot of work is going (especially Gregg's mammoth 50 hours investigating I2C) on developing a bus system to 'join' ancillary components. Have wired systems had their day? I can't answer that, but probably not.
    I'm not knowledgeable enough just yet to know what is required of such a bus system in this application. I do know that on here we are going to work it out.

    WiFi seems robust and secure enough to me in that people now entrust whole networks to it without concern. So if a DCC++ bus system only needs to move commands to and from other components, then WiFi seems like it is a least worth exploring.
    Where ESP8266 scores big points is that it is very cheap and has a very powerful System on Chip at our disposal. I can see it doing a lot of work in ancillary systems without the need of additional Arduinos. If you just want to pipe serial data to and from, then it does that by default without the need of additional software over the simple 'act as an AP'. There is a limitation in that 1 server can only handle 4 clients. But I think that would cover 99% of our needs.

    In the first instance I'll post up my 'Starter package' for you guys to evaluate. If WiFi regains the interest it had in earlier days on these forums, then I'll be more than happy to help. I've done a lot of the groundwork on ESP8266, but it is still early days for this wonderful device. New stuff is coming out almost weekly, it's kind of taking the electronics world by storm. For sure I'll be branching off into Home Automation and stuff going forward.

    Essentially though, we need to collaborate on this. I'm no expert systems engineer, just a humble hobbyist with a lot of ideas. I do have an engineering background though which helps.

    Regards
    Steve

    PS.
    It's a shame the CC3000 is not based on the 8266 so for now at least you'll have to grab a development board (not many $$$) sorry.
    I'll get a picture up shortly so everyone can see how simple this is.
     
    Scott Eric Catalano likes this.

Share This Page