/Projects/Phoneline controller v2

This is a newer version of previous device with a single relay. This one can have up to 6 relays and 6 sensor-state inputs.
The task was to build a device that connects to the phone line and has a relay as an output switch. It should also sense if the connected «consumer» is turned-on or off and report to the administrator at the other end of the phone line. The administrator would then call-in the device, log in with the password, and check the state of «consumer», turn it on or off, change password or some other settings.

This version has 6 relays.

plcv2pic1

Operation

The administrator should call-in the device from another telephone. After a few (configurable amount of) rings, the controller will pick-up the line and answer with a beep. After the beep the administrator must enter 4-digit password onto the keypad of his phone (DTMF). This must be done in 6 seconds. If the password is not entered in 6 seconds or wrong password has been entered, the device will beep and hang up. You can call it again now.

After the password has been successfully entered, you will hear one beep. Now you must choose which relay you want to operate (1 – 6), so you can press:

- 1, 2, ..., 6 – enter relay «bank»
- # – end session (hang up)
- any other key will result in 5 beeps (invalid command)

After pressing 1...6 you will hear as may beeps as the button value you pressed. Now you have entered a relay's bank. After a short break, you will hear two beeps or three beeps. Two beeps means that the «consumer» is turned on (detected with «sense-input» if controller configured for «pulse-mode») or that the relay is turned on (if controller configured for «switch-mode»). Three beeps means that the «consumer» or the relay is turned off.
After those two or three beeps you can press:

- 1 – turn on relay (if configured for «switch-mode») or pulse the relay for N (configurable) seconds (if configured for «pulse-mode»)
- 0 – turn off relay (if configured for «switch-mode»)
- * – enter settings for current bank
- # – end session (hang up)
- any other key will result in 5 beeps (invalid command)

After pressing 1 or 0 the relay will do it's job and you will hear two or three beeps after it has finished pulsing or turning on or off the relay. We know what those two or three beeps stand for from above.
After pressing the pound key (#) the controller will not hang-up, it will return to the main menu. Now you can chose another relay to work with, or you can press the pound key (#) again to exit/hangup.
After pressing the star key (*) the device will enter setup. You will hear 2 long beeps and now you have these setup options:

- 1 – configure after how many rings the controller will answer a call (1 – 9, 0 (for 10), * (for 11), # (for 12))
- 2 – set the type of the system: pulse or switch – mode (1 - pulse, 2 - switch mode)
- 3 – the length of a relay pulse in seconds (1 – 9, 0 (for 10), * (for 11), # (for 12)) if configured for pulse-mode
- 4 – set the new 4-digit password (* and # can also be used for password)
- # – exit setup, allways saving changes

After entering any of those options you will first hear 2 long beeps followed by as many beeps as the chosen option-number. For example: If you press setup option 1, you will hear beeep-beeep-beep indicating that you entered setup option 1 (this single shorter/quicker beep).
After entering an actual value in setup option, you will hear a short confirmation beep, followed by those two long beeps from entering the setup. Now we are back at the beginning of the setup and can choose again from the setup options above.

plcv2pic2

The device will remember the relay state even after power-down. When the power get's back on it will put the relay into previous state before the power was lost.
There is also a timeout timer so that if you hang-up before the controller, it will keep the phone line occupied for about 35 sec and than hang-up.
If you ever forget the password, you can press the «reset_sw» switch. This will reset the password to the default value «1-2-3-4». The button only operates if the controller is in idle state. For example: waiting for a call...

Modifications
If you don't want to connect electrical «consumer» that operates on mains voltages, you might want to change the value of resistor at the «sense-input» from 47k to less than that or whatever you might need this detect-circuit for:

c_507_phonecontroller_sens_pic

Author (sent by): Trax

Download counter: 7,259

Rating: (2.92, votes 3488)

Vote:

Date: 14-01-2008

Lokalna verzija ove stranice: Telefonski kontroler v2

508_PhoneLineController_6.rar

Bookmark and Share Comments (23)

comment [23]

I want to use it as a reference
IP: 180.191.135.16

comment [22]

Sir, Can I see you program
IP: 180.191.135.16

comment [21]

I simulated the ring detector circuit on Multisim and obtained the output like what you described. We haven't observed the actual output of the curcuit with an oscilloscope but I hope we get the same results. Thank you.
IP: 180.191.79.65

comment [20]

It is always +5V except when phone is ringing. When this circuit detects RING, it will pulse the optocoupler output from 5V to 0V rapidly. Why don't you try it?
IP: n/a

comment [19]

the measurement of voltage should be between the 5 and 4 pins of the optocoupler, right? the +5V Vcc to optocoupler, has its ground common to the ground presented on pin 4? Its always 5V if your try to see the schematic?
IP: 180.191.130.244

comment [18]

Your measurements are wrong, you will get pulsed output here so it will go from 0V to 5V very fast which on instrument will read around 3V as you measured. Try connecting oscilloscope and see the signal at the optocoupler output.
IP: n/a

comment [17]

Thank you sir. I have experimented with your circuit for the ring detection.It seems that the ouput is a constant 5V when the telephone is not ringing. And when then telephone is ringingit is ping to about 3.7ish V. But the problem is that this logic level can still be considered high, therefore I can't get pulses for this? How did you manage to detect the ringing?
IP: 112.198.242.94

comment [16]

Hi, I used simple pin-toggling to generate the sound. You can use PWM for this purpose, and circuit to inject the signal into the phone-line just like I used it.
IP: n/a

comment [15]

Sir, what algorithm did u use to generate beep tones?
IP: 180.191.134.243

comment [14]

Well, there is a ring detector circuit and after PIC detects 3 rings it will turn on relay which opens the line. After that, DTMF communication starts...
IP: n/a


Comment page: 123>


add comment

name

e-mail (will not be published)

website

How much is = also add letter "a" at the end of your result! Eg.: 7a

Please log-in!

You can log-in on forum link: Login page. After logging-in, return to this page and click refresh in your browser.

site friends

sponsored links

ads