f0dmx

here is how i built a wireless isolated dmx controller that takes osc input. the box uses an esp8266 to create a wifi access point that one can connect to with a laptop (or phone or whatever). opensound control messages sent to the box are converted into standard dmx commands. multiple clients can be connected and send dmx commands at the same time.

f0dmx 1

f0dmx 2

below is arduino code for the esp8266, the kicad schematics and some supercollider test code.

//Generic ESP8266 Module, 160 MHz

#include <ESP8266WiFi.h>
#include <WiFiUdp.h>
#include <OSCMessage.h>
#include <OSCData.h>
#include <LXESP8266UARTDMX.h>

#define PORT 19999  //EDIT osc port
const char *ssid = "f0dmx"; //EDIT softAccessPoint network name
const char *password = "mypass";  //EDIT password

WiFiUDP Udp;

void setup() {
  WiFi.softAP(ssid, password);
  Udp.begin(PORT);
  //pinMode(BUILTIN_LED, OUTPUT);
  ESP8266DMX.startOutput();
}

void dmx(OSCMessage &msg) {
  int channel = msg.getInt(0);
  int value = msg.getInt(1);
  ESP8266DMX.setSlot(channel, value);
}

void start(OSCMessage &msg) {
  ESP8266DMX.startOutput();
}

void stop(OSCMessage &msg) {
  ESP8266DMX.stop();
}

void loop() {
  OSCMessage oscMsg;
  int packetSize = Udp.parsePacket();
  if (packetSize) {
    while (packetSize--) {
      oscMsg.fill(Udp.read());
    }
    if (!oscMsg.hasError()) {
      oscMsg.dispatch("/dmx", dmx);
      oscMsg.dispatch("/start", start);
      oscMsg.dispatch("/stop", stop);
    }
  }
}

bill of material...

1       dcdc            ROE-0505S       reichelt
1       xlr female      XLR 3KU         reichelt
1       optocoupler     6N 137          reichelt
1       ic              SN 75176BP      reichelt
1       box             BOPLA KS 420    reichelt
1       resistor        10K
1       resistor        470
3       resistor        10
1       resistor        120
2       cap             10uF
1       cap             100uF
1       regulator       LF 33 CV
1       micro           ESP8266-01
1       socket          4x2
1       usb cable

f0dmx kicad schematics

example of how to send osc from supercollider to the f0dmx box. make sure you send integers and not floats.

//make sure you are connected to the f0dmx wifi network
n= NetAddr("192.168.4.1", 19999);  //the ip and port of the f0dmx box
n.sendMsg(\dmx, 9, 255)  //dmx channel 9, value 255
n.sendMsg(\dmx, 9, 0)
n.sendMsg(\dmx, 7, 100)  //dmx channel 7, value 100
n.sendMsg(\dmx, 7, 0)

n.sendMsg(\stop)  //usually not needed
n.sendMsg(\start)

AttachmentSize
Package icon kicad schematics27.48 KB