Jump to content
 

NCE SB5 with AIU and BD20 for block occupancy - need resistor wheelsets


imt
 Share

Recommended Posts

  • RMweb Premium
3 hours ago, imt said:

Hi! I am currently far away and lying in the sun (sorry!) so I don’t have things to hand. My setup is similar to yours and uses Cabs 4 & 5 for the AIUs for definite. I know you can go to 8 or so but not sure whether it’s 8, 9 and 10.

perfect - I think this means I can use 4,5,8,9 and 10 if I need to

regards

Andy

Link to post
Share on other sites

On 22/01/2022 at 07:55, imt said:

Hi! I am currently far away and lying in the sun (sorry!) so I don’t have things to hand. My setup is similar to yours and uses Cabs 4 & 5 for the AIUs for definite. I know you can go to 8 or so but not sure whether it’s 8, 9 and 10.

Addresses 8/9 and ten are more for the power cab as long as you have version 1.65B.

The PH pro its governed by two things the free cab addresses up to 63, and the cab bus load which is one amp before external power is needed.

All items inc the face plate draw some current on the cab bus 

AIU   24mA at idle / 90mA at full load

Throttle   85mA - back light flicker = low voltage

UTP    30 mA

USB interface 30mA

 

John.

Edited by arff999
Link to post
Share on other sites

  • RMweb Premium
3 hours ago, arff999 said:

Sorry forgot top add

For the SB5

