| Author |
Message |
khanna_gunjan
Joined: 18 Jul 2006 Posts: 27 Helped: 2
|
21 Jul 2006 8:26 How do i avoid Jitters |
|
|
|
|
Hello,
In one of my application, i am trying to read a Output Voltage of a reed contact in the microcontroller and i am using an opto-coupler for the purpose. The problem is that before the contact is properly closed, there is these jitters there ( with jitters i mean closing and opening of the contact at a very fast rate, before it finally stablizes).
Can anyone suggest me a simple solution to avoid these jitters with few components. Also, i would like to mention that the output of the opto-copler is then read by the microcontroller and which can only generate an interuppt when it sees the falling edge of the signal and i tried to use an RC circuit at the output of the opto-coupler .. but with the slow charging and discharge time the controller is not able to detect the falling edge of the signal..
Please suggest. thanks
Gunjan
|
|
| Back to top |
|
 |
tronix
Joined: 06 Jul 2006 Posts: 121 Helped: 6
|
21 Jul 2006 8:51 Re: How do i avoid Jitters |
|
|
|
|
To avoid jitters u can follow either of the two approaches
1.h/w approach : use nand latch as input stage(google to get ckt)
2.s/w approach : give some time delay for reading of switch after sensing first change of state
|
|
| Back to top |
|
 |
khanna_gunjan
Joined: 18 Jul 2006 Posts: 27 Helped: 2
|
21 Jul 2006 9:41 Re: How do i avoid Jitters |
|
|
|
|
I am now trying with connecting a cmos Inverter (with a change in input reference from high to low) in the input side .. as the delay time for this inverter will be a around 200 ns seconds .. i think it will help..
any suggestions on this.. ??
|
|
| Back to top |
|
 |
tronix
Joined: 06 Jul 2006 Posts: 121 Helped: 6
|
21 Jul 2006 12:48 Re: How do i avoid Jitters |
|
|
|
|
Iam not sure that u hv got d solution.
Using a time delay is Software Solution and what this mean is that after sensing first change of state microcomputer(or device which is used to read switch) should wait for some time > bounce time and then take the reading again which if found different from the previous reading indicate false switching and a valid transition otherwise.
If u want to hv a h/w approach go for nand in input.
Google for more details
|
|
| Back to top |
|
 |
khanna_gunjan
Joined: 18 Jul 2006 Posts: 27 Helped: 2
|
21 Jul 2006 13:30 Re: How do i avoid Jitters |
|
|
|
|
| tronix wrote: |
Iam not sure that u hv got d solution.
Using a time delay is Software Solution and what this mean is that after sensing first change of state microcomputer(or device which is used to read switch) should wait for some time > bounce time and then take the reading again which if found different from the previous reading indicate false switching and a valid transition otherwise. |
Thanks.. this really helped
|
|
| Back to top |
|
 |
haytham
Joined: 06 Jun 2004 Posts: 223 Helped: 14 Location: Egypt
|
23 Jul 2006 8:34 Re: How do i avoid Jitters |
|
|
|
|
You need monosatble circuit
it is simple
|
|
| Back to top |
|
 |
safwatonline
Joined: 19 Nov 2005 Posts: 1352 Helped: 164 Location: EGYPT
|
23 Jul 2006 8:50 How do i avoid Jitters |
|
|
|
|
i think this is called de-bouncing and it originally found for push buttons as they bounce , there r several soultions i dont know if they r applicable to ur optocoupler but here they r anyway
http://www.elexp.com/t_bounc.htm
p.s. a simple delay loop seems to be the right and simple appraoch.
|
|
| Back to top |
|
 |