A Simple Touch-Tone Remote Control System I recently needed a small controller to monitor a few inputs and operate a small number of outputs. The equipment would be located in a remote location so I had to be able to reach it in some wireless fashion. In the end, there was no WiFi, it was too far away to set up my own wireless link, there was no landline telephone and infrared wasn't an option either. I originally thought I might be able to use SMS messages on a cell phone but the old "non-smart" cell I had available didn't have a very useful interface to allow the monitoring system to send status messages or process an incoming text message to turn something on or off. A Google/Youtube search turned up several possibilities but no complete solutions. Here's what I did to set it up on a Professional Development Board. Most cell phones, even quite old ones, can be set to "Auto-answer" when a headset is plugged in to them. That was the first step. Then, I took the signal usually going to the earphone and fed it into a Touch Tone Decoder chip ( HT-9170). This let a tone sent from another phone anywhere to be processed by the decoder chip into a 4-bit pattern. The decoder also provides a handy "Data Valid" signal whenever a valid tone value is received. A Basic Stamp reads the tone signals and grabs the value whenever the "Data Valid" signal is active. Based on the received tone sequence, a set of inputs can be read or an output can be turned on or off. I settled on a 5-character string of codes. A typical string might be *358#. The * indicates that a control sequence is starting. The next tone is either 1 or 3, signifying "input" or "output". Next comes the "channel" identifier which I arbitrarily limited to 4,5,6,7 (5 in this example). Once a channel is chosen, an 8 is entered to turn "on" or 9 is entered to turn "off". Finally, a # is entered to act as an "end of transmission" signal. Now, this is fine, particularly in the operating of the outputs. But, the astute reader will question how the status of the inputs are relayed to the distant operator. It's all great when you're standing 4 feet away from the system using a mobile phone and able to see the system in action, but what about when you're on the end of a landline miles and miles away? The answer was to use the Stamp's ability to generate the full range of Touch-Tone signals and make them audible. By placing the cell phone headset microphone where it can hear the Stamp's tones, the operator on the phone can hear what's going on at the site. With this system, the operator can be certain that each keypress is being "heard" by the Stamp and can be given information as to the status of inputs. (two short beeps for on, two long beeps for off, for example). A special sequence tells the operator that the start of sequence has been accepted. In setting up the system, two modifications were found to be useful. The first was to immediately go to the input status routine as soon as the "1" was seen rather that wait for a channel to be selected. Now, the four inputs are reported in quick succession automatically with two short beeps meaning "on" and two long beeps meaning "off". Assume that input 1 and 3 were on. The listener would hear beep-beep, beep-pause-beep,beep-beep, beep-pause-beep to reflect the on, off, on, off status of the inputs. Secondly, even though each change of state of an output gives the short-beep, long-beep status of the output just affected, I took the 4 inputs and connected them to monitor the outputs directly. With this connection, an input query gives the status of all the outputs with a quick read of the inputs. Because I happen to have a BS2p-40 installed in my Development Board, I could still have another set of inputs for switch inputs and read them either by extending the current input routine or making a second input routine. A schematic of the system built on a Professional Development Board and a YouTube video of the system being tested is availble.