6 cabs can be used with the SB5 (Cab address range 2 through 7.

John. 

John

So if I have two throttles connected how many AIUs do you think I can connect at the same time?

I now have one AIU in place being driven by a MERG DTC8a block detector which works just fine.

My current problem is that JMRI seems only to read the first six channels of the AIU (I am using CAB address 10 for this AIU). it is most odd - the seventh AIU channels lights up on the AIU but the interface to the JMRI seems not to notice!

I don't suppose you have used JMRI at all?

Andy

Link to post
Share on other sites

Hi Andy 

No sorry I dont use JMRI, never will to be honest.

I would use some thing like I train.

I would guess 3 aiu,s connected should be ok, as long as they have different cab addresses. strange it only sees the first six id think that was an issue with JMRI itself. 

John. 

Link to post
Share on other sites

  • RMweb Premium

It turns out to be a known hardware issue with AIUs. The input resistors on channel 7 (and sometimes channel 6) are different for some arcane reason and this impacts sensitivity. The solution I now have in place is to simply remove the output resistors on the DTC8a on the relevant channels and all is now working fine. There is a long investigation on the JMRI blog into this. My current problem is the worldwide shortahge of AIUs to purchase.

Andy

Link to post
Share on other sites

32 minutes ago, Andy Keane said:

It turns out to be a known hardware issue with AIUs. The input resistors on channel 7 (and sometimes channel 6) are different for some arcane reason and this impacts sensitivity. The solution I now have in place is to simply remove the output resistors on the DTC8a on the relevant channels and all is now working fine. There is a long investigation on the JMRI blog into this. My current problem is the worldwide shortahge of AIUs to purchase.

Andy

 

If its any use, there is a guide to making your own AIU's from Arduinos.    It would give you 14 inputs from a standard Arduino, and probably 40+ from a "Mega".   

https://mrrwa.org/nce-cab-bus-interface/

 

If you can build things with Arduino, it looks very easy:   
1 - get a RS485 chip and wire it onto a handful of pins,  2 - install the library in the Arduino IDE (its in the standard libraries to download),  3 - select the AUI example, change its CAB address in the code, compile, load to Arduino.  4 - work out how to power it on the layout (most genuine Arduinos take 7v-20v DC on their inputs),   5 - install on layout, connecting DTC8's etc.. .  

 

I've not tried it. 

Were I to try, I'd buy some genuine "Nano Every" units at about £11 each from Farnell/RS/etc., and prior experience tells me to also buy genuine RS485 chips as well.   

 

- Nigel

 

Link to post
Share on other sites

  • RMweb Premium

I think using an Arduino with this little Raspberry Pi board

https://thepihut.com/products/rs485-board

will do the trick. I have a spare Mega lying around so have sent of for a couple of the 485 interfaces and we shall see if it works.

It will in fact be better than the AUI as one of my baseboards really needs 20 inputs and that would have taken two cab adresses using the NCE AUi while I hope to deal with them all on one Arduino with room to spare.

Luckily I have the low power DC bus aviable to run these things already in place.

Andy

Link to post
Share on other sites

12 hours ago, Andy Keane said:

I think using an Arduino with this little Raspberry Pi board

https://thepihut.com/products/rs485-board

will do the trick. I have a spare Mega lying around so have sent of for a couple of the 485 interfaces and we shall see if it works.

It will in fact be better than the AUI as one of my baseboards really needs 20 inputs and that would have taken two cab adresses using the NCE AUi while I hope to deal with them all on one Arduino with room to spare.

Luckily I have the low power DC bus aviable to run these things already in place.

Andy

 

A few things...  

 

I think the 5v may be easier with an Arduino (where most things are 5v) rather than the 3.5v version.  

 

There may be power for your module on the CAB-Bus wires.  How do NCE power their devices on the CAB-Bus ?   

 

Past experiences with cheap-ish RS485 boards has shown unreliability.  You may be fine with the board shown (and I'd use something like it for experimenting). 
But our experience on a fairly large layout was that Chinese RS485 boards were not reliable and would randomly cause lock ups for all sorts of things.  We painstakingly removed the chips from the boards and substituted genuine Texas Instruments chips (from RS/Farnell/etc., so known provenance) and the communications problems we'd experienced went away.  

 

 

 

Link to post
Share on other sites

  • RMweb Premium
2 minutes ago, Nigelcliffe said:

 

A few things...  

 

I think the 5v may be easier with an Arduino (where most things are 5v) rather than the 3.5v version.  

 

There may be power for your module on the CAB-Bus wires.  How do NCE power their devices on the CAB-Bus ?   

 

Past experiences with cheap-ish RS485 boards has shown unreliability.  You may be fine with the board shown (and I'd use something like it for experimenting). 
But our experience on a fairly large layout was that Chinese RS485 boards were not reliable and would randomly cause lock ups for all sorts of things.  We painstakingly removed the chips from the boards and substituted genuine Texas Instruments chips (from RS/Farnell/etc., so known provenance) and the communications problems we'd experienced went away.  

 

 

 

Thanks for the info - it sounds like you are actively using these Arduino approaches so all input gratefully recieved.

On the chips I do also have five genuine Texas Instruments chips on order. What I liked about the Pi boards was the fact that the cable socket is already in place etc.

My layout is 12 feet by 18 feet so hopefully distances will not be an issue.

Did you have any issues at all with the code on the web? Did you need to make any edits? I plan to use Mega boards and so will need to make some changes - I wondered if you had already done this and could share your experince.

regards

Andy

Link to post
Share on other sites

21 minutes ago, Andy Keane said:

Thanks for the info - it sounds like you are actively using these Arduino approaches so all input gratefully recieved.

On the chips I do also have five genuine Texas Instruments chips on order. What I liked about the Pi boards was the fact that the cable socket is already in place etc.

My layout is 12 feet by 18 feet so hopefully distances will not be an issue.

Did you have any issues at all with the code on the web? Did you need to make any edits? I plan to use Mega boards and so will need to make some changes - I wondered if you had already done this and could share your experince.

regards

Andy

 

Our (its a group layout, so the code wasn't mine) RS485 experience was with Arduinos, our own code to link various modules.  Distance wasn't the issue, the problems were over ranges of inches to small number of feet.  We ended up with a two module test-rig, of a few inches between them, and that revealed the source of the problem (would run for a while, then lock up), and that we'd fixed it with genuine TI chips.   
Yes, I'd be doing as you are: the pre-made boards are great for prototypes; get something working then worry about turning it into something robust.  

 

The Arduino code on the forum is stuff I found with a quick search (because I'd guessed it would be there).  I'd expect it to work, because the author is known for LocoNet code for Arduino, and that code works.   But, I've not tried the NCE Cab-bus code.   

 

I've not looked into putting the code on a Mega, but I'd expect the first task to be sorting out the pins for RX/TX for the RS485.  

 

 

 

regards

 

Nigel

 

 

Link to post
Share on other sites

  • RMweb Premium

Nigel

I have the code compiled for the Mega OK so just waiting on the postman to deliver some chips to play with.

But one tedious issue I have found alread is that the standard JMRI code I use will not allow more than 14 addresses per board when building sensor tables for NCE hardware because it assumes users must be using actual NCE hardware rather than things like Arduinos. I really don't fancy having to branch off my own version of JMRI to get around that - ho hum!

I am therefore now off to the JMRI users forum!

Andy

Link to post
Share on other sites

  • RMweb Premium

I now have an Ardunio Mega plus a Raspberry Pi RS485 board doing the job of the AIU courtesy of Alex Shepherd's awesome coding of the interface ( https://mrrwa.org/nce-cab-bus-interface/ ).
The little Pi board is from the PiHut: https://thepihut.com/products/rs485-board.
The only subtlety is that as shipped the wiring of the socket on the RS485 board is the wrong way around (RS485 does not specify which way they should go for any given application).

The Mega has more capability than this application strictly needs but it does nicely separate the RS485 from the connections to the programming PC and I had one lying around. Until such time as NCE start shipping AIU boards again this works for me. If you got it working on an Arduino Uno it would be cheaper too.

If anyone needs any help on this I am happy to tell what I know, also Alex is very helpful too.

Andy20220205_122425.jpg.42351c805e92ead52ee4e52a18f77492.jpg20220205_122449.jpg.28a539e23acfad144fdcfc04cbadc3bd.jpg20220205_122434.jpg.c352b6752b31722f1c4c1f17422e213b.jpg

Link to post
Share on other sites

6 hours ago, Andy Keane said:

I now have an Ardunio Mega plus a Raspberry Pi RS485 board doing the job of the AIU courtesy of Alex Shepherd's awesome coding of the interface ( https://mrrwa.org/nce-cab-bus-interface/ )............

 

Top work, and yes, Alex is a great guy for helping others.  

 

You can now code your Mega to do other things at the same time....  If you think of it as having to inspect the AUI every few miliseconds, there's loads of code time for it to do other things, such as report the time of day, remind you to run the 6.04 Sodor special, run the signal box interlocking,  etc...  

Link to post
Share on other sites

  • RMweb Premium
7 minutes ago, Nigelcliffe said:

 

Top work, and yes, Alex is a great guy for helping others.  

 

You can now code your Mega to do other things at the same time....  If you think of it as having to inspect the AUI every few miliseconds, there's loads of code time for it to do other things, such as report the time of day, remind you to run the 6.04 Sodor special, run the signal box interlocking,  etc...  

Well if I go on this way I will have four of these mega boards scattered around - two under the station itself and two under the fiddle yard sidings. I could probably have them mining for bit coins in their spare time.

Andy

Link to post
Share on other sites

On 05/02/2022 at 19:15, Andy Keane said:

Well if I go on this way I will have four of these mega boards ....

 

I found this in my collection of bookmarks, may be useful

 

https://www.alfray.com/trains/nce_cab_bus.html

 

I see from the JMRI forum that you're already considering doubling up the addresses on the Megas.  I was going to suggest you looked into whether that was possible, or alternatively running multiple RS485 devices per Mega (there being three serial UARTs on the pins on the Mega, which gives more options than a Uno/Nano).  

 

 

Link to post
Share on other sites

  • RMweb Premium
1 hour ago, Nigelcliffe said:

 

I found this in my collection of bookmarks, may be useful

 

https://www.alfray.com/trains/nce_cab_bus.html

 

I see from the JMRI forum that you're already considering doubling up the addresses on the Megas.  I was going to suggest you looked into whether that was possible, or alternatively running multiple RS485 devices per Mega (there being three serial UARTs on the pins on the Mega, which gives more options than a Uno/Nano).  

 

 

Ps, a really useful link.

Link to post
Share on other sites

  • RMweb Premium

Alex has now shipped me a code for the Mega that allows it to behave like a pair of AIU boards with two separate CabBus addresses and 28 sensor inputs, but using just a single RJ11 socket and cable to connect. This is really helpful to me as I have bits of my railway that have a very dense set of points, track and sensors. It’s cheaper than two AIUs and neater.

Please let me know if that helps anyone.

Andy

  • Like 1
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...