以编程方式控制英国的电源插座
这很简单。
我想将一盏灯插入英国电源。
我希望能够通过软件打开和关闭它的电源 - 比如通过串行端口命令,或者通过运行命令行或我可以从 ruby 或 Java 访问的东西。
我看到很多关于如何在美国电力系统中使用 X10 来做到这一点的文章 - 但是有人在英国实际尝试过这样做吗?
如果你成功了:
1)你到底用了什么硬件使用?
2)如何通过软件控制它?
It's very simple.
I want to plug a lamp into the UK mains supply.
I want to be able to power it on and off from software - say from serial port commands, or by running a command-line or something I can get to from ruby or Java.
I see lots written about how to do this with X10 with American power systems - but has anybody actually tried doing this in the UK?
If you got this working:
1) Exactly what hardware did you use?
2) How do you control it from software?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
在美国和英国你必须做的事情实际上没有什么区别。您需要的是使用并行端口,您可以在没有硬件复用的情况下控制 8 个套接字,并且在复用情况下最多可以控制 256 个套接字,或者使用具有串行/USB 通信支持的微控制器(您可以使用 PIC,它很容易用汇编器进行编程) )来控制相同类型的硬件:带有支持电网电压的三端双向可控硅继电器的板(我推荐继电器,因为有了它们,您不必担心连接/控制的设备),以及一些晶体管驱动三端双向可控硅开关元件/继电器,以将控制电路与电源电路解耦。
完成此操作所需的 DIY 硬件并不是真的那么难,您可能会学到一些如果你从来没有做过电子产品。
如果您有一台带有并行端口和少量要控制的设备的计算机,我会使用一个简单的电路,将端口的每个输出耦合到驱动继电器的晶体管,从而关闭每个设备的电路。
市场上有一些已经内置的电路板 你可以购买,但我不能夸大事实,DIY 并不难。
(来源:Electronickits.com)
There is really no differences on what you have to do on the US and on the UK. What you need is either use the parallel port, from which you can control 8 sockets without hardware multiplexing, and up to 256 with multiplexing, or a microcontroller with serial/USB communication support (you could use PIC, which are easy to program with assembler) to control the same kind of hardware: a board with either triacs of relays (I'd recommend relays, as with them you don't have to worry what device you connect/control) that support the voltage of your electric grid, and some transistors to actuate the triacs/relays, to decouple the control circuit with the power circuit.
The DIY hardware needed to do this is not really that hard, and you might learn some if you've never done electronics.
If you have a computer with a parallel port and a small amount of devices to control, I'd go with a simple circuit that couples every output of the port to a transistor that actuates the relay, which closes the circuit for each device.
There are some already built circuit boards on the market that you can buy, but I can't overstate the fact that it's not hard to DIY.
(source: electronickits.com)
还有适用于英国(和欧洲)电源系统的 X10 产品,配有英国 3 针插头。
您所看到的美国系统的项目只需购买英国版本的产品即可应用于英国。
要在电力线上发送和接收命令,您需要 CM12模块,可以根据需要通过串口进行编程。此外,还有一系列可以控制 CM12 模块的现成软件。您可能更容易与此类软件交互,而不是直接控制 CM12。
英国 X10 产品的热门在线供应商是 Let's Automate< /a>.
There are X10 products for the UK (and European) power systems as well, complete with UK 3-pin plugs.
The projects you've seen for the American system can be applied to the UK simply by buying the UK version of the products.
To send and receive commands on the powerline, you would need the CM12 module, which can be programmed through the serial port as you require. In addition there is already a selection of off-the-shelf software that can control the CM12 module. It might be easier for you to interface with such software, instead of controlling the CM12 directly.
A popular online vendor of UK-based X10 products is Let's Automate.
尝试 iBoot 。 。 。我们在医院使用它。 。 。非常可靠,使用非常简单的界面。英国电力也可用。 。 。
Try the iBoot . . . we use it at hospitals . . . very reliable uses a very simple interface. UK power is available as well . . .
我是 Phidgets 产品的一名满意的客户,这个产品可以满足您的要求: PhidgetInterfaceKit 0/0/4(接口通过 USB 端口)。
在软件控制方面,Phidgets Inc.提供了许多库。
(来源:phidgets.com)
I am a happy customer of Phidgets products and this one would satisfy your requirement: PhidgetInterfaceKit 0/0/4 (interface is through a USB port).
In terms of software control, Phidgets Inc. offer many libraries.
(source: phidgets.com)