DMX Hardware issues

I've put together a DMX Shield with a protoboard and have been trying out the SerialtoDmx sketch. My issue is that when I start to send any sort of commands to the arduino I get really erratic behavior from the light I'm trying to control. My initial thought is that I'm picking up noise somewhere. Could all of the jumpers be acting as antennas and creating the erratic behavior?

Thanks,

Loren

I'm thinking this maybe more of a timing issue. I guess. What Arduino do you use? I made an Open DMX board using Arduino, first I use the old Diecimila board with ATMEGA 168 and it has some troubles, blinking erraticly to be exact. Then I switch to Duemilanove with ATMEGA 328 and the problem disappeared. From what I read, the ATMEGA 328-based Arduino board seems like the best option for DMX, not sure about the newer Arduinos

Thanks for the quick reply. I'm using a arduino uno with an atmega 328.

is that SerialtoDMX sketch the one that you got from TinkerIt? The website didn;t say anything about supporting UNO, but nevertheless UNO uses ATMEGA 328 so i think it should be OK.

I still think that the timing is the issue here, you may wanna use this DMXSerial library instead A Arduino Library for sending and receiving DMX it worked for me using the 1.0 Arduino IDE too.

I appreciate the link. Is there a way to send DMX Values out of this library? The lights I'm trying to use are theatrical and I need the signal to go down a DMX line.

yes, it can send and receive DMX, the site also has some instructions on how to build his version of DMX shield, may come in handy :slight_smile:

I did look into that library. The problem with that is that I have spent some time getting some software ready based on the DMX Simple library. I know that my process is probably backwards... Lesson learned. Is there anyway for me to track down the timing problems? If so where should I start?

Thanks,

Loren

You might need an Arduino with a crystal, not a resonator - I think the DMX baud rate specification of 250kbaud is pretty tight.

The whole point of the RS485 drivers in DMX is to avoid noise issues, so it won't be that. Much more likely to be a lack of decoupling
or some such, or as I fear timing issues.

I briefly skimmed over this: http://arduino.cc/forum/index.php/topic,9573.0.html Would it be worthwhile to check?

I had some problems with a DMX circuit I made. I was using a sn75176 as the RS485 driver and couldn't get it to work reliably without a 0.1uf capacitor tying it's vcc and gnd pins. Have you tried testing the circuit in a breadboard? When I first built the circuit on a breadboard I didn't have a problem because of it's inherent capacitance.

ld3300:
Have you tried testing the circuit in a breadboard? When I first built the circuit on a breadboard I didn't have a problem because of it's inherent capacitance.

People mean different things when they say "breadboard". So here is a picture of my current setup:

I'm not using the red boards just the arduino and the white area.

Let me know what you think.

Its hard to say from that photo but I can't make out any decoupling on the RS485 driver, nor any twisted pair connected to it...

What rs485 chip are you using?

MarkT:
Its hard to say from that photo but I can't make out any decoupling on the RS485 driver, nor any twisted pair connected to it...

@MarkT there is no cap should I add one?

ld3300:
What rs485 chip are you using?

@ld3300 I'm using the MAX485CPA

Decoupling is not an optional thing, it is required for all digital logic. If you look at the datasheet for the MAX485CPA you'll find it mentions nothing about decoupling requirements despite the chip
switching highish currents at high speed - shame on Maxim! I'd suggest a 0.1uF ceramic cap
close to the supply/ground pins as a reasonable first step. Close to the supply/ground pins is
important.

I'd expect almost any capacitor of 10nF or higher to make a difference if that is the cause
of the erratic behaviour if you want to check quickly, but you should always have decoupling on all chips
if you want circuits that are reliable.

Try pulling pin 2 on your MAX485 Chip high instead of Low. Right now your chip is enable to receive and drive, which is probably confusing it.