TTL UART to RS485 Converter Module (CE05154)

Hi Bob,

I had an inkling I’d need correction from our resident RS485 guru on that post! I’ll remove that from my post.

-James

4 Likes

Hi James.Guru ???. If you think about it the same thing applies to quality audio circuits. The same pros and cons (more pros than cons) apply. Not rocket science but, dare I say it, Analog techniques
Cheers Bob

5 Likes

This is literally just TTL to RS-485 - it cannot do RS-485 to TTL without modification.

Again, a real shame the board is so limited in its functionality.

2 Likes

Hi Ewan
This device IS both ways. Block diagram of the driver…

BUT not both ways at the same time, ie; Half Duplex only.
Please read the above thread completely. You will probably find most of your questions answered.
If you look at the circuit I think R5 and R6 should be removed and R7 only used AT THE CABLE ENDS. That means if you only have 1 device at each end it would be OK to leave ir but if you are using several (read more than 1) intermediate devices this resistor should be removed on those.
What the other pull ups are for I don’t know. All of these resistors are discussed above.

In short if you have one of these at each end of a twisted pair (A & B lines) you should be able to insert TTL at one end and extract the same TTL at the other end BOTH WAYS.
Cheers Bob

4 Likes

Hi Bob,

For the MAX485 to receive RS-485, ‘RE bar’ (with a line across the top - Receiver Output Enable) needs to be asserted LOW, which cannot be done the way the board is constructed (RE bar, and DE - Driver Output Enable) are both tied HIGH.

My original comment was that this board is simply 'TTL to RS-485 unless modified '.

3 Likes

And disregard - there IS an output for RE to be set low… Doh!

4 Likes

Hi Ewan,

Just wanted to say thank you for posting an update to this one after you solved your problem! Now someone else having the same problem can skip all that troubleshooting :slight_smile:

3 Likes

Bought a couple of these recently, just now got them working over a 30M alarm cable, ie no twisted pairs. The usual got ya, had TX and RX around the wrong way to the Pico. Used the Core Electronics Low/High level converter between the device and the Pico.

Connected the RE & DE pins making it like a direction signal rather than an enable. Drive this low and the device receives, set high to transmit. It was pretty easy to set up using UART of the Pico and one GPIO for the direction.

My intention was to use these to send sensor data to a main unit for a weather station. But I think I will go with more expensive units that incorporate some isolation and line protection. Still these offer a rather cheap way of sending data that does not involve WiFi or other radio transmission. Very happy with how these units are performing so far.

Cheers
Jim

3 Likes

Back in the 90’s I designed a comms system for a whole of building security system. I think the max cable length was about 150m and up to 20 or so nodes could be connected to a single twisted and shielded pair. It ran in a very noisy environment, half duplex at 125 kbits/s.

The terminating resistor discussion sparked my interest as I couldn’t remember how I did it back then, so I’ve been through the archives and discovered

Unfortunately I couldn’t find my old calculations, but this system was deployed in many RMIT buildings and worked reliably for many years.

So I suppose that there is nothing wrong with each node having a terminating resistor.

2 Likes

Hi Mark

Probably not if you can drive it. Most of the Maxim IC data sheets say the drivers are designed to work into a load of two 120Ω terminating resistors and 32 ICs in parallel which should be 54Ω (i think without looking it up) so I think if you had a termination on each node (110Ω) that would be 5.5Ω for 20 nodes. Very low, so unless you had some ICs with plenty of grunt methinks you must have only terminated the ends.

Reinforces my comments re the advantages of a balanced line for longer transmissions.
Cheers Bob

2 Likes

It’s not all about the DC steady state side of things. It’s an AC system running at 250kHz (Manchester encoded). There is a lot of distributed resistance, capacitance and inductance along the way. I would think it would be very hard to model the effective impedance at each node easily, for me anyway. So back then I put a CRO on the line and adjusted things so that the ‘eye’ pattern was as good as it could get. You may notice the protection diodes, that was to suppress the overshoot we were seeing.

2 Likes

Hi Mark

Nothing said about DC. The terminating resistors are seen by both AC and any DC present. They are to present the line with a resistance approximating the characteristic impedance of the line. 120Ω seems to be an all round figure for most pairs in most cable types.

Hyperthetical situation: if the line is perfect and zero ohmic resistance and terminated with an open circuit (as almost with high input resistance OpAmps) you will get 100% reflection. This reflected signal will add and subtract from the incident signal and form standing waves. At different points along the line the signal will be double amplitude and zero. If a node happens to be at a zero point it will see nothing. If at a double point and a collision detection system is in place it will see an apparent collision and shut down. I have actually seen this happen where the effective termination was far too high (due to an oversight by the design engineer) and the particular set up worked with one length of cable and failed with another length. Correct termination cured everything. Fortunately the project was still under development.

If the cable is perfectly terminated (does not happen in practise) the will be maximum transfer of power and no reflection.

The same situation arises if the cable is shorted.

I did and if the conditions could get bad this is a good idea.
Cheers Bob

1 Like

What are the DI DE RE RO pins? Which is TXD, RXD, for the TTL side?

Hi Kingsley
If you go back to a reply in June 2023 you will find this extract from the Maxim application notes
image
and in this reply and the next few you will find out what all the other pins are and what to do with them.
Cheers Bob

2 Likes

From the Maxim data sheet, explains what the 4 pins do.

You can effectively link RE & DE and use them as a direction pin. (this is the way maxim intended ti to be done)

Cheers
Jim

1 Like