Jump to content
Kiran

Getting started with LCC (Layout Command Control)

Recommended Posts

gavino200

Thanks again to Kiran for opening and guiding this clarification thread. I'm looking forward to learning more from you about this project. 🙂

Share this post


Link to post
gavino200
5 hours ago, roadstar_na6 said:

Coold you technically use LCC with a DC layout then?

 

Yes, absolutely. It's completely separate from how you power and control your trains. As far as I know you can also use a loconet system to control your layout without actually having a DCC control center or cabs. You would just need a loconet to computer interface and a simple 12 Volt power supply. 

  • Thanks 1

Share this post


Link to post
inobu
7 hours ago, roadstar_na6 said:

Coold you technically use LCC with a DC layout then?

Yes,

 

LCC is separating layout activities from train activities. This means there is no association with the track, leaving the

track to operate as DCC or DC.

 

  • Like 1
  • Thanks 1

Share this post


Link to post
inobu
Posted (edited)
3 hours ago, gavino200 said:

 

Thank you, and to clarify, likely redundantly like a five year old, Loconet is a two way communication system. The loconet devices do in fact send information from the periphery to the center. Specifically, with Loconet you don't have to set all the junctions a certain way every time, before you start? Am I right about that?

 

Another discussion point that I've encountered concerns the LCC protocol. Generally the LCC protocol is compared to DCC protocol in these discussions. But like you say, loconet has it's own protocol. For me any meaningful discussion of protocol should compare LCC protocol to loconet protocol. Furthermore, I was under the comfortable impression that if I used a control software package like JMRI or train controller, I would only really have to concern myself with learning the software interface, and not ever really need to understand the inner workings of it. Have I been naive about that?

 

 

Protocol

 

The protocol is a type of rule or language that an electronic device uses. These rules enables the device to interpret the 1's and 0's. The Ones and Zeros are formulated into

commands strings.

 

Example

This is an actual Loconet command to throw switch address 500

 

The command station will send a series of ones and zeros over the Loconet bus.

 

1011 0000  0111 0011 0011 0011 0000 1111

 

The device uses its protocol to formulate the data packet into a Hexadecimal string

 

B0 73 33 0F

 

The devices then looks up the Hex string and carries out the command.

 

JMRI helps us Interpret the Hex

 

We connect JMRI to the loconet bus so it can monitor and read the messages going across the Loconet bus.

Using the protocol as well JMRI can translate the message into a readable and graphical representation for us to

manipulate.

 

Raw screen capture

 

[B0 73 33 0F]  Requesting Switch at LT500 to Closed (Output On).

 

Graphical view
 

image.png.e873fb4ac7855804a2e6f10db7ccbd1e.png

 

image.png.f1173a32d29f3359feebdcaded8443e6.png

 

Setting Junctions

 

As you can see from above the layout can be configured the way you want. As JMRI starts up you can have it to

initiate the switches in the position you want.

 

I keep injecting Loconet into the conversation because it is the only real example we can use. In essence

LCC is an opensource version of Loconet.

 

Inobu

Edited by inobu
  • Like 1
  • Thanks 1

Share this post


Link to post
Kiran

My experimental setup for block detection

 

I do apologize for not taking pictures as I was experimenting. I didn’t anticipate that I would be documenting this. Also, these are horrible wiring practices for a DCC layout. Don’t do this. Look at www.wiringfordcc.com for tips on wiring DCC layouts. The below is just a quick way to create a test layout for experimentation.

 

Using Unitrack S248 sections and S62 feeders, I created 4 blocks by replacing the unijoiners with insulated ones. I had a ton of Kato Unitrack feeder wires lying around and I also had a couple of Kato 3-way splitters. I used these to power all the 4 blocks. I had 4 feeder wires going to all 4 blocks.

 

I have to run one of the 2 feeder wires through the coil transformers. For consistency, I decided to use blue wire. Only 1 wire needs to go through the CT. These RR-Cirkits CTs do not require multiple loops. I cut the blue wire, ran it through the CT and used 3M Scotchlok 3 wire Insulation displacement connectors (IDCs) to make it whole again. The CTs have 2 solid wires. You need to connect a pair of twisted wires to these and run them to the BOD4-CP. I used Woodland Scenics JustPlug system plugs because they are easy to use but screw terminals work just fine. Polarity doesn’t matter. So you can use any color wires. You could strip the jacket of a CAT5 cable and use the 4 twisted pairs from it. That way you get wires with different colors. Being blind, I don’t care about colors. So I just use the same color :). BOD4-CP has 4 pairs of screw terminals and this is where these twisted wire pairs go. Notice the 4 screws next to the terminals? You can turn those with a Phillips screwdriver to adjust detection sensitivity.

 

01.jpg.cdfacd2b1db057f6e273876c75d4534c.jpg

I had a laptop installed with JMRI. I also have an NCE Powercab system that I use for programming track. This is connected to my laptop with the NCE USB interface. I just needed to create the LCC CAN bus. This is pretty simple.

 

1. Connect the “LCC Buffer-USB” to a USB port on my computer (USB cable supplied). LCC Buffer-USB is part of RR-Cirkits “LCC Starter Kit”.

2. Plug one of the supplied terminator pair connectors into the RJ45 slot and the CAT 5 cable into the other slot.

3. Connect the CAT5 cable from LCC Buffer-USB to LCC Power-Point. Connect the provided power supply to the Power-Point as well.

4. Using a CAT5 cable (not supplied), connect the Power-Point to Tower-LCC.

5. Use the remaining connector from the terminator pair to terminate the LCC bus.

 

That’s it! I have an LCC CAN bus now. Bod4-CP with its connections to the CT sensors plugs into Tower-LCC either directly via the male-female connector or a 10 wire flat cable.

 

Next step is configuration. When you connect the LCC Buffer USB to the computer, it gets assigned a COM port. I use Windows and you can find this in Device Manager. It is Com port 4 in my case.

 

02.png.56a9e416f3eb1759fa801dec26a244c3.png

I then go in to JMRI > Edit menu > Preferences and create a new OpenLCB connection

 

03.png.7b45bbf77c7376ab9aa84885a5b483db.png

If the connection is working, there will be an “Open LCB” menu item in JMRI.


04.png.bd0cfd163f3e8abb20e558ae3ac9b971.png

 

I have put off talking about LCC terminology primarily because I don’t fully understand it myself. But there is one thing that is absolutely important and that is Event ID. Every time, something happens on the layout, there is a unique event ID generated for that. To see this in practice, let’s look at the traffic monitor in Open LCB menu in JMRI.

 

I am going to place a locomotive in one of the blocks, wait for a few seconds and take it out. Let’s see what shows up in the traffic monitor.


05.png.ccef56f973ecc587232f4f61b261712d.png

 

There were 2 events with unique IDs. Event ID “02.01.57.00.02.A7.00.5A” was generated when I placed the locomotive on the track in the block. The CT (Coil Transformer), detected that something is drawing current and it went active. The way it (CT sensor) tells the LCC bus that it is now active is by generating an event with this ID. The second event with the ID “02.01.57.00.02.A7.00.5B” is generated when I removed the locomotive from the track. These events are generated on the LCC bus and can be used by any other device on the network. For instance, a turnout on LCC, can lie in wait for the sensor to generate the event ID “02.01.57.00.02.A7.00.5A” (which indicates that a loco or train has entered the block) to be triggered and automatically throw or close the turnout as required. Or a signal can change aspect or whatever fancy thing you can think of to do. 

 

This brings us to “producers and consumers”. If I understand this correctly, in the above example, my CT sensor is the producer. The turnout which is lying in wait for the sensor to go active is a consumer.

 

I like to maintain all my layout information in JMRI. so I have begun creating sensors in JMRI and assigning them names. In JMRI, tables of sensors, turnouts and other things can be created by going in to Menu > Tools > Tables. To create a sensor, I select sensor table, select “Open LCB” tab and click on Add…


06.png.2b8be25331ab5ff090e38a50811cc632.png

 

JMRI requires the 2 Event ID pairs for active and inactive in the format 02.01.57.00.02.A7.00.5A;02.01.57.00.02.A7.00.5B to create a sensor. I can give this a name and there I have my sensor!

 

07.png.6fe1c8bfa3b037d4b2d87e8a1aa3932e.png

I am beginning to create sensors for my permanent layout and you will notice that one of the sensors in the table is active because there is a locomotive in that block.

 

JMRI also lets you create panels to virtually represent your layout. You can place sensors on the panels and indicate where they are. Same for Turnouts. But you don’t have to. You need to use JRMI to configure your LCC nodes. Such as having them trigger and do something an event occurs. Once you configure the nodes, they will just work fine without JMRI.

 

Next up, I am going to configure a turnout and have it do things when something else happens such as a pushbutton is activated or a block is occupied. And more terminology!

 

 

  • Like 1
  • Thanks 3

Share this post


Link to post
Kiran

As part of my research, I came across this LCC Clinic by Balazs Racz which basically covers everything from block occupancy detection, turnouts and signaling using LCC.

 

 

 

 

  • Like 2

Share this post


Link to post
Kiran

I have now succeeded in getting the MTB MP1 turnout motor to work with Tower-LCC and BOD4-CP as you can see in this video:

https://drive.google.com/file/d/1OHs6d5-w0IhB854fIj0V8UPDEQ4SkBW0/view?usp=sharing

 

I also have 2 push buttons connected to control the motor. I prefer to have 2 buttons, 1 for each state of the turnout but you can do this with a single button and have the motor perform alternate action on each press. Or you can also have a SPDT switch with momentary contact. I can also add an LED anywhere on the layout to indicate the status of the turnout.

 

I am also going to get this working with a Kato turnout and write up the steps.

  • Like 4

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...