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.
RPM via GPIO pulses
|
« Next Oldest | Next Newest »
|
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
|
Users browsing this thread: 1 Guest(s)