# Serial to DMX Adapter



## tomed101 (Nov 28, 2007)

I need a serial to DMX adapter. This is kindof weird, but this for use in a laboratory to control heating lamps, pumps, valves and other interesting stuff via relays etc. So I need a serial to DMX adapter which I can program using the BASIC language, (not Visual basic). Once this is set up the adapter will the main control centre for a sophisticated test unit. 

Is such a unit available, and if so where do I get one and how much will it cost? If I can only get one which can be programmed with VB, that is ok because usually the commands are fairly similar and can be figured out.

Thanks, Tom


----------



## icewolf08 (Nov 28, 2007)

Is it not possible to write your program to use a USB>DMX adapter? Those are very easy to get.


----------



## mbandgeek (Nov 28, 2007)

USB is a serial interface, so programming shouldn't be all that different. It works by sending one byte at a time, just as serial.


----------



## Footer (Nov 28, 2007)

I want to say dove systems made a serial to DMX adapter years ago, it was proprietary if I remember.


----------



## Van (Nov 28, 2007)

As a control protocol for relays, DMX is a bit of over kill don't you think ? If you have a serial signal you can directly address a large number of relays already on the market with little to no need of writing and designing your own control program.


----------



## Footer (Nov 28, 2007)

Van said:


> As a control protocol for relays, DMX is a bit of over kill don't you think ? If you have a serial signal you can directly address a large number of relays already on the market with little to no need of writing and designing your own control program.



Ya, thats my feeling as well. I know you can get a set of 20-30 relays that you can easily control via serial commands.


----------



## tomed101 (Nov 29, 2007)

Its not just relays, its also dimmers, stepper motor controllers among other things. I went looking, and Pulse appear to make a serial to DMX adapter. The program is required for this system to work as it takes data from several sensors to trigger commands, such as using the dimmer to maintain a temperature using heat lamps... From what I have read, USB is a real PITA when it comes to programming in BASIC, no problem for Visual basic.


----------



## kwotipka (Nov 29, 2007)

Look into the PICAXE microcontrollers at:

http://www.rev-ed.co.uk/picaxe/

They are very easy to program and they have some prebuilt relay boards. If all you need to do is turn on and off lamps, this would probably be the way to go because you could leverage the microprocessor to read temps and act as a thermostat / do logging, etc.

If you have any question, hit me offline via PM and I will get you my email address.

kw


----------



## tomed101 (Nov 29, 2007)

kwotipka said:


> Look into the PICAXE microcontrollers at:
> http://www.rev-ed.co.uk/picaxe/
> They are very easy to program and they have some prebuilt relay boards. If all you need to do is turn on and off lamps, this would probably be the way to go because you could leverage the microprocessor to read temps and act as a thermostat / do logging, etc.
> If you have any question, hit me offline via PM and I will get you my email address.
> kw



Thing is that the program is already written an all I need to do is add in in the DMX stuff. If I get the serial adapter then I should be able to send a single line of code to the port for every change i.e. [email protected] 

Alsom its not just the relays, its the dimmers and stepper motor controlers as well. The idea is also that when a part brakes down, I can go and get am "off the shelf" replacement part without having to cobble together a custom made unit, just a DXM switch pack or a dimmer.


----------



## JD (Nov 29, 2007)

tomed101 said:


> From what I have read, USB is a real PITA when it comes to programming in BASIC, no problem for Visual basic.



Yea, most versions of DOS basic were written in the com1 com2 and lpt1 days, so they do not address the windows environment and its higher level ports. Even though DMX is a serial language, the old ports need a bit of a handshake to get them open, so its more than just level conversion. Haven't searched around but you might try looking for a serial to usb converter, or even an lpt to usb. Not sure if such a thing exists, but worth a google! 

Basic does have a function for machine port addresses, but it assumes they are static hardware, whereas windows does everything "virtual"


----------



## tgates (Nov 30, 2007)

http://www.dfd.com/232.html


----------



## tomed101 (Nov 30, 2007)

tgates said:


> http://www.dfd.com/232.html



Nice looking product. Pity it costs $1320

I think i should be able to get the adapter, and hopefully they are all reasnably easy to program, I know the one listed above is very easy.


----------



## n1ist (Dec 1, 2007)

I haven't looked inside it, but I would guess the Enttec USB PRO (the PRO, not the regular one) uses an FTDI usb-rs232 chip in front of the micro that handles the DMX. The driver that comes with it sets up a virtual com port so you program it just like a regular serial port. If you must, you can open it up, and wire in a MAX202 instead of the FTDI part to get regular serial in.


----------



## tomed101 (Dec 2, 2007)

n1ist said:


> I haven't looked inside it, but I would guess the Enttec USB PRO (the PRO, not the regular one) uses an FTDI usb-rs232 chip in front of the micro that handles the DMX. The driver that comes with it sets up a virtual com port so you program it just like a regular serial port. If you must, you can open it up, and wire in a MAX202 instead of the FTDI part to get regular serial in.



Thanks for the info. I will look into that one, and check out the practicalities.


----------



## mbenonis (Dec 2, 2007)

mbandgeek said:


> USB is a serial interface, so programming shouldn't be all that different. It works by sending one byte at a time, just as serial.



While USB has "serial" in the same, it is completely different from a serial (or RS232) connection. You can't build a device that uses USB in the same way you would build a device that uses a serial port (a USB device would require a heck of a lot more circuitry and drivers).

As far as the OP's question is concerned, I'm not sure DMX is the way to go here. It might be easier to just design/build a serial protocol to control these instruments instead of using DMX to do it (and going through all the headaches involved with it).


----------



## tomed101 (Dec 7, 2007)

After some more research, I think one of these will be the way to go. It can convert RS232 to DMX or back the other way. It can also control, or be controlled by things like analogue (0-5V) and can control servo motors. The RS232 interface seems really simple, just send two numbers to the port (channel and value). So in theory all i have to do to set channel one to FF, is code something which translates to print to port COM1 [1,255] 
Any ideas or feedback?
Tom


----------



## n1ist (Dec 8, 2007)

It looks like that one should work. You may have to look at their sample code; it is not clear whether you need to send the text string [1,255] or the two bytes 0x01 0xFF.
/mike


----------



## tomed101 (Dec 8, 2007)

Whatever it is, it should be pretty obvious whether it is working or not, and if not, change to the other coding style.

Thanks for the assistance guys, been a big help.

Tom


----------

