Searching \ for 'What is a good capacitive value with a 2.2k resis' 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/index.htm?key=what+good+capacitive
Search entire site for: 'What is a good capacitive value with a 2.2k resis'.

Truncated match.
PICList Thread
'What is a good capacitive value with a 2.2k resis'
2003\02\02@160029 by Russell McMahon

face
flavicon
face
> Could anyone recommend a good capacitive value used with a 2.2K resister
> to filter out noise.  I have some limits switches which are NO and
> connected to a 2.2K pullup resistor.  However the moment the limit
> switches are closed to ground, they cause my PIC processor to reset.  I
> am thinking that the limit switches are somehow picking up some high
> frequency noice, which is not appearing on my 20MHz scope.  I know that
> the pins are set for input mode, so it is not shorting the system.

What you describe is rather strange and suggests some other problem.
If you are in a "normal" environment this would be an extremely unusual
occurrence. Check carefully that eg switches really go from pins to ground,
ground return is same as PIC ground etc. Have you got any power supply
decoupling on the PIC eg 10 uF or 100 uF Vdd to ground capacitor? What is
your power supply.

IF the switches are some distance from the processor on long wiring runs
then voltage pickup is more likely. If so, firstly repeat the test with
switches with very short leads adjacent to the PIC. If this works OK then
you noise theory sounds more likely.

Assuming remote switches and long leads. First ensure switches have a 2 wire
connection back to PIC ie do NOT use eg equipment ground as earth return.
Connect via a twisted pair of wires (this balances induced noise in each leg
so that they cancel).

The time constant of an RC circuit is T = RC
so C = T/R
In this case it's not the 2k2 that you want to use as your R but a
resistance in the noise supplying circuit.
Try this:
   - Place a 1k resistor in EACH leg of the wires going to the limit
switch - resistors located at the PIC. end.
   - Place a 0.1 uF capacitor across the PIC to ground connection (where
the two resistors reach the PIC and ground).
   - Use a 100k pullup resistor.
Time constant is now 2k x 0.1 uF = 200 uS to discharge the cap
and
100k x 0.1 uF =     10 ms to charge the cap.

You could use values which are closer for charge and discharge R's but have
to ensure that the input circuit properly pulls the circuit to a logic low.

A larger capacitor within reason won't hurt. eg a 1 uF or even a 10 uF for
test purposes. The 10 uF/100k will have a 1 second time constant so will be
no good in "real" use (and the PIC prefers not to have such a slow
transition) BUT this will show you if your problem is noise.

BUT FIRST - do perform the test with a switch right at the PIC and no long
leads. If this fails then you are doing something else wrong that you
haven't described here.



       Russell McMahon

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2003\02\02@161857 by hard Prosser

flavicon
face
Be careful if putting big caps directly across a small switch. The cap will
charge up when the switch is open & then discharge with high current
through the switch when it is closed. The current can easily reach several
hundred amps (momentarily) and weld or otherwise damage the switch
contacts. Placing a 10 - 100 ohm resistor on series with the cap. will
normally prevent damage but still provide enough filtering. More elaborate
circuits using more resistors & diodes can also be used.

Richard P





> Could anyone recommend a good capacitive value used with a 2.2K resister
> to filter out noise.  I have some limits switches which are NO and
> connected to a 2.2K pullup resistor.  However the moment the limit
> switches are closed to ground, they cause my PIC processor to reset.  I
> am thinking that the limit switches are somehow picking up some high
> frequency noice, which is not appearing on my 20MHz scope.  I know that
> the pins are set for input mode, so it is not shorting the system.


<snipped>

A larger capacitor within reason won't hurt. eg a 1 uF or even a 10 uF for
test purposes. The 10 uF/100k will have a 1 second time constant so will be
no good in "real" use (and the PIC prefers not to have such a slow
transition) BUT this will show you if your problem is noise.

BUT FIRST - do perform the test with a switch right at the PIC and no long
leads. If this fails then you are doing something else wrong that you
haven't described here.



       Russell McMahon

--

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2003\02\02@213259 by Richard Graziano

picon face
For a Butterworth configuration LPF, the cut-off frequency is equal to
2PiRC.  That is a resistor in series with the signal and a shunt resistor
from the load end of the resistor to signal return.

