02-14-2013 03:53 PM
Hello,
I have a question on handling output signals from a PIC16F84. It seems like Multisim's simulation doesn't work properly - but before I blame Multisim I would like to ask the NI community or NI's software engineers for a solution. Because I am German you are welcome to continue this thread in German if this is allowed by the forum's rules. If you should need further information to analyze my problem I will be happy to provide it.
The circuit itself should convert "pulse dialing" signals to "tone dialing" (DTMF tones). So you can get old, classic telephones working on newer devices that do not support "pulse dialing" anymore.
The circuit is line-powered by the loop-current of the analogue telephone line.The PIC is supplied by a rudimentary voltage regulation and counts the impulse signals (voltage breakdowns / current interruption on the phone line). After that the PIC translates the series of impulses to their equal number (e.g. 3 impulses = number 3). Finally the PIC gives out the two signals with different frequencies needed to generate a DTMF tone (e.g. for number 3 these are 697Hz and 1477Hz). As you can see in my attached PDF file this works fine.
Now I have to convert the rectangle wave given out by the PIC to a form that is at least similar to a sine wave - otherwise the device which is receiving the DTMF tones will not understand them.
So I connected a lowpass filter at the output of the PIC. Now you would expect the rectangle signal to be smoothened in a way like the "e-function" goes (loading / discharging a capacitor through a resistor). But the results are far away from that - as you can see I get very strange curves.
When I set up a frequency generator with the same output signal as the PIC and the same lowpass-filter I get curves as expected.
So we can say that the output of the PIC works as a frequency generator in my circuit. But why does the filter not behave like it should?
I have already tried a lot of different values for my RC-filter and simulation settings - this didn't fix the problem.
It would be nice if someone has a an idea how to fix this.
Thank you.
Solved! Go to Solution.
02-14-2013 07:36 PM
The output impedance of the PIC may be too high. Can that output drive 50 ma?? Try scaling the impedance of the filter. Make the resistor 10000 ohms and the capacitor 10 nF.
Lynn
02-21-2013 04:21 PM
Hi Lynn,
thank you very much for your advice that helped me to solve the problem. You are right, we are coping with AC-values here so the output impedance is important. I had only checked the DC values of the PIC thus not taken care of its impedance. I think it is not a common application to use the PIC as a programm-code-controlled frequency generator - mostly it is used for switching or other logical purposes. So output impedance values isn't given that much attention in the data sheet (I have only found a rough one named "high"). To solve the problem I have added an impedance changer built with an OP AMP at the PIC's outputs. As you can see now the low-pass-filter works as it should.
02-21-2013 07:59 PM
That may work in simulation but it would not work in hardware - for the same reason. With your 4.3 V logic signal the op amp output current at the instant of switching would be 43 mA >> 16 mA the LMC6062 can source.
If you want to learn to design circuits, you need to keep load impedance and source current and voltage limits in mind.
Lynn
02-21-2013 08:18 PM
You are right about that Lynn, it is a rudimentary impedance changer just for testing purposes. Referring to the current problem I should mention that the whole circuit can get a maximum of ca. 13mA due to limits of analogue telephone line powering. In multisim I have measured maximum values from 8 - 9mA flowing through the circuit. As soon as I have a prototype bulit up with real components I will post my results here.