Sign up Calendar Latest Topics
 
 
 


Reply
  Author   Comment   Page 6 of 11     «   Prev   3   4   5   6   7   8   9   Next   »
Nelson

Registered:
Posts: 3
Reply with quote  #76 
I built this rig and it is great!  Now I am trying to add a 120V relay into the mix for the RED_ALERT command.

I have had some mild success but a number of setbacks so  I figured I would ask about it from the start.

If I wanted my relay to operate on Pin 12 of the arduino, how would I code it into the arduino script?

Once that it is done, how do I know what index it is in the DMXcommands.xml?

thanks
davr

Avatar / Picture

Registered:
Posts: 49
Reply with quote  #77 
To add a relay to the board, you'd have to do something like the following. basically you need to add code wherever you see reference to red/green/blue


near other #defines
const int RelayPin = 12;
#define RelayDefaultLevel = 0;

in setup() add a default, like
DMXSerial.write(4, 0); // 4 is the channel that goes into dmxcommands. 

and set up the pin for output like
pinMode(RelayPin, OUTPUT);

and then in loop()
digitalWrite(RelayPin, DMXSerial.read(4));

then in your dmxcommands, send a 1 to channel 4 to turn the relay on and a 0 to channel 4 to turn the relay off
Nelson

Registered:
Posts: 3
Reply with quote  #78 
thanks for the advice!  That works on the arduino side.

On the DMX Commands I entered
<event type="RED_ALERT">
<setvalue index="6" value="1" change="0"/>

It will turn my relay on but when I turn red alert off, the relay stays on.

Do I have to add another line to the event type to turn it off at the end?
davr

Avatar / Picture

Registered:
Posts: 49
Reply with quote  #79 
Put:

<setvalue index="6" value="0" change="0"/>

under the situation_normal or whatever the default event is
 
Nelson

Registered:
Posts: 3
Reply with quote  #80 
That fixed it.  One last issue.  During red alert the relay blinks on an off in about 1 second intervals.  I am guessing that is as intended for red alert.

Is there a way to keep the relay on full time during red alert.  I tried placing the command under red_alert continuous=yes  and that didn't change anything.

Also, the relay doesn't come on immediately during red alert like the lights do.  It waits a second.  Any ideas?

Thanks for all the great help thus far.
anwoke8204

Registered:
Posts: 188
Reply with quote  #81 
I didn't see in the thread, is this for a single DMX strip?  if so, is there a way to expand it to a multi strip setup with different addresses per strip?  We have bought an Arduino, and the lights and are looking to build our own controller so we can overide the lights and stuff if we need to (turn them all white to light up the room inbetween games, dial them down or turn them off if we have people who go into seizures playing, etc.) but not sure if this can do multiple sets or just the one


vfrdirk

Registered:
Posts: 129
Reply with quote  #82 
The Arduino used in this thread has two sets of PWM (pulse width modulation) pins which can be used as as light controllers. The instructions here only use one set, so it's possible to wire in a second set of resistors and transistors to work a second strip, but there's been some debate about the amount of power that's needed to run 1 set, let alone two, but it should work just fine after you modify the Arduino script (and the DMX script in Artemis) to send signals to the other pins.

There are some other tools (SoftPWM, I think) that can add PWM functionality to non-PWM pins on the Arduino.
anwoke8204

Registered:
Posts: 188
Reply with quote  #83 
Did we ever find out if this works with the Arduino Uno, or does it have to be the Arduino Duemilanove?
MarkBell

Avatar / Picture

Administrator
Registered:
Posts: 1,850
Reply with quote  #84 
Unfortunately, since the Uno uses an embedded USB port instead of the onboard FTDI chip from previous generations, it probably won't work with the Uno.  It should work with the Sparkfun Redboard, which is basically an Uno with an FTDI chip for USB conversion (you even use the Uno settings in the IDE).  Also the Arduino Pro and Pro Mini boards use an FTDI compatible header for programming, so the FTDI USB - RS485 cable will do you right as well.  Here's a page from Sparkfun that has several boards compared:  Totally Tabular.  Any that say FTDI or FTDI cable will probably be compatible.
__________________
Note - this is in no way intended to be an official position of Thom or Artemis, as I am not an official representative of the creator or game.
anwoke8204

Registered:
Posts: 188
Reply with quote  #85 
Ok, I have teh duminalove, and I have installed the Arduino software on my computer, but I can't seem to find a way to get the software over onto the arduino.  I hook it up, and it gets detected, but I am not sure what I am supposed to do to put the software onto the arduino.  I have tried all of the scripts on this thread, but it all fails.
Anagram

Registered:
Posts: 34
Reply with quote  #86 
anwoke8204: truly the best thing to do is to go through the Arduino general introductory tutorials and get a feel for how all the pieces fit together. Then using all of the scripts and instructions on this thread will come easier to you. In any case, to cut to the chase: putting the software on the Arduino:  http://arduino.cc/en/Guide/Windows#toc7

Good luck!
Clanggedin

Registered:
Posts: 1
Reply with quote  #87 
I just finished getting my board all set up and it's working like a charm. I have never done anything like this before so it is a total hack job, but it is working.  One thing that I am wondering is if anyone has made or found additional code that can be loaded to the Arduino so the set up can be used as a color organ when I'm not playing Artemis.

Then the lights could work double duty. 
Anthom

Registered:
Posts: 7
Reply with quote  #88 

Just wanted to jump in and give a big hearty THANK YOU! for all the posts discussing this.. the instructions with images and diagram luotinen posted were especially helpful!  Because of this thread I was able to craft and setup my own DMX setup and whenever I had a question I was able to come back to this thread and pretty much find the answer.

Here is a snap of my final board setup:



I cut a old plastic hard drive shipping shell in half and screwed the boards into it with stand offs (from Radio Shack) and trimmed it to fit snugly into one of those project boxes (also from Radio Shack).



I have tested it briefly with the 9,10,11 pins and it's working great! 

I apparently picked up a different type of LED strip having 5 wires instead of the 4 listed here.  The extra wire appears to just be for the White light however so it doesn’t seem to be a big issue.

Now it's time to dig into the DMXcommands.xml and start tweaking!

 

stovepipez

Registered:
Posts: 18
Reply with quote  #89 
Clean and nice looking job you did there.
Anthom

Registered:
Posts: 7
Reply with quote  #90 

Thanks!

Here is the completed Artemis DMX Box:




Used Cat5 jacks for easy connect of the lights.. blue is the primary light and red secondary.  Power connector on the left and I couldn't find anything to mount for the USB connector so I drilled a hole and just fed the cable in.  All in all I'm really happy with how it came out and so far it has been working great!

And here is a short demo video for those interested:



Thanks again! [biggrin]

Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.