Rich
{Original Message removed}

2003\02\02@213926 by Richard Graziano

picon face
That should have been a shunt capacitor... Sorry about the dumb error.
Rich
----- Original Message -----
From: "Richard Graziano" <spam_OUTrgrazia1TakeThisOuTspamrochester.rr.com>
To: <.....PICLISTKILLspamspam@spam@MITVMA.MIT.EDU>
Sent: Sunday, February 02, 2003 9:32 PM
Subject: Re: What is a good capacitive value with a 2.2k resister to filter
out high frequency noice?


> For a Butterworth configuration LPF, the cut-off frequency is equal to
> 2PiRC.  That is a resistor in series with the signal and a shunt resistor
> from the load end of the resistor to signal return.
>
> Rich
> ----- Original Message -----
> From: "Russell McMahon" <apptechspamKILLspamPARADISE.NET.NZ>
> To: <.....PICLISTKILLspamspam.....MITVMA.MIT.EDU>
> Sent: Sunday, February 02, 2003 3:54 PM
> Subject: Re: What is a good capacitive value with a 2.2k resister to
filter
> out high frequency noice?
>
>
> > > Could anyone recommend a good capacitive value used with a 2.2K
resister
> > > to filter out noise.  I have some limits switches which are NO and
> > > connected to a 2.2K pullup resistor.  However the moment the limit
> > > switches are closed to ground, they cause my PIC processor to reset.
I
> > > am thinking that the limit switches are somehow picking up some high
> > > frequency noice, which is not appearing on my 20MHz scope.  I know
that
> > > the pins are set for input mode, so it is not shorting the system.
> >
> > What you describe is rather strange and suggests some other problem.
> > If you are in a "normal" environment this would be an extremely unusual
> > occurrence. Check carefully that eg switches really go from pins to
> ground,
> > ground return is same as PIC ground etc. Have you got any power supply
> > decoupling on the PIC eg 10 uF or 100 uF Vdd to ground capacitor? What
is
> > your power supply.
> >
> > IF the switches are some distance from the processor on long wiring runs
> > then voltage pickup is more likely. If so, firstly repeat the test with
> > switches with very short leads adjacent to the PIC. If this works OK
then
> > you noise theory sounds more likely.
> >
> > Assuming remote switches and long leads. First ensure switches have a 2
> wire
> > connection back to PIC ie do NOT use eg equipment ground as earth
return.
{Quote hidden}

(where
{Quote hidden}

for
> > test purposes. The 10 uF/100k will have a 1 second time constant so will
> be
> > no good in "real" use (and the PIC prefers not to have such a slow
> > transition) BUT this will show you if your problem is noise.
> >
> > BUT FIRST - do perform the test with a switch right at the PIC and no
long
{Quote hidden}

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2003\02\02@214337 by Richard Graziano

picon face
I must be having a bad day.  The cut off frequency for a Butterworth LPF is
1 over 2 PI RC.  There.
{Original Message removed}

2003\02\03@080545 by Olin Lathrop

face picon face
> Could anyone recommend a good capacitive value used with a 2.2K resister
> to filter out noise.

That of course depends completely on the frequency you want to start
filtering at.  The rolloff frequency for an RC filter is:

 F = 1 / (2 * Pi * R * C)

where F is the frequency in hertz, R the resistance in ohms, and C the
capacitance in farads.  I keep the constant 10**6 / (2 * Pi) = 159155
permanently in a variable in my calculator.  It can be divided by any two
of the resistance in ohms, the frequency in hertz, or the capacitance in
microfarads to yield the third.  Very handy.

> I have some limits switches which are NO and
> connected to a 2.2K pullup resistor.  However the moment the limit
> switches are closed to ground, they cause my PIC processor to reset.  I
> am thinking that the limit switches are somehow picking up some high
> frequency noice, which is not appearing on my 20MHz scope.  I know that
> the pins are set for input mode, so it is not shorting the system.

There is something else going on, like inductance in the line causing a
kickback.  If the switch is external to the board, then you should protect
the PIC inputs.  After the 2.2Kohm pullup, put a 1Kohm resistor in series
with diodes to ground and supply.  After that put another 10Kohm resistor
in series to the PIC pin.  That should protect from over and under voltage
spikes to a few tens of volts.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

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