DMX MosFet

In this tutorial we are using the DMX MosFet Receiver to control an RGB LED strip. The board mounts four mosfets while the strip has three outputs, one for each color. You can evend find more advanced strips that have four outputs, three for RGB and one for the white. In both cases, the DMX MosFet Receiver is a compact solution to control the strip.

In this example we are using it with the DMX Master, but it’s also possible to use it independently, by uploading your own custom firmware on the board. We are working on a tutorial for that so stay tuned.

First of all we connect the Receiver with the Master, matching the Master’s OUT ports D+ D- and GND with the same-named ports on the Receiver.

Then we have to connect the LED strip, if you look on the receiver’s OUTPUT ports, each mosfet has two outputs (+ and -), but all the ports labeled C are connected (C is for COMMON). In this way we can plug the power (or ground) to any of the C ports and it’s like connecting all of them to the same ground or power.
In our picture the power is the red cable, that we are connecting on a C port, while the blue ones are the individual GND for red, green and blue.

Then we have to supply the voltage required by our LED strip. In our case it’s 12V that we’re getting from a transformer to which we cut the wire so that we can fit them in the “EXTERNAL POWER” connector. Remember to identify correctly + and - because they’re not exchangeable.

Then we set the address of the receiver, to make it simple we set it to 1. In this way when we write

DmxMaster.write(1,128);

we are addressing to the first mosfet on the board and the others are sequential. In our case it’s 1 for red, 2 for blue and 3 for green.


Let’s start with something basic, like turning on each color individually; try to write it by yourself first, then keep reading for the solution. Remember to include the DMX library.

Ok, first of all we have to include the DMX library, that allows us to use the DmxMaster object. Then in the setup() function, we can use the maxChannel method to define the top channel that we are using, in our case is 3 because we’re not the last mosfet, but let’s write 4 so that if we want we can use all of them.

#include <DmxMaster.h>

void setup() {
  DmxMaster.maxChannel(4);
}

Then in the loop we nest another loop that turns on each channel every second.

for(int i = 1; i < 4; i++) {
    DmxMaster.write(i, 255);
    delay(1000);  
    DmxMaster.write(i,0);
  }

And that’s basically it, take a look at the result and the full code after the break.

/*channel: 
 1: RED
 2: BLU
 3: GREEN
 */

#include <DmxMaster.h>

void setup() {
  /*also if we are using only three channels,
   we set the maximum to four so that we can still 
   use the last mosfet if we want */
  DmxMaster.maxChannel(4);
}

void loop() {
  for(int i = 1; i < 4; i++) {
    DmxMaster.write(i, 255); //full on
    delay(1000);  
    DmxMaster.write(i,0); //off
  }
}
  1. June 11, 2013

    ian

    is there a schematic for the DMX MosFet.

Leave a comment