DMX Transmission
rapscaLLion
Posts: 75
So I've spent the last week playing with the Propeller and the education kit (waiting for my starter kit to arrive, they where on back order).
I figured out the basics of spin, got a B420 lcd screen fired up and working, hacked a 9V 300mA adapter onto the board. Now it's time to attempt
an interface to DMX, and here is where I am running into a wall. My problem is, I don't have much experience with programming at such a low
level (granted, spin is pretty high level, but the hardware is not). I am working based off of this site: http://www.dmx512-online.com/packt.html
although I will probably buy the full DMX spec sooner or later.
I am trying to communicate with some DMX units I have, some older, some newer. However, I don't understand how to program for communication
at 250Khz, it seems that accurate timing at that speed is not possible. I'm sure I am just not understanding something here, and I have looked at the
DMXIn object from the forums, but I don't understand assembly (yet?) so that hasn't helped.
PS: I am using a SN75176.
Can anyone help with some advice?
Thanks!
I figured out the basics of spin, got a B420 lcd screen fired up and working, hacked a 9V 300mA adapter onto the board. Now it's time to attempt
an interface to DMX, and here is where I am running into a wall. My problem is, I don't have much experience with programming at such a low
level (granted, spin is pretty high level, but the hardware is not). I am working based off of this site: http://www.dmx512-online.com/packt.html
although I will probably buy the full DMX spec sooner or later.
I am trying to communicate with some DMX units I have, some older, some newer. However, I don't understand how to program for communication
at 250Khz, it seems that accurate timing at that speed is not possible. I'm sure I am just not understanding something here, and I have looked at the
DMXIn object from the forums, but I don't understand assembly (yet?) so that hasn't helped.
PS: I am using a SN75176.
Can anyone help with some advice?
Thanks!
Comments
http://forums.parallax.com/forums/default.aspx?f=25&m=132052
There is a good DMX demo code made by Timothy D. Swieter
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Regards.
Alberto.
·
Glad to see you are jumping into using the Propeller for DMX.· One of the first things I thought of when I first read about the Propeller was its use in DMX because of the processing power!·
·
You are correct in that the software I wrote and is found in the forums is used to receive DMX.· Do study it though because it will help you understand the method for receiving the signals - sending them out is only slightly different.· To get the proper BAUD rate I believe you have to use assembly, there may be some fancy Spin tricks, but I doubted that when I created my code last year.·
·
The DMX object I created was based on the Serial Object included with the programming tool - I think maybe Chip wrote that file.· I studied the assembly code of the receive portion of the driver and wrote the other software around it to receive a DMX packet.· You too should study the serial object to understand how it sends and receives data.· Then start modifying the driver to send a DMX packet.·
·
At the moment I wouldn't spend the money on the DMX Spec.· The information found on the web site you referenced should be enough for now.· There is a couple other website that may help and recently Show Control, a Yahoo Group, had a good discussion on sending DMX compatible for older instruments.· I am sure there are several tricks out there for sending DMX to make it friendlier to those companies that interrupt the standard differently.·
·
Your application may have something like this
-1 COG for sending the continuous stream of DMX
-1 COG for general overhead
-1 (or more)·COG managing user input, loading shows from various media, etc
·
Keep trying.· If I get time I may look into doing the code for sending DMX because I have had several people request it.· I would not count on it happening soon, I just got married and in a month or two I am moving China (and taking my Propeller development tools too - I hope).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter
tdswieter.com
One little spark is all it takes for an idea to explode
I have been looking over your DMX input code and I think I might be starting to get the drift.
Wish me luck!
I have already written and tested code to transmit DMX, it currently has an issue where is takes a couple mins to start working, likely waiting for the clock to roll around.
I send the code to a friend with a scope, and much much better understanding of the propeller, he will likely have it fixed today. I will post the code sometime tonight.
Can I ask what you are using the lighting for? and what input device you plan on using to control your lights?
My next little project will be to make small box with input/output and usb to program the box. My hope to to be able to do much more interesting effects then I can currently with the Elation DMX operator pro controller that I have. The Operator Pro has a side for controlling moving head, scanner type lights and also a completely separate par can side. My aim is to use the propeller to take input from the par can side and change outputs of the other side to do some more interesting lighting affects. Also I am going to add some switches etc to the propeller since the dmx contoller only has on button that has direct affect, (turns all par can on full), I want to have some buttons to mash on
Anyhow, I hope that the code I have written will save you time, as it was a wee bit challenging to get the assembly working correctly.
-Teva
Thank you so much, I would really appreciate that code. I have been fiddling around myself, and made some generic assembly code but it still isn't working. I just don't have enough assembly experience. I am actually driving some LED color changing lights to light up a room, the propeller would generate the colors and output to the dmx via four channels that correspond to R, G, B and W. There really is not input per say, although certain settings can be changed via an lcd display and three buttons, which I have working already. Pretty boring stuff lol!
Anyways, I would greatly appreciate taking a look at that code, even if you can't solve the holding problem.
Thanks!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
lets see what this does... KA BOOM (note to self do not cross red and black)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
lets see what this does... KA BOOM (note to self do not cross red and black)
Highly useful for all kinds of control, as it is standardized (at least theoretically) and readily available and supported.
I am posting it anyhow. I may have found the issue, but my test board need to be re assembled which I don't have time for.
Try commenting out the section I mention to see if the delay goes away.
I am really sorry about the delay, it takes a very long time due to I think needing to go through the entire 32bit counter. [noparse]:([/noparse]
About maybe 2 mins.
Once it starts working it should work with almost anything, the output should look perfect due to how the counter is used.
Eric,
Currently I have my hands on: 6 martin scx scanners, 2 roboscan 812's 3 american DJ accu rollers, 1 elation 4pack dimmer, and a martin atomic strobe. The strobe is insane, it uses more power then everything else.
I have not got into lasers yet, tell me what you think of the Chauvet Scorpions when you get them maybe?
-Teva
Thanks for the code, for some reason I could not get it working. I have it wired up properly, and get it started succesfully,
however no matter how long I wait it doesn't connect with the lights. I put a led across A and B and it indeed took about 30 seconds
to light up, but no change in the lights.
Any ideas?
There was indeed a pause before it started to work, but only about 20 seconds. I placed an led across the A/B as an indicator, it work's great.
The other lights I am using still don't work tho... I opened them up and looked inside, the use a JPK (http://www.jpk.co.nz/) 8 channel reciever.
I know they work, as they run fine off the various DMX controllers I have, but they simply won't communicate with your code [noparse]:([/noparse]
Out of curiosity, what lengths did you use for MAB, MBF, etc?
Thanks,
Alex
The red DMX-RX indicator light comes on, but ONLY when all the DMX levels are at zero. Any other level and the DMX
reciever light goes out. If I set the levels with a dmx controller, then switch the cable over to the propeller board, the
lights will zero when DMX is at zero, but any other level the light fails to recieve. What could be going wrong here?
The other lights I have recieve no problem!
during the start bit. This should not have been a problem, however the LED light (or more specifically the JPK reciever) only accepted input with
a start bit of zero. I'm not sure that this conforms to DMX standards, as I thought the start bit was unspecified, but regardless I have fixed the
problem by ensuring the start bit is always at zero.
Thanks so much for the code Teva, it works beautifully now. The only issue is the pause before output, which for me varies between 10 and 50
seconds for some reason. The code you said to comment had no visible effect, the hold was still there.
Thanks,
Alex
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
You guys are all awesome!
I have not had a chance to sit down and work with it yet. It sure would be a time saver for all interested.
Include this as an object, use the start command to initialize and then use the write command to set the channel values.
Easy as pie.
I will let you know how the Scorpion works out. I have·three 532nm lasers and some mirrors here but didn't want the liability in the event of a home-brew failure.
That atomic strobe would be awesome. I am using 16 walmart strobes this year with a modified trigger. I used 8 last year.
Thanks for the code
Link to last years Christmas display http://www.youtube.com/watch?v=z5VT3buv4TQ
I am glad you got your code working!!!!· It is so exciting.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter
tdswieter.com
One little spark is all it takes for an idea to explode
That is quite the show! How many dimmer packs are you using? I like Chauvet Aurora, pretty cool for how cheap it is, I am interested in how it turns out, might get and modify one myself. It uses DC motors? Most gear seems to all uses steppers..
Well all 16 together might be close to the Atomics power. The great thing about it is the control, you can control intensity very finely.
Timothy,
Can I post your Input code into the Object Exchange?
I already finished cleaning up some of the documentation.
I just want to post them together.
I will eventually do a complete rewrite with code that can do multi channels and input/output in the same cog and have various timing features to line up output so that delays can be minimized. For now though its works pretty well!
Anyone reading this thread,
Please test this code if you are interested and report any non working hardware, I would really like to find any bugs while the code is still fairly simple!
When trying the code, and a certain device does not work, try adjusting the MAB and other timings, I have it set fairly tight some devices could require looser timings, I would love to know what devices I need this.
-Teva
I would hardcode the startcode as being 0, to avoid people like me making that mistake [noparse]:)[/noparse]
Otherwise the code works like a charm! I have had no problems with it since I got it working!
If I remember correctly, in my code I had all 512 values of DMX avaliable in an array. That was one of the cool parts of the Propeller, the speed of the code, and the cog.
Keep up the good work!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter
tdswieter.com
One little spark is all it takes for an idea to explode
This display isn't a DMX setup. It is·from another manufacturer,·it·was 96 channels for the 2006 season.
I thought the Aurora would be steppers also but it turned out that they are DC gear motors.
-Teva
btw what project are you using it for?