Continue to Site

Welcome to

Welcome to our site! is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Photoelectric Encoder Speed control DC Motor circuit

Not open for further replies.


Advanced Member level 6
Jan 5, 2008
Reaction score
Trophy points
Activity points
Hi, such DC motors include an IR led and phototransistor and a disc, as a means of feedback.
I wonder how can I use such an arrangement to keep the motor speed stable?
I would like to do it with simple discrete electronics if this is possible.
--- Updated ---

I have found this. will this be able to maintain a constant speed of the motor?
Although not discrete...


  • Photoelectric Encoder Speed Measuring Electric Motor.jpg
    Photoelectric Encoder Speed Measuring Electric Motor.jpg
    67.3 KB · Views: 119
  • 12 volts dc motor speed controller circuit diagram using encoder wheel.jpg
    12 volts dc motor speed controller circuit diagram using encoder wheel.jpg
    162.7 KB · Views: 118
Last edited:

I built a similar system for an aging cassette motor whose speed was unstable. In the middle I put a frequency-to-V IC (8038 or 9400). This provided a feedback voltage to an op amp.

I painted black lines around the flywheel. I mounted a bulb and phototransistor to create electrical pulses to the F-to-V converter.

Though I barely knew what I was doing, with experimentation I realized it's important to:
* avoid making gain too much or too little
* avoid making response time too long or too short.

If high gain were combined with overly rapid response, it causes overshoot and wild variations between slow and fast.

My system was hard to adjust properly. The motor held stable speed for a few seconds briefly, then wandered.
Eventually it hit me that the bearings were worn, and the motor was a hopeless case. I purchased a replacement motor which restored stable speed. I set proper rpm via a tiny screwdriver adjustment.
Last edited:


    Points: 2
    Helpful Answer Positive Rating

I guess a f-V-converter is not the exoected "discrete" solution.
But I have no idea how to build it with discrete parts, too.

Regulation problem:
I've built something similar woth the use of a microcontroller.
A regulation loop to be stable wants fast feedback of RPM. Now your RPM sensor just gives a couple of pulses per rev.
Every edge is an RPM information. The problem here is, that with high RPM you get an information - let's say - every 10ms.
But with low RPM it's maybe every 100ms.
For a regulation loop it's hard to compensate for this.
You may get it stable for high RPM, but it becomes instable for low RPM.

For small DC motors I've used a different approach.
An ideal motor has a perfect V-to-RPM behaviour and it has a perfect torque-to-current behaviour.
Thus: connect the motor to a given voltage and it will result in a fix RPM, independent of torque.
Easy for RPM regulation: just use the voltage of desire and get the RPM of desire.

A real motor acts as if there was a resistor in series with the motor.
This means: connect a voltage, the motor starts to turn. Increase the torque, this automatically increases current, this automatically increases the voltage drop at the series resistor, this automatically lowers the voltage for the (ideal) motor, this automatically results in reduced RPM.
The problem is the series resistor.
Thus I designed a power supply with integrated negative source resistor. Sounds complicated, but indeed it just has a shunt inside to measure the current and feedbacked this information to the voltage regulation.
As example this means: set the output voltage to 12V (unloaded) then connect a load of let's say 100mA, and the output voltage automatically rises to 12.1V. This acts like a "-1 Ohms" source impedance.

One hast to carefully adjust the negative resistance of the supply to the series resistance of the used motor.
One can only compensate to let's say 90% of the motor resistance. Overcompensation lets the motor spin from zero RPM to full RPM and back.

  • Like
Reactions: c_mitra


    Points: 2
    Helpful Answer Positive Rating
I designed a speed regulated DC motor controller using a similar principle back in the 1980s for a high speed cassette tape duplicator machine.

My approach was to compare the optical output pulses with a stable oscillator frequency in a PLL circuit. It was a long time ago but I think it used a CD4046 as the loop controller. The customer had a phobia over using microprocessors, believing they needed years of software development and a team of scientists to design with them so the whole machine, including keypad, display and communication had to be done with nothing more complex than basic logic gates!

It worked very well and at different motor speeds by switching reference oscillator frequencies. It could be made continuously variable with care.

PLL has the drawback of limited speed range (lock range) so whether it is an applicable solution depends upon the motor speed or encoder pulse speed.



    Points: 2
    Helpful Answer Positive Rating
A simple comparator can be made with 2 transistors. About the problem of the low pulse repetition, I wonder if a small capacitor in place could cure this. Smaller capacitor->less time to charge/discharge. So the loop could be more responsive

Going back to 1984 (38 years ago) there was a fascinating article in a magazine called Electronics Today International by Ray Marston on a novel way to closed loop speed control small dc motors without an external tachometer for feedback. As soon as I saw this thread it triggered my memory and I have only just now managed to locate the original article, now yellow from age !

I have built several of these over the years with great success, and the whole article is well worth reproducing after all this time.
--- Updated ---

The last one I built was for the power feed for one axis of a vertical milling machine for my employer, the speed was adjustable from fast traverse to barely moving.
At slowest speed the torque was amazing. Load it up and it pushed really hard without any noticeable fall in speed. The only feedback coming from amplified motor back EMF without any external tachometer.


  • SMVF1.jpeg
    212.8 KB · Views: 98
  • SMVF2.jpeg
    267.6 KB · Views: 91
  • SMVF3.jpeg
    235.2 KB · Views: 98
  • SMVF4.jpeg
    293.1 KB · Views: 102
  • SMVF5.jpeg
    275 KB · Views: 106
  • SMVF6.jpeg
    234.8 KB · Views: 99
  • SMVF7.jpeg
    269.8 KB · Views: 96
  • SMVF8.jpeg
    237.6 KB · Views: 98
  • SMVF9.jpeg
    271.9 KB · Views: 95
  • SMVF10.jpeg
    269.3 KB · Views: 95
  • SMVF11.jpeg
    317.6 KB · Views: 94
  • SMVF12.jpeg
    221.9 KB · Views: 110
Last edited:
The chopper is usually for a tachometer signal. Anything wrong with k*(V-I*R) speed control?

LM2907 / LM2917 maybe - it seems to have all this built in to an IC.
Been using them since 5.25 inch floppy drives were invented to control spindle speed.


Not open for further replies.

Part and Inventory Search

Welcome to