I am using PWM on pins 9, 10, and 11 to control some small gear motors with single mosfet choppers. That part works ok. But depending on load 2 of the motors slow down or stall (the 3rd one is lightly loaded so works fine) so I want to add some feedback. I am adding an LED/phototransistor with a hole in a gear for a signal. My question is about using a timer while using PWM. I haven't modifed the frequencies (even though a little higher would be good). What I would like is a 1 mS interrupt so I can count time between edges (using variables not using the internal counter registers). The bike speedometer here:
looks like a good way to do it and the speed/time range looks ok too but I am not sure if I can use the timer interrupt while using PWM. Since I haven't modified the timers for PWM can I still use the 1 kHz interrupt? I do need to monitor 2 sensors but that is just additional variables and inputs to look at each interrupt.
This is on a Uno board.