Interrupt question...

Hi guys,

I'm building a motor of sorts, it's an old compressor powered by air (exactly a compressor backwards). I'm using solenoids instead of reed valves and i need to drive those with an arduino, in order to do that i need a crank position sensor of sorts. I'm planning on using a hall effect sensor with a 36-1 (or similar) trigger wheel...

My question is around the speed at which the arduino operates and whether or not 36 interrupts per revolution is too much... at a nominal speed of say 100rpm, that's 60 sec per 100 revs, and there's 36 trigger signals per rev... so about 0.016s between pulses. Is that enough time to decide whether the valves should be open and to open/close them? I'll also be running a PID controller (or similar) to determine the timing of the next valve event (open/close)...

Any thoughts?

216 per second is peanuts for a Arduino (Uno etc). When decoding DCC signals it gets signals of 18kHz+. So nothing to worry about :slight_smile:

I have a one-pulse per rev optical sensor on a small DC motor and at about 12000 rpm (200 pulses per second) the Arduino running at 8MHz is well able to read the sensor, do PID calculations and communicate by wireless.

In this Thread I posted a version of PID code that does not use floating point values and is IIRC 10 times faster as a result.

...R

Sweet... that's enough confidence for me... thanks guys