Currently, I am working on a project to control a motor. The motor controls the y position of a linear stage. Normally this setup is used to move a camera back and forth to adjust the focus. Over the past month, I have been able to successfully model the position of the lens with MatLAB code. The input of the system is kind of an odd function. Instead introducing a force, the feedback control is done by inputting a trapezoidal or triangular velocity profile into the system's state space. The input is essentially a curve that accelerates to a certain speed, holds that speed and then decelerates. This tells the dynamic system to move a precise distance and then decelerate rapidly. It works quite well.
The biggest problem that I had was determining how the computer sends a signal to the motor. There are constants that are defined in the program and the motor has a specific code developed by the company that gives it commands. Determining what number to input in order to get a specific result was rather tricky, but eventually, after a lot of testing, I was able to get a suitable result.
The precise motor position was analyzed with an eddy current sensor. I thought it was rather cool. I attached a steel block to the top of the lens mount and then faced the sensor towards the block. The sensor can read between 0 and 2 mm extremely precisely and the result can be measured with an oscilloscope and then converted to millimeters. I really enjoyed testing and analyzing this system. It was a lot of fun!
The biggest problem that I had was determining how the computer sends a signal to the motor. There are constants that are defined in the program and the motor has a specific code developed by the company that gives it commands. Determining what number to input in order to get a specific result was rather tricky, but eventually, after a lot of testing, I was able to get a suitable result.
The precise motor position was analyzed with an eddy current sensor. I thought it was rather cool. I attached a steel block to the top of the lens mount and then faced the sensor towards the block. The sensor can read between 0 and 2 mm extremely precisely and the result can be measured with an oscilloscope and then converted to millimeters. I really enjoyed testing and analyzing this system. It was a lot of fun!