Remote controlling with USB relay module

Scripts and programs to automate Astroart
Post Reply
Forum_2015
Posts: 358
Joined: 07 Dec 2018, 15:04

Remote controlling with USB relay module

Post by Forum_2015 »

Hi all, I'd like to share my experience concerning the automated remote control of a spectrograph by means of an AA script. May be there are few people interested in spectroscopy (and specific Lhires III model) but the argument can also be extended to other electronic devices we have in observatory.

The heart of module is the USB relay card, a basic controller used to switch on/off a lot of devices from computer. Though it is an USB equipment, computers see it as a serial device and all communications are established through the COM port.

I'm not a script expert but I have realized that Astroart manage the controller in a very easy way using a couple of commands: Serial.Connect() and Serial.Send (). For example, with controller in COM3, I activate the relay #1 (turn on the calibration lamp on spectrograph) with commands:

Code: Select all

Serial.Connect (3)
Serial.Send (Chr(92) + Chr(1))
In the following page you'll find further information about hardware and software implementation (a basic configuration).

http://quasar.teoth.it/html/USB_relay/USB_relays.htm

Clear sky!
Paolo

Forum_2015
Posts: 358
Joined: 07 Dec 2018, 15:04

Re: Remote controlling with USB relay module

Post by Forum_2015 »

Great stuff Paolo!
With your agreement I'd like to also cross post on the Astronomical spectroscopy forum.
We need to see more of this type of work - automation is the way forward!
Well done mate.

-----------
"Astronomical Spectroscopy - The Final Frontier" - to boldly go where few amateurs have gone before....
https://groups.yahoo.com/neo/groups/ast ... scopy/info
http://www.astronomicalspectroscopy.com/

Forum_2015
Posts: 358
Joined: 07 Dec 2018, 15:04

Re: Remote controlling with USB relay module

Post by Forum_2015 »

Of course, Ken! I'm glad you appreciated.

Paolo

Post Reply