100nf ceramic capacitor at Digital Input

What is your opinion at using 100nf capacitor at Digital input circuit using PC817C optocoupler/Optoisolator Why i am using ? I am using to eliminate false triggering of Pushbutton becuase in Push button their are noises when push button are pressing which considered as buutton presseing commonly known as debounce issueWhat is your opinion on using a 100nF capacitor in the digital input circuit with the PC817C optocoupler?

I am using this capacitor to eliminate false triggering from the pushbutton. When the pushbutton is pressed, it generates noise, which can be mistakenly detected as multiple button presses. This issue is commonly known as "debounce."

Debounce is usually done in the software.

1 Like

What does the datasheet or applications note suggest?

Many, many articles on switch debouncing, hardware or software.

Just look in IDE, examples, debounce

1 Like

That circuit will never work.
You need a voltage input to operate a PC817.

24V In at DI_1+ and GND at DI_1-

The cap does nothing to help debounce.
You might consider putting the debouncing on the output of the PC817

I would also change that 1K resistor to 2.2K

1 Like

Try the cap in parallel with R55 or across pins 3 and 4. Maybe a larger cap, 1uF ?

1 Like

What is the reason for changing a 1k resistor to a 2.2k resistor?, To reduce current consumption?

The PC817's input LED should only need about 3 ~ 4mA so a 4.7k would probably work OK.

Yes you are driving it with more current than necessary and generating heat that will shorten lifetime

1 Like

Try this circuit

3 Likes

Thank you all for your help; I appreciate it!

You are welcome
Have a nice day!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.