DMX Sender problem - Teensy 4.1 - Grove RS485 module (MAX13487E) and TeensyDMX library

RomRom

Member
Hello everyone !

I'm new to the community and I already thank you for all the solutions I was able to find for my old projects through this forum and I hope you will be able to help me again.
I'm not an engineer, please be kind with to me 😁

My Problem​

I cannot send a DMX signal with my Teensy 4.1 card, I receive it very well (reading the monitor and the internal LED of the card).
Do you think the problem comes from the module I'm using or elsewhere?

Needs​

My project must receive DMX data from my card, analyze (algorithm) and write new DMX values out.
I use TeensyDMX library.

Material​

- Teensy 4.1
- 2x module Grove RS485 - The module uses MAX13487E chip
- 2 XLR (male & female)
- Grove cables

Connection​

XLR => Module RS485​

XLRGrove cable colorsModule Grove RS485
Broche 1 (GND)BlancGND
Broche 2 (Data -)JauneB
Broche 3 (Data +)RougeA

DMX-Receiver​

Module Grove RS485Grove cable colorsE/S Teensy 4.1
GNDNoirGND
VCCRouge3.3v
RXBlanc1 (TX1)
TXJaune0 (RX1)

DMX-Sender​

Module Grove RS485Grove cable colorsE/S Teensy 4.1
GNDNoirGND
VCCRouge3.3v
RXBlanc8 (TX2)
TXJaune7 (RX2)

DMX send test code​

C++:
#include <TeensyDMX.h>

namespace teensydmx = ::qindesign::teensydmx;

// Pin for enabling or disabling the transmitter.
// This may not be needed for your hardware.
constexpr uint8_t kTXPin = 8; // Teensy 4.1 - TX2 = 8 | RX2 = 7

// RƩcepteur DMX sur Serial1
teensydmx::Receiver dmxIn{Serial1};

// Create the DMX sender on Serial2.
teensydmx::Sender dmxTx{Serial2};

void setup()
{
  // Turn on the LED, for indicating activity
  pinMode(LED_BUILTIN, OUTPUT);
  digitalWriteFast(LED_BUILTIN, LOW);

  // Set the pin that enables the transmitter; may not be needed
  pinMode(kTXPin, OUTPUT);
  digitalWriteFast(kTXPin, HIGH);

  // Initialize the DMX sender and receiver
  dmxTx.begin();
  dmxIn.begin();
}

void loop()
{
  // Read value
  uint8_t valueDmx = dmxIn.get(65);

  Serial.println(valueDmx);

  if (valueDmx < 50)
  {
    // Switch on
    dmxTx.set(15, 255);
    digitalWrite(LED_BUILTIN, HIGH);
  }
  else
  {
    // Switch off
    dmxTx.set(15, 0);
    digitalWrite(LED_BUILTIN, LOW);
  }
  delay(1);
}

1744209470719.jpeg
 
Last edited:
I have made some tests to try to isolate the cause of the problem :

- I have swapped the RS-485 module with the good one (Receiver). The problem persists.
- RS485 module is correctly supplied with 3.3V.
- I checked the XLR connector wiring again, and it corresponds to the standard (Pin 1 = GND, Pin 2 = Data-, Pin 3 = Data+), identical to the one used for the receiver, which works.
- I rechecked the continuity of all the wires with a multimeter to make sure there were no cuts or bad contacts.
 
Couple of points:
1. You don’t need the code that uses the kTXPin; you can remove or comment it out. That’s meant for enabling the transmitter if the hardware needs that. It looks like there’s no ā€œenable transmitterā€ pin on the Grove device; it’s already enabled because the DE line is tied to voltage.
2. From the Grove device schematics, it looks like the TX line is for transmitting, so you need to connect TX from the teensy to TX on the Grove device.
3. As well, RX line looks like it’s for incoming data, so I’m surprised the receive side is working if the Grove RX line isn’t connected to the Teensy RX line.
 
Couple of points:
1. You don’t need the code that uses the kTXPin; you can remove or comment it out. That’s meant for enabling the transmitter if the hardware needs that. It looks like there’s no ā€œenable transmitterā€ pin on the Grove device; it’s already enabled because the DE line is tied to voltage.
2. From the Grove device schematics, it looks like the TX line is for transmitting, so you need to connect TX from the teensy to TX on the Grove device.
3. As well, RX line looks like it’s for incoming data, so I’m surprised the receive side is working if the Grove RX line isn’t connected to the Teensy RX line.
Hi Shawn,

Thanks for your help! I've tried removing the kTXPin lines and connecting the jumper wires directly: TX from the Teensy to TX2 and RX from the Teensy to RX2. Unfortunately, this didn't resolve the issue; I'm still not getting a usable DMX signal out.

