Alright so we have a computer setup at our fire station that is connected to a scanner, and running two tone detect to alert all our personnel when a call goes out.
Is there a way to use a batch file (triggered by two tone detect) through the computer to trigger a relay? I want to use a relay to trigger strobes around the station, but just need a way to output just enough current to turn a relay on and then off.
Anyone have any ideas?
Preferably low cost since we are volunteer and have very little money.
Thanks!
If you want to go really cheap and hackish, you can use the RTS pin on a serial port to activate a relay. It takes a little extra circuitry though.
Here's a page that shows the schematic (you can omit the LED if you want).
If your computer doesn't have a serial port, you can use a USB to serial adapter.
By default, the RTS pin is "low" (negative voltage). When the serial port is opened, it goes high. You can write a program in python or some other language that opens the serial port for a certain amount of time and then closes it. That will turn the relay on for that amount of time and then turn it back off. If you're not into programming, here's a hackish way to do it with a batch file:
The command "echo AAA > COM1" will open up COM1 (serial port), send the characters "AAA" out the serial port, and then close the serial port. Normally the serial port defaults to sending at 9600 bits per second (bps). Each character that gets sent is one byte (8 bits). So sending "AAA" is sending 24 bits, which takes .0025 seconds. By adding more characters to send, you can increase the time that the serial port (and therefore the relay) is on. So if you wanted to have the relay on for ten seconds, you'd need to send 12000 characters. So in your batch file you'd put: echo [12000 letter "A,s"] > COM1.
Of course you'd replace COM1 with whichever COM port you happen to be using to control the relay.
Andy