Control Hardware through Software
-
Hi guys, I'm trying to do a very simple project where I can turn a light on and off via a software component. For example, when a mail message is received in a critical queue a light mounted on the ceiling blinks on and off in a certain pattern. It sounds so easy but I have no idea where to start. I'm not sure how I can connect a tangible object with physical mass (Light fixture) to a logical object such as software (PC). Can anyone recommend a kit or something like that where I could have a USB or Serial port connected to a circuit board which then in turn connects to a light switch or something to that effect? I think codeproject has some articles on how to talk to a serial port in c#. Thanks
-
Hi guys, I'm trying to do a very simple project where I can turn a light on and off via a software component. For example, when a mail message is received in a critical queue a light mounted on the ceiling blinks on and off in a certain pattern. It sounds so easy but I have no idea where to start. I'm not sure how I can connect a tangible object with physical mass (Light fixture) to a logical object such as software (PC). Can anyone recommend a kit or something like that where I could have a USB or Serial port connected to a circuit board which then in turn connects to a light switch or something to that effect? I think codeproject has some articles on how to talk to a serial port in c#. Thanks
-
I think, what you need is : http://www.codeproject.com/KB/cs/csppleds.aspx[^] It used LPT...
Holy Cow! Thanks!
-
Holy Cow! Thanks!
Since most PCs nowadays don't have a parallel port any more, it may be useful to know you can do similar things with a serial port; on a typical DB9 connector there are some 5 so called control lines; some are inputs to the PC, others are outputs. And you can observe the inputs and control the outputs using the SerialPort class, once you have opened the appropriate port. You will find several relevant articles on CP about this. BTW: if you are not really familiar with electronics, I strongly recommend you experiment with a USB-to-serial cable; that way, when you damage the goods, it is just that cable that has to be replaced, not your I/O card or mother board. :)
Luc Pattyn [Forum Guidelines] [My Articles]
Voting for dummies? No thanks. X|
-
Since most PCs nowadays don't have a parallel port any more, it may be useful to know you can do similar things with a serial port; on a typical DB9 connector there are some 5 so called control lines; some are inputs to the PC, others are outputs. And you can observe the inputs and control the outputs using the SerialPort class, once you have opened the appropriate port. You will find several relevant articles on CP about this. BTW: if you are not really familiar with electronics, I strongly recommend you experiment with a USB-to-serial cable; that way, when you damage the goods, it is just that cable that has to be replaced, not your I/O card or mother board. :)
Luc Pattyn [Forum Guidelines] [My Articles]
Voting for dummies? No thanks. X|
Ah.. great advise. Any chance there is an aftermarket kit that I could purchase on the hardware side that could demonstrate how this 120v lamp connects to a circuit board and then from the circuit board to the serial/parallel/usb port on the PC?
-
Hi guys, I'm trying to do a very simple project where I can turn a light on and off via a software component. For example, when a mail message is received in a critical queue a light mounted on the ceiling blinks on and off in a certain pattern. It sounds so easy but I have no idea where to start. I'm not sure how I can connect a tangible object with physical mass (Light fixture) to a logical object such as software (PC). Can anyone recommend a kit or something like that where I could have a USB or Serial port connected to a circuit board which then in turn connects to a light switch or something to that effect? I think codeproject has some articles on how to talk to a serial port in c#. Thanks
For USB based control and measurement of external devices I'm a big fan of the miniLAB 1008[^] 2 10 bit analog outputs 4 12 bit analog inputs or 8 11 bit single ended 28 dio Slight overkill for just turning one device on and off (for which you would need to use the miniLAB to switch a relay), but should you progress to analog contol and measurement or decide to control several devices it's pretty cheap and very easy to set up and use. No doubt there are loads of other similar bits of kit - I've just had a lot of success with these.
-
Ah.. great advise. Any chance there is an aftermarket kit that I could purchase on the hardware side that could demonstrate how this 120v lamp connects to a circuit board and then from the circuit board to the serial/parallel/usb port on the PC?
Hi, don't know what is available in your area. the link Alex provided also has "high voltage" stuff, things that would control 120/230V equipment. DIY stuff would be cheaper, provided you get it right from the beginning... :)
Luc Pattyn [Forum Guidelines] [My Articles]
Voting for dummies? No thanks. X|