Controlling Peripheral Relay/Switch with Scripts

Has anybody worked with writing scripts with peripheral devices such as relays and/or switches? For example, writing a script that activates/deactivates a relay switch to turn devices on and off. Or maybe writing a script that checks the status of a peripheral on/off switch to provide a remote status of an open or closed door.

Are there universal USB/Ethernet peripherals available for stuff like this?

From your requirement it looks like you are interested to control electronic / electrical devices with script, for this you need to have embedded modules which is usually microcontroller based, for usb based controlling you can use usbmicro's U451 module, and you'll need some wire, wire cutters, crimpers, and nuts etc to hook it all up.

For web based control you can use some webrelay, for this you need to have 9-28 Volts of power supply, which has got interface for connecting relays, and one Ethernet port for connecting LAN cable from PC to module, control will be either browser based or xml messages, which we can do through scripting. or you can buy Net Control NC-800 electronic module, from which you can control maximum 8 relays, from internet/intranet, buying modules are little expensive.

So if you are familiar with PCB designing , Basic Knowledge of programming 8051 / 8052 Microcontroller, Soldering, usage of breadboard, then you can buy components and can build your own module with less money, afters it can be controlled through scripting.

Probably you can go through http://www.electronicsforu.com , build your module, come back to us and tell us how you would like to control devices through scripting, what is medium of communication USB/LAN/Wireless, what command / message device will recognize / use to activate or deactivate relay.

1 Like

Akshay, Is there a wireless version similar to the NC-800/400 that you recommend? I found a few but they were very expensive.

There are some wireless modules also, but they are expensive, as I mentioned in my last post, buying modules are expensive compare to building your own.

There are some ZigBee wireless Modules, these modules simulation programs are available for matlab.

Wireless Devicecontrolby pcRS 232Interface: Wireless Device control by pc RS 232 Interface

National Control Devices: Wireless Relay Controller Boards

I think this is not right place to discuss on embedded modules, if you have modules ready and configured to electrical / electronic devices, then let us know what is to be done through scripting.

I think right place to this topic is in our Special Forum ---> Hardware

1 Like

Agreed, and thank you for the information- it's just what I needed.