depending on what you need to do, there are some easier ways to hack together an encoder. I probably would not use these hacks on an FRC robot, but for a testing platform, they are fine.
If all you want to do is sense speed, acceptable results can be had with a reflective sensor like this
http://www.robotmesh.com/line-tracki...ONYaAgcT8P8HAQ and using some white and black paint on the shaft of the wheel. If you want something with a bit more resolution you can use a pair of hall effect sensors and attach magnets to the rotating object.