RS485 using RJ11

Ok but your assumptions about common mode rejection here are simply wrong. You can use that knowledge of physics (or just Ohm’s law) to work this out for yourself.

No, this is also wrong. These are transmission lines. One does not drive the capacitance of a transmission line, you drive the impedance. For RS-485 this is 100 ohms. A 100 ohm load from a 100 ohm source is not a large load. This is easily driven by many common level shifters (see WLED hardware guide), or you can use a line driver IC if you prefer.

To reiterate, the reason none of the advantages you’re assuming are real is because there is actually no real advantage to differential signaling here. It’ll have essentially the same common mode rejection, noise margin, range and reliability as single ended because you aren’t doing anything where being differential matters. It isn’t a bad thing, but it also doesn’t really matter.

I agree completely with this and don’t take an issue with proven solutions. Rather I am trying to correct all the advice you’re giving that is wrong. You’re telling people they need to use RS485 to send signals 5m, that twisted pair cables will pick up crippling amounts of “antenna noise”, and that being differential is needed for common mode rejection on a short run of wire at low frequencies, that line capacitance matters somehow, the level shifters the WLED documentation recommends for driving lines cannot drive lines, etc. Even if you don’t care to understand, it is still really important that nonsense like this be corrected so other people don’t get mislead.

If you want to pick apart my critique of your advice, at least try not to put words in my mouth.

Yes you drive the impedance of a transmission line. You also pick a driver that has the characteristics to match the load that line represents.
What current levels are you asking your levelshifter to produce to drive your 100Ohm load (worst case)?

You mean how do you calculate current from a resistance and voltage? Just apply Ohm’s law. I = V/R, so a 100 ohm load consumes 10 mA per volt. If you put in 5V across a 100 ohm source resistor and a 100 ohm cable, you get 5/(100+100) = 25 mA. Note that this only flows when the signal is changing, once it settles the current drops to zero.

Okay, so under this model of our wiring we’re expecting the driver end (levelshifter) to supply up to 25mA of current to reliably drive the LED input.

But if we go to the specs of the “best practices” levelshifters - the 74AHCTxxx line of devices - they’re rated at 8mA max (sink or source)???

How can we expect that driver to reliably supply the current you’re asking for?

Under transmission line theory, the 25mA is to drive the line, not the LED input. The LED input itself is high impedance and so does not consume significant current. As far as the level shifter is concerned the line has nothing connected at the end and the only load is the impedance of the line.

That is just recommended, meaning it will meet all specifications for things such as propagation delay over the full voltage range. We don’t really care about a lot of those specs and we’re running at only 5v, so lower voltage performance doesn’t matter. Part of it too is that this is a logic family that people have been using 30 years, so it is well understood how well it can drive a line. I didn’t write the WLED documentation, and I prefer a different logic family, but whoever did seems to have known what they were doing.

Sorry? do you mean you would expect a production device to supply more than the recommended ratings?

Look at any production datasheet, for eg: TI-74AHCT125

Under “5.1 Absolute Maximum Ratings” you’ll find a current limit of +/- 25mA per output and a total device limit of +/-50mA (this would really apply if you used all 4 gates of the '125 - many people do).

The notes for that section specify:

Stresses beyond those listed under Absolute Maximum Ratings may cause permanent damage to the device. These are stress ratings only, and functional operation of the device at these or any other conditions beyond those indicated under Recommended Operating
Conditions is not implied. Exposure to absolute-maximum-rated conditions for extended periods may affect device reliability.

Which most people (and especially those designing electronics) take to mean:

Bad things will happen to your device when operated here - stick to Recommended Operating Conditions. (which limits us to +/-8mA per gate)

As far as

Did you really mean to say that?

A major issue with addressable LEDs is the fact that they specify a Vin-Hi of 0.7xVcc or 3.5V with a 5V supply. The fact that the ESP devices can at best supply 3.3V for an LED input is the basic reason we need levelshifters. The need to ensure we don’t get “lower voltage performance” is a major portion of the data integrity discussions for the LED protocol.

Yes it can.

It actually says “Continuous output current”, so driving a DC load. We aren’t driving a DC load, so not applicable.

Yes I did. The power supply is 5V, so that is the only supply voltage that matters in this application. Lower supply voltages will provide less current, but no one here cares about that.

All I can say is good luck if that’s how you want to try and design reliable systems.

It is the WLED website that recommends the 74AHCT125. I don’t personally use or recommend it. If you don’t like the site’s recommendations, you’ll have to take it up with them.

I have no problem at all with the site’s recommendations.
The vast majority of that information is proven to be very reliable and useful.

Your suggestions are another matter altogether.

1 Like

Interesting idea, kind of looks like my Diff-Solo or Diff-Adv solution.

Those all don’t do power though since the amount you’d be able to get over a UTP cable of say 30m is very very low, you should also not exceed 500mA per pair too much and then even if you start with 5v or 12v in, that’s not what you are going to get at the other end.
POE solves this by using a high input voltage (55v) and then always down-converting it at the end. I’m working on a similar system called Diff-Power orientated towards running LEDs but that’s still in development and will be available in 2025 once all the bugs are worked out.

I will try to follow your development, looks cool!

You just spent 3 posts trying to discredit them as unreliable:

IMO their recommendations are fine but you clearly had some problems with them.

Nope, in general I don’t have issues with the KB recommendations.

My issues in the above posts are with the way you’re trying to portray that information.
I don’t agree with many of your conclusions.

As I’ve said multiple times, you’re free to do this stuff as you see fit.

Just wanted to close the loop on this.
I decided to run CAT6 to each window for data (I have buckets of it) and use RS485. That gives me 4 distinct channels, if I ever need it. Power at the window will be the 12V 14-2 wire vs trying to send it over the CAT6.
To simplify the installation, I’m putting a single gang box next to each window where I can stash related electronics. This gives me a ton of room to expand as needed (blinds, glass break sensors…)
The ESp32 will be back in the server room. This gives me runs between 3 and 30 meters. Making them all RS485 simplifies the install since every window is the same.
Thanks to everyone for the positive input.

From the POV of having installed and seen many Low Voltage installs, I’d suggest a dual vs single gang box for “stashing electronics”. In the end, there’s never enough space :wink:

Hopefully these can flush (or nearly flush) mount so they become mostly invisible.

In general I love the fact you’re looking ahead on this one :sunglasses:

Let us know how it progresses!

1 Like

In this case, it’s a single gang per_window.
It’s mostly just holding a couple RS485 boards, fuses and possibly a little arduino board with a 1/2" smurf tube to the window jamb. Being just for that particular window, 1 gang should suffice.
Each room is getting a double gang for a dashboard along with a ceiling box for camera or other high mount sensors.
We are doing spray foam insulation so I’m paranoid about future proofing.