Travis, The DCC++ baud rate is fixed in the Arduino sketch, but if you go down to 9600 you are going to slow up the Serial data rate by more than a factor of 10. I can only imagine that this will seriously affect performance. The Serial rate is the weakest link in these multi processor systems, it needs to move as fast as possible. Back to the drawing board my friend, get the Xbee's up to speed, or better still use them in another project . Steve.
I think you are absolutely correct. perhaps I will leave the wireless alone, until I find something that works. I suspected slowing down the baud would cause problems somewhere. for the price, I really kind of thought they would perform better. back to hardwire USB I guess. thanks. ~Travis
Travis, If you'd like to play with a wireless connection, then you could do worse than to have a go with my experiments with the ESP8266. Have a read from here http://www.trainboard.com/highball/...ource-dcc-station-and-interface.84800/page-69 The Shields are less than $10 and go right on top of the stack. Use the server code I've posted on here, and you can connect JMRI, DCC++ Controller and WebSocket apps without further ado. And it works at 115200 baud . Steve.
not sure if my ESP is compatible, I will post pictures a bit later as I am enjoying my coffee right now. (can't disturb the coffee ) I think it is a ESP 01, and it is a mlt-group shield. I have 4 of them, and right now they are just collecting dust, so the idea is very intriguing, though I know nothing about them. I bought them as a curiosity for experimenting with. this looks like as good a time as any to start. ~Travis
if all else fails, I have hardwire Ethernet coming from my WiFi router running nearby, I could also connect the base station hardwired to the network, and use jmri via my network. it's not like my base station will be moving around, and the code is already built into DCC++. I may test that idea before I jump into the great unknown of ESP. ~Travis
You can set up a server with type 01, if you have prototyping shields as well, then you're nearly there with a few additional components. You can flash the ESP with a spare Uno or similar with Usb to Serial on board. Is that the soldering iron I can smell warming up . Dave Bodnar kindly did a full write up of setting up the Arduino IDE to make it compatible with the additional ESP stuff needed for development and programming. You end up with a dual build environment in the familiar C/C++ Arduino code that you're used to. Dave's write up is here http://trainelectronics.com/WiFi-esp8266/Setup/ Ignore the server code, its well out of date. You're just concerned with the hardware build and programming options for now. If you don't have a USB to Serial device, then as I said, there is a method using an Uno.
I got it to work with an Ethernet shield. (DCC++ -> Ethernet -> Ethernet port in router -> WiFi in router <-- laptop running JMRI) I will still play around with the ESP though, as a completely wireless solution would be neat. ...I just happened to think, my DCC++ base station is built into a rackmount server case, just because it looks cool how well does the ESP shield work through a metal box? I suspect not well. I may have to set the ESP on the back burner in favor of what is working right now. ~Travis
As you know most low power radio would struggle to work through metal boxes. You'd have to figure an external antenna. I presume that's where you would have gone with the Xbee.
yes, I had an Xbee picked out that I could connect an antenna to. good thing I didn't order it yet. I think where I have a working design, I can focus on making the setup look neater, as it looks like a pile of colored spaghetti right now. ~Travis
Guys, In the past I bought one Soundtrack Tsunami AT1000 GE FLD-16 (Modern) decoder. It was installed on a Bachmann Engine. At this time I was using the Dynamis System, and the decoder work very well. Than, on next, I migrate for DCC++and JMRI software, and the decoder stops all functions. I decide to physically uninstall all, and install again. Today,on JMRI I have the address 3, and I can start the engine, but, no other functions, like bell, horns, movement,lights,and so. I try to read all CV's and the software answer "Programmer error: Timeout talking to command station (306)". I think, the decoder lost the factoring programing CV"s, and I want to restore it with DecoderPro. Is it possible? Could someone help me? Regards
I've asked this before, and the answers were conflicting..... DCC++ code appears to perform write CVs to the main correctly, at least in that the code doesn't expect or check for a response, yet when writing CVs to the main with JMRI, JMRI always hangs, and eventually times out, as if it's waiting for a response that obviously never comes. Can anyone contact Twindad to find out if his JMRI implementation for DCC++ can be verified that it's correct for programming on the main? I'd sure like to be able to use JMRI to adjust parameters, especially when doing speed matching.....
Hey Crusader... I'm happy to report the fix for the "Ops Mode Write Hang" will be in the upcoming 4.5.6 development release of JMRI. If you don't mind, please try it out once it's released and report back how it works. I've tested it on my machine, but that doesn't mean I've covered every possible use case. For those who remember it, I've also finally committed the fix for the NPE crash when trying to use AmpMeter with DCC++ on Linux devices. That, too, will be in 4.5.6.
Any idea what the schedule for the in a stable release? I'll be able to test your updated code this week.
4.5.6 is available now: http://www.jmri.org/download/index.shtml Traditionally, the stable releases are done twice a year... around Christmas, and around the NMRA national convention. I expect 4.6.0 (the next stable release) to be done at or before Christmas.
YUP......I just got a notification from the Yahoo JMRI group about the 4.5.6 availability, and I've already tested it on my test setup. It certainly doesn't time out when programming on the main, and I was able to successfully change sound settings while operating with a Digitrax sound decoder. GREAT WORK, and thank you again.
Glad to do it. Sorry I was so hard to find. Much going on at home this fall. I will try to keep more in touch with what is going on...
I've just returned to model railroading after prioritizing my NASA/aerospace career for 20 years. I became a TB member to ask this very question. After becoming a member I found the search button and came upon this response. Had spent a week determining that the output table state changes were sending the accessory 'a' commands but only manually inducing the Z output commands would toggle test LEDs on my Arduino Mega outputs as desired. I don't have a layout or decoders yet - wanted to confirm the technology before committing to the new approach - and LEDs were my first (previously frustrating) attempt. So, will I need to use a turnout command to switch a light? Next I'll play with how to do this from a script. Thanks so much! Greg
In JMRI, everything output-wise that isn't a Throttle or a Signal is (usually) a Turnout. In JMRI/DCC++ there are two steps to controlling a DCC++ Output... First you must associate the output pin with an index value you will use in JMRI to reference it. 1. In the DCC++ menu, choose "Configure DCC++ Sensors and Turnouts" 2. Click the "Outputs" tab. 3. Click "Add Output". This will add a row to the Outputs table. 4. Set the Index to the turnout number you want to use. Set the Pin # to the Arduino pin you have the LED wired to. 5. Set any of the checkboxes that are relevant. 5. Click "Save Outputs" and then "Close". Second step... creating a Turnout to control it with. 1. Choose "Tools->Tables->Turnouts" 2. Click "Add" 3. Choose "DCC++" from the "System Name" drop-down 4. Put the Index number in the Hardware Address Box 5. Assign a user name to the turnout. 6. Click "OK" Now within JMRI, when you throw or close that turnout, you will turn the LED on or off.
there has been some talk of accessory decoders and lights in this thread. have a look at geoffb's 17 function decoder. its pretty simple, some resistors a couple capacitors and a diode with an optoisolator(make sure to use the one he lists) fed into an Arduino mini to decode accessory commands. can also power led's and is fully customisable with CV addressing. cos is about $20 au so bout $15us for raw components. or can also build his updated version on printed boards for a bit more. can be bowered from track power and is very low power usage when idle or power it from a separate 5volt source (5 volt bus) it can run a combination of up to 17 outputs. I use it to power leds and servo operated turnouts. and NO SERVO JITTER http://model-railroad-hobbyist.com/node/19446 http://model-railroad-hobbyist.com/node/24316