Hi,
I would like some advice on troubleshooting/fixing a problem I am having with receiving DMX signal into an Arduino Mega board.
I am using the guidance from Matthias Hertel here: A Arduino Library for sending and receiving DMX and DMX Shield for Arduino with isolation.
I have used an LT1785CN8 chip as my RS485 transceiver. I had them around and they appear to do exactly the same as the MAX485.
Attached is a schematic of the simplified layout I am working with.
I have put an LED as an output, and the code in my loop is simply this:
void setup() {
// Initialise DMX in Receive Mode
DMXSerial.init(DMXReceiver);
}
void loop() {
// Calculate Time Since Last DMX Data
unsigned long LastDmx = DMXSerial.noDataSince();
if (LastDmx < 500) {
// Status LEDs
analogWrite(12,0); // DMX Fault
analogWrite(11,255); // DMX OK
}
// If no recent DMX Signal, then reset
else {
// Status LEDs
analogWrite(12,255); // DMX Fault
analogWrite(11,0); // DMX OK
}
}
Wire it all up, and it appears that I get some very unreliable DMX signal. The OK led flashes intermittently, with the fault LED nearly always on.
I actually want to control some servos from different DMX channels, but they operate very erratically and do not always respond when the DMX input changes.
My DMX source has been tested with a known working fixture and has no problems. I don't have an oscilloscope, so I am not sure how else I can test. I have stripped it down to just the transceiver chip and the Arduino to make sure nothing else is interfering and the same behavior occurs.
Has anyone got any suggestions on how I can further troubleshoot this? Anyone seen this or similar issues when working with DMX?
Thanks,
Craig