This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
RPM via GPIO pulses
#4
Most of the NPN proximity switches operate at plus 6V which is way to high for a RasPi or esp32. I made a solution a long time ago using any input with a pullup resistor (or using the internal one on a '32. Connect a diode to the input that blocks the 12V from hitting the pin. When the NPN activates, the voltage on the sensor line drops to zero, thus pulling the GPIO low. So, your interrupt routine must be set to FALLING_EDGE. Works perfectly. Power your NPN from 12V.
Reply


Messages In This Thread
RPM via GPIO pulses - by SY Kalinka - 2024-03-03, 06:54 PM
RE: RPM via GPIO pulses - by Boatingbaileys - 2024-03-06, 07:51 PM
RE: RPM via GPIO pulses - by SY Kalinka - 2024-03-13, 03:28 PM
RE: RPM via GPIO pulses - by petere101 - 2024-03-14, 04:59 AM
RE: RPM via GPIO pulses - by Blue Ocean - 2024-03-17, 08:54 PM
RE: RPM via GPIO pulses - by Sailoog - 2024-03-19, 07:34 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)