开云体育

jmri & Arduino DCC-EX #dcc-ex


 

I have an Arduino uno with a motor shield attached and loaded with the DCC-EX command station software
?
I have tested this and it detects my loco within the monitor part of the Arduino so I know the loco can be detected and if I issued the command <R 8> directly to the loco the loco judders forward and is detected
?
however when using decoder pro and using the add now loco button I get a message "loco failed to respond"
?
currently I have jmri version 4.26 on my Mac and 5.10 on the other systems due to java limitations on my Mac
?
the track voltage on the main is 12v
?
the loco works on other dcc systems so no problem there (I have a digikeys 5000 on my main layout)
?
I have tried multiple computers running jmri on windows 10 , windows 7 , linux , and Macos all give the same message
?
jmri on all the systems can turn the power to the track on and off on the Arduino but nothing else
?
so any help would be welcome
?
Many thanks
?
Rob


 

Rob,

Prior to Mac OSX 10.10 (Yosemite), you are limited to Java 1.8.

Assuming that you are running Yosemite or later, you will need to follow the instructions at??to remove Java 1.8.

Dave Sand



----- Original message -----
From: "Rob Heath via groups.io" <suntzu777=[email protected]>
Subject: [jmriusers] jmri & Arduino DCC-EX
Date: Tuesday, May 13, 2025 5:03 AM

I have an Arduino uno with a motor shield attached and loaded with the DCC-EX command station software
?
I have tested this and it detects my loco within the monitor part of the Arduino so I know the loco can be detected and if I issued the command <R 8> directly to the loco the loco judders forward and is detected
?
however when using decoder pro and using the add now loco button I get a message "loco failed to respond"
?
currently I have jmri version 4.26 on my Mac and 5.10 on the other systems due to java limitations on my Mac
?
the track voltage on the main is 12v
?
the loco works on other dcc systems so no problem there (I have a digikeys 5000 on my main layout)
?
I have tried multiple computers running jmri on windows 10 , windows 7 , linux , and Macos all give the same message
?
jmri on all the systems can turn the power to the track on and off on the Arduino but nothing else
?
so any help would be welcome
?
Many thanks
?
Rob


 

Simply try reading and writing individual CVs with Decoder Pro. You may also need to replace the USB cable.


 

Rob,
?
Some questions that might help to solve the issue:
  1. When you say the track voltage on the main is 12v, do you mean you are feeding 12V to the motor shield, or you have measured 12V on the track?
  2. If you are feeding 12V to the motor shield, what type of motor shield are you using?? Some of them can drop a volt or so, so you end up with 11V or less on the track.? I believe some decoders don't respond well on the programming track if the voltage gets too low.
  3. In JMRI, have you verified the settings to ensure that the system is using the DCC-EX system for the programming track, like this?
  4. Are you definitely using the Programming Track output of the motor shield on your programming track?
  5. What version of DCC-EX are you running?
  6. Do you have an Android phone?? If so, have you tried programming commands from within the Engine Driver app to see if this is a JMRI or a DCC-EX issue?
  7. Can you DRIVE a loco via a JMRI throttle with the DCC-EX system?? If so, is that on the programming track or the Main track output?
Trevor.


 

Hi Rob,
?
In order to detect messages from the loco, you need to have current detection - usually hall sensors in this case - sat between the track and your Arduino.
?
You sound knowledgeable so you may already know this and have it set up but it's worth a mention just in case.
?
There's a table on this page that shows which motor boards have current sensing built in, and which don't.
?
?
Regards,
Chris
?
?


 

开云体育

Hi Trevor thanks for the reply , I have had some success

The whole idea was to repurpose some old tech to run my layout in the garden shed under dcc , I have an old iPad which is no longer supported by apple , a raspberry model 2b and an Arduino uno with motor shield?

It turns out that if I did a standard install of the latest dcc-ex command station which was part of the problem as it disables the program track and the Arduino then refuses to send signals to the track so this needed some custom settings which with the help of the discord channel they were able to solve that problem for me

My next problem is to get the project to be stand alone without any network as the shed is too far away so I have tried various raspberry pi installs and since my pi is underpowered by todays standerds this needed some more work

