February 8th, 2004, 11:41 AM
LED sensor for equipment state info?
I'm using Girder to control my HTPC/projector/DTV receiver/amp
setup. Amazing what can be done.
The projector has discrete codes for on & off (RS232 control), but the
DTV box and amp have the usual IR toggle code. Any missed
signal from the USBUIRT causes the devices to get out of sync.
Does anyone make a serial, parallel, or USB device which you stick
over a power LED to allow reading on/off state info from the PC? Or
maybe a homebrew project?
February 8th, 2004, 12:02 PM
There are many ways to do this. Look at smarthome.com and browse some of the things they have.
I have found that occasionly there are ways around this.
For instance, my dvd player always turn on when I press the eject button. So to turn it off, I send the commnad to open/close the tray and then send off...
My VCR always turns on when I sned the play command...
So check out some of those options
February 8th, 2004, 03:46 PM
This can be done -- I've actually been thinking about this for a future project -- but the way I've looked at it, it is a somewhat complex hardware project to interface with Girder.
First, over the LED you will need to put an LED detector probe, like one of these: http://www.smarthome.com/8013.HTML
The LED detector probe would plug into the quad digital breakout BOB box: http://www.smarthome.com/1622.HTML
The LED detector probe is meant for the BOB box. The BOB box, when the LED detector probe detects an LED being on, turns on one of the output lines to five volts.
So, then the issue becomes how do you interface the BOB box with the serial port so that you can use the serial port plug-in of Girder. There are two ways that I can imagine:
1) You should be able to directly hook up the the probe lines from the BOB box directly to the serial port, and write a script to discern when the BOB box is putting out the 5 volts. This approach I'm not sure about, because I haven't directly done anything like this. Furthermore, serial port lines usually function with 5-12 volts on a line signalling one state of a bit, and minus 5-12 volts on a line signalling another state of a bit. You would be able to have one of these two states, but the BOB box would put out 0 volts on the line otherwise, which would be an undefined state.
2) The other approach, which I would probably do, is to hook up the output lines of the BOB box to a sensitive relay, like this one: http://www.elkproducts.com/products/elk-924.htm. This relay responds with as little as 5 volts, and as little as 1.2 ma. Then, you would hook up a serial port to the output of the relay to basically detect closure of the relay -- i.e., you would use the serial port plug-in switches device file to detect whether the relay is on and off. I've used the switches device file to detect relay activation, and so I know that this approach works.
February 8th, 2004, 03:53 PM
I should mention that there is one other way, but it requires some surgery to the device you're monitoring. Open up the device that has the LED, and monitor the voltage over the LED with a voltmeter. Also monitor the current of a circuit in parallel with the LED. If it's sufficient, you should be able to hook up a circuit in parallel to the LED and directly wire in the relay that I referred to in my previous post, so that when the LED is on, the relay is on, and then you can detect the relay via Girder. If the current is insufficient (less than 1.2 ma), then worst case scenario is you'd have to chop out the LED, and wire in your relay circuit in place of the LED, so that you can use the full LED turn-on current yourself, instead of having to share it with the LED.
February 11th, 2004, 01:02 AM
in terms of what you were saying with the sensor to see if it was on or not you can do the following.
Get a photo-resistor (i forget if that's really what it's called it's kinda late) what it does is when it sees light the resistance goes up and when there is less light the resistance decreases. So you use that in combination with a comparitor circuit. So you give the comparitor like 5 volts lets say and then you make the circuit with the photo resistor = 5 volts when the circuit is dark meaning it's not sensing light from the piece of equipment. THen whenthe equipment turns on it will sense light the voltage will differ and the comparitor will change states. THen use the girder plugin for the serial input with the 4 or 15 switches. Let the comparitor be hooked up to a transistor and that will open or close the state of a switch and the girder serial pluging will be able to catch the change in state.
This is a rough explination. Do a little searching and you can have it running in a few hours.
February 11th, 2004, 06:35 AM
Thanks to everyone for the suggestions. SmartHome does have
exactly the sensor required, along with others that sense video,
current draw, etc.
A homebrew project with easy-to-find parts from Radio Shack hooked
into the serial or parallel port is certainly possible and less expensive.
The simple answer for me ended up being that my device actually
*did* support discrete on/odd codes. I search the various JP1 and
Pronto forums until I found codes which could be imported into
the USBUIRT plugin.
Thanks again to all.
August 2nd, 2005, 10:59 AM
I've come into a need to do this. Can someone provide more detail or links on how to build this?
Specifically, I'm not clear on the interfacing to the computer part. The BOB seems to be discontinued?
I'd appreciate any advice