2

I got somewhat short pulse 35ms, I written script in python using RPi.GPIO, using event and callback. Is it possible to detect so short pulses? On related question how close to 3V3 I need to get? I found

"A voltage near 3.3 V is interpreted as a logic one"

But nothing specific, I will be below 3V3 but how low can I get? 2V5 is enough? Have not run this cause still waiting on hardware that generates pulses, I just wonder if I need 555 to extend pulses. Raspberry 2 if that's important

windman
  • 79
  • 1
  • 3

2 Answers2

4

35ms is an eternity to a computer, although poor coding can make pulse detection unreliable.

1.3V is HIGH, although I suggest you design for 2V. See Electrical Specifications of GPIO

Ghanima
  • 15,578
  • 15
  • 58
  • 113
Milliways
  • 54,718
  • 26
  • 92
  • 182
  • Thank you I thought so, however I am surprised with voltages. I am aiming for 2.5-3V tho with my divider so should be fine. – windman Jul 29 '18 at 20:00
0

I agree with "35ms is an eternity to a computer, although poor coding can make pulse detection unreliable".

Specifically, reading a gpio value in a loop is not reliable. Configure the GPIO to generate an interrupt on leading or trailing edge and use the interrupt to process the event (or just set a flag/count that the event occurred).

Chad Farmer
  • 111
  • 5