μDiff: Long distance digital signals over RJ45

A simple 50mmx44mm module to route power and differential signals (RS-485) over RJ-45

Similar projects worth following
I need to transfer a digital signal (ex: data signal to some WS2812 LEDs) over a long-distance using an inexpensive RJ-45 cable. This uses RS-485 differential signaling to make it possible and reliable. This module is designed to accept input voltage between 8V-28V, and will output 5V and 3.3V. Both output voltages, GND, along with the RO, RE, DI, RE signals can be accessed through an 8-pin JST header.

Input can be through the VIN or pins-7/8 & 4/5 on the RJ45 connector (you can pass current directly through the ethernet cable). Beware of current limitations on the cable, it's typically ~700mA for an AWG26 shielded wire pair (2 wires).

Every part is an off-the-shelf through-hole component which is easy to source.

The board is not so big, at 50mm x 44mm, it's also designed to be stackable thanks to 4 grounded M3 holes in the corners.

PS: This is my first open source hardware device ;)

How it works

At first glance it should be obvious how this module works, but I'll explain it below.

To start, you need minimum 2 modules.

Let's assume one device acts as the driver, and will be connected to an MCU (microcontroller, ex: Arduino).

The other device will act as the receiver, and will be a short string of WS2812 LEDs drawing 200mA of current at 5V (1W).


The two modules will be connected through a 15 meter AWG26 RJ45 cable, and we'll assume there's a 12V power source near module 1.

  • Connect the 12V and GND from your power source to the VIN/GND pins on module 1
  • Connect the 8-pin JST cable to module 1 and wire the other end to the MCU's data pins (and power/gnd if needed), and ensure RE and DE are pulled high (DIP switches in the OFF setting)
  • Connect the RJ45 cable between the two modules
  • Connect the 8-pin JST cable to module 2 and wire the LED strip to it, and ensure RE and DE is pulled low (DIP switches in the ON setting).
  • Profit!
                                                  |         Device        |
                                                  |    (5V LEDs WS2812)   |
       +--------------+                           |                       |
       |   +8V~28V    |                           |    +---------------+  |
       | power source |                           | DI |          VIN GND |
       +-+----------+-+                           +-+--------------+---+--+
         |          |                               |  |           |   |
+--------+----------+--------+                   +--+--+-----------+---+------+
|  (+) VIN          GND (-)  |                   | RO RE DE DI GND 5V GND 3V3 |
|                            |    15m AWG26      |                            |
|       RS485/RJ45     +-----+ <-+-+-+-+-+-+-+-> +----+  RS485/RJ45           |
|         module 1     |RJ45||   | | | | | | |   |RJ45|    module 2           |
|         (driver)     +-----+ <-+-+-+-+-+-+-+-> +----+   (receiver)          |
|                            |                   |                            |
| 3V3 GND 5V GND DI DE RE RO |                   |  (-) GND          VIN (+)  |
+------+---+-----+-----------+                   +----------------------------+
       |   |     |
    | GND VIN   P0   |
    |                |
    |       MCU      |
    |    (Arduino)   |

Of course you'll need to ensure the 120 ohm resistors are installed on each module. You'll also need to push some code to your MCU to drive the DI data pin and transmit the signal to the LEDs.

That's it!

Some notes

If you need to pull more power (ex: 5W), try stepping up the power source up to max 28V. Otherwise you can use a dedicated and thicker cable (ex: AWG 16) to power the VIN/GND on module 2 (the module connected to the LEDs).

  • 1 × MAX3088 RS-485 IC 8-pin DIP
  • 1 × SIP3 5V/1A switching voltage regulator
  • 1 × RJ45 connector
  • 1 × 2-pin screw terminal
  • 1 × 8-pin JST-XH male connector with female connector and pins

