Posts: 11
Threads: 4
Joined: Jan 2023
Reputation:
0
Hi,
I have rigged up a npn proximity switch and are using the "pulses" setup in OP.
I have glued two magnets to the flywheel for the pick up and played around with the measuring rate both in the "pulses" settings and in KIP, however the RPMs are bouncing quite a lot. I suspect that it misses one of the magnets periodically but before i glue more on or remove one, I would like to know if anybody has this running reliable and stable ?
Posts: 178
Threads: 14
Joined: Nov 2020
Reputation:
17
In the new version of KIP, there is a sampling option on the path menu. Try upping this and it might smooth the data out. I went about this a different way and use an ESP but I do the same thing in the esp code.
Interested in your results on this as I want to do something with pulse on the Pi.
Posts: 11
Threads: 4
Joined: Jan 2023
Reputation:
0
When increasing the sampling period the reading got smoother but it still lost half the counts every 10 seconds or so. Also tried to adjust the "rate" in OP GPIO pulses but that did not seem to change anything...not sure what its for actually??
Ended up removing one of the magnets from the flywheel and now have a stable reading:-)
Posts: 3
Threads: 0
Joined: Jan 2024
Reputation:
0
2024-03-14, 04:59 AM
(This post was last modified: 2024-03-14, 04:59 AM by petere101.)
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.
Posts: 29
Threads: 4
Joined: Sep 2019
Reputation:
0
Is code available for reading these rpm pulses without having OP installed? I do have SignalK running and use KIP intensively. I could do it via SensESP but I have the Raspberry nearby so would like to skip the unneeded WiFi step.