Simple Motor Optical Encoder: Parts List

Current Part:

Parts List
PIC 18F4520 Microcontroller
L298 Motor Controller
7805 +5v Regulator
12v DC Motor + Printer Stage
10Ω 10kΩ 150Ω Resistors
47uF Capacitor
40 MHz Crystal
IR Emitter Diode
IR Detector

Parts List Details
           You may or may not be familiar with the parts above so a picture of each item has been included to help give you an idea of what they look like. I'll go through and explain each part briefly below.

PIC 18F4520
           The PIC microcontroller will be the brains of this project. Any model of the PIC can be used as long as it has analog to digital converters on it and hardware PWM generators. I chose the 18F4520 because I have quite an excess of them and offers an automatic inverse PWM signal required by the L298.

40 MHz Oscillator
           This will be the clock speed. Instruction Frequency will be 10 MHz. This was arbitrarily chosen with whatever crystal oscillator I found laying around my workbench. Any standard PIC frequency 2 MHz - 40 MHz could be used. It is worth it to mention that 40MHz might be risky for certain frequencies but for this application it will be ok.

IR Emitter Diode/Detector (Phototransistor)
           These two circuit elements will be used for the optical encoding detection. The IR beam will be shot at an encoded piece of paper with black and white strips which will reflect into the phototransistor. Depending on the intensity of the color the beam is shot at, the phototransitor will have a different voltage at its output point.

L298 Motor Controller
           It is assumed that you've used this motor controller before. I have a few L298 tutorials so if you have never heard of this device before I urge you to at least look through them. This will be for your benefit as the L298 is one of those simple yet complex devices.