I have had a mini lathe for years but have not used it much, then when I started using it *alot* the motor controller stopped working. Its been sitting for a few months and I am convinced that trying to make my own motor controller is what I need to do. The plan is to give the lathe a servo spindle and both manual and CNC capability. FYI actually CNC'ing the lathe is on the todo list but right now what I need is a rotating spindle =)

The exact design for the encoder wheel is going to depend on how the optos turn on and off but basically I am going to use an oscilloscope and probably a few test encoder wheels while trying to get a "perfect" square wave while the spindle is spinning. I'll use a second channel on the scope to align 2 optos as perfectly as I can just by visually checking the waves.

I'm a noob to electronics so I likely will not progress very fast but would like comments if you have any. The "basic" design of my power supply is going to be rectified 120v AC power and PWM driven mosfets to control the spindle speed and position.

My first goal if all works out is going to be the programming to get a good constant spindle speed and the second is going to be a programmable spindle for something like tapping cycles just to make that task a bit quicker and more automatic especially if running the tap into the hole more than once.