Shop OBEX P1 Docs P2 Docs Learn Events
DMX transmitter possible? — Parallax Forums

DMX transmitter possible?

rapscaLLionrapscaLLion Posts: 75
edited 2007-02-01 07:42 in BASIC Stamp
Hi,

I have a fairly simple but specialized project. I am looking at BASIC Stamp 2 because of the
easy learning curve (I already have lots of programming experience, just not for microprocessors).

What I need to do is take a potentiometer style input, translate it into a value (either % of 100 or
0 - 255) and based on that, manipulate four DMX channels (which correspond to red/green/blue/white LEDS).
The DMX lights are preexisting. The relationship between POT input and color output is not at all linear,
which is why I have to program a microprocessor.

What I need to know is, using BASIC Stamp 2, is it possible to make a DMX transmitter that can control
four channels? (No DMX input, only output). For info on the DMX standard, look here: http://www.dmx512-online.com/packt.html

Assuming I have the components can I do this with a BS2 or must I use an external DMX controller?

Thanks a lot!

Comments

  • FranklinFranklin Posts: 4,747
    edited 2007-01-29 02:15
    At 4 microsec per pulse timing you might be better off with an sx but if you keep your code tight it's do-able.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • rapscaLLionrapscaLLion Posts: 75
    edited 2007-01-29 02:20
    You mean the BS2SX-IC?

    The SX says its for developers with previous BS2 experience, is that something I should be worried about?

    The code has very little I/O, but a fair amount of calculations to do.

    What do you think?

    Post Edited (rapscaLLion) : 1/29/2007 2:34:39 AM GMT
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-01-29 16:18
    With a data rate of 250000 bits per second this is not possible with a BASIC Stamp. In theory it would be possible with an SX, but I believe someone has already done a DMX Propeller Object. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • rapscaLLionrapscaLLion Posts: 75
    edited 2007-01-30 15:40
    Hi,

    So BS2 is out entirely? Even the BS2SX?

    The reason I am scared to go propeller is I have no previous micro programming experience. Programming experience yes, but not at this level. Looking at all the BS2 stuff, I figure I could get a good grasp of it in 2 weeks before starting on the DMX project. Do you think a similar result is possible with the Propeller? (I know that's an unfair question)

    Thanks!
  • BeanBean Posts: 8,129
    edited 2007-01-30 15:53
    With a decent speed clock (20MHz) you should be able to generate the DMX codes with SX. I'm not sure about the electrical interface though. I though Jon Williams had created some DMX code for the SX, but I can't seem to find it.

    But if there is already a DMX object for the propeller, that would probably be easier (although more expensive).

    I assume the pot will control the hue, and the micro will convert hue to R-G-B ? That should be do-able on either micro.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheap used 4-digit LED display with driver IC·www.hc4led.com

    Low power SD Data Logger www.sddatalogger.com
    SX-Video Display Modules www.sxvm.com
    Stuff I'm selling on ebay http://search.ebay.com/_W0QQsassZhittconsultingQQhtZ-1

    "USA Today has come out with a new survey - apparently, three out of every four people make up 75% of the population." - David Letterman
  • rapscaLLionrapscaLLion Posts: 75
    edited 2007-01-30 16:04
    Arg, conflicting information!

    I don't know what you guys mean by "SX"

    I am asking about BS2SX-IC

    Are you referring to that or to the seperate "SX" chip line?
  • BeanBean Posts: 8,129
    edited 2007-01-30 16:21
    The BS2SX-IC is not fast enough.
    We're talking about the seperate SX line.
    If DMX is just serial you can just use SEROUT with the SX/B compiler for the SX line. (Even at 250KBaud).

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheap used 4-digit LED display with driver IC·www.hc4led.com

    Low power SD Data Logger www.sddatalogger.com
    SX-Video Display Modules www.sxvm.com
    Stuff I'm selling on ebay http://search.ebay.com/_W0QQsassZhittconsultingQQhtZ-1

    "USA Today has come out with a new survey - apparently, three out of every four people make up 75% of the population." - David Letterman
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-01-30 16:28
    The SX Microcontroller (such as the one used as the interpreter chip on the BS2sx) is available separately and capable of 50 to 75 MIPS and can have interrupts. You can find these at the following link. With a free BASIC compiler it makes it easier to use as well.

    http://www.parallax.com/sx/index.asp

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2007-01-30 18:20
    rapscaLLion,

    Just out of curiousity, how many channels do you need to accommodate? If fewer than 512, are they all at low addresses?

    -Phil
  • rapscaLLionrapscaLLion Posts: 75
    edited 2007-01-31 05:26
    4 channels only, and at this point I assume I can specify which ones. (I believe the units have dip switches anyways)
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2007-01-31 06:06
    There's a chance this may be possible to accomplish with one of the AVR coprocessors on the MoBoStamp-pe board. If so, you'll be able to do your programming in PBASIC. The difficulty may lie in the fact that the AVRs use a 9.6MHz RC clock, so would have to be regularly synchronized with the BASIC Stamp to reduce the effects of thermal drift on the output baud rate. This is not an insurmountable issue, though. The DMX protocol, being asynchronous with two stop bits, will be forgiving of slight baudrate discrepancies.

    You would also need an RS485 daughterboard for the DMX interface. Such a board would be easy to proto when the Proto-DB (prototyping daughterboard) becomes available — soon — with a commercial RS485 board further down the road.

    What is your time frame, BTW?

    -Phil
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2007-01-31 07:46
    Rapscallion -

    There is another approach, but it's a bit costly. There are all sorts of DMX Interface boards available. Here is one web site, just to take a look:
    http://www.bpesolutions.com/dmxproduct.html

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->
  • rapscaLLionrapscaLLion Posts: 75
    edited 2007-02-01 07:42
    Hi,

    I think I will go with a Propellor processor, the time frame is a few months so I should be able to get the hang of it (I hope)

    Thanks for your help selecting the chip, I'm sure I'll have more questions when I get my hands on it!
Sign In or Register to comment.