Responsiveness of Photon Digital Inputs

I have an IoT project which will require monitoring whether machine spindles are active within each minute.

  • Each spindle is “watched” by an NPN NO inductive proximity switch rated at 2kHz switching frequency.
  • Each prox is triggered by a .125" metal button on the spindle
  • The button center is spinning on a 3/4" radius
  • Spindle speed can be up to 3000 rpm
  • In most cases, all 18 available digital inputs on a Photon would be monitoring spindles, one spindle per input.

All the code would have to do is determine whether the state of any of the inputs changed in 60 seconds, publish which inputs had a state change, and do it again over and over.

A minute is a long time and my assumption is that the responsiveness of the Photon inputs could handle it, but what do you guys think? Would a Photon be an appropriate microcontroller for this scenario?

The common way to "monitor" hi-speed digital signals would be via interrupts, but unfortunately you don't get 18 independent interrupt-enabled pins on a Photon.
https://docs.particle.io/reference/firmware/photon/#interrupts

Seems @ScruffR responded faster than me… again! If you are simply looking for movement, not how many rotations per minute then some simple external hardware (resettable latches) could be used in conjunction with the Photon to do this. If you are looking at rotations and as @ScruffR indicated, the Photon is not able to do this without (counting) external hardware.

1 Like

Excellent, guys. Much appreciated. I didn’t know the Photon had interrupts available. Also the info about rotation counts is helpful as that topic has come up just recently as well.

Many thanks!

Just recently I posted a basic outline how this could be done

You know, ScruffR and peekay123, in a perfect world you guys would get paid for info like this. Thanks for taking the time and effort!

2 Likes