New to all of this and it's awesome!

Marty_G Mar 26, 2017

  1. Marty_G

    Marty_G New Member

    4
    5
    1
    I started with a Christmas Bachmann train. It's okay - no complaints but the cool factor wore off pretty quickly. I then built a good sized frame and bought a bunch of EZ track. I can see how it might not be a dedicated hobbyists first choice but for me it's fine. It's grandchild friendly:) and let's me concentrate on the parts I really like which are controls and automation.

    I read up on DCC but honestly was a little intimidated with the cost and proprietary solutions. I really wanted something I could configure / program / use on a PC or Raspberry Pi. I bought a pi and arduino and had a lot of fun running regular DC locomotives and then one day I came across DCC++ and thought wow this is it! I bought the bits, mega and motor shield, that were recommended and a DCC loco, followed directions exactly as written and amazingly it worked perfectly the first time.

    Kudos to the author / developer Gregg. Well done and much appreciated.

    Best regards,

    Marty
     
  2. UK Steve

    UK Steve TrainBoard Member

    421
    619
    11
    Couldn't have put it better myself!

    Far too many "this doesn't work" "can I use this motor shield?" "blah blah blah"

    Well done Marty.
     
    Scott Eric Catalano likes this.
  3. fitz

    fitz Staff Member TrainBoard Supporter

    8,340
    437
    104
    Marty G, welcome aboard. As one of the ONLY people here who does not model, just fan of twelve inch to the foot stuff, that is all Greek to me, but almost everyone else here will understand. Good to see you here.
     
    Last edited: Apr 1, 2017
    Scott Eric Catalano likes this.
  4. jonnno

    jonnno TrainBoard Member

    14
    11
    2
    I have a similar story but I cannot get the controller to install on my win 10PC. Have you any advice on how to do it. I understand that I am probably not pressing the correct buttons

    jonnno
     
    Scott Eric Catalano likes this.
  5. Keith Ledbetter

    Keith Ledbetter TrainBoard Member

    48
    46
    2
    Welcome, and yes it really is a sweet solution right "out of the box" as you stated. It can be slightly intimidating at first but man where else do you get such a low cost system for so cheap! It's worth the minimal time investment.

    The blessing and the curse of DCC++ is the openness. Blessing because it always us to tweak and play if we want (try new motor shields, etc) but curse because the infinite modification causes confusion and makes it seem hard. For the vast majority if they watch Gregg's initial videos and hook it up as described it will meet their needs without ever needing anything else! And most people can going with just a couple hours of time investment (most of that is learning how to get the files onto the hardware and hook everything up properly)

    jonnno have you tried running with JMRI and controlling that way and does it work. (probably best to start another thread and I'm sure we can help you out)
     
    Scott Eric Catalano likes this.
  6. Marty_G

    Marty_G New Member

    4
    5
    1
    Hello jonnno,

    I'm happy to read you are enjoying the hobby. I'm not any type of expert but am happy to share my observations.

    I have the "controller" application running on both a win10 laptop and a raspberry pi. All I did was download the Processing environment, downloaded and opened the DCCpp_Controller app, configured it and it seems to work fine. My laptop isn't anything special.

    I don't tend to use the controller app to run my trains, I use custom Python code and JMRI. I was developing my own application in Python when I discovered JMRI has the ability to talk wireless to smartphones and tablets. I downloaded Engine Driver and Digitrains and am sold. They just work :) Not sure if they have all the features advanced users need but at this stage they're just fine for me.

    I have seen one quirk with DCC++ and am wondering if others have noticed it. Both JMRI DecoderPro and the DCCpp_Controller app behave the same way and it doesn't matter if I use the win 10 laptop or the pi. Currently I have four DCC locos and they all have SoundTraxx Sound Value decoders. They function fine. When I put a loco on the programming track I can read any CV I have tried. I can write any CV I have tried with one exception and that is trying to write the long loco address. Both JMRI and DCCpp_Controller write the short address fine but both fail on the long address. Every time. I do not think this is related to CV29.

    Not one to give up, and having read somewhere that SoundTraxx needs a specific sequence to write the long address, I discovered if I write CV 17 and CV 18 in a certain order I can get the long address to write. Once written it then reads and responds fine. I also know if I take my loco to a friends house and program the long address with his NCE system it programs immediately with no issues.

    I would like to read more of your adventures.

    Regards,

    Marty
     
    Scott Eric Catalano likes this.
  7. jonnno

    jonnno TrainBoard Member

    14
    11
    2
    I agree. I have never been so enthused with a concept.

    My problem is very basic. I have downloaded the controller.zip and unzipped but not for the life of me can i work out how to install in into win 10. I think it must be a program i am missing because i have not seen this problem mentioned previously. I have made the DCC++ base station and loaded the software, but cant try it until i get the controller installed. Frustrating!
    I have not done anything with jrmi yet. Is it actually possible to bypass the controller and just use jrmi?

    My plan is to get DCC++ running via the track, then wirelessly, then wifi and battery power.

    I am very much in the learning phase with electronics and am enjoying playing with arduino etc but am aiming my interest to model rail. I very much like the idea of computer control but it is hard work getting through the acronyms and jargon which i have to spend ages translating into something i can understand. All part of the fun, though
    I would add that this is a fantastic site and i will eventually get my project working
    Thanx for your help. It is greatly appreciated.
    jonnno
     
    Scott Eric Catalano likes this.
  8. Marty_G

    Marty_G New Member

    4
    5
    1
    Hello jonnno,

    Yes, JMRI is fully capable of being a "controller" and sending commands to the DCC++ base station. A USB connection from your computer to the Arduino is all you need to communicate. Once you open JMRI you will need to set it up to talk to the DCC++ base station.

    I think JMRI is a better way to go for most users. I use the DCCpp_Controller app for debug and when I program CVs because I have it and am used to it. I use JMRI when I run trains over wifi and it works really well.

    Just a question on the DCCpp_Controller app. It wasn't clear to me from your note. Have you downloaded and installed the development program called Processing from www.processing.org? The DCCpp_Controller app will not run by itself. You have to open the Processing development program and then run DCCpp_Controller from inside.

    This is a fun hobby!

    Marty
     
    Scott Eric Catalano likes this.
  9. jonnno

    jonnno TrainBoard Member

    14
    11
    2
    Thank you so much. How could I have missed this. I cant wait to get home and try it out.
    If you have advice on how to set up wifi it would be much appreciated because thats what i want to do. I dont suppose you use battery power as well do you

    jonnno
     
    Scott Eric Catalano likes this.
  10. jonnno

    jonnno TrainBoard Member

    14
    11
    2
    Well i downloaded the processingapp and then had the problem of "putting controller into the processing environment"
    Is there an automated way of doing this>? I managed to put 1 of the files into the processing app by file/open/app and managed to get the layout display but nothing else and I presume I need to put all of the other files in as well. How do I do this?
    I realise how basic this is but when you dont know, you dont know

    jonnno
     
    Scott Eric Catalano likes this.
  11. Marty_G

    Marty_G New Member

    4
    5
    1
    Hello jonnno,

    It sounds like you may be making it a bit more complicated than it should be? You really shouldn't need to move files around. It's been a while for me so I decided to reinstall everything. Here's my steps:
    1. Goto www.processing.org and download the zip file for your version of windows. In my case I'm running win10-64 so I downloaded processing-3.3.5-windows64.zip. Windows put it in Downloads.
    2. Right click on the zip file and select Extract All... Let Windows put it in the default location.
    3. Double click on the file processing.exe. It should open with a blank screen that resembles the Arduino programming screen.
    4. Go to github and download the zip file for the DCC++ controller called Controller-master.zip
    5. Right click on the zip file and Extract All... where ever window wants
    6. Connect a usb cable from your PC to the Arduino, in my case a Mega.
    7. In Processing click File - Open... and find the DCCpp_Controller.pde file
    8. The file should load filling the processing screen with the COPYRIGHT notice from Gregg.
    9. Click the "play" button in the upper left corner.
    10. Unless you get lucky, I didn't, DCCpp will not find the Arduino.
    11. If you click the question mark in the upper right hand corner a screen will pop up listing all of the hot keys. (be careful with the "escape" key. Pressing it seems to quit the program:)) Pressing "h" will toggle the help screen.
    12 Press lower case "s". this should bring up the serial port selection box. Click on the green SCAN button. Click on the green arrow keys to cycle thru the options. Mine were pretty clear. The first was Emulator, don't want that, the second was COM3, That's the port in my case, and the third was an IP address, not what you want for a direct connection. I set mine on COM3 and clicked CONNECT. A couple of seconds later a green message banner displayed across the top saying it had found the MEGA and life was good:)
    13. I clicked the green POWER button on the lower left. A blue message displayed saying Track Power On and my locos started making noise. Clicking again and power turned off.

    I literally sat plugged into the Mega and did each step while writing this note.

    Good luck :)

    Marty
     
    Scott Eric Catalano likes this.
  12. jonnno

    jonnno TrainBoard Member

    14
    11
    2
    I did all of this. The hardest part was finding the github file.
    I reached exactly the same spot as previously. I have the trackplan on screen and can press various buttons which seem to respond appropriately. However it will not connect to the base station. Win device manager tells me that the arduino is connected to com3 and is working properly but controller will not connect to it. I do notice the arduino lights flicker when i press "connect" but so far nothing else seems to happen. The message at the top of the screen says "searching for base station" and "waiting for base staion at serial port com3"
    I have tried different usb ports, turning power on and off and reinstalling. Perhaps I have not got the base staion software correct??
    Thank you again. You have gone above and beyond
     
    Scott Eric Catalano likes this.
  13. Jimbo20

    Jimbo20 TrainBoard Member

    57
    56
    3
    Did you successfully load the basestation code into the Arduino? If you did you should be able to use the Arduino IDE's serial monitor to run a few simply commands to verify the basestation is working.

    Run the Arduino IDE (Not the controller processing program or JMRI) and connect a USB cable from the PC to the basestation and turn on the power supply to the motor shield.

    In the Arduino IDE click on Tools / Serial Monitor. A new window should open. If you type "<1>" (without the quotes) in the box and click send, you should see the power lights on the basestation motor shield light up. Similarly, typing "<0>" will turn the power lights back off.

    If this test works, it confirms the basestation is programmed and you can now move on to trying to get the DCC++ controller to work.

    For information, here is a list of commands that the basestation supports. These commands are what the JMRI or DCC++ controller send when they are used.

    https://github.com/DccPlusPlus/BaseStation/wiki/Commands-for-DCCpp-BaseStation

    Good luck!
    EDIT: One thing to note is that you cannot have both the Arduino IDE and the controller processor program running at the same time, otherwise you will get connection errors.
    Jim
     
    Last edited: Aug 10, 2017
    Scott Eric Catalano likes this.
  14. jonnno

    jonnno TrainBoard Member

    14
    11
    2
    Thanks Jim
    I did this and my motor shield does not light at all. It is new ,made in china and has never been used. This is my IDE for the base station. It uploads without errors being mentioned on the IDE

    #include <Accessories.h>
    #include <Comm.h>
    #include <Config.h>
    #include <CurrentMonitor.h>
    #include <DCCpp_Uno.h>
    #include <EEStore.h>
    #include <Outputs.h>
    #include <PacketRegister.h>
    #include <Sensor.h>
    #include <SerialCommand.h>

    void setup() {
    // put your setup code here, to run once:

    }

    void loop() {
    // put your main code here, to run repeatedly:

    I have wondered if it is complete. Should there not be something within void setup and void loop. I have not cut the link which protects against >12 volts. I presume the shield is powered by the arduino, but it is showing no sign of being alive. Pressing the small button on the shield, however, does make a red LED flash on the arduino. I presume that does mean power is getting in

    So far you guys have helped enormously and I am very greatful. I feel there is not far to go, but I still have to ask for your help and advice

    jonnno
     
    Scott Eric Catalano likes this.
  15. Jimbo20

    Jimbo20 TrainBoard Member

    57
    56
    3
    This looks like your problem; the code should have a lot more than that in it.

    Download the basestation-master.zip from here (click on green 'clone or download' button and select Download Zip):
    https://github.com/DccPlusPlus/BaseStation

    Then find and right click the downloaded Basestation-master.zip file and select 'extract all'

    Now using file explorer find the extracted files and double click on DCCpp_Uno.ino e.g.:

    .......\BaseStation-master\BaseStation-master\DCCpp_Uno\DCCpp_Uno.ino

    This should open the Arduino IDE and all the necessary files for the basestation.

    You should now be able to upload this code to your Arduino..

    Good luck,

    Jim
     
    Scott Eric Catalano likes this.
  16. jonnno

    jonnno TrainBoard Member

    14
    11
    2
    Have done it and it seems to work. Hooray. Next issue is to get a train to run
    Thank you all very much. I really needed this basic advice. It is easier when you know what to expect. Should everything on the controller screen work?
     
    Scott Eric Catalano likes this.
  17. jonnno

    jonnno TrainBoard Member

    14
    11
    2
    i have now managed to connect the base station to 15 AC power, but have not yet connected to track--soon. I noticed that when i press the "POWER" button on the controller, 4 LED's at the base of the connection block light up on the shield. At least that did happen. Now they do not light up at all even if i switch it all off and start again. Is this normal? I might add that I divided the power-in link on the shield and checked it was divided with a meter. I do get the message at the top of the screen that track power is on.
    Most of the other buttons that i press seem to work except those that relate to the track itself (points, mainly) which I would assume is normal.
    Any further advice please
     
    Scott Eric Catalano likes this.
  18. sboyer2

    sboyer2 TrainBoard Member

    35
    40
    3
    i hope you mean 15v DC and not AC

    Steph!
     
    Scott Eric Catalano likes this.
  19. jonnno

    jonnno TrainBoard Member

    14
    11
    2
    I do mean AC. I understand that the motor shield simply transmits whatever power you put in to the out sockets and I need AC to run DCC
     
    Scott Eric Catalano likes this.
  20. sboyer2

    sboyer2 TrainBoard Member

    35
    40
    3
    no, the motor shield requires DC for DCC, no AC whatsoever!!! the DCC signal is a DC squarewave signal

    putting AC through the power input of the shield will not generate a complete signal. and hopefully you didn't fry the L298 chip.

    Steph!
     
    Scott Eric Catalano likes this.

Share This Page