DTMF controller needs momentary output

Thread Starter

haxxx

Joined Feb 14, 2009
35
I bought a DTMF controller the schematic of which i've attached.
The four transistor outputs (Q1-Q4) go high and stay high
on tone detection, instead of the pulse I require.
They return to low only when the power to the controller is reset,
so i'm trying to find a delayed reset for power after the relay executes its contact closure. Please see the attached circuit i drew, will this work, if not,
any suggestions?

Haxxxx
 

Attachments

SgtWookie

Joined Jul 17, 2007
22,230
Instead of trying to re-set the DTMF decoder, why don't you just monitor DV?

DV stays low until a valid tone is decoded, then DV goes high, and stays high until there is no input tone, then DV goes low. The D0-D4 outputs remain latched.

Set an interrupt to look for the rising edge of DV, then save whatever is in D0-D4 in the uC, and you're done until the next rising edge of DV.

Powering the IC down and back up again won't work if a tone is long.
 

praondevou

Joined Jul 9, 2011
2,942
You don't need to time delay the relay driver circuit, it also wouldn't work.
The relay driver signals come from the MCU so why don't you just reset the microcontroller?
In the schematic pin 20 of the MCU (reset) is open, is that true? According to the datasheet it's bidirectional and it's internally pulled up to Vcc. So the only thing you'd need to do is after one of the RELAY_X signals goes HIGH after a certain time you pull down the RESET pin to GND.

Tell us if you want to do this and we think of something.
 

Thread Starter

haxxx

Joined Feb 14, 2009
35
You're right Praondevou, I bought it online, no access to firmware.
you're method of temporarirly pulling the reset pin low seems to be the way to go. what is the best method for doing that?
 

praondevou

Joined Jul 9, 2011
2,942
You're right Praondevou, I bought it online, no access to firmware.
you're method of temporarirly pulling the reset pin low seems to be the way to go. what is the best method for doing that?
Well the easiest method that comes into my mind is using an OR gate with 4 inputs, after that a time delay RC and an schmitt trigger inverter. The schmitt trigger level for LOW to HIGH transition will be at approx. 70% of VCC, so with 47k and 22uF that's 63% @ 1 second, so these values give you a bit more than a second. You could adjust them to your needs.

The circuit uses 2 ICs which is not good I know but I'll post it anyway until I have a better idea.

As soon as one or more relay outputs of the MCU goes HIGH the capacitor is being charged until the schmitt trigger is activated and the the MCU is reset.

EDIT: if using this circuit there needs to be a diode towards the schmitt trigger gate output, since on power-up the reset pin of the MCU is actively being pulled to LOW.
 

Attachments

Last edited:

praondevou

Joined Jul 9, 2011
2,942
@haxxx
First, can you test if resetting the MCU (manually) yields the desired effect?

Some output ports may not be affected by an external reset.
 

praondevou

Joined Jul 9, 2011
2,942
Ok, this one uses 1 IC. As I said, first try manually if the chip really resets the relay outputs when you pull the RESET pin to GND.

See section 8.4.1 of the Freescale datasheet.
 

Attachments

SgtWookie

Joined Jul 17, 2007
22,230
One thing about resetting the uC; it's also controlling three relays, and I have no clue what they are doing. If you reset the uC, it'll likely go through an initialization routine that will change the relay state to some default.

Are you using the DTMF signals externally? I'm curious as to why you want them to only pulse once.

Rather than try to re-set the DTMF decoder or the uC, it could be easier to run D0-D3 through another latch that's tri-state; just set the outputs to high impedance and have pull-down resistors on them. The DV will tell the latch when to load the data in and turn the outputs on. You could then either wait for DV to go low, or have a timer turn on the output for a period.
 

praondevou

Joined Jul 9, 2011
2,942
Rather than try to re-set the DTMF decoder or the uC, it could be easier to run D0-D3 through another latch that's tri-state; just set the outputs to high impedance and have pull-down resistors on them. The DV will tell the latch when to load the data in and turn the outputs on. You could then either wait for DV to go low, or have a timer turn on the output for a period.
Wookie, I don't get it. Could you elaborate?

There are 4 relays and apparently they turn on when a tone was detected. And then they stay on until you turn off/on power to the device. That's what the OP doesn't want, he wants a pulse of (unknown) length. Then he wants the relay to turn off. If the PIC, once a tone was detected keeps the output always activated, then I need to reset the PIC.

Although I do not understand what means:
"The four transistor outputs (Q1-Q4) go high and stay high
on tone detection, instead of the pulse I require."

Does that mean the collector is high (relay is off) or does it mean the relay is on (that's what I thought)?

I imagine the PIC turns on a certain relay depending on which tone was detected.

If I send a different tone later, will it turn off the first relay? In this case I wouldn't have to reset the PIC but to put a delay on the PIC relay driver output.

There is some information missing on what else this thing does and how it behaves.

@haxxx can you inform the model/type of this dtmf decoder or send the manual?
 

Thread Starter

haxxx

Joined Feb 14, 2009
35
I've placed led's on the collector of all 4 transistors so i have a visual.
each transistor turns on when its specified tone is received (LED lit, relay latched). As I said earlier what i need is a momentary contact closure(1 sec) then relay turns off. I can now confirm that pulling the reset pin low
resets any of the lit LED's so i will go with that option, Your second circuit looks daunting, i'd rather go with the first one, once it will work, and i already have quad OR gates and inverter chips with schmitt trigger inputs.
By the way sending a tone 1 turns on relay 1 without affecting any other relay. they can each be turned on and off individually. If u have the time to explain ur second circuit i'm all ears. Model is Ramsey dci1c.

thanks,
Haxxx
 

praondevou

Joined Jul 9, 2011
2,942
Your second circuit looks daunting, i'd rather go with the first one, once it will work, and i already have quad OR gates and inverter chips with schmitt trigger inputs.
The circuit with the 40106 works like this:

Normally the four inputs on the left are LOW (outputs from MCU). Diodes are not conducting, the input to U5E is HIGH, it's output LOW, the capacitor discharged.Output of U6F is HIGH, therefore the RESET pin on the MCU continues HIGH.

When one input on the left goes HIGH the corresponding diode conducts, pulling the input of U5E LOW, it's output HIGH. This charges the cap and after reaching the schmitt trigger threshold level of U6F, it's ouput goes LOW, thus pulling the MCU's RESET pin LOW.

you can also put a diode (pointing backwards as in the other schematic) with a lower resistance in series in parallel with R2 to discharge the capacitor faster.
 

SgtWookie

Joined Jul 17, 2007
22,230
Wookie, I don't get it. Could you elaborate?

There are 4 relays and apparently they turn on when a tone was detected. And then they stay on until you turn off/on power to the device. That's what the OP doesn't want, he wants a pulse of (unknown) length. Then he wants the relay to turn off. If the PIC, once a tone was detected keeps the output always activated, then I need to reset the PIC.
I see. OK, I didn't know where the OP was getting their output from; if it's the relays, then the uC will need to be reset. If it were from U3, the DTMF decoder, outputs D0-D3, then that data could be sent through a latch that had 3-state outputs; the loading and output enable would be controlled by the DV (data valid) via one-shot timers and/or RC delays to give the pulse width that the OP desired. This also avoids the possibility that a long tone would be detected more than once if you re-set the MCU. However, if they are having trouble understanding the 40106, the latch and timing would be a bit much.

Although I do not understand what means:
"The four transistor outputs (Q1-Q4) go high and stay high
on tone detection, instead of the pulse I require."
I don't know either. I would think that Q1-Q4 would be selected to represent bits D0-D3 from the DTMF decoder, but I really don't know what those relays are for.

I imagine the PIC turns on a certain relay depending on which tone was detected.
Me too.

BTW, your 40106 circuit looks OK for the intended use, as long as the output was long enough for the OP.
 

praondevou

Joined Jul 9, 2011
2,942
would a 74hc14n hex inverter work ok.
Yes, it will work the same way, it's a schmitt trigger too.

Please not that a schmitt triggers thresholds are not absolute values, they depend on the supply voltage and change from IC to IC, if you need an definite output pulse width, you'll need a different circuit.
 

Thread Starter

haxxx

Joined Feb 14, 2009
35
essentially what i need is the time it would take to manually push a button 1/2 to 1 second, a little more or less won't hurt.
Thanks a lot, let u know how it goes.

Haxxx
 
Top