Interestingly, I've confirmed that inverting the TX and RX connections does work for DMX reception in my setup. It seems the manufacturer's datasheet might have the TX/RX pinout reversed, as noted on the product page for the module.
Capture d’écran 2025-04-10 aĢ€ 09.35.05.png

I tested on another series but I have the same problem.

Here's a new version of the test code - Receiver ok but not sending :

C++:
#include <TeensyDMX.h>

namespace teensydmx = ::qindesign::teensydmx;

const unsigned int channel = 65;  // channel input test

// DMX receiver on Serial1
teensydmx::Receiver dmxIn{ Serial1 };

// Create the DMX sender on Serial2.
teensydmx::Sender dmxTx{ Serial2 };

void setup() {

  Serial.begin(115200);
  Serial.print("Receive and send test");

  while (!Serial2 && millis() < 4000) {
    // Wait for serial port initialization
  }

  // Turn on the LED, for indicating activity
  pinMode(LED_BUILTIN, OUTPUT);
  digitalWrite(LED_BUILTIN, LOW);

  // Initialize the DMX sender and receiver
  dmxTx.begin();
  dmxIn.begin();
}

void loop() {
  // Read value
  uint8_t valueDmx = dmxIn.get(channel);

  Serial.println(valueDmx);

  if (valueDmx < 50) {

    // Switch on
    dmxTx.set(15, 255);
    digitalWrite(LED_BUILTIN, HIGH);

  } else {
    // Switch off
    dmxTx.set(15, 0);
    digitalWrite(LED_BUILTIN, LOW);
  }

  delay(1);
}
 
Finally it works!
I changed DMX lamps for my tests. This means that my DMX signal will not be interpreted by all the devices.

The device in question that doesn't work is a Chinese 12v LED dimmer (DMX Decoder 512 4CH x 8A, LED Controller) that I use to control spotlights for the stage (music group).

I'm waiting for the new module RS485 to see if it will be recognized by more devices. I think my decoder is more sensitive to voltage levels (< 3.3volt).

Code​

Here is my new test code :
C++:
#include <TeensyDMX.h>

namespace teensydmx = ::qindesign::teensydmx;

const unsigned int channelIn = 65;  // channel input test
const unsigned int channelOut = 1;  // channel output test

// DMX receiver on Serial1
teensydmx::Receiver dmxIn{ Serial1 };

// Create the DMX sender on Serial2.
teensydmx::Sender dmxTx{ Serial2 };

void setup() {

  Serial.begin(115200);
  Serial.print("Receive and send test");

  while (!Serial2 && millis() < 4000) {
    // Wait for serial port initialization
  }

  // Turn on the LED, for indicating activity
  pinMode(LED_BUILTIN, OUTPUT);
  digitalWrite(LED_BUILTIN, LOW);

  // Initialize the DMX sender and receiver
  dmxTx.begin();
  dmxIn.begin();
}

void loop() {
  // Read value
  uint8_t valueDmx = dmxIn.get(channelIn);

  Serial.println(valueDmx);

  if (valueDmx < 50) {

    // Switch on
    dmxTx.set(channelOut, 255);
    digitalWrite(LED_BUILTIN, HIGH);

  } else {
    // Switch off
    dmxTx.set(channelOut, 0);
    digitalWrite(LED_BUILTIN, LOW);
  }

  delay(1);
}

Connection​

Module Grove RS485Wire Jumper colorsI/O Teensy 4.1
GNDBlackGND
VCCRed3.3v
RXWhite7 (RX2)
TXYellow8 (TX2)
 
Hello everyone,

I wanted to correct a mistake I made in my previous message regarding the wiring. During the transition from the prototype to a cleaner version with soldering, I realized that I had used two different types of cable (a Grove cable and another similar one) whose yellow and white wires were reversed.

To avoid any confusion, here are the correct wiring tables:

DMX-IN​

Module Grove RS485Grove cable colorsI/0 Teensy 4.1
GNDBlackGND
VCCRed3.3v
RXWhite0 (RX1)
TXYellow1 (TX1)

DMX-OUT​

Module Grove RS485Grove cable colorsI/0 Teensy 4.1
GNDBlackGND
VCCRed3.3v
RXWhite7 (RX2)
TXYellow8 (TX2)

Couple of points:
1. You don’t need the code that uses the kTXPin; you can remove or comment it out. That’s meant for enabling the transmitter if the hardware needs that. It looks like there’s no ā€œenable transmitterā€ pin on the Grove device; it’s already enabled because the DE line is tied to voltage.
2. From the Grove device schematics, it looks like the TX line is for transmitting, so you need to connect TX from the teensy to TX on the Grove device.
3. As well, RX line looks like it’s for incoming data, so I’m surprised the receive side is working if the Grove RX line isn’t connected to the Teensy RX line.
You were right about the cable inversion
 
Back
Top