Command Station for DCC Adapter for Xpressnet

24,259

Command Station for DCC Adapter for Xpressnet
Command Station for DCC Adapter for Xpressnet

Xpressnet is a bus system designed for model railways, facilitating the interconnection of input devices, computer interfaces, stationary decoders, and feedback detectors. Numerous commercial input devices, such as the multi-mouse from Roco, utilize this bus system. An adapter is available to enable OpenDCC to interface with Xpressnet devices, which require a 12V power supply. This voltage is typically generated using a linear regulator from the OpenDCC supply. However, in larger Xpressnet installations, the power supply may become overloaded, necessitating the use of a robust external power supply. In such cases, the fuse F1 should be omitted, and SJ1 should remain open. Xpressnet operates using a half-duplex RS485 connection with a baud rate of 62.5 kBaud, employing 9 bits, no parity, and one stop bit. The Max485 (or Max481) chip converts data from the processor's serial interface into an RS485 differential signal. Although not mandatory, it is advisable to use slew-rate limited transmitters to reduce high frequencies on the bus, thereby minimizing potential termination and reflection issues. A LED indicates the transmission direction, which is generally unnecessary. Testing has revealed that the differential lines of RS485 may enter an undefined state when neither the master nor the slave is transmitting. To address this, a pull-up resistor of 1.5kΩ to 5V on line A and a pull-down resistor of 1.5kΩ to ground on line B are recommended. The adapter can be connected to the pin headers for JP1 and JP2 as well as the ISP interface. The power supply (+15V) for the regulator for Xpressnet must be connected using a separate wire from the command station's power supply plug. Long wire-wrap pin headers can be used to achieve a distance of 20mm between the PCBs. The Atmega32 processor in OpenDCC should be replaced with an Atmega644P to support the second USART; it is crucial to ensure that the suffix P (PicoPower) is included, as only this version contains two USARTs. After powering up the adapter, the output voltage should be verified before connecting any Xpressnet devices. The Roco Multimaus will display an Err13 message if it cannot establish a connection with the command station.

Xpressnet serves as a robust communication framework for model railway systems, allowing for seamless integration of various components. The architecture is based on the RS485 protocol, which is well-suited for multi-drop networks, enabling multiple devices to communicate over a single pair of wires. The choice of using half-duplex communication is significant, as it simplifies the wiring requirements while still allowing for efficient data transfer.

The Max485 or Max481 chips are pivotal in the conversion process, transforming the TTL level signals from the microcontroller into differential signals suitable for RS485 communication. This conversion is essential for maintaining signal integrity over longer distances, which is a common requirement in extensive model railway setups.

The implementation of pull-up and pull-down resistors on the differential lines is a critical design consideration to prevent the lines from floating when no devices are transmitting. This ensures that the communication lines remain stable and reduces the likelihood of erroneous data transmission.

The design also incorporates a visual feedback mechanism through an LED, which indicates the direction of data transmission. While this feature may not be essential for all users, it can aid in troubleshooting and ensure that the communication is functioning correctly.

The requirement for an external power supply in larger installations highlights the importance of power management in digital communication systems. Adequate power supply design is crucial to ensure that all devices receive the necessary voltage and current without overloading the system.

Furthermore, the recommendation to replace the Atmega32 with an Atmega644P underscores the need for scalability in design. The additional USART provided by the Atmega644P enhances the system's capabilities, allowing for more complex setups and improved communication options.

Finally, the emphasis on verifying the output voltage before connecting Xpressnet devices is a prudent safety measure. This step ensures that the devices are not subjected to incorrect voltage levels, which could lead to device failure or erratic behavior. The inclusion of error messages, such as the Err13 from the Roco Multimaus, provides users with immediate feedback on the system's operational status, facilitating quicker troubleshooting and maintenance.Xpressnet is a bus system for model railways to interconnect input devices, computer interfaces and stationary decoder or feedback detectors. Many commercial input devices (including the multi-mouse from Roco) are based on this bus. The following adapter enables OpenDCC to interface to Xpressnet devices. Xpressnet devices need a power supply of 12V. This voltage is created with an linear regulato from the supply of OpenDCC. On large Xpressnet installations, however, this power supply may be overloaded. In this case, the 12V should be generated with a powerful external power supply. The fuse F1 must be left out in this case. SJ1 should be left open. Xpressnet uses a half-duplex RS485 connection. The baud rate is 62. 5 kBaud, 9 bit are used, no parity, one stop bit. The chip Max485 (or Max481) takes the data from the serial interface of the processor and converts it into the R485 differential signal. While not required, it is strongly recommended that slew-rate limited transmitters be used to minimize high frequencies on the bus, and thus help avoid possible termination/reflection issues.

A LED displays the transmission direction (normally not needed). By testing different transcievers I found that the differential lines of RS485 may come to an undefined state, if neither master nor slave is sending. A pullup resitor of 1k5 to 5V on line A and a pulldown of 1k5 to GND on line B is recommended. The adapter could be plugged on the pin headers for JP1 and JP2 boat and on the interface for ISP. Only the power supply (+15 V) for regulator for Xpressnet must be connect with a separate wire from the power supply plug of the command station.

I`m using long wire-wrap pin header to get a distance of 20mm between the PCBs. The processor Atmega32 of OpenDCC must be replaced by an Atmega644P, to support the second USART. Important is the suffix P (PicoPower), only this type contains two USARTs. Now power up the adapter and check the output voltage. Only after this Xpressnet devices should be connected. The Roco Mulitmaus reports Err13 when it cannot connect to the command station. 🔗 External reference