View all 10 components

  • Kit components for v.03

    Alexander Williams6 days ago 0 comments

    Here are all the components included with the v.03 kit (without the board):

    In total there's exactly 40 solder points, and there's a recommended order for soldering the parts which I'll explain in the provided documentation.

    The 120ohm resistor is optional, depending on the setup of you modules/system. The 3-pin 2.54mm male headers, DIP switch, 8-pin JST-XH header, and 2-pin screw terminal are also optional depending on how you want to connect/use the module. The fuse is rated at 500mA (trip 1A) and can be swapped for a larger fuse if more current will be drawn. The 5V switching regulator is rated at 1A and can also be swapped for a larger one. Finally, the RS-485 transceiver (MAX3088) can be replaced with another one that's pin compatible (ex: MAX3085) but check the datasheets to ensure the pinout is the same.

    I can expect to put the board and kit up for sale on Tindie within the next 3 weeks - assuming all goes well with the v.03 boards.

  • Testing with el cheapo

    Alexander Williams05/02/2021 at 05:59 0 comments

    I performed a test with my soldered through-hole Module 1, and el cheapo pictured below:

    Instead of using module 2, I wanted to see if I could emulate the same setup using the same capacitors, fuse, and switching regulator.

    The signal was received by the WS2812 LEDs, but I think it was arriving too quickly for the RS485 transceiver on the el cheapo model. It did not work correctly and the LEDs were erratic. I didn't consider the consequences of a baud rate mismatch between the two devices, so ultimately this test was a fail.

    On the plus side, we can clearly see how messy it becomes when you need to DIY all the components on a breadboard, as opposed to having a real PCB with everything built-in:

    I'm looking forward to receiving v.03, which should be a major improvement over v.02 pictured above.

  • Initial tests with v.02: success!!

    Alexander Williams04/30/2021 at 04:39 0 comments

    I ran a battery of tests on two v.02 modules (soldered) and everything works perfectly!

    I made two modules, one with electrolytic capacitors, and another with ceramic (ceramics were part of the v.02 design, electrolytic was just a random idea I wanted to test).

    From the photo above, you can see the two modules connected through a 15m AWG26 RJ45 cable, and the left module is powered directly by 20V.

    Here you can see the left module connections. It is powering a clone DigiSpark with an ATtiny85, with 5V, which is programmed with the Adafruit Neopixel srandtest example program configured for 9 LEDs. The connector only needs 3 wires: 5V, GND, signal (DI). Since RE is pulled high by default, the DigiSpark is set to "Drive" mode so I didn't need to wire the RE pin.

    Here we have the right module connections. It is powering a small strip of nine WS2812 LEDs. In this case the connector has 4 wires: 5V, GND, signal (RO), and RE, and I use a tiny breadboard to tie RE to GND - thus setting it in "Receive" mode.

    The v.03 module has a nice feature that lets us tie RE/DE to ground or high through simple DIP switches. We'll also be free to set the operating mode manually, or wire everything to the MCU and set them through code.

    It works at minimum 8V too, however the LEDs pull significantly more current at that voltage. I did check the temperature of the switching regulators with a type K thermocouple, and it didn't seem to go over 28deg C. Although that's hardly conclusive considering the low current being drawn.

    I did notice a lot of noise on the A/B input pairs at R1 on the right module (receiver), but that's due to the lack of low frequency bypass capacitors. The electrolytics alone are insufficient (they weren't even part of the v.02 design either). The v.03 module has a mix of ceramic and electrolytic at the inputs and output, so there hopefully won't be too much noise there.

    I'll make a few minor changes to the v.03 design, and send it to the fab over the weekend. While I wait for those, I'll get to work on documentation for those who want to DIY and/or buy my kit.

  • Why not PoE?

    Alexander Williams04/29/2021 at 23:12 0 comments

    An obvious question is "why not just use Power-over-Ethernet?"

    Well, technically this module is essentially a passive PoE device following the 802.3af mode B pinout, but without adhering strictly to the spec.

    When looking at passive PoE devices, you'll typically find something like this:

    The problem with these cables is they only work with devices which are already networked, such as IP cameras and phones. Moreover, if the devices don't support the voltage received from the injector, they could easily be damaged.

    In the situation where you want to control some 5V LEDs from a long distance using a wired setup, you'll need a DC-DC converter and an RJ-45 connector at the LED end, and you'll also need an RJ-45 connector near the MCU. Finally, you'll need some kind of device to send your data signal as a differential signal, assuming you want it to arrive intact at the destination - that's where the RS-485 transceiver comes into play.

    In the end, a DIY setup to support "PoE" with non-networked devices will end up looking exactly like  this module.

    Note: I didn't discuss "Active PoE" because that involves a bit more hardware and a lot more complexity.

  • Yay, v.02 boards have arrived

    Alexander Williams04/29/2021 at 04:24 0 comments

    The v.02 boards arrived today and they look sooo much better than v.01. Although this board is a through-hole only version, it should be 100% functional.

    I'm going to solder the components and make 2 modules, run some tests, and then make another post with my results.

    Hopefully I can order the v.03 module before the weekend.

  • Updated v.03

    Alexander Williams04/29/2021 at 03:23 0 comments

    I'm still waiting for the v.02 boards to arrived, so in the meantime I continued over-engineering the v.03 board and ended up with this:

    In this iteration, I liberally added thermal vias under every component which could potentially get hot with 2~3A of current going through it. I also added more silkscreen labels to clearly identify things, and switched from 6-pin to 8-pin JST header. This adds an extra GND pin to make it easier to wire 5V to one device, and 3.3V to another device. I also decided to break out the DE pin so it's possible to control that pin through an MCU as well.

    The DIP switch allows for manual configuration of the RS485 operating mode (receiver/driver/off), and there's a 3-pin header which can connect VIN to RJ45. I initially wanted to use a high-current rocker switch, but it adds a lot of bulk and cost to the module, so I opted for a riskier 3-pin header with scary warning labels.

    The important thing is to avoid touching those headers while the board is powered. That's common sense, but hey...

    Anyways, since this is more of a development/hacker board, people are free to wire things as they wish (ex: skip soldering the 3-pin header, use an 8-pin header instead of the JST connector, etc).

    The 3.3V LDO was initially user-selectable, but I decided to opt for an SMD SOT-223 LDO which is limited to 1A but should be fine for powering a small MCU like an Arduino Pro Mini.

    For now I'll keep waiting for v.02 before making further changes to v.03.

  • Removing through-hole variant

    Alexander Williams04/21/2021 at 10:06 0 comments

    Looking at the SMD board, there are still 9 components which require hand-soldering, for a total of 38 solder points. Still less than a 40pin RPi header haha ;)

    This made me wonder if the through-hole board variant is even necessary. As it turns out, there's no real difference between the two, other than "a bunch of passives to hand-solder".

    With that in mind, and for simplicity's sake, I've decided to only offer 2 variants:

    • Board only, with SMD parts pre-soldered
    • Board kit, with SMD parts pre-soldered + additional through-hole components

    Once the boards arrive, I'll post instructions for those who want to source the components on their own.

    I considered using an SMD component for the RS-485 IC, but I think a few people might want to choose an alternative IC, such as a slew-rate limited device or something similar. In that case i'd rather provide more generic boards which accept a standard 8-pin DIP socket.

  • SMD v.03 complete

    Alexander Williams04/21/2021 at 04:25 0 comments

    I've completed v.03 of the SMD board. Here's a preview without the through-hole components:

    This board will still require a fair bit of hand soldering, but it's still much less than the fully through-hole board.

    So far I'm quite happy with this one after iterating on it a few times, but I still don't plan to order the test batch since I haven't received v.02 yet.

  • Preparing v.03 SMD and THT

    Alexander Williams04/20/2021 at 04:45 0 comments

    I've cloned the v.03 though-hole (THT) board and replaced the footprints of many through-hole components with SMD parts.

    Here's the through-hole v.03 preview so far:

    The board size and layout will remain identical in the SMD version, except for slightly different placement of the SMD components. This means it will be possible to mix and stack the SMD/THT boards, and connect them using the same cable assemblies without any pin mix-up between them.

    We do end up with lots of "wasted space" on the SMD board. I think it's not a big deal.

    The SMD components are much cheaper too, but the SMD assembly will bring the cost back up.

    I'm currently still trying to decide if I want the fab to hand-solder certain components as well (IC DIP socket, RJ45 connector, JST connector). Just those three components have 22 solder points combined. I'll need to compare the cost VS time saved for hand soldering.

    Since there's so much free space on the board, I'm using all 0805 resistors and capacitors with large hand-soldering pads so it'll be easier to replace them with different values if needed.

    The 5V switching voltage regulator, fuse, and 120ohm terminating resistor will remain through-hole and need to be manually soldered. That provides some flexibility on how much current the board can pull, and whether it's used in a bus topology or not.

    At the last minute, I also added an SMD diode between the fuse and VIN, which should protect the board/components in the event of user error.

    I'm still waiting for the v.02 boards to arrive before sending v.03 to the fab.

  • Alternatives on Tindie

    Alexander Williams04/17/2021 at 04:42 0 comments

    Before starting this project, I searched through Tindie for projects similar to my idea.

    I did find a few options which could technically work, but they all seem to be missing one or two key features.

    WS2812 LED Strip Driver PCB

    This project was interesting because it's designed specifically to drive some LED strips without much fuss. Unfortunately the boards are impossible to mount due to lack of mounting holes, the "kit" doesn't include any components and there's no schematics or other useful information.

    LED Data Extender/RS485 and RJ45

    This seemed to be exactly what I wanted, except it doesn't have a voltage regulator so it can only be used to transfer a low current data signal. It's essentially identical to that el cheapo board with an RJ45 for data. I like that it uses a simple dip switch to choose between RX/TX (I might borrow that idea), but the lack of ability to transfer higher voltages (ex: 12V, 24V, ...) was a deal breaker. I think the module is not too pricey, even fully assembled I do think it should probably be priced at $10 or $15 for a pair instead of $15 for one.

    RS485 Stick

    I'm still a bit confused about what this is. RJ45 to USB? Weird but cool I guess.. The description says it can be used to transfer power and data but it doesn't even have any fuses or voltage regulators. I do like the breakout pins but this is also not designed to be mounted anywhere and reminds me too much of el cheapo at a much higher price point. This module is interesting (because it's weird) but it's sadly not professional enough and lacks important usability/safety features.

    RS485 HAT (daisy-chain, bus powered) Raspberry Pi

    I saved the best for last. I like this because it literally does everything I want, and it even supports full-duplex communication thanks to the larger transceiver. Unfortunately it has two flaws which I couldn't overlook: 1) it's designed for a RaspberryPi, instead of being a standalone module. 2) it's really expensive. It uses the de-facto standard 40-pin RPi header, but the RPI pins are then completely blocked off, so you can't even stack another shield on top of it! Overall I think it's well designed but that IC and voltage regulator are pricey, and that 40-pin header leaves you with a lot of hand-soldering (2x more solder points that my board).


    As you can see, there are definitely many solutions to this problem, including some I didn't mention. But for my needs they were all lacking something important. Hopefully I created something that will be useful for others as well.

View all 15 project logs

  • 1
    Buy the kit or DIY

    The PCB gerbers aren't available yet, as I am offering these boards for sale (in kit format available soon). If you want to DIY the boards, please wait a bit until I release the gerbers on GitHub.

  • 2
    Solder the components

    Every component is through-hole, so it's difficult to mess up. The only issues I can see are:

    • placing the microcontroller (max3088) incorrectly
    • shorting pins during hand-soldering

    Otherwise there's no real skill required.

    The board is not lead-free, so please be aware of that (I might make it lead-free for the production run).

  • 3
    Set the slide switches

    The slide switches are in the OFF position by default (down, facing toward the edge of the board).

    This setting puts the MAX3088 in driver mode (it sends data) because the RE and DE pins are pulled up to 5V by default, but this setting also allows one to control the RE pin through an external MCU.

    The other settings are printed on the back of the board:

    ON-ON = RE and DE are tie to low, the MAX3088 will be in receiver mode (it receives data)

    OFF-ON = RE tied high, DE tied low, the MAX3088 goes into low-power mode and disables both send and receive.

View all 6 instructions

Enjoy this project?



Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates