I have been tasked with a project of controlling motor speed using a very strange method, and need some general help. Instead of a Pot being used the task at hand is to use two LED,s and two LDR,s as well as a perforated disk to control the speed. When the disk is turned clockwise the motor should speed up and when the disk is turned anti clockwise it is to slow down. Disk design is entirely up to me by the way
I have a general understanding of what needs to be done. The LED,s should be put on one side of the disk and the LDR on the other so as when turning the led only shines through the holes in the disk. however i have a few questions im hoping someone can answer;
how would i go about detecting the clockwise and anticlockwise turns of the disk
how would i code the motor speed to scale to the rotations of the disk
general tips also appreciated
note: no external components can be used besides the basic arduino board, components mentioned and general transistors resistors.