You are on page 1of 11

EE213 Electrical Circuits Laboratory Term Project

DC Motor Speed Control Using PWM

Pre-Report

Berkay Baykara 1875798 Volkan Doan 1875954 Assistant: Gzde ahin

1. Introduction This project is a cooling system which operates a differential operation according to its two temperature sensors (LM35). The system has a fan (connected to a DC motor) which can rotate both clockwise and counter-clockwise to cool the direction which is hotter. The cooling system operates in 3 discrete regions determined by the temperature difference between the sensors. The more the temperature difference is the faster the fan rotates. This system consists of three main parts which have different objects but work in cooperation: The sensors and discretization part, triangular wave generator, and direction part. First two parts are to create three different PWM signals according to the sensors data. Third part defines which way the fan will rotate again according to the sensors-. 2. Analysis A) Sensors & Discretization Part i. Difference Amplifier

In this part, one of the sensor data voltages is subtracted from the other one in order to determine how fast the fan should rotate. By the help of an op-amp there exists a differential operation. The gain of this operation is set to 12/1.2=10 (which means VO=10(V2-V1) where V1 & V2 are the data voltages of the sensor 1 & 2 respectively); therefore, it is possible now to work with numbers with reasonable amplitudes instead of mVs.

ii.

Absolute Value Operation

Since the output of the previous part is proportional to (V 2-V1), it will be positive when V2>V1, and negative when V1>V2. Because the aim of this part of the system is just determine the necessary speed, there should not be any differences like that. Therefore we use an op-amp and just invert the sign of the input voltage only if it is negative. iii. Discretization

In our cooling system there are three discrete cooling speeds. In order to create such a system, there should be different levels which the sensor data will be compared with. In this system, there exist three different comparators each of them with a different compare voltage level. The output voltage of the previous part is compared with 0V, 1.5V and 3V at each comparator. This system leads us to have different outputs when the temperature difference between the sensors is in the interval 0-15 oC, 15-30 oC and over 30 oC. Each of the output voltages of these three comparators is buffered in order to avoid any load effect.

Summing amplifier

To be able to drive the motor with the information come from these three comparators, we need to turn these three output voltages into a single one. We use a summing operation to handle this problem practically. With a gain -1.8/12=-0.15, these voltages are turned into a single output voltage varying related to the temperature difference level between the sensors. If the difference is between 0-15 oC, we have an output like;

and a final output voltage (the output of the all sensor & discretization part, denoted by V SP) with an amplitude of 1.9V. If the difference is between 15-30 oC, we have;

and VSP=-1.5V. If the temperature difference is over 30oC, our voltages are like;

and in this case we have an output voltage VSP=-4.8V.

B) Triangular Wave Generator i. Square Wave Generator In this part of the system, we need to create a square wave in order to turn it into a triangular waveform, which we will use it again to create PWM signals. As a practical method, we connect a 1F capacitor between two input terminals of a negative resistance converter.

This op-amp gives us a 50% duty cycled square wave with a 12V peak voltage. The frequency of this wave affects the frequency of PWM signal and PWMs with low frequencies may sometimes be problematic. To avoid such a problem, we chose 100, 6k and 1.2k resistors and 1F capacitor, therefore we get a frequency which is around 1.1kHz.

Output of the square wave generator

ii.

Integrator

To create PWM signals, we need a triangular wave. We use an integrator in order to turn the square wave we got in previous part into a triangular wave.

The capacitor and the resistor affect the output according to the formula

and with these capacitor and resistor choices we get a triangular wave as output:

Output of the integrator

Now, we have a variable, sensor-dependent VSP and a triangular wave in order to create a PWM signal. There is a final comparator which compares the triangular wave we created and VSP.

During the time when triangular wave is over the VSP, comparator enters + saturation region and as soon as it drops below VSP it enters saturation. By this method we can create 3 discrete PWM signals thanks to 3 discrete VSP levels. After the op-amp there are a diode and a resistor, which act as a half wave rectifier. Since the op-amp supplied with + and 12V it gives -12V in - sat as output. By this rectifier, we increase the bottom level of PWM signal to 0V. C) Direction Part To control the direction of the rotation of our motor, we use two basic comparator and the output voltages of the sensors as inputs. Whenever sensor 1 is hotter than sensor 2, IN1 becomes 12V and IN2 becomes 0V; and when sensor 2 is hotter vice versa. These IN1 and IN2 both go to the motor driver (L293D) and define the direction of rotation of the motor.

10

3. Conclusion By using two temperature sensors, a DC motor, a motor driver and several op-amps we designed a differential cooling system. Speed of the fan depends on the temperature difference between the sensors and our system is capable of cooling the hotter side. For this purpose we create a square wave and make it turn into a triangular one. Then, by subtracting the sensor voltages we get an input. We compare this voltage with three different levels and it provides us with a discretization. By combining these two parts finally we get a PWM signal and control the speed of the motor with it. By a direction part, we also can control the direction of the rotation, which makes our system differential.

11

You might also like