MERG CBUS

For my model of Penmaenpool, I am using MERG’s CBUS as the layout control system. CBUS was originally developed for model railways on the same principles as automotive CANBUS, and it allows devices to communicate using short “events” instead of direct wiring. This means everything from point motors and signals to track detection and panel indicators can run over a simple four-wire bus. Instead of wiring every switch directly to the devices it controls, each input produces an event on the bus, which can then be acted on by any number of outputs. This keeps the wiring straightforward while making the system flexible and expandable.

The layout is controlled through JMRI, with CBUS providing the link between the computer, control panels, and layout modules. JMRI acts as the brains of the system, handling interlocking, route setting, and eventually automation or timetable running. CBUS then takes care of passing events around the layout.

At Penmaenpool itself, the plan is to retain the feel of real signalling practice by using a lever frame. The levers operate through CBUS, so pulling a lever generates an event which JMRI can process, setting the appropriate points and signals. The computer supervises interlocking, ensuring the lever frame works as it would on the prototype, while still keeping the system easy to maintain.

The result is a hybrid system: a physical lever frame for authentic operation, JMRI for logic and supervision, and CBUS as the digital backbone linking everything together. It feels hands-on and mechanical at the operator’s end, but underneath it is modern, reliable and infinitely expandable.

System Architecture

The control system at Penmaenpool is built on CBUS, running entirely on a 12 V DC supply. The backbone is a single Cat5 cable, which distributes both the CBUS signalling and the 12 V power to every board.

  • One twisted pair carries the CANH and CANL data
  • The remaining three pairs, paralleled together, form the 12 V power bus
  • The CAN bus is terminated at each end with a 120 Ω resistor, ensuring stable signal transmission
  • The Cat5 run is kept well away from DCC track wiring to prevent interference

This approach means the whole layout can be wired together with just one neat cable, instead of bundles of individual wires.

Core Components

  • Lever frame input: Each lever is wired into a CBUS producer module (such as a CANPAN or CANMIO-IN), which generates events whenever a lever is moved.
  • PC interface: A CANUSB4 module connects CBUS to the JMRI computer. It is powered directly by the USB connection and handles both event monitoring and interlocking logic.
  • Servo control: All points and semaphore signals are driven by CANMIO-OUT (servo mode) modules. Each output drives a single servo, with adjustable travel and speed to mimic realistic operation.
  • Indicators: Panel LEDs and any additional status lights are also managed by the CANMIO, with outputs configured accordingly.

Logic and Flow

  1. Lever pull: Moving a lever generates a CBUS event.
  2. JMRI interlock: The event is passed to JMRI, which checks the interlocking table. If the move is permitted, JMRI transmits the corresponding output events.
  3. Layout action: The relevant CANMIO servos respond — setting the point or moving the semaphore signal. At the same time, indicators on the panel update.

This flow allows the tactile, authentic feel of a lever frame while ensuring safe and reliable logic behind the scenes. Using servos instead of solenoid motors avoids heavy current pulses and allows smooth, prototypical operation of Penmaenpool’s points and signals.

The CANPAN Module

The CANPAN is a combined input and output module designed specifically for control panels. It can scan up to 32 switches or levers and drive up to 32 LEDs, all through CBUS. This makes it ideal for the lever frame and indicator panel at Penmaenpool.

Lever Inputs

Each lever in the frame is wired into the CANPAN’s switch matrix. The module scans the contacts and generates a CBUS event whenever a lever is pulled or restored. Switches can be configured for:

  • ON/OFF (toggle)
  • ON only (push button style)
  • OFF only
  • Push on/push off (alternate action)

These events are passed to JMRI, which checks the interlocking and then issues the necessary output events to drive the points or signals.

Panel Indicators

The CANPAN also drives the indicator LEDs on the panel. Up to 32 LEDs can be connected in a simple row/column matrix. Each LED can be set to respond to CBUS events as ON, OFF, or FLASH, and can also be polarity reversed if needed. This allows JMRI to update the lamps to confirm when a route has been set or a signal cleared.

Integration with JMRI

Because the CANPAN is both a producer and a consumer module, it allows two-way communication between the lever frame and the interlocking system. Lever pulls are reported to JMRI, and JMRI in turn updates the panel indicators, keeping the frame and the layout state in sync.

Practical Notes

  • The CANPAN runs on 12 Vdc, in line with the rest of the Penmaenpool CBUS system.
  • Configuration is done in FLiM mode using the FLiM Configuration Utility via the CANUSB4 interface.
  • The module remembers its switch and LED states in EEPROM, so the panel powers up in the same condition it was last used.

This single board therefore provides a neat and robust way of connecting the lever frame and panel indicators into the wider CBUS and JMRI system, with only one ribbon cable between the frame and the module.

The CANMIO Module

The CANMIO is a versatile multi-input/output CBUS module. It can be built in several configurations, but for Penmaenpool it will be assembled in servo mode to operate up to eight servos, with the option to add up to eight inputs if required.

Servo Control

Each servo output can be individually configured for travel, speed, and end-points, allowing precise adjustment to suit both point motors and semaphore signals. Slow travel can be set for realistic arm movement, while point servos can be tuned for positive switching without over-driving the mechanism.

Lever Frame Interlocking

Some CANMIO outputs will also be used to drive servos inside the lever frame itself. These act as mechanical locks:

  • When JMRI authorises a lever movement, the corresponding servo withdraws the locking, allowing the lever to move.
  • If the move conflicts with the interlocking logic, the servo holds the block in place, physically preventing the lever from being pulled.

This adds a tactile realism to operation, as the frame resists conflicting movements just as on the prototype.

JMRI and CBUS Integration

JMRI includes native support for CBUS, treating modules as producers and consumers of events. A lever pull from the CANPAN produces an event; JMRI receives this, checks the interlocking, and issues output events which the CANMIO consumes to move servos. The same event can also update LEDs or trigger route logic, illustrating CBUS’s one-to-many design.

The system connects to the computer via a MERG CANUSB4 interface. Once configured in JMRI Preferences, the Event Table and Node Manager tools make it easy to monitor and manage traffic on the bus. Firmware updates can also be applied over the network, reducing maintenance.

This ensures the lever frame, layout servos, and JMRI logic all remain synchronised, while still allowing future expansion such as timetable operation or automation.

Integration with CBUS and JMRI

  • Events in: When a lever is moved, the CANPAN generates a CBUS event. JMRI checks the interlocking and, if valid, issues an output event to the CANMIO.
  • Servo action: The CANMIO responds by moving the relevant servo — either on the layout (point or signal) or inside the lever frame (interlocking lock).
  • Feedback: The CANMIO can also be configured to send back events when a servo changes state, which JMRI can use to confirm the action and update the panel indicators.

Inputs Option

If built with inputs enabled, the CANMIO can also monitor up to eight contacts (such as detection circuits, push buttons, or auxiliary frame contacts). These would generate CBUS events just like the CANPAN.

Configuration

Unlike the CANPAN, which can be taught in SLiM, the CANMIO is an advanced kit that requires a computer for setup. Configuration is done via the FLiM Configuration Utility (FCU) connected through the CANUSB4 interface.

Role at Penmaenpool

At Penmaenpool, CANMIO modules will:

  • Drive the point servos, ensuring reliable and smooth operation without the current surges of solenoids.
  • Operate the semaphore signals, with realistic movement adjusted through the servo travel and speed settings.
  • Provide physical interlocking in the lever frame, using servos to block conflicting movements.
  • Act as the link between the lever frame, JMRI, and the moving parts of the layout.