用电脑切换多个灯泡最容易,最实用的方法是什么? [英] What's the easiest, most practical way to toggle several lightbulbs with a PC?

查看:295
本文介绍了用电脑切换多个灯泡最容易,最实用的方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题主要是电子产品相关,但它也有编程方面。



问题



我们在办公室的墙上有一个交通灯。当人们进入办公室时,他们可以从交通灯上立即知道昨晚的自动化建设,测试运行顺利:绿色表示所有测试通过,黄色表示一些测试失败,红色表示一些生成失败。



现在,三个电缆上有三个开关交通灯和有人必须手动切换这些每天早晨。



我有一些背景



我可以编写软件。我有一些焊接经验。我知道数字设计理论,但我从来没有建立一个物理设备。我手上没有很多时间。



问题



如何控制三



一些宽松的约束










b

  • 我不关心编写软件以控制串行/ USB端口的努力。

  • 说到这里,如果我不必写任何软件,只使用现有的工具。

  • 我不喜欢做任何焊接!我可以去其中一个爱好工具包,你把组件推入插槽等。或者也许它可以是玩具R我们的东西。

  • 我愿意购买一个现有的设备像




  • 。加上其前1/3组合的价格的1/3。更好的是,它们给你的库来控制它,所以编程是一件轻而易举的事。



    此外,如果你去eBay你可以让他们更便宜,尤其是如果你不介意使用现在的古董并行端口。我不认为你会得到图书馆。



    祝你好运


    This question is mainly electronics related, but it also has a programming aspect.

    Some background on the problem

    We have a traffic light on a wall in our office. When people come in to the office, they can immediately tell from the traffic light whether last night's automatic build & test runs went smoothly: Green means all tests passed, yellow means some tests failed and red means some builds failed.

    Right now, there are three switches on three cables hanging from the traffic light and someone has to manually toggle these every morning. I'm looking for an easy way to automate this process with a PC.

    Some background on me

    I can write software. I have some soldering experience. I know digital design theory, but I've never built a physical device. I don't have a lot of time on my hands.

    The question

    How can I control three 110V lightbulbs (or any device) from a PC with the minimum amount of effort (and investment)?

    Some lax constraints

    • I don't care about the effort to write the software to control a serial/USB port.
    • Having said that, it would be nice if I don't have to write any software and just use existing tools.
    • I prefer not to do any soldering! I can go with one of those hobby kits where you push components into slots etc. Or perhaps it could be something from Toys "R" Us.
    • I'm willing to purchase an existing device like an Arduino board.
    • It would be nice if I can get this done with just parts that are lying around. For instance, I have an old 2400Bd modem that I can take apart (though, that would probably be followed by some soldering).

    Update

    Similar projects that are mentioned in the answers:

    解决方案

    An arduino board seems like overkill for something this specific, espeacially if you aren't going to be using it with conjunction with anything else. Plus you are going to have to buy a variety of components or an arduino shield (specifically the relay shield) so it'll quickly add up, especially if you don't want to solder (you will be looking at about $120+tax for the arduino and the shield.)

    Since you are switching AC (the lightbulb) and the computer gives out DC, you will need relays. Also you will need to switch the relays with transistors as I don't think the output from serial or usb will output the mA you want.

    The easiest way to go about this is to use a USB relay board. Something like this would work great http://www.robotshop.us/phidgets-1014-relay-interface.html. Plus its 1/3 of the price of the earlier combination. Even better they give you libraries to control it so programming is a breeze.

    Also if you go on eBay you can get them even cheaper, especially if you don't mind using the now "antique" parallel port instead. I don't think you'll get libraries though.

    Good luck

    这篇关于用电脑切换多个灯泡最容易,最实用的方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