Close
0%
0%

μDiff: Power+Data to LEDs and devices over RJ45

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

Similar projects worth following
μDiff provides an easy way to reliably transfer power and a digital signal over a long-distance using an inexpensive RJ-45 cable.

It uses RS-485 differential signaling and 802.3af Power-over-Ethernet pinouts to achieve this. The μDiff module can accept an input voltage between 8V-28V, and provides outputs of 5V and 3.3V. Both output voltages, GND, along with the RO, RE, DI, RE signals can be accessed through an 8-pin JST-XH header.

Current is limited to 1A with the default components, but can be upgraded to ~2A with a different 5V switching regulator and fuse. Beware of current limitations on the RJ-45 cable, it's typically ~700mA for an AWG26 shielded wire pair (2 wires).

Some components are pre-soldered SMD (0805), while the rest are easy to source off-the-shelf through-hole components.

The board measures 50mm x 44mm, lead-free and RoHS compliant, and is designed to be stackable through 4 grounded M3 holes.

PS: This is my first open source hardware pro

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).

Connections

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

  • A box for this module

    Alexander Williams06/14/2021 at 08:59 0 comments

    I spent a few days designing a stackable box for the module. I've finally successfully 3D printed a prototype of the bottom part (still missing the top/cover for stacking), here are some photos:



    It's a bit underwhelming, so i'll keep iterating on this until it looks awesome.

  • A pinout for module v.03

    Alexander Williams05/22/2021 at 03:19 0 comments

    I made a pinout for the v.03 module and thought I'd share it here. It'll be part of the documentation which I'll publish hopefully within the next week.

  • Module case design and v.04?

    Alexander Williams05/21/2021 at 14:37 0 comments

    I know I should have been testing the v.03 module, but I somehow got pulled into the idea that "it needs a case".

    I'm in the process of designing and 3D printing (PLA) a prototype case for this module. If it turns out well, then I'll look into the different materials (ABS, wood, acrylic, carbon fiber?) which could be used for the final product.

    I'm also looking into making a v.04 revision due to some minor annoyances I've discovered along the way:

    • the RJ45 connector sticks out past the board edge by 2mm
    • the 8-pin JST-XH connector should really be right-angled so the wires stick out rather than up
    • the DIP switch should be right-angled to remain accessible when boards are stacked
    • the 3-pin VIN<->RJ45 header should be female, not male (for safety)
    • I hate terminal blocks, it's too easy to pull the wires out, so i'm looking for an alternative (perhaps 2-pin JST-XH?)

  • Initial tests with v.03: success!!

    Alexander Williams05/18/2021 at 05:30 0 comments

    I soldered the components onto two v.03 modules and ran some initial tests with a string of 5V LEDs, so far the modules work perfectly!

    "Off" mode, set through the DIP switches also works as designed.

    I'll continue some load and noise tests, and post another update once that's done.

  • Yay, v.03 boards have arrived

    Alexander Williams05/17/2021 at 09:20 0 comments

    It took a few weeks, but the new boards are finally here!

    I tried adding thermal vias throughout the board, but it seems the soldermask covered them. I'm not sure if that's better than leaving the vias open, but my guess is it'll at least prevent solder from the through-hole components from being wicked through the board.

    The first order of business is to solder the through-hole components, run some tests and ensure they work as designed.

    If all goes well, I'll put the kits up for sale on Tindie.

    Afterwards i'll (finally) upload schematics and gerbers etc to GitHub.

  • Kit components for v.03

    Alexander Williams05/03/2021 at 01:41 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.

  • 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.

View all 13 project logs

  • 1
    Buy the kit or DIY

    The PCB gerbers aren't available yet, as I am offering these boards/modules 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 and components are lead-free and RoHS compliant.

  • 3
    Set the slide switches

    The DIP 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 settings are printed at the top of the DIP switch:

    • 1-2 OFF = RE and DE are brought high, the MAX3088 will be in driver mode (it sends data)
    • 1-2 ON = RE and DE are brought low, the MAX3088 will be in receiver mode (it receives data)
    • 1 ON, 2 OFF = DE tied low, RE tied high, the MAX3088 goes into low-power mode and disables both send and receive

View all 6 instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

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