I cannot seem to send DMX with an Arduino Nano + max485
I'm using the DmxSimple library "FadeUp" example
I believe my problem is with the wiring.
I have a DMX lighting fixture for testing, and I have confirmed the fixture is working perfectly with DMX coming out of QLC+ on my laptop (channel 1 moves the light (PAN) so it's easy to test with channel 1)
I've spent over 5 hours testing different wiring configurations, and still cannot get my Arduino Nano to output DMX.
I've used blinking LEDs as well as serial debug messages to confirm that the code is actually executing properly on the Arduino Nano, and on the right pins, so the only thing I can think is that I'm missing something regarding the wiring.
Perhaps with the voltages or polarities?
I've tried different Nano's and different MAX485 boards just to make sure it wasn't a defective unit.
I've tried switching polarity to the DMX cable, but that had no effect.
I've tried using GND, 5v, and 3.3v to the DE and RE pins of the MAX485 board. nothing.
have a look at RS485 example
you need to use DE and RE to control the direction of transmission
I also find it useful to have a PC USB-RS485 dongle to monitor the bus
horace, thanks so much for the link. It cleared up a lot of my confusion over the Max485 pin functions.
markd833, thanks so much for pointing out that I had Nano D3 connected to the wrong pin on the Max485. Also thank you for the note about tying to 5v to keep it on transmit.
Unfortunately, it's still not working.
I checked the voltage of A and B on the max485 and they're fluctuating between:
Also one more thing I noticed... if I disconnect one of the 2 data pins from the max485 (A or B) to the DMX cable, the light starts flashing all kinds of colors randomly. and the lighting fixture's 'dmx signal' indicator is flashing erratically.
I'm not sure if that makes any difference in troubleshooting this problem I'm having, but wanted to mention in case that gives any clues
have you correctly terminated the RS485 bus with a 120ohm resistor?
are you using the correct baudrate? if you have an oscilloscope have a look at the A and B signals
it would be worth getting a USB-RS485 dongle for a PC to test and monitor the Nano/RS485 interface combination
horace:
have you correctly terminated the RS485 bus with a 120ohm resistor?
Yes I have a standard 120ohm DMX terminator in the lighting fixture's DMX OUT port.
Termination isn't an issue, as it works fine with QLC+ on my laptop.
horace:
are you using the correct baudrate?
I'm using the DmxSimple library's example called FadeUp. I've posted the code above. There's nothing affecting baudrate in that example, so DmxSimple would be taking care of that.
horace:
if you have an oscilloscope have a look at the A and B signals
Okay, I will give this a go shortly. Is there something specific I should be looking for?
horace:
it would be worth getting a USB-RS485 dongle for a PC to test and monitor the Nano/RS485 interface combination
I can see the messages, the signals don't look dirty,
What should the voltages coming from A and B be?
The only thing I can think is that the signal voltages aren't correct so the light fixture isn't reading them?
Tested the voltage of a working commercial DMX artnet adapter.
Working Commercial DMX adapter:
A: 4.83 Volts
B: 0.17 Volts
Not Working Arduino to Max485 (as pictured above on breadboard):
A: 2.63 Volts
V: 1.46 Volts
I tested 2 different Max485 boards... same voltage readings
So it seems perhaps the voltages aren't correct on my breadboard?
Am I missing any components between the Nano and the Max485?