So currently I can connect my old iPad to the pi provided the pi is connected to the network but if it is not then the pi refuses to allow anything to connect and this is across all devices , both windows 7 ,8 and 10 , my iMac’s and iPhone

Eventually I have settled on Steve Todds distribution and trying to get the home made system to work as I want it

Here is a pic of my current progress as I want the system to be headless with no keyboard or mouse and currently this project has cost only time as everything has been repurposed


If anyone can assist the the pi configuration in being stand alone with no network that is my last hurdle

A picture of the project

Rob
IMG_5071.jpeg


On 15 May 2025, at 02:04, Trevor Rowland via groups.io <trevor@...> wrote:

Rob,
?
Some questions that might help to solve the issue:
  1. When you say the track voltage on the main is 12v, do you mean you are feeding 12V to the motor shield, or you have measured 12V on the track?
  2. If you are feeding 12V to the motor shield, what type of motor shield are you using?? Some of them can drop a volt or so, so you end up with 11V or less on the track.? I believe some decoders don't respond well on the programming track if the voltage gets too low.
  3. In JMRI, have you verified the settings to ensure that the system is using the DCC-EX system for the programming track, like this?
    <inline.0.part>
  4. Are you definitely using the Programming Track output of the motor shield on your programming track?
  5. What version of DCC-EX are you running?
  6. Do you have an Android phone?? If so, have you tried programming commands from within the Engine Driver app to see if this is a JMRI or a DCC-EX issue?
  7. Can you DRIVE a loco via a JMRI throttle with the DCC-EX system?? If so, is that on the programming track or the Main track output?
Trevor.


 

The Pi isn't refusing to allow anything to connect, it's not aware that anything is trying to connect - because there's no network.
?
Networks aren't easy things to set up - if you have an old internet router lying around you could try taking that out to the shed and plugging it in (it doesn't need to be plugged into a phone line). That will give you a little more than a standard switch would (DHCP server for example) and may allow the Pi and computer (when either plugged into the router via ethernet or connected to its wireless network) to communicate with each other.


 

Hi Rob,
?
If I understand correctly, you are using the Pi with Steve Todd's image, connected via USB to your DCC-EX system.? Is that correct?
?
If so, Steve's image - by default - establishes a WiFi network with the Pi acting as an access point.? I can't remember the WiFi access point name, but I feel it was something along the lines of "rpi-jmri" or similar.? If you are using his image - unmodified - can you see that WiFi network when you are near your Pi?? Can you connect to that WiFi network?
?
Trevor.


 

开云体育

Hi Trevor I can acces the pi only if it is connected to my network , I can view and control things via my iPad through the Jmri web server however as soon as I remove the network cable I cannot do any of the above

I put Steve’s image on a larger so card and expanded the partition so I could get any updates on ?but I think the pi has had updates that lock it down further?

I have no problems installing Jmri ?and just have to check Java installs ok so ?my next plan is to use an older pi distribution and see if that functionality returns

I did try even older distributions on my pi but those could not install the various networking tools as those files are no longer available for those distributions

So I am looking for the “sweet spot” so to speak that will give me the functionality I want

I know someone suggested attaching the pi to a router but in theory I should not need to or get an old laptop and run Jmri from that but I want to see if I can do what I want with what I have

‘I have the bit between my teeth and not going to let go yet”


Rob

Pro


On 16 May 2025, at 02:03, Trevor Rowland via groups.io <trevor@...> wrote:

?
Hi Rob,
?
If I understand correctly, you are using the Pi with Steve Todd's image, connected via USB to your DCC-EX system.? Is that correct?
?
If so, Steve's image - by default - establishes a WiFi network with the Pi acting as an access point.? I can't remember the WiFi access point name, but I feel it was something along the lines of "rpi-jmri" or similar.? If you are using his image - unmodified - can you see that WiFi network when you are near your Pi?? Can you connect to that WiFi network?
?
Trevor.


 

Hi Rob.
like to ask are you using a clone?Arduino.to run the locos with.
Andrew.
?


 

开云体育

