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
#1
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 ?
Reply
#2
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.
Reply
#3
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:-)
Reply
#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
#5
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.
Reply
#6
I was never happy with the rpm pulse code in OpenPlotter v3.x.x. We used a python code from here (search RPM): https://abyz.me.uk/rpi/pigpio/examples.html

pigpio is no longer available in RPi5 so we have to rewrite this code. I am working in openplotter-gpio v4.x.x right now, any example of RPM in python?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)