Shop OBEX P1 Docs P2 Docs Learn Events
Rather urgent problem using DMX — Parallax Forums

Rather urgent problem using DMX

CumQuaTCumQuaT Posts: 156
edited 2009-02-22 10:24 in Propeller 1
Hi, I have an urgent problem that needs to get off the ground as soon as humanly possible, and I really need help...

I have to get a wall-washer light to receive color information from my propeller chip. I originally tried this with a Basic Stamp, which I'm the most familiar with, but the Stamp just didn't seem to be fast enough...

The light in question is one of those really big long RGB wall washer type lights that can flood a large amount of colored light onto a wall or ceiling or some such. It receives a DMX signal, however, it gets the DMX signal from a special control box that can only accept an RJ45 feed... I have hooked up my propeller chip to an RJ45 port and tried the DMX controlling method using a MAX487 chip noted here (http://forums.parallax.com/forums/default.aspx?f=25&m=171793) and haven't had much success...

I know that there are DMX generators that communicate via ethernet available for computers, but I need this done with a single propeller chip if at all possible... Can this be done? Can anyone help?

Thank you hugely in advance. If I can provide any more information at all, please just ask...

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Who are you, and why are you reading my signature?

Comments

  • CumQuaTCumQuaT Posts: 156
    edited 2009-02-18 07:16
    If anyone thinks they may be able to help but needs more information, please just let me know... The other DMX generation project worked fine, I just need it to work through ethernet!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Who are you, and why are you reading my signature?
  • Brian FairchildBrian Fairchild Posts: 549
    edited 2009-02-18 08:43
    You say the controller has an RJ45 port, are you sure this is for Ethernet? There is a standard for DMX on RJ45s...

    Pin 1 - Data + (XLR pin 3)
    Pin 2 - Data - (XLR pin 2)
    Pin 7 - 0v (XLR pin 1)
    Pin 8 - 0v (XLR pin 1)

    If it really is DMX over Ethernet then you're going to need to know which protocol it is using. Most of them use UDP which ought to be doable with a Propeller and something like a Microchip ENC28J60 or a Wiznet 5100.
  • CumQuaTCumQuaT Posts: 156
    edited 2009-02-18 08:46
    That pin allocation is correct, yeah. I'm fairly new to Propellor... Any advice on how I can get this working?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Who are you, and why are you reading my signature?
  • CumQuaTCumQuaT Posts: 156
    edited 2009-02-18 09:04
    Re-reading your post, I think I'm getting it. That pin allocation is indeed the one I'm using, I just have no idea how to code it... I'm using the code and IC mentioned at this post (http://forums.parallax.com/forums/default.aspx?f=25&m=171793) but I have no idea what to do with the code since I'm so new at this... I'm frantically studying propeller coding to learn it, but it's slow going... Any nudges in the right direction on how to send color signals with that code would truly be life saving!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Who are you, and why are you reading my signature?
  • Brian FairchildBrian Fairchild Posts: 549
    edited 2009-02-18 10:25
    Somewhere on the control board will be a switch to set the DMX base address of the unit. You'll need to know what this is set to. In my code example below I've assumed it is set to '1'. You'll also need to know how the DMX channels are used bu the control board, my assumption is that it uses three channels in the order red, green and blue. Some fixture will also have a channel for overall brightness and channels for things like strobe function.

    It's then as simple as setting the right DMX channels top the right values...

    CON
    '***************************************
    '  Hardware related settings
    '***************************************
      _clkmode = xtal1 + pll16x                             'Use the PLL to multiple the external clock by 16
      _xinfreq = 5_000_000                                  'An external clock of 5MHz. is used (80MHz. operation)
    
    '***************************************
    '  System Definitions      
    '***************************************
    
      RED           = 1             'DMX slot for red
      GREEN         = 2             'ditto green  
      BLUE          = 3             'ditto blue
    
      TX            = 10             'pin used for DMX transmit line
    
    OBJ
    
      DMX           : "DMXout.spin"
    
    
    PUB main
    
      'Start the DMX object
      DMX.start(TX)
    
      'set RGB to full = WHITE
      DMX.write (RED,255)
      DMX.write (BLUE,255)
      DMX.write (GREEN,255)
    
      
      'more code here
    
    



    ...it really is as easy at that. By changing the values sent to each channel you can change the colour. If your unit is one that has an overall brightness channel then that will need to be set to 255 before you will see anything.
  • CumQuaTCumQuaT Posts: 156
    edited 2009-02-18 10:50
    You are an absolute hero. Thank you so very much! I can't possibly tell you how much help this is!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Who are you, and why are you reading my signature?
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2009-02-19 02:12
    CumQuaT - so did you get this working? I haven't tried the sending code yet myself as I am usually focused on the the receiving code of DMX. My code needs some cleanup and added robustness, but if you have to receive DMX-512A there is an object on the exchange for it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter, E.I.
    www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, uOLED-IOC, eProto for SunSPOT, BitScope
    www.tdswieter.com
  • CumQuaTCumQuaT Posts: 156
    edited 2009-02-22 10:24
    Yeah, it ended up working perfectly. It still needs alot of programming to get it doing PRECISELY what i want, and i'm learning spin from scratch (which is incredibly difficult since i cant find any layman programming guide that says "this is a loop, this is if/then operation, this is math operation) but i'm getting there. definite progress!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Who are you, and why are you reading my signature?
Sign In or Register to comment.