Creating a smart-controlled turntable driver

This Instructable is part of a series of Instructables. Their goal is building up a complete DIY turntable.
The other Instructables are about

• Designing a preamplifier for the audio signal: RIAA conform preamp
• Build up the hardware: DIY turntable build-up

A very important part of this instructable - a micro controller controllable voltage source for driving the motor - is covered by another intructable: light controlled voltage source

This project will cover the following topics:

What are the possibilities to drive a turntable. This leads to a build up of a complex driving circuitry with a micro controller implementation and a high level controlling circuit with two feedback loops. All will end up in a complete build up and implementing of the final version into the already existing turntable from the former project.

Step 1: Short discussion: possible drivers

The driver, of course, is an electrically driven motor. But there are possible differences between the driver configuration and the choice of a possible motor. Motors for turntable have a need of two or more different speeds. At least the turntable shall spinning with 33 1/3 rpm or 45 rpm with a few +/- rpm adjustment.

I dont like these common-or-garden units [rpm] but they are way more handy than Hertz for this case.

Turntables are either belt driven or direct driven devices:

DIRECT DRIVE: Direct driven motors, as the name states, are directly driven by the motor. That means, that the physical power, coming from the motor, is directly transfered to the speed of the turntable. As you can image, this has a need for really smooth and silent operating motors. This comes together with a high price of the motor.

This is always a balancing act between smooth and stable rotating of the turntable and quality/price of the motor.

One can circumvent these problems by using a translator between motor and the turntable axis - ideally this translator has mechanical filter characteristics to smooth the speed to a constant drive.

BELT DRIVEN: The motor is normally connected to a belt, through which it drives the actual turntable. This method is criticized because of the belt. It can either slip or stretch, which results in different (or no) speed of the turntable. As you can image, this leads to an unlinear driving speed and an unwanted varying of the speed of sound.

But we can use this stretching of the belt as a favour in our system. One the one hand, this can be the part which translates the energy from the motor to the turntable, on the other hand the streching of the belt attenuates aprupt speed changes down to a lower level. This smoothing is the result of a mechanical variation of a lowpass filter, resulting out of the stretching of the belt and the mass of the turntable. Thats why we prefer a bigger mass in case of belt driven systems.

I know this is always a topic of big discussions. You can find direct drive systems every now and then even in HiFi systems. From my point of view, putting in a lowpass filter in a system like this isnt a bad thing and slipping or streching of the belt, which is the most critical point i think, can be avoided with a proper design of the mechanics and the circuitry.

Since this is already the start of our design phase, I have to remember my requirements for a fitting principle of driving my turntable - my main requirements are a very high quality sound and a low speed.

to make long story short: Of course, it would be possible to build up a system with a direct drive, but i thing that belt driven systems can work very well, especially if they are used with a higher turntable mass.

--> A beld driven system seems to fit to my requirements in the best possible way for me.

Step 2: The right motor

Creating a smart-controlled turntable driver

I used many old parts from an old turntable for my build-up in this instructable, however the motor is driven by the mains and i already have the requirement of a DC driven device - most likely in the range of my amplifier with 12Vdc raw voltage or 10Vdc regulated voltage.

The speed regulation is an important factor in this case. The speed has to be very stable at 33 1/3 or 44 rpm to get the sound we want.

Exact speed can be achieved by the use of a stepper motor, but this motors are a little bit rough in velocity and are in need of a driving circuitry (e.g. µC + H-bridge). I made some experiments with a stepper motor and my turntable and, next to the fact that I only had one shitty stepper with a too large stepsize, the velocity wasnt that precise to justify the extra amount of circuitry. Unfortunately this experiments left an ugly hole in my base plate behind.

When we want to drive the system with a linear motor, we need some kind of control circuitry. We have to measure the actual speed of the turntable and convert this information to a proper speed of our motor.

The linear motor must work in the range of 0V to 10V (max. 12V) - with a maximum current approx. given by the mains adapter with 700mA (without current consumption of the lin. voltage regulator).

This voltage shall be high enough for our need of speed (voltage = rpm) and this current shall be high enough for the needed torque (current = torque). If the torque doesnt fit, we still have a gear ratio between the motor and the turntable due to the belt. The motor speed is also depending on this gear ratio. The motor speed again comes together with noise and vibration of the base plate. You see, this is a thing which needs testing and try and error.

After a while of searching the internet, basements of friends and so on and so forth, i found a DC motor, which seems to fit my requirements. It has to ball bearrings in the inside which can guarantee a smooth run. I used a former gear wheel as a pulley, connected both and tried the first run - you can see it on the picture above. I connected a hook, made of soldered copper wire, to the motor to avoid belt slipping.

Step 3: The gearing and measured motor characteristics

Creating a smart-controlled turntable driver
Creating a smart-controlled turntable driver

The gearing is achieved by the two pulleys (the bigger one around the turntable axis and the smaller one around the motor axis). The gearring ratio can be calculated by dividing both diameters, which solved to a ratio of 1:13 - 13 rpm of motor speed results in 1 rpm of turntable speed.

The testing with the motor shows, that it can only handle speeds above a certain limit in combination with the beld due to the static friction - this limit is at approx. 2.5sec/round == 24rpm of the turntable. Since this is lower than our minimal speed of 33 1/3, this should be a sufficient gearing.

In my case, the motor is mainly voltage controlled (controlling speed) . The current is the same for static loads, which is always the case for a turntable.

The voltage ranges are between 3V for 24rpm and 6V for about 100rpm. This range is sufficient for controlling the motor and 6V are enough to speed it up to the wanted speed.

The motor will automaticalls increasy the current with higher load. Stopping the motor at 6V leads to currents around 300mA, which is the current limit for me from now on.

Step 4: Basic control circuit

Creating a smart-controlled turntable driver
Creating a smart-controlled turntable driver
Creating a smart-controlled turntable driver
Creating a smart-controlled turntable driver
Creating a smart-controlled turntable driver
Creating a smart-controlled turntable driver

We dont simply use the motor and control its speed by controlling the voltage. This may works for some projects with high tolerances in speed, but definately not in my case. As it is usually done in speed controlling circuits, i use a second motor as a voltage generator, which is driven by the same belt (as it is shown in the second pic).

One can see on the picture above, in my 3-6V range the motor generates voltages between 300mV and 1000mV in the important range, but up to 1200mV at 6V control voltage (look on the multimeter).

Of course it is possible to use this voltage in an analog circuitry and control the motor in this way, but to bring more flexibility in my circuit i want to use a micro controller. For the first trials i used an ATMEGA328 on an Arduino. Since the analog parts from the arduino can handle voltages between 0-5V (10bit), our control voltage has to be amplified. I used a simple LM358 as an noninverting amplifier with an approximated gain of 5. This leads to an amplification up to 5V in the important speed range (up to ca 80rpm). My motor uses internally brushes to get the voltage to the changing coils. This leads to sparkling effects which create high frequency noise on my signal. To get rid of this typical noise, I implemented a highpass filter of 3rd order. The cut off frequencies are at 80Hz, 35Hz and 3Hz, i simply used resistors and capacitors which are available, but pay attention that it is above 1-2Hz, depends of expected changes in speed.

When you use motors in combination with transistors as switches or similar, please have in mind that a running motor can cause high currents if the switch is closed and the motor is still moving. Thats why diodes are normally implemented as so called catch or freewheel diodes.

As i already mentioned, the motor needs voltages between 3-6V to run my turntable in a proper way. This voltage has to be controlled by the Atmega as well, which has an 8bit analog output.

My instructable about a light controlled voltage source handles exactly this problem. For those who dont want to read that: long story short, i used the PWM signal from the Atmega, to brighten and dim a LED, which controls a resistor and therefore the outputvoltage of an LM317. This leads to a linear control of the voltages between 3 and 6 Volt with digital values between 20 and 255 (the first twenty arent used, because they higher the maximum voltage above 6V). This is also shown in the display print picture. The voltage source is shown above where you can see the green LED and LDR combination as well. The perfboard also contains the amplifying circuit for the speed signal from the generator. The whole circuitry - LM317 as light controlled voltage source and amplifier - arent really complex and easy to build up for my first tests.

There are also the input pins marked with typical arduino declaration: A0 is the first analog_read pin, pin9 stays for one PWM output (digital pin number nine).

Step 5: Basic Software aka first trials

Creating a smart-controlled turntable driver
Creating a smart-controlled turntable driver
Creating a smart-controlled turntable driver

Since we have now a sensor for measuring a voltage with a linear behaviour to the rotationspeed and a motor, both connected to a MCU (microcontroller unit), we can implement a simple control loop in C language.

At first, the measured speed values are filtered with a ten point moving average filter (additionally to the analog filters).

The LED indicator for too high speed is given by:

if (sensorValue

else { digitalWrite(led, LOW); }

The motor control code is given by:

// controller for the motor linearity

if (sensorValue > speedValue) { fadeValue=fadeValue-1; }

//fadeValue is the value, fading the LED and therefore varying the motor control voltage

else if (sensorValue < speedValue) { fadeValue=fadeValue+1; }

if (fadeValue

else if (fadeValue>255) { fadeValue=255; } }

This is a strange kind of p-controller (with no proportionality to the mismatch value), which works, but not very properly. One main disadvantage is, that it isnt really fast and starts to swing, like the data plot shows. Another point is, that i dont know the exact measured speed_value, which i have to reach, to end up with exact 33 1/3 rpm. I approximated values in this step, which arent correct. What you else can see, is that the filter didnt remove the noise. Thats why i have do redesign the filters as well.

The third picture shows the generator speed on top and the control voltage at the bottom.

This problems have to be solved from now on in the following steps, by:

  • new calculation of the filters
  • measure the systems important data
  • use that as a base for calculating a PID controller
  • adding additional sensors, which measure the rotation speed by measuring the time between marked points on the turntable

    To my favour, i implemented an MCU, with which i can handle the whole controlling and its changes in a digital way.

    Step 6: New Schematic and Blockdiagram pt.I

    Creating a smart-controlled turntable driver
    Creating a smart-controlled turntable driver
    Creating a smart-controlled turntable driver

    The first picture shows the new Filters. I reduced it to 2 filters, both with cut off frequencies lower than 1Hz. This give high time constants to our loop system, but remember that this whole thing is only about a slow rotation and a not fast moving system.

    now we got that, we take care about the PID controlling. At first, picture the whole system as a block diagram, which is shown.

    The loop has to be opened, and the step responce must be recorded (in my case, with an arduino). The step was created by the arduino sending out a PWM signal. The response shows a PT2 behaviour (nearly PT1). Calculating the time constants and gains (typical methods using the tangent at the highest slope) lead to K=0.78 Tu=1114ms and Tg=1870ms. For more information regarding this, visit this, which is unfortunately in german.

    Using standard calculations after Chien/Hrones/Reswick, we end up with the control values Kp=0.755, Ki=0.336 and Kd=0.421. Ta being the time between to samples. Since i use an micro controller, this is lost time i have to incorporate in the calculations.

    This can now be implemented in the standard algorithm of an PID controller:

    e = w - x; //comparison
    esum = esum + e; //Integration

    y = Kp*e + Ki*Ta*esum + Kd/Ta*(e - ealt); //controlling

    ealt = e;

    Step 7: PID controller

    Creating a smart-controlled turntable driver
    Creating a smart-controlled turntable driver

    The first PID controller, which used the calculated values, showed a good but not awesome behaviour during my tests. I experimented just a little bit, and endet up with Ki=Kp=2, and a small Kd=0.2 (first picture). This leads to a lower change from my motor voltage to smal changes but a big reaction from the controller to big changes (second picture). These abrupt changes, which are responsible for the faster controlling, have also one negativ: the motor goes into "full power" and the turntable has one main overshoot. This is not important, if the turntable is used properly, since it should only run with the same speed or turned on and of with buttons. But if i hold it with my finger, it speeds up. This can be avoided by limiting the maximum motor control speed to approx 80% via the software.

    The D part from my controller is also visible at the LED from my light controlled voltage source, because it causes a flickering.

    I tried alot with varying the constants, but either the system is slow, or it has a big overshoot. The constants, i presented you at last seemed to be the best for my purpose, since its more important for me to reach my 33 1/3 as fast as possible, than reaching it slowlier with no overshoot. The slow reaction from the controller is on the one hand a software issue, on the other hand it is a result from my high time constants due to the high capacitances in the backfeeding loop.

    If i change my mind, i can simply it in my firmware.

    Step 8: Additional time measurement

    Creating a smart-controlled turntable driver
    Creating a smart-controlled turntable driver
    Creating a smart-controlled turntable driver
    Creating a smart-controlled turntable driver
    Creating a smart-controlled turntable driver

    Even changing speed values can be reached in a more or less fast way, but how fast the turntable exactly is, cannot be determined till now. It is possible to exactly measure the voltage per rpm from my generator. Since i use very small rotationrates, the generated motor voltage varies a lot over time and another negative is that i am not able to measure the voltage/rpm in a accurate way.

    Thats why i implement another additional sensortype, a light barrier, to measure the exact time between one rotation. The circuitry is relatively simple: i use a LED and a LDR in an transistor circuitry, working as a switch. If the led light can reach the ldr, the voltage increases at the base pin from my transistor, which is feeded with 5 volts at the collector. This leads to switching 5volts off and on, everytime the ldr is illuminated.

    The pin is connected to the digital pin of my micro controller, giving a low state, each time the ldr is illuminated - which meas each time the rotating plate of the turntable have one whole rotation.

    Since this means a sampling rate of one measurement in 1.8 seconds (in case of 33 1/3 rpm), i added more of this circuits around the rotating plate, which leads to 4 measurements in one rotation. Due to that, the measument of a new value is delayed with 1/4*current rotation speed.

    The rest is done in software: the time between two low states is measured. it should be exactly 1.8 seconds. The control deviation is calculated an a P controller correct the values.

    Step 9: The all over system

    Creating a smart-controlled turntable driver
    Creating a smart-controlled turntable driver

    The all over system looks like shown above and is still highly experimental. The actual system works pretty well. The rotation speed is measured and the p controller gives a new value for the pid controlling two the second control system. The speed of rotation is generally exactly around 33 1/3 rpm, which was the main goal of this project, but it is still in a developing process.

    this video shows the driving turntable and the voltage source, with a flickering led which indicates the controlling.

    I will add steps to this and other instructables, to complete it.

    There will be a more complex circuitry and a PCB board designed. I will implement a automation mechanism to short circuit the generator, if the turntable speed is to high. This will lead to a damping due to its self induction, which will act like a break. This is a good possibility to lower the overshoot.

    Another important point, is that i want to implement a stand alone microcontroller, without any arduino stuff. Thats why i will implement a Atmega328 with my written software in the next weeks.

    If your have comments or are interested in more informations/the software/etc., feel free to contact me.


    Tag cloud

    make build easy simple arduino making homemade solar laser printed portable cheap mini building custom cardboard wooden create super lego turn paracord chocolate your paper light intel