Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Activating Electrical Device using Micro-controller

Status
Not open for further replies.
I'm trying to activat/de-activate a SINGLE electrical device using a PIC and control commands from a standard DTMF telephone set. I have found a circuit diagram and explanation of how it works but don't understand what is taking place after reading through it. Can someone give me the circuit diagram for activating just ONE electrical device instead of the four shown in the diagram of the link attached please?. Thanks.

Device Control Using Telephone: ElectroSofts.com
 
I'm having trouble following the diagram for the four electrical devices that the article is trying to activate/de-activate...so if anyone can reduce it to just one device to activate/de-activate, i think i would be able to better follow the explanation that is given.
 
Device Activation

Hi,

Thanks for the link but I'm not using the phone transformer and audio in/audio out as part of my circuit. I'm using the TIP and RING connected to the DTMF decoder MT8870 which then feeds to the brain, the PIC18F458. From here i don't know what to do in order to activate/de-activate the external electrical device. Like count 4 rings and then open the line for the user...then wat?

Could i use like a non-volatile EEPROM memory module to store a valid 4-digit combination to be used as the user ID that wants to access the electrical device? Then, once a valid cose is entered, a correct sequence must be entered like *1# to turn the device on and a *2# to turn it off?

The only problem with this, if this can work, is that how would the person know if he/she was successful in activating/de-activating the device desired...A beep tone is usually used to indicate to the user that his/her code sequence was correct. How do i implement this beep tone verification for the user wishing to activate/de-activate the electrical device using the PIC as the main device for control?
 
You need the transformer else it may imbalance or load the line. Phone companies hate when folks hook up homemade stuff to the lines and it may be in violation of your phone contract.
 
Thanks for the link but I'm not using the phone transformer and audio in/audio out as part of my circuit. I'm using the TIP and RING connected to the DTMF decoder MT8870
You really should use a transformer. As a rule, most telephone companies don't like it when your circuit isn't isolated from the line. The circuit you originally posted violates this rule.
which then feeds to the brain, the PIC18F458. From here i don't know what to do in order to activate/de-activate the external electrical device. Like count 4 rings and then open the line for the user...then wat?
Then a beep prompt to tell the user to enter his DTMF over dial codes.
Could i use like a non-volatile EEPROM memory module to store a valid 4-digit combination to be used as the user ID that wants to access the electrical device?
You could also used the built in EEPROM memory of the PIC18F458 which has 256 bytes available for this.
How do i implement this beep tone verification for the user wishing to activate/de-activate the electrical device using the PIC as the main device for control?
The diagram I posted above showed how it is done without a MT8870. You could use the same technique using the MT8870 in place of the MCP6022 on the analog side of things.
 
You need to design the circuit as two parts,One is Ring counter & the the is the tone decoding part.

For the Ring counter u need to use a simple timer like 555 (monstable) to detect the number of rings & off hook the phone via a suitable resister.For this 555 you need to couple the phone lines using some isolators.

For the tone decoding part I use an external interrupt pin connecting to detect the steering bit(flag).& if its a valid steering flag then read the binary output of 8870 & make the decision.

Some psuedo

*Poll for Ring Detection (555 output).
*Activate the PIC output relay (this is to place the resister on the phone line to make it off hook)
*Poll for steering bit (8870) & if it is valid then read the 8870 outputs
*Take action (switch on & off outputs)
 
Designing the ring counter and tone decoding

Hi,

How do i know what values to use for the ring decoding and tone decoding parts? How to calculate the values to use. What is the principle or theory behind the calculation of the values to be used?...

For the DTMF decoder stage...I'm using the differential input configuration instead of the single DTMF IN configuration so i have to choose resistors according to the desired gain i want for my system but how do i know what capacitor values to use?...Should i just use the values given in the MT8870 datasheet?...I'm from Trinidad and we used the Standard DTMF-2500 telephone set that is also used in the United States. I have no idea what to do for the capacitor and resistor value for the ring detection part.

How did they calculate the values that is used in the articles attached?...Namely the values for the "Optical isolation circuit" from the "Activating an electrical device.pdf" and the "DTMF decoding" as well as the "Ring detection" sections from the article "CK603.pdf"
 

Attachments

  • Activating an electrical device.pdf
    412.3 KB · Views: 487
  • ck603.pdf
    49 KB · Views: 358
Wire it up like figure 4 in the pdf you posted except sub your PIC18F458 for the ancient 16F84A. The only thing left for you to do would be to write code for the PIC18F458.
 
The ring counter could be any counting IC - 4017, 4020, 4040, 4059, 4060 to name a few. For DTMF decoding, the LM567 tone decoder is designed for this purpose, and can drive a relay or opto for your circuit.
 
Using LM67 Tone Decoder

I researched some articles on google after reading the datasheet for this decoder and i'm not quite sure of its operation due to limited time on my hands at the moment to switch to this decoder. The relays that would be activated by this decoder would automatically be turned on after a specified number of rings is reached?

I want to activate relays but have security with whoever is turning on the specified relay to activate a particular device to which it is attached. Like when the specified number of rings is reached, the user calling the particular phone to which the relay is attached should then have to enter a correct code sequence to activate the electrical device attached to the relay else, activation of device is denied. Thus, i think using the MT8870 together with the PIC18F458 would be the proper design choice over the LM567 not so?
 
Thus, i think using the MT8870 together with the PIC18F458 would be the proper design choice over the LM567 not so?
Yes! :D
Using the MT8870 will be 100x easier since you are interfacing with a PIC.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top