PDA

View Full Version : DMX transmitter possible?



rapscaLLion
01-29-2007, 08:13 AM
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!

Franklin
01-29-2007, 09:15 AM
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

rapscaLLion
01-29-2007, 09:20 AM
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 Savage
01-29-2007, 11:18 PM
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

rapscaLLion
01-30-2007, 10:40 PM
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!

Bean
01-30-2007, 10:53 PM
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 (http://www.hc4led.com)

Low power SD Data Logger www.sddatalogger.com (http://www.sddatalogger.com)
SX-Video Display Modules www.sxvm.com (http://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

rapscaLLion
01-30-2007, 11:04 PM
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?

Bean
01-30-2007, 11:21 PM
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 (http://www.hc4led.com)

Low power SD Data Logger www.sddatalogger.com (http://www.sddatalogger.com)
SX-Video Display Modules www.sxvm.com (http://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 Savage
01-30-2007, 11:28 PM
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)
01-31-2007, 01:20 AM
rapscaLLion,

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

-Phil

rapscaLLion
01-31-2007, 12:26 PM
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)
01-31-2007, 01:06 PM
There's a chance this may be possible to accomplish with one of the AVR coprocessors on the MoBoStamp-pe (http://www.parallax.com/detail.asp?product_id=28300) 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 Bates
01-31-2007, 02:46 PM
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 -->

rapscaLLion
02-01-2007, 02:42 PM
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!