RS 485 radio modules

Above all, we must have a look at the characteristics of the RS485 link used by the XpressNet bus. The Lenz USA XpressNet Specification document gives us all the necessary technical information. We learn that the link is 9-bit, 62,500 bps (bits per second), half-duplex (i.e. bidirectional, but the information can only be transmitted in one direction at a time), and that the supply voltage is 12 V. This document also gives the wiring of the connection sockets, which are common DIN sockets known since the 1960s (and maybe even before?)

There are plenty of modules capable of transmitting radio signals RS485 on the market, but they are industrial devices. This means that priority is given to the transmission safety and then to the range, which for some can reach the kilometre in clear terrain! This is far too much for us, and it is especially expensive. Don’t forget that we need two modules!

Cheap — and Chinese of course — modules

Then I found this: 433 MHz RS485 Universal Asynchronous Receiver Transmitter RF Wireless Transceiver Module.

Here is an illustration of the page:

Module advertising

That seems to fit our project, right? And here are the main specifications of the product:

Interesting and not too expensive, but sold without instructions. I finally find this document on the internal circuit HM-TRP-RS485, which teaches among other things how to set up the link. But how to send the indicated data, and with what software? It’s a mystery!

The investigation continues

Finally, I find (I don’t even remember how), a utility named HM-TRP Setting GUI.exe (downloadable here as a compressed file), and its instructions, in English obviously badly translated from Chinese, with some inaccuracies.

Well, now we know that we need to “open the serial port”. It is clear that we must connect the module to a serial port of the computer. But there are two pitfalls: I don’t have a serial port (like almost everyone), and I still don’t know how to connect this port (RS232) to the radio module (RS485).

What we need is something that could connect a USB port of the computer to the RS485 terminal block of the radio module.

In search again of such a thing. And, miracle of the Internet, we find this. Five pieces is a bit too much — we only need one, but for the price, we won’t quibble.

Investigation bogged down and rebounded

A few weeks later, the adapters arrive singing a known song: no documentation! You plug one into a USB port: “Windows cannot find a driver for this device”. The German seller probably has the right driver? On the website, no trace of the product! You write to the seller (via Amazon); no answer. Let’s go. First let’s give him a bad appreciation. Well done!

Fortunately, there is pretty detailed advice on the product page, that even gives the adapter internal chip reference. A search on this reference gives me two results: the first in Chinese, incomprehensible even supposedly translated into English, and the second coming from New Zealand! But there at least I finally get a download link for a driver, and it happens that this driver works! Windows creates a new COM6 port. Alleluia! And many thanks to the person who gave this saving advice!

At last, I’m going to start the tests

That’s what I said to myself. Not so fast! It is necessary to power the radio module in 5 V. Such a voltage is present on the USB port, but the adapter has only two terminals marked A and B — these are the RS485 wires. Never mind: I open the case — not glued — and I solder two wires on pins 1 and 4 of the USB connector.

Connection between adapter and radio module

Pink wire: +5 V
Blue wire: 0 V (GND).

Yeah, then, the gentleman said “No electronics, no difficulty, and all that…”. OK, OK. You can power the radio module with a 4.5V flat battery, by wedging the wires with paper clips on the contact blades! Simply, don’t mistake the polarity.

Just a little more effort

Configuration mode

The documentation of the radio module tells us that, to set it into configuration mode, the internal circuit CONF pin must be connected to ground GND. To open the case is very simple: once the protective red cap of the antenna connector is removed, the printed circuit falls by itself! But here, we’ll have to do two micro-solders. This will be the most delicate part of the whole project. Or maybe plant pins into the pads? And since it may happen that we have to change configuration several times, it is better to leave this wire in place, cut it in two and strip the ends to be able to restore this connection, while taking precautions to avoid accidental contacts.

After that, setting up using the HM-TRP_Setting_GUI.exe utility is almost a pleasure (but how ugly it is)!

Module configuration

The first thing to do is to choose the COM port and then click Open COM. Then you have to choose the BaudRate. Here, already appears a little trouble: the value 62,500 is not in the drop-down list. It can however be modified in the UART BaudRate option at the bottom of the window. But be careful: you’ll have to rewrite a value of the list to make a configuration again, otherwise the communication will no longer work!

Other values ​​can be left as is, except RF Settings / Bit Rate. Another problem: it is recommended to choose a rate twice faster than the RS485 link. This is impossible here, since the maximum value is 115,200 bps whereas we would need 62,500 × 2 = 125,000; so let’s type 115,200.

All we have to do then is:

At this point, perhaps the serial and / or radio links specialists will have already subdued problems to come…

XCSOURCE® 5pcs Adapter Converter USB-485
8.99 €
at amazon.fr

433M RS485 UART RF Wireless Transceiver Module
$24.99 piece + $5.00 shipping
at ebay.fr (broken link)