Searching \ for '[PIC] PIC distorts square wave' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=pic
Search entire site for: 'PIC distorts square wave'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] PIC distorts square wave'
2007\03\19@032210 by Mohit Mahajan

picon face
Hello,

I have set up a webpage at http://mohitm.wetpaint.com/ which illustrates my
problem...

I have a PCB with a square wave generator that outputs a 1 V p-p, 1kHz
signal. Through different stages of buffering, amplification and
rectification, this (rectified) signal is fed into AN1 of a PIC16F870.

Without the PIC in its socket, the square wave generator products a nice
square wave signal. As soon as I put in the PIC, the signal changes. I have
tried a variety of components/PICs etc. but it doesn't help.

The circuit and the oscilloscope screens are shown on the webpage above.
http://mohitm.wetpaint.com/

I will request you to please give it a glance and if you can suggest where
the problem lies, I shall be grateful.

Thanks for your time,
Mohit.

2007\03\19@034014 by Jinx

face picon face
> Thanks for your time,
> Mohit.

Hi Mohit, does the signal come out of IC3B (it says COND1 on
that label but AN1 has COND label) ?

What are the values of C8, 13, 14, and is R4 10k or 10R ? Have
you tried removing those capacitors ? I'm not clear as to why you'd
want them on a square wave

2007\03\19@045449 by Mohit Mahajan

picon face
 > Hi Mohit, does the signal come out of IC3B (it says COND1 on
> that label but AN1 has COND label)
Yes COND1 -> COND. Eagle doesn't let you duplicate names, so the numeric
suffix.

> What are the values of C8, 13, 14, and is R4 10k or 10R ? Have
> you tried removing those capacitors ?
Since this was a prototype board and I wasn't sure what quality of
rectification IC3 would do, I put in C8, C13, C14 just in case I needed to
connect capacitors (of different values/sizes) to filter the rectifier
output. R4 and C8 would form a LPF. In the boards that were working
previously, and the present ones, C8 is 470uF; C13,C14 are not connected and
R4 is just a wire (0 ohm).

> I'm not clear as to why you'd want them on a square wave
Actually, IC3 rectifies the square wave to a signal that can be fed into the
PIC analog pin. And these capacitors are there to final-smoothen the output.


This is basically a conductivity meter. The Cell1/Cell2 dips into a
solution. Depending on the conductivity of the solution, the 1V p-p square
wave amplifies through IC4C. IC4D is for calibration. And IC3 for
rectification so that the PIC can read the analog signal.

Point is: I cannot understand why the square wave should get distorted by
putting in the PIC.

Thanks,
Mohit.


Jinx wrote:

Thanks for your time,
Mohit.


Hi Mohit, does the signal come out of IC3B (it says COND1 on
that label but AN1 has COND label) ?

What are the values of C8, 13, 14, and is R4 10k or 10R ? Have
you tried removing those capacitors ? I'm not clear as to why you'd
want them on a square wave

2007\03\19@050411 by Jinx

face picon face
> Point is: I cannot understand why the square wave should get
> distorted by putting in the PIC

What happens if you try a resistance in place of the PIC pin ?

2007\03\19@060041 by Mohit Mahajan

picon face
> What happens if you try a resistance in place of the PIC pin ?

You mean: R4 and then the PIC pin?.. I've tried 10R and 22R. No help.

Thanks,
Mohit.

2007\03\19@063336 by Jinx

face picon face
> > What happens if you try a resistance in place of the PIC pin ?
>
> You mean: R4 and then the PIC pin?.. I've tried 10R and
> 22R. No help

No, I mean a resistor to ground from the C8 side of R4, without
the PIC installed. A1 as a digital i/p should be very high impedance
(judging by the i/p leakage figure of 1uA) so I guess a few Mohm
might be representative

2007\03\19@071714 by Mohit Mahajan

picon face

> A1 as a digital i/p should be very high impedance
But its an analog input. And I just tried the resistor anyway. The
square wave remains as such. But changes shape with the PIC.

Mohit.

Jinx wrote:
>>> What happens if you try a resistance in place of the PIC pin ?
>> You mean: R4 and then the PIC pin?.. I've tried 10R and
>> 22R. No help
>
> No, I mean a resistor to ground from the C8 side of R4, without
> the PIC installed. A1 as a digital i/p should be very high impedance
> (judging by the i/p leakage figure of 1uA) so I guess a few Mohm
> might be representative
>

2007\03\19@072418 by Michael Rigby-Jones

picon face


{Quote hidden}

Nothing within the schematic would suggest a reason for this to occur.  The output of the square wave  generator is buffered by numerous op-amp stages before getting anywhere near the PIC.  This suggests to me that the fault is simply a construction/wiring issue, e.g. somehow part of the waveform generator circuit is accidently connected to one or more pins on the PIC socket.

Try removing the PIC and applying power to the circuit then probing all the PIC socket pins with your scope, any waveforms present apart from the pin that COND1 connects to would indicate a fault. A -1volt level on a PIC pin would be more than enough to turn on a protection diode and clamp the signal level to around -0.6v.

Regards

Mike

=======================================================================
This e-mail is intended for the person it is addressed to only. The
information contained in it may be confidential and/or protected by
law. If you are not the intended recipient of this message, you must
not make any use of this information, or copy or show it to any
person. Please contact us immediately to tell us that you have
received this e-mail, and return the original to us. Any use,
forwarding, printing or copying of this message is strictly prohibited.
No part of this message can be considered a request for goods or
services.
=======================================================================

2007\03\19@075926 by Jinx

face picon face

>  > A1 as a digital i/p should be very high impedance

> But its an analog input. And I just tried the resistor anyway. The
> square wave remains as such. But changes shape with the PIC.

Ah yes, you did say 1V wave. Have you got another square wave
source, like a signal generator ? Or maybe a PIC and a FET ?

2007\03\19@082024 by Mohit Mahajan

picon face
> Ah yes, you did say 1V wave. Have you got another square wave
> source, like a signal generator ? Or maybe a PIC and a FET
Okay, will give that a shot. I'll start up two different boards, one
only with the PIC and power supply. The other with the square wave
generator (but without its PIC). Connect the grounds of the two, to get
a common one. Will let you know shortly.

Thanks,
Mohit.

Jinx wrote:
>>  > A1 as a digital i/p should be very high impedance
>
>> But its an analog input. And I just tried the resistor anyway. The
>> square wave remains as such. But changes shape with the PIC.
>
> Ah yes, you did say 1V wave. Have you got another square wave
> source, like a signal generator ? Or maybe a PIC and a FET ?
>

More... (looser matching)
- Last day of these posts
- In 2007 , 2008 only
- Today
- New search...