Yes got them off amazon together with the motor head 4 years ago , they were about ?12 in 2021

Rob

On 16 May 2025, at 06:26, andrew_pink58 via groups.io <andrew_pink58@...> wrote:

Hi Rob.
like to ask are you using a clone?Arduino.to run the locos with.
Andrew.
?


 

Hi Rob.
Had the issue of loco could not run forward or back, power was on track , and program track had no problem .turn on or off.fine
So I bought the original UNO Arduino , and that fixed the problem .
So some clone brand Arduino do work .
So with my, Mac
?Java -OpenJDK11U-jdk_x64_mac_hotspot_11.0.21_9
?Jmri 5.5.2
Andrew.


 

FWIW:
?
I have built lots of DCC-EX systems for various people, using lots of different Arduino boards (Clone Megas, Mega+WiFi, ESP32 Duino, STM32 etc.) and lots of different motor shields.? I haven't personally come across an issue with the Arduino board not driving locos yet, although I do know 1 person who was sold a DCC system using an ESP2866 board that wouldn't run DCC-EX.
?
Specifics about what boards are OK for DCC-EX are best discussed on the DCC-EX discord server though.
?
As for the Pi not providing a WiFi access point, what specific Pi board are you using Rob?
?
Trevor


 

Also, what specific motor shield are you using?


 

开云体育

Hi Trevor my pi is a model 2b without Bluetooth , I think it’s 900hz with 1gb of memory and running from the sd card and the motor shield is ?Diymore l298p

I also have a hardware shutdown switch wired to pins 5,6 ?with the line dfoverlay=gpio-shutdown written into the config.txt file however if I update from Steve’s original jmri image this gets broken , it did work with his April image but not his new may image

Rob

Pro


On 17 May 2025, at 03:21, Trevor Rowland via groups.io <trevor@...> wrote:

?
Also, what specific motor shield are you using?


 

开云体育

Correction Trevor a model 3b running at 1.4 mhz , bought in 2019

Rob

Pro


On 17 May 2025, at 07:04, Rob Heath via groups.io <suntzu777@...> wrote:

?Hi Trevor my pi is a model 2b without Bluetooth , I think it’s 900hz with 1gb of memory and running from the sd card and the motor shield is ?Diymore l298p

I also have a hardware shutdown switch wired to pins 5,6 ?with the line dfoverlay=gpio-shutdown written into the config.txt file however if I update from Steve’s original jmri image this gets broken , it did work with his April image but not his new may image

Rob

Pro


On 17 May 2025, at 03:21, Trevor Rowland via groups.io <trevor@...> wrote:

?
Also, what specific motor shield are you using?


 

I have used the DIYMore L298p shields myself, so that should be fine.
?
Also, I believe that a Pi 3B should provide a WiFi Access Point from Steve's image.? Steve's web site mentions that model 3 Pi boards do work, so that seems to settle it.
?
If you simply load his image to the SD card, then (from his web site):
?
Once you've assembled the hardware and installed the image, first connect your RPi to your layout via your system's USB or serial connector, then plug in the RPi's power adapter. You should see some LEDs on the RPi begin to blink, and shortly, using your wifi-capable phone, you'll see a WiFi network named "RPi-JMRI". Select it and enter "rpI-jmri" when prompted for the key (note that 3rd character is a capital "eye").
?
So, I'd suggest, as a test, loading his image to a fresh SD card, and don't make any changes at all.? Don't worry at this stage about shutdown switches or any other changes.? Then, power on the Pi - without connecting a LAN cable.? Give the Pi 30 seconds to a couple of minutes to start up.? At that point, you should be able to see a WiFi network called RPi-JMRI on your iPad.? If you can see that WiFi network, then connect your iPad to that network, using the password rpI-jmri, then you should be able to use WiThrottle (once the system is connected to the DCC-EX controller of course).? If that WiFi network doesn't show up, are you certain the WiFi chip on your 3B is functional?
?
Trevor.


 

开云体育

Hi Trevor I did as you suggested?
1. Burnt a fresh image of Steves latest download of the rip-jmri distro
2. Connected and powered up my pi
3. Selected the rip-jmri ?on my iPhone , iPad network and entered the correct password which does not work on either device

4 just changed the localisation as I read that this effects the wifi signal

I know the pi’s wifi works as it is broadcasting ts signal

But I still can’t join the pi’s network

I explained this to Steve when I contacted him directly and even sent a video of the process I did to try and connect

I know the wifi chip is good as previously installing a pi os it searches and connects no my home network

So if anybody have any other ideas please mention them

Rob

On 17 May 2025, at 16:48, Trevor Rowland via groups.io <trevor@...> wrote:

I have used the DIYMore L298p shields myself, so that should be fine.
?
Also, I believe that a Pi 3B should provide a WiFi Access Point from Steve's image.? Steve's web site mentions that model 3 Pi boards do work, so that seems to settle it.
?
If you simply load his image to the SD card, then (from his web site):
?
Once you've assembled the hardware and installed the image, first connect your RPi to your layout via your system's USB or serial connector, then plug in the RPi's power adapter. You should see some LEDs on the RPi begin to blink, and shortly, using your wifi-capable phone, you'll see a WiFi network named "RPi-JMRI". Select it and enter "rpI-jmri" when prompted for the key (note that 3rd character is a capital "eye").
?
So, I'd suggest, as a test, loading his image to a fresh SD card, and don't make any changes at all.? Don't worry at this stage about shutdown switches or any other changes.? Then, power on the Pi - without connecting a LAN cable.? Give the Pi 30 seconds to a couple of minutes to start up.? At that point, you should be able to see a WiFi network called RPi-JMRI on your iPad.? If you can see that WiFi network, then connect your iPad to that network, using the password rpI-jmri, then you should be able to use WiThrottle (once the system is connected to the DCC-EX controller of course).? If that WiFi network doesn't show up, are you certain the WiFi chip on your 3B is functional?
?
Trevor.


 

开云体育

The Pi password is rpI-jmri. All lower case APART from the I in rpi. Most often that’s the issue

Phil G

On 17 May 2025, at 17:44, Rob Heath via groups.io <suntzu777@...> wrote:

? Hi Trevor I did as you suggested?
1. Burnt a fresh image of Steves latest download of the rip-jmri distro
2. Connected and powered up my pi
3. Selected the rip-jmri ?on my iPhone , iPad network and entered the correct password which does not work on either device

4 just changed the localisation as I read that this effects the wifi signal

I know the pi’s wifi works as it is broadcasting ts signal

But I still can’t join the pi’s network

I explained this to Steve when I contacted him directly and even sent a video of the process I did to try and connect

I know the wifi chip is good as previously installing a pi os it searches and connects no my home network

So if anybody have any other ideas please mention them

Rob

On 17 May 2025, at 16:48, Trevor Rowland via groups.io <trevor@...> wrote:

I have used the DIYMore L298p shields myself, so that should be fine.
?
Also, I believe that a Pi 3B should provide a WiFi Access Point from Steve's image.? Steve's web site mentions that model 3 Pi boards do work, so that seems to settle it.
?
If you simply load his image to the SD card, then (from his web site):
?
Once you've assembled the hardware and installed the image, first connect your RPi to your layout via your system's USB or serial connector, then plug in the RPi's power adapter. You should see some LEDs on the RPi begin to blink, and shortly, using your wifi-capable phone, you'll see a WiFi network named "RPi-JMRI". Select it and enter "rpI-jmri" when prompted for the key (note that 3rd character is a capital "eye").
?
So, I'd suggest, as a test, loading his image to a fresh SD card, and don't make any changes at all.? Don't worry at this stage about shutdown switches or any other changes.? Then, power on the Pi - without connecting a LAN cable.? Give the Pi 30 seconds to a couple of minutes to start up.? At that point, you should be able to see a WiFi network called RPi-JMRI on your iPad.? If you can see that WiFi network, then connect your iPad to that network, using the password rpI-jmri, then you should be able to use WiThrottle (once the system is connected to the DCC-EX controller of course).? If that WiFi network doesn't show up, are you certain the WiFi chip on your 3B is functional?
?
Trevor.