Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: DMX vs CAN as Control Bus

  1. #1
    Join Date
    Oct 2010
    Location
    Ann Arbor, MI
    Posts
    20

    Default DMX vs CAN as Control Bus

    Hey all,

    Designing a little control system for a NDA'd project. Basically, have 6 "projectors" that take the following inputs, as of now:
    - Laser Brightness (via I2C DAC)
    - Motor Speed / Direction (up to 3)

    Right now, my design has them networked via CAN, and each node is powered by a dsPIC MCU. The dsPIC sports an integrated CAN controller, so I just need a cheap xcvr, like the MCP2551 also from Microchip. Using Rohm motor drivers, and the dsPIC comes in handy because of it's Motor Control PWM outputs (the Rohm IC is a bit funky when it comes to direction control as well).

    Planning on using a standard USB<->CAN adapter with a good SDK, like something from Kvaser to interface with the PC. I've only got 3 CAN messages atm to carry all the data needed, and I think I can run the bus at pretty high data-rates, around 1Mbps because the cable length will be so short.

    CAN has the benefit of being rated for "safety-critical" apps too which is nice, although regardless the protocol my firmware will kill off laser emission upon loss-of-communication. Would use Cat5(e) to run the CAN...with 8 wires in Cat5e, I wonder if I could carry CAN + 2 DMX channels in the same wire.

    DMX would be around the same cost to implement, I'd just use a RS-485 transceiver like the SN75176B to interface with the bus. Right now I think I will leave room on the PCB for both interfaces (the dsPIC has enough pins to support both anyways) for flexibilities sake, but I'm curious to hear about members' here experiences with either protocol.

    e: I don't think ILDA is applicable here, because these projectors have no XY control, etc, just what is described above. Perhaps projector is a misnomer.
    e2: I think I'll leave DMX on there as well, as I may use these for some of the other laser units I have that are currently all analog, and would be interfaced via DMX in the future. Cheaper to make only one PCB and selectively populate it.

    secondary questions
    DAC IC - Laser has a 0V-5V modulation input. Is a 8-bit DAC granular enough, or should I look at 10-bit+ DACs?
    Last edited by movax; 01-18-2012 at 20:21.

  2. #2
    Join Date
    Jun 2010
    Location
    Zweibrücken, Germany
    Posts
    605

    Default

    Hi movax,

    I work with and program CAN-Bus systems om a daily basis. I have also thought about CAN in laser systems but quickly discarded the idea due to the lack of support (if any) in show system software such as LD2000, Mamba, LSX ect., many already have DMX implemented.

    8 bit for the modulation is sufficient, this is standard as far as I know.

  3. #3
    Join Date
    Jun 2009
    Location
    The Woods, CA, USA
    Posts
    534

    Default

    Ether Dream for the DAC (12-bit) http://ether-dream.com/ Could also use it for your motor control, if you want to go with say serial motor control from pololu.com as it has no CAN support or DMX at this time.

    I'm a CAN fan myself. DMX is kind of sad for lasers from the safety stand point as you pointed out. I've even seen it used on a shutter.....to me not a good idea.

  4. #4
    Join Date
    Oct 2010
    Location
    Ann Arbor, MI
    Posts
    20

    Default

    Quote Originally Posted by Solarfire View Post
    Hi movax,

    I work with and program CAN-Bus systems om a daily basis. I have also thought about CAN in laser systems but quickly discarded the idea due to the lack of support (if any) in show system software such as LD2000, Mamba, LSX ect., many already have DMX implemented.

    8 bit for the modulation is sufficient, this is standard as far as I know.
    CAN on a daily basis, my condolences (a professor of mine had this unhealthy...fascination with CAN, shoehorning it everywhere, even when not appropriate). CAN software support is definitely poor in show system SW, I agree, but this particular installation would not be driven by show software at all. This is more of an art installation, and let's just say the inputs to the system are provided by passerby/ambient noise. So there will be a application on the PC processing input data (video, audio, etc), and then using whatever USB/CAN SDK to turn them into CAN messages to drive the projectors.

    Good to hear about the 8-bit though. I'm trying to condense into as few CAN messages as possible; right now I'm down to 3, which should result in low bus utilization, especially since the projectors will not transmit themselves, aside from the occasional heartbeat message.

    Quote Originally Posted by Picasso View Post
    Ether Dream for the DAC (12-bit) http://ether-dream.com/ Could also use it for your motor control, if you want to go with say serial motor control from pololu.com as it has no CAN support or DMX at this time.

    I'm a CAN fan myself. DMX is kind of sad for lasers from the safety stand point as you pointed out. I've even seen it used on a shutter.....to me not a good idea.
    That looks like a pretty beefy platform (skimmed the thread describing it over in the Adv. forum), but I think a custom application here would be better, especially since the # of motors could grow. Depending on how the project turns out, I may be able to release the hardware/software as open-source for people to start building CAN-based laser equipment. Is the HW for that open-source as well? Curious if it is 2-layer or 4-layer PCB-wise.

    And definitely agree with you on the safety standpoint, DMX is just not a good idea for anything where safety is even remotely a factor.
    Last edited by movax; 01-19-2012 at 07:12.

  5. #5
    mixedgas's Avatar
    mixedgas is offline Creaky Old Award Winning Bastard Technologist
    Infinitus Excellentia Ion Laser Dominatus
    Join Date
    May 2007
    Location
    A lab with some dripping water on the floor.
    Posts
    9,904

    Default

    Can being bidirectional and faster, and a "little" safer are its only saving graces. Having just spent six months working on a CT machine where everything but the data pipe (5.56 Gbits per second) was CAN, I see little difference in the physical layer over DMX, its just slightly more robust, but much faster. This is from a entertainment industry view, as up until now, there has been little need for bidirectional communications in the theatre/entertainment world. Few lighting fixtures have anything useful to convey back to the lighting desk. Winches and smoke machines on the other hand, have things to say.

    Its all in the protocol, how collisions are avoided etc.

    DMX was NEVER intended to be expanded to what it has become.

    In 1986, 512 basic channels was more then most desks/CPUs could output, and few installations would ever comsume more then one DMX universe. 8 bits of motion per axis was a lighting directors wet dream.

    DMX is like RS232, damn useful, but never intended to be stretched the way it has.

    For a one off install, or something that needs to talk back, I'd do CAN, for a commercial product, I'd stick with DMX or use ethernet on a private network.

    Steve

  6. #6
    Join Date
    Jun 2010
    Location
    Zweibrücken, Germany
    Posts
    605

    Default

    CAN has gotten a lot safer since the creation of CAN-SIL2 components/protocol, giving a much higher level of security mainly thru redundant messaging. Due to law changes in the EU all newly developed equipment which could be a safety hazard to the public, has to comply with the new CAN-SIL2 standard. Other than CAN-Open or J1939, CAN-SIL2 properly implemented will surely qualify for laser applications.

  7. #7
    Join Date
    Oct 2010
    Location
    Ann Arbor, MI
    Posts
    20

    Default

    Quote Originally Posted by mixedgas View Post
    For a one off install, or something that needs to talk back, I'd do CAN, for a commercial product, I'd stick with DMX or use ethernet on a private network.

    Steve
    This is what I was thinking, it is a one-off so CAN is probably the better choice.

    Quote Originally Posted by Solarfire View Post
    CAN has gotten a lot safer since the creation of CAN-SIL2 components/protocol, giving a much higher level of security mainly thru redundant messaging. Due to law changes in the EU all newly developed equipment which could be a safety hazard to the public, has to comply with the new CAN-SIL2 standard. Other than CAN-Open or J1939, CAN-SIL2 properly implemented will surely qualify for laser applications.
    Are there open docs on implementing/supporting CAN-SIL2 per chance, or is it a paid spec? When I was in the auto-industry we had AUTOSAR/OSEK and such, don't recall CAN-SIL2 off-hand though.

  8. #8
    mixedgas's Avatar
    mixedgas is offline Creaky Old Award Winning Bastard Technologist
    Infinitus Excellentia Ion Laser Dominatus
    Join Date
    May 2007
    Location
    A lab with some dripping water on the floor.
    Posts
    9,904

    Default

    There is also always RS485 Serial. Uses a 1.75$ 8 pin dip transceiver chip.
    Cheap, works, bidirectional, and quite safe.

    Steve

  9. #9
    Join Date
    Jan 2008
    Location
    Belgium
    Posts
    1,009

    Default

    Also, beware ...

    Last time i used the Microchip framework for CAN (about 2 years ago). It was far from bug free.
    Don't trust any of the Microchip to set your baud rate. Program the registers yourself ...

  10. #10
    Join Date
    Oct 2010
    Location
    Ann Arbor, MI
    Posts
    20

    Default

    Quote Originally Posted by FourDee View Post
    Also, beware ...

    Last time i used the Microchip framework for CAN (about 2 years ago). It was far from bug free.
    Don't trust any of the Microchip to set your baud rate. Program the registers yourself ...
    Good to know. Hopefully their CAN application notes are halfway decent; I have a framework I use for all my Microchip projects (PIC18/24x/32, dsPIC) that gets my clock/oscillator control set up properly as well. Now looking for a cheap CAN<->USB interface. I need to order one for work, so I think I'll try out the Kvaser Leaf and see what it's API is like. C# bindings would be great.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •