Go Down

Topic: Schmitt trigger weird behaviour (Read 279 times) previous topic - next topic

SwengX

Jun 09, 2020, 02:18 pm Last Edit: Jun 09, 2020, 05:35 pm by SwengX
Hello,

I have a project where I use this exact schmitt trigger to debounce a pushbutton. When I push the button nothing happens at the digital pin on the  Arduino. I think it just floats. Actually, I use an embedded Atmega328. When I press the Atmega a bit with my finger, the state of the pin changes from 0 to 1 or vice versa regardless of the state of the pushbutton. So far, this looks like a floating pin. I measured the voltages, the schmitt trigger output pin was ok (5V), and I made a continuity test from the output to the arduino digital pin and it was also good. However, I can't measure 5V on the arduino digital pin. The voltage just goes away?! Then, I noticed that when I connect my multimeter between the schmitt trigger output and GND, everything works fine. What causes this? I hope it is nothing serious because it is quite hard to modify the circuit on the pcb.

Smajdalf

Try to resolder the Schmitt IC - at least the output pin. I seems you get it working everyone you press it to the PCB improving contact.

dlloyd

If you want the Arduino input to be normally low (high when button pressed) then perhaps your circuit connections are like this?


6v6gt

You can, of course, debounce a button purely in software. Something like if you get a button press, ignore further activity from that button for the next , say, 100mS.

Go Up