RS485 using RJ11

Hello, First post - Just found WLED.
New home construction and I want to run LED strips on each window in the house but, I don’t want 20 ESP32s all over the place.
My idea is to run a couple ESP32s and haul the data signal to the LED with RS485.

I have 12v power at each window to drive the LED strip (and blinds) but I was wondering if anyone has driven the receiver RS485 board by sending 5 volts along with signal from the ESP32 over something like RJ11. Doing so would keep me from needing a buck converter at each window - making the package smaller.

If this would work, I could drive all my windows with 3 or 4 ESP32s and have a really small package to hide at the window.

Thoughts?

Done a number of those types of setups and it can work very well.
The 5V required for the RS485 is pretty minimal, each board needs on the order of 50mA or so.

The 2 things I’d watch out for would be:

  • Total draw of all your RS485 boards, 5x50mA = 250mA. Not huge but still a requirement
  • The size of the wiring you’ll use to connect, especially as it relates to total current. You mention RJ11 connectors, which leads me to think of old style telephone wiring. That can be as small as 28AWG (or worse). That’s fine for the actual data line, but for power distribution (even of low power devices) it may be an issue.

Pretty easy to test, just put the max number of devices you want to drive on the end of a piece of line thats the longest you want. Supply 5V at the start and see what drop you get at the end.

Using RJ45/Cat5E cable will give you lots of conductors/headroom for that kind of a setup and the wiring is very available /pretty cheap.

Personally, I usually just tie a very small buck converter to the RS485 board. A 12->5V 1A converter is tiny.

I didn’t realize RJ11 could be that thin. I thought it was 22or23 like cat5.
Using CAT6 makes more sense since Im already pulling it everywhere else.
Each run would be it’s own 50ma draw but I would need to generate 24x50mA (24 windows) which is more than any 1 run can handle so circuit protection is needed… Yeah, little buck converters are looking pretty good.

This one has the buck onboard and is the smallest footprint I’ve ever seen.

Maybe you can use parts of my project :wink:
https://wled.discourse.group/t/ws2814-based-power-led-pixel/9869
https://wled.discourse.group/t/once-more-esp8266-based-wled-controller/11130
No separate 5V line, only 24V powerline (12 or 19V also possible), every PCB have a 78xx step down switcher for RS485 and the adresseble driver IC WS2814.
For wiring I’d use 2 line 0,75mm² and 2 line shilded cable 0,14 mm²

I don’t think you need rs-485 for wiring within a single house (data will probably be similar with or without the 485 hardware given the appropriate data cabling), but if you do a low power rs485 receiver can easily run off a 7805 regulator given 12v.

RS485 for data transmission is a cheap, reliable and a simple solution for data runs beyond 5m or so. Given the OP is already doing backbone wiring, this solution makes a ton of sense.

To all those suggesting 78xx type solutions: Don’t.
78xx converters are pure linear devices,which means the drop down is down by throwing away the extra Voltage x Current as heat.

While it’s not a lot of power for the RS485 boards, it’s still an unneeded waste.
Back in the 80’s that was a reasonable solution, today a small buck converter is pretty much as cheap and way more efficient.

1 Like

78xx are not linear only. In last years some vendors built drop in replacements, what switcher based :wink:
I like cheap china clones, like this: https://www.lcsc.com/product-detail/Power-Modules_YLPTEC-K7805-500R3_C2992390.html
It cost some cents only. For my project i use a switcher for every LED driver PCB. Why? It keeps the wiring simple, fast and protect against fails by wrong wiring.
Every PCB is protected by a TVS diode and a fuse. Wrong polarity will blow the fuse.
With more voltagelines you will need more wires, more terminals and mor protection citruits. Possible error scenarios are: 24V to 5V and 5 to 24V. Wrong polariry from 24V or 5V. Different volage lines can build catastrophic cascade fails. Absent 24V on Current sources, but 5V on inputs, may kill the current source ICs! That’s not an “academic mindgame” only, it’s my own expirience by bredboarddevelopment. :wink:

So I had the same idea. I designed one that uses the RJ12 connector with 6 conductors. Two for power, two for ground, and one each for the A and B lines. To save cost, I am trying a simple zener regulator for the 5V not a lot of current us needed there. Sure, about .8W will have to be dissipated in the resistor if run by 24V but hey, if you have a 24V system, you should have enough to spare. :wink:

The boards are on the way. I will let you know how they turn out.

If you said 500m I’d agree, but you can do 100m runs easily enough just with normal 5v signaling, so no real advantage to rs485 unless you have a truly enormous home. If he’s running twisted pair anyway I bet it works twice as long as he needs with simple source termination to the 100 ohm line.

Good luck with reliably handling antenna noise over 30m, let alone 100m.
You can always come up with an electronics solution “that works great for me”, but doesn’t deal with the reality the rest of world sees (I’d quote one of 70+ people complaining they don’t really need a level shifter…)

There’s a reason the professional lighting folks use RS485 (see DMX) for their signal transmission: it’s reliable and it works in a vast array of environments.

What’s the point in designing something that leaves open the possibility of noise flickers sometime in the future (or now) when there’s a proven solution that costs almost nothing to implement?

Well, that approach will certainly keep the costs down…

Let us know how it goes, and have fun with WLED!! :sunglasses:

That’s down to the cabling, not the protocol. Assuming you’re using twisted pair or similar RF pickup is common to both halves of the wire and thus does not show up across the load. Or rather both halves of the load see the same voltage and thus no potential difference. If you look at an antenna they split the two halves of the wire so that the field is not the same in both, that way they pick up signal.

I’ve measured a bunch of cables, you get plenty of SNR at these (short) distances. Which makes sense, you don’t need complex electronics to send kilohertz signals meters.

I think instead you’re looking at the handful of people that wire things incorrectly and assume they’re having radio interference or something equally ridiculous on a 5m wire.

Mainly that reason is that they wire together large numbers of devices and so have to deal with differences in ground potential as well as ground loops, making differential signalling really important since devices won’t necessarily agree on what voltage is zero. This is a point to point application so you don’t have those problems.

I’m saying try it out and see if the rs485 makes any difference. Probably it won’t since the distances are too short and then you can save some power/money but if it does you can still buy a bunch of 7805 regulators and receivers.

The issue with LED data is not that it’s a (relatively slow) 800Khz signal.
The problem is that the protocol specifies tight timings at the 120-150ns level.
The physics of that timing pushes the transmission issues up to the 10Mhz range.

Things like twisted pair wiring can help (that’s why Cat3/5/6/7 etc wiring is designed the way they are). But if you want to actually make use of the benefits of common-mode rejection, you need a differential sender and receiver.

As always, you’re entitled to your opinion(s) and to build your projects as you see fit.

In my case, the distances range from 3 up to 30 meters with around 30 CAT6 runs.
Good separation from AC power cant be maintained for every_length of cable so I’d rathe not rely on ‘good cabling practices’. Past experiences tell me it’s never always good.

Each window will have a motorized shade/blind, open/close sensor as well as the LED. Each device managed by 1 pair in the CAT6. I’ll need to print a box of some dimension to hold the fuse and plugs so adding a couple RS485 modules to that gadget isn’t a big deal.

Having all the windows using the same gadget is important for future sanity tho.
So, even tho it might work fine for most without RS485, I’d still make them all RS485 for easy future maintenance as well as simplifying the ESP32 connections in the server room by having everything the same.

I like this alot! What are you expecting the per unit cost to be?
In my case, I want to use the cable run for Shades, open/close sensor as well as LED so my board will have a little more to it.
My skills stop at the protoboard so it wont be nearly as tidy.

David,
Pretty cheap. The parts are about $3. The biggest cost is the terminal block. Maybe one can be found less that $1.20 for the Phoenix Contact one I selected. Toss in another $0.50 for the board and it is at $3.50. Of course, two are required.

Ya know, for what you have in mind, I might be able to help with a complete solution. I assume you can PM me. Do so and give me some more detail about what you want to do.

Some guys here think RS485 is oversized. But PLCs in industrial areas use RS485 for busses from 50 cm to some dozen meters. It’s cheap and the ICs are aviable easily.
https://www.lcsc.com/product-detail/RS-485-RS-422-ICs_MaxLinear-SP485EEN-L-TR_C6855.html
An’t so expensive like originals from MAXIM, but with serious datashets. Maybe you can save a bit more money with chinese generica. But… why? To catch a error for earn 3 cents - some houers hard work - no! :smiley:

More like 7-8 MHz ideally, but yes square waves have higher frequencies than the fundamental.

No, this is wrong, and I think the core of your misunderstanding. Both the single ended and differential configurations here have similar common mode rejection; both subtract the positive wire from the negative wire. I think you’re imaging the single ended configuration as measuring some absolute voltage relative to earth or whatever, but that is not how the circuit works. They’re both ultimately measuring the difference between two wires, the only difference is in one case the second wire is ground, in the other it is data-.

Sorry, I’ve done enough physics to know the difference here (not to mention doing enough real world implementations).
Twisting 2 wires together, definitely adds a level of noise immunity that a pair of parallel wires doesn’t get.
But that immunity is not enough to guarantee good signal over distance when you’re talking about a voltage band of potentially only 2 V (TTL signals are guaranteed 0.8V to 2.4V).
Above and beyond all of that is the fact that you’re trying to drive the capacitance of your wires with something not designed for that purpose (even assuming you’re using a proper level shifter)

Adding the differential sender/receiver puts you in a territory where you’re guaranteed the performance of the signal over wires and distance.

As I’ve said all along, you can build your setups however you like.
But if people ask for advice, you’ll see recommendations of proven solutions.

As someone else put it: “It’s the physics, stupid”