Tag Archives: RS485

RS485 & Raspberry Pi: Monitoring Power

Commercial data centers, lighting controls, utility rooms for buildings, and others need to keep a tab on their power consumption. The normal way to do this is by using electronic voltage meters and multi-branch current monitoring circuits. Vytas Sinkevicius wants to monitor power consumption using the ubiquitous single board computer, the Raspberry Pi (RBPi) as the main controller and the RS485 interface in a Branch Current Monitor (BCM) system.

The heart of the power monitoring system is an RBPi 3. Other parts the system uses are a Pi-SPi-RS485 Interface, a VP-EC-BCM Interface, a breakout PCB for an 18-Channel Current Sense Transformer, and a few Current Sense Transformers. Vytas will be writing the software in C, using the Geany compiler.

Electrical engineers use two types of current sense transformers for measuring current. The first type has a continuous hollow core, with the wire carrying the current passing through the hollow of the core. This type of current transformer is suitable for new constructions and requires the main power to be turned off for installations. The breaker wire has to be removed and re-connected after the current transformer is attached.

The second type of current transformer has a split hollow core, where one-half of the core may be separated from the other. Split cores are ideal for applications where the power wiring to the breakers cannot be switched off. By separating the top half of the core, the breaker wire can be placed in the hollow of the lower part, and the top half of the core replaced thereafter. Vytas is using a split-core current transformer, model type CR3110-3000, and CR Magnetics manufacture it.

The Pi-SPi-RS485 Interface provides power to the VP-EC-BCM Interface and communicates with the RBPi. As the RBPi and Pi-SPi-RS485 combination uses the Modbus RTU and RS485 protocols, they can be located as far as 4000 feet away from the actual area where power is being monitored.

The Pi-SPi-RS485 is a perfect fit for the RBPi3, as its ports match the GPIO port on the RBPi3. Moreover, as it duplicates the GPIO expansion port on the other sides of the Pi-SPi-RS485 module, additional modules are easy to add. You can fit the module directly on the back on an RBPi3, or use optional mounting hardware to connect and keep them alongside. All RS485 signals are duplicated on terminal blocks on the board, and on the RJ45 connectors as well.

Each RS485 module has its own power input (9-24 VDC) for powering remote transmitters, and its LDO regulator operating from the 5 VDC bus provides the 3.3 VDC. Therefore, this does not load the 3.3 VDC bus of the RBPi. There are on-board LED indicators for indicating the status of power and RS485 signals. Termination resistors can be selectively switched in using jumper settings provided. The module provides power to the VP-EC-BCM Interface over a CAT5e cable via the dual RJ45 connectors.

The VP-EC-BCM Interface made by VP Process Inc. does the actual power monitoring. This is a converter unit for current sense transformer with 36 channels. It has a 3-kVAC isolation between the primary circuits and the Power/RS485 Interface.

RS485 Relay Output Module for the Raspberry Pi

Although many consider the RS485 relay output module as an archaic protocol, it is still important to the industry. The RS485 protocol allows up to 32 devices to communicate through the same data line over a cable length of up to 4000 feet with a maximum data rate of 10 Mbps. Not many other protocols can equal those numbers.

The single board computer, the Raspberry Pi (RBPi) is increasingly finding its way into more and more industrial applications. However, the limiting factor for most compatible relay modules is the number of contacts available, which are either too few, or limited by the GPIO pins used.

The RS485 relay interface overcomes this limiting factor. Modules such as the Pi-SPi-RS485 and VP-EC-8K0 support the Modbus protocol. That offers the industrial user up to 253 modules at eight relays per module, theoretically making it possible to use 2,024 relays from one interface. Practically, there are two limitations.

According to the hardware protocol, the RS485 relay can support up to 32 unit loads, before a repeater/amplifier becomes necessary for the next batch of loads. Popular modules use the Texas Instruments RS485 drivers such as the SN65HVD72DR half-duplex IC, which according to the TI data sheet, allow only up to 200 unit loads.

In addition, the hardware protocol of the RS485 relay output module specifies the maximum distance between the extreme ends of the RS485 transmission line cannot exceed 4000 feet. For greater distances, a repeater/amplifier becomes necessary.

Therefore, for any industrial application requiring serious outputs such as few hundreds of easily configurable relays, each with 10 A SPDT contacts with MOV protection, where the distances are within 4000 feet between all modules, the RS485 modules for the RBPi are a perfect fit. Some modules are field ready as they have an optional DIN rail enclosure.

RS485

RS485 is an industrial standard for transmitting serial data via a hard-wired cableā€”EIA/TIA-485 defines the system. RS485 offers the ability of multi-drop cabling with data speeds of up to 10 Mbps over 50 feet, and slower communication speeds of 100 kbps for up to 4000 feet. Industrial applications such as data acquisition widely use the RS485 protocol.

Simple networks often use RS485 links, connected in 2- or 4-wire mode. A typical application may have several addressable devices linked to a single controller, PC, or SBC such as the RBPi. This typically uses a single line for communication.

Using simple interface converters, linking systems using the RS485 and RS232 protocols is possible. This may include optical isolation between the two circuits. It is also possible to incorporate surge suppression for any electrical spikes that the communication line may pick up.

RS485 makes it easy to construct a multi-point data network for communication. According to the protocol, you can have 32 nodes capable of both transmitting and receiving. Furthermore, you can easily extend this capability further by using automatic repeaters and using high-impedance drivers/receivers. That means hundreds of nodes can exist on a network, extending the common mode range for both drivers and receivers with tri-state and power off modes for power saving.