TUTORIAL
TUTORIAL OVERVIEW Whether you’re building a small robot or using any kind of motors in your projects, it might be useful to know the speed at which your are driving them. In this tutorial we will see how to connect and use an infrared speed sensor based on the LM393 chip. The speed sensor uses a disc with holes (encoder disc) to block the infrared beam, thus by counting the number of times the sensors goes from Low to High we can calculate the number of revolution for a given time period. For our tutorial we will count the number of time the speed sensor goes from Low to High in a second and then divide that number by 20 (number of holes in the encoder disc) to get the number of revolution per second. CONNECTIONS The speed sensor uses only 1 pin that goes from Low to High to detect holes in the encoder disc. Since we will be using Interrupt zero to read the speed sensor, we need to connect it to Pin 2 (interrupt 0 pin) on the UNO. Were are also using the