This is my first time to write in this forum, and I’m not sure if this is the
correct place for my question.
I have got two gear head motors (GHM-15 , GHM -04 w/ encoder).
I’m trying to build a feedback system where I design a controller with
matlab/simulink to control the motor, and I would like to read the ouputs
of the encoder (position/speed) to use them in the feedback loop.
1- First, since the encoder outputs are frequencies (square wave), how
can I make use of them ? Will the LM2917 freq to volt work ?
2- How would the controller output affect the motor ? should it vary the
current or the voltage of the motor , and how to connect it to it?
If I’m not mistaken, the GHM-15 has a more or less standard quadrature encoder with AB outputs. The two phases of this encoder are 90 degrees out of phase (quadrature).
To read this encoder you typically use a special purpose decoder, or a uP with that capability. The PIC 18F2431 family comes to mind. The phase difference of the encoder allows direction to be recovered. Basically, one counts a counter up if A lags B, and down if B lags A. This logic can be done in discrete hardware, or by state machine code in a PIC (uP) if not too fast.
The counts indicate the relative position of the shaft. The rate of change indicates the velocity. Knowing these things, a PID controller can generate a PWM signal to run a DC motor.
You might want to look up PWM, PID and encoders in a motion control book, or look for a typical application in a robotics book.