JMRI Hardware Support - LocoBuffer-II to LocoNet®
Author: Bob Jacobsen
Keywords: Digitrax LocoBuffer-II java model railroad JMRI hardware

# Hardware Support: Connecting a LocoBuffer-II to LocoNet®

The LocoBuffer-II provides a very reliable way to connect a computer serial port to a LocoNet®. It was produced by Dick Bronson's RR-CirKits company, based in part on the original LocoBuffer design, but is currently out of production. You might be able to find one in a local hobby shop. It's been replaced by the LocoBuffer-NG, which uses a built-in USB connection.

## Recommended setup

The LocoBuffer-II requires a USB-to-serial adapter with dedicated drivers on computers without a serial port. See the LocoBuffer-NG for a LocoNet-PC interface with direct USB support.

The recommended LocoBuffer-II option switch settings are:

- 19,200 baud or 57,600 baud
- RS-232 echo off
- LocoBuffer mode
- ICSP Program Mode off
- Boot Program Mode off
- Isolated power (see below)

The recommended JMRI setup for the LocoBuffer-II is:

- Set all switches off (toward the front label side).
- Connect the LocoBuffer-II to a suitable power supply, for example a wall-wart of the correct voltage.
- Start DecoderPro or other program and configure it for:
  - LocoNet LocoBuffer-II
  - Select your port
  - 19,200 baud or 57,600 baud, to match the LocoBuffer-II internal option switch settings
  - Hardware flow control

## Loop-back testing

The LocoBuffer-II input circuit and code actually reads from the LocoNet output jack, so if you install the LocoNet terminator (the small circuit that was shipped with the LocoBuffer-II) and set SW7-8 to ON (down) so that the input circuitry gets its power from the wall-wart, then you have created a loop back test. The only thing that is not tested is the LocoNet jack itself.

Steps:

1. Unplug The LocoNet cable
2. Open case (use a small screwdriver to work open the latches at the small slots on the sides)
3. Install terminator
4. Set Sw 7-8 ON, all other switches OFF
5. Set the JMRI LocoBuffer options to 19,200 baud and hardware handshaking enabled
6. Open the JMRI LocoNet Monitor window.
7. Using JMRI send some commands (e.g. switch commands)
8. The commands should appear in the LocoNet monitor window and the LocoBuffer-II activity LED should blink
9. Remove the terminator (unless your application requires it)
10. Restore the LocoBuffer-II option switches to their normal settings for your application

## LocoBuffer-II Power

When powered by an external supply, the LocoBuffer-II completely isolates your computer from the LocoNet, removing the possibility of ground currents flowing through the LocoNet cable.
If you are using an isolated computer, for example a laptop that's not connected to any peripherals, you can configure the LocoBuffer-II for "Local Power" so that it doesn't need an external power supply. It will then get it's power from the RailSync leads in the LocoNet.

It is strongly advised that you get your computer connection working properly with an external power source in "Isolated Power" mode before you do this. That way, if any problems arise when you try to use Internal Power, you'll know what caused them and they'll be much easier to diagnose.

To configure the LocoBuffer-II for "Local Power", remove the power connection and set switches 7 and 8 to ON (down, toward the switch illustration).

LocoNet® is a registered trademark of Digitrax, Inc.