Hi everyone,
I want to do something that I imagine lots of people have done before, but I don't know the best way to do it!
I have a small dc motor which drives via a pulled a rod which has a worm gear on it and a arm moves up and down the pulley (part of an old CD duplicator robot). There is a small disc with stripes on it at the end of the pulley and a "transmissive encoder sensor". That's the background, the idea is that if the arm hits something, the PIC recognises a lack of change in the encoder and stops the motor. Hooking it up is OK, but what method do I use for reading in the pulses? Pulsin or count over a time period (or something else?) The motor will no doubt take a fraction of a second to spin up, too - this may also need to be taken into account. I'd appreciate any advice, thanks!
Bookmarks