If it's failing with both the DCC++ controller code and custom code talking directly to the base station... it's not a JMRI issue. It's a Base Station issue.
the error message was: "Writing Second Byte of Long Address Failed". Digitrax site has all the calculators you need if you want to 'manually' program CVs via you CS. The error on second byte of the long address might indicate that CV 29 ( the second bit) is still set for short address. If that is the case it won't program the long address. JMRI usually take care of CV 29 in the background when you program with it. Once you know the 6 bits of CV 29 you will recognize them spread out in the programming tabs of JMRI.
Remind me.. are you using the Programming Track or Ops Mode on the Main? If on the Program Track, I'm not sure what's going on. If on the main, I *think* you can get in a case where if CV29 is set for long address, and you try to change the (long) address, after the first byte is set, the second byte can't be programmed b/c the address has already changed and the command is still trying to use the old address. That is, if the loco address is "ABCD", and you want to change it to "WXYZ", the first write will change the address from "ABCD" to "WXCD", and the second write will fail because it's still trying to address "ABCD" I'm thinking... set CV29 to short address, then write the new long address CVs, then set CV29 to long address. Or better yet, always use the Program Track for address changes.
I used the programming track in both DCC++ controller, JMRI and also tried with my own crafted program. To anwer Pierter, the CV29 is 38 decimal, or 26 in hex, and 0010 0110 binary and other CVs are listed below CV0001 0x03 00000011 CV0017 0xD6 11010110 CV0018 0x78 01111000 CV0029 0x26 00100110
Just want to confirm, I downloaded the BaseStation code from here : https://github.com/DccPlusPlus/BaseStation and the Master Branch. Is that correct? Thanks!
I just got a different 15V/5A power supply and still the same error. I believe I got all connected correctly. Anything else I can try? Thanks!
Good Evening, I just watched all of your videos and find DCC++ quite impressive. Your system does most of the things I want to do on my railroad, in fact I think it will do all of them once I learn how to use all of the features. How did you set up your sensors, are they something you built or did you use some of the commercial sensors? I am thinking about using infrared sensors for block occupancy and signal control at the same time letting the DCC++ code know that a block is occupied. I may be able to start using DCC++ on my layout in the next few days. I currently have JMRI running on a Raspberry Pi 3. Will DCC++ run on the Raspberry Pi 3 assuming it can be compiled on Raspbian? Thanks John
I have been playing a little today, I installed Processing 3 on my Raspberry Pi 3 and was able to install and run the Controller. I was not able to test the connection the the Arduino Mega 2560, that will be done later this evening or perhaps tomorrow. Here is a photo of the screen showing Controller up and running.
I loaded the base station code onto the Arduino Mega 2560 tonight. I am able to connect to the base station from the controller, turn on track power and play with the throttles. Some of the functions do not appear to work but that might be because I do not have the motor controller installed or anything hooked up for the controller to control. I plan on completing most of my wiring this week, I will be ordering some relay boards to control the twin coil switch machines on most of my switches. I will also us the relay boards to control the four Tortoise switch machines used on my double crossover. I also plan on exploring changing the layout drawing to my my layout. Then it will be on to signaling and block occupancy detection.
Just a quick update, I received my Arduino Motor Shield today, somewhat sooner than anticipated. I disabled Vin since I will be running 15 to 18 volts for track voltage in my 5 x 10 foot HO layout. Installed specified jumper between pin 4 and pin 13 since I am using an Arduino Mega 2560 instead of the Arduino UNO. I powered everything up, started checking outputs and found out there must be a load on the output channels in order for them to produce any output. A couple of grain-of-rice bulbs took care of that. I initially had output from channel A but none from channel B. After checking everything and watching the video "An Arduino Mega 2560 DCC++ Base Station" again to make sure I had the jumper on the correct pins I decided to move it to pin 3 (the fourth pin from the end of the header) and now I have output from both Channel A and B. All is well now I think so I will move on to the power wiring for my track so I can attempt to actually run a locomotive or two. My next major DCC++ project will be to replace the layout drawing with one of my layout. I know I read something about that somewhere, is there a video or document available on how to make that change? Thanks for all the help I have received here, I hope to be able to return the favor one day soon.
Happy Thanksgiving Everyone!! I tracked down the Controller_sample_Layout, the comments included are a great tutorial on how to create a layout for Controller that matches or closely matches a users layout. Great job Gregg on the comments, it makes sense and seems easy enough to follow. I will try to start on my layout drawing for Controller sometime today if time permits. I also want to get at least some of my power wiring completed so I can run some trains on the layout.
Which motor driver is better for DCC++, the Arduino motor shield or the Pololu MC33926 motor driver shield? It seems the Pololu has slightly higher current capabilities and from what I have read it seems to also work for automatic reversing for reverse loops. How do you set it up for automatic reversing? I am asking because the Pololu seems to be significantly higher cost. Thanks for all the help I have received from this forum.
Hello Papajohn88, I am glad you got things working....I use the Pololu shield because of the higher current capabilities and I have had a few units with sound running during a Christmas train show and it held up fine. I have not used it to program trains or current sensing or reversing. I still have experiments to do with the set up...but as far as running trains and using home made throttles it works nicely. I will be testing with JMRI at a later date.
Hello Scott, Thanks for your reply. I have been using a Digitrax Zephyr Plus DCS-51 with JMRI for about two years now. That unit is only capable of 3 amperes total current draw. It has worked well with both main and programming tracks fused at 2 amperes each. I will most likely purchase a Pololu MC33926 as soon as the hobby budget will allow it just to be on the safe side. I plan on having enough of my new layout wired for power tomorrow so I can start running trains. We moved here from Virginia in August and I am in the process of building a new 5 x 10 foot layout in the second bedroom of our apartment. How does the Pololu get set up for reversing? I have not seen anything on that and I have a reverse loop on my new layout which for now will be manually controlled with a DPDT switch. I would like it to be automatic some day if possible, perhaps with an AR-1 if I can't get Pololu to do it. I hope to have a train running around our Christmas tree again this year although I am not sure we will even have room for the Christmas tree.
I am not sure that the DCC++ supports auto-reversing directly, but i think it does support commercially made auto-reversers. I think David Bodnar had a auto-reverser he made... not sure though. (BTW, how's he doing? haven't heard from him in a while) ~Travis
Hello Travis, thanks for your reply. I remember reading some messages about auto reversing however I do not remember exactly what was said. I will figure it out eventually and most likely end up purchasing an auto reversing unit. In the mean time I will just use a DPDT switch, stop the train, flip the switch and then start the train again. It shouldn't be a problem since I do not have any locomotives with sound at this time.