Motor causing interuppts

Hello, Thanks in advance for any assistance.

I am attempting to make a tachometer for DC motors using arduino uno.

I am using interrupt, after tinkering for quite a while, I have the interrupt working with both a hall sensor and photointerrupter.

My problem is in any case when I turn the motor on (the motor on separate batteries etc) it causes interrupts. When the motor is on, away from the sensor, or even if the sensor is disconnected it triggers roughly 300 to 900 times per second. I have a 103 capacitor on the motor, and the motor case is grounded to a motor terminal.

Unfortunately this interupt does not appear to correspond to the motor rpm or I would be done :smiling_imp:

I have a pull up 10K to the interuppt pin etc.

I assume this is motor noise problem.

I have searched, schmitt trigger needed?

Thanks

You will need to post a wiring diagram (a photo of a pencil drawing will do) and your code. Please use code tags (the button that looks like a scroll with <> on top)

so it looks like this

...R

I believe that the particular motor was a problem. I tried different motors and they did not cause the interrupts. Hopefully the motors that I will be using with this will be compatible. So if you have a similar problem try a different motor. I tried a motor that didn't have the capacitor on it and it worked. Whether it's the number of windings or number of commutators I have no idea. Cap