Stepper Motor "Crunches" when Interrupt pin enabled

We are using a Controllino MINI (which I think is based on the Arduino UNO) to control a stepper motor.

We are using a magnetic sensor as a limit switch and I've set interrupt pin CONTROLLINO_INO (defined as pin 2 in header. I assume that is pin 2 on UNO).

I am enabling the interrupt by doing standard coding ie.

pinMode(CONTROLLINO_IN0, INPUT_PULLUP);
attachInterrupt(digitalPinToInterrupt(CONTROLLINO_IN0), ourInterruptRoutine, CHANGE);

The interrupt triggers correctly.

However when I move the stepper motor there is often a low level "crunching" sound clearly audible. This happens even when the magnetic sensor is not being hit ie. interrupt not being triggered. When I disable the interrupt the "crunching" disappears.

So the mere fact of enabling the interrupt is causing this. It has nothing to do with whether or not the interrupt is being triggered.

Has anyone come across this before? Is there a solution

thanks

Doug

Please post formatted code using code tags an an annutated schematics.

Or, is it being triggered constantly?

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.