Introduction: DC Motor Speed Drive
This instructable will elaborate on the design, simulation, building and testing of a switch mode dc to dc converter and control system controller for a DC motor. This converter will then be used for the digital control for a shunt dc motor with a load. The circuit will be developed and tested in different phases.
The first phase will be to build a converter to operate at 40V. This is done to ensure that their is no parasitic inductance from wires and other circuit components which can damage the driver at high voltages. In the second stage the converter will operate the motor at 400 V with at a maximum load. The final stage is to control the speed of the motor with a variable load with the arduino controlling a pwm wave to adjust the voltage.
Components are not always cheap and thus an attempt was made to build the system as cheaply as possible. The end result of this practical will be to build a dc-dc converter and a control system controller to control the speed of the motor within 1% at a set point in steady state and to set the speed within 2s with a variable load.
Step 1: Component Selection and Specifications
The motor I had available had the following specifications.
Motor Specifications: Armature: 380 Vdc, 3.6 A
Excitation (Shunt): 380 Vdc, 0.23 A
Rated speed: 1500 r/min
Power: ≈ 1.1 kW
DC Motor power supply = 380V
Optocoupler and driver power supply = 21V
This would imply that the maximum current and voltage rating of components that are connected to or controlling the motor would have higher or equivalent ratings.
The freewheel diode, labelled as D1 in the circuit diagram, is used to give the reverse emf of the motor a path to flow preventing the current from reversing and damaging components when the power is shut-off and the motor is still turning (generator mode) .It is rated for a maximum reverse voltage of 600V and a maximum forward DC current of 15 A. Therefore it can be assumed that the flywheel diode will be able to operate at a sufficient voltage and current level for this task.
The IGBT is used to switch the power to the motor by receiving a 5V pwm signal from the Arduino through the optocoupler and IGBT driver to switch the very large 380V motor supply voltage. The IGBT that is used has a maximum continuous collector current of 4.5A at a junction temperature of 100°C. The maximum collector emitter voltage is 600V. Therefore it can be assumed that the flywheel diode will be able to operate at a sufficient voltage and current level for the practical. It is important to add a heatsink to the IGBT preferably a large one. If IGBTs are not available a fast switching MOSFET can be used.
The IGBT has a gate threshold voltage of between 3.75 V and 5.75 V and a driver is needed to deliver this voltage. The frequency at which the circuit will be operated is 10 kHz thus the switching times of the IGBT needs to be orders faster than 100 us, the time of one full wave. The switching time for the IGBT is 15ns which is sufficient.
The TC4421 driver that was selected has switching times of at least 3000 times the PWM wave. This ensures that driver is able to switch fast enough for the circuit operation. The driver is needed to provide more current than the Arduino can give. The driver obtains the needed current to operate the IGBT from the power supply rather than pulling it from the Arduino.This is to protect the Arduino because drawing to much power will overheat the Arduino and smoke will come out and the Arduino will be destroyed (tried and tested).
The driver will be isolated from the microcontroller providing the PWM wave by using an optocoupler. The optocoupler completely Isolated the Arduino which is the most important and valuable part of your circuit.
For motors with different parameters only the IGBT needs to be changed to one with similar characteristics to the motor that will be able to handle the reverse voltage and continuous collector current current needed.
A WIMA capacitor is used in conjunction with a electrolytic capacitor across the motor power supply. This stores a charge to stabilize the power supply and most importantly helps eliminate the inductances from the cables and connectors in the system
Step 2: Building and Layout
The layout of the circuit was set out in order to minimize distance between components to eliminate unnecessary inductances. This was done especially in the loop between the IGBT driver and the IGBT. An attempt was made to eliminate noise and ringing with large resistances that were grounded between the Arduino, Optocoupler, Driver and IGBT.
The components are soldered onto a Veroboard. An easy way to build the circuit is to draw the components of the circuit diagram on the veroboard before you start soldering. Solder in a well ventilated area. Scrath the conductive path of with a file to create a gap between components that should not be connected. Use DIP packages so components can easily be replaced. This helps when components fail to not then have to solder them out and resolder the replacement part.
I used banana plugs (black and red sockets) to easily connect my power supplies to the veroboard this can be skipped and the wires directly soldered onto the circuit board.
Step 3: Programming the Arduino
The pwm wave is generated by including the Arduino PWM library (attached as a ZIP file). A proportional integral controller PI controller) is used to control the speed of the rotor. The proportional and integral gain can be calculated or estimated until sufficient settling times and overshoots are obtained.
The PI controller is implemented in the Arduino’s while() loop. The Tachometer measures the speed of the rotor. This measurement input to the arduino into one of the analog inputs using analogRead.The error is calculated by subtracting the current rotor speed from the setpoint rotor speed and set equal to error. The time integration was done by adding sample time to time every loop and setting it equal to the time and thus increasing with every iteration of the loop. The duty cycle that the arduino can output ranges from 0 to 255. The duty cycle is calculated and output to the selected digital output PWM pin with pwmWrite from PWM library.
Implementation of PI controller
double error = ref - rpm;
Time = Time + 20e-6;
double pwm = initial + kp * error + ki * Time * error;
Implementation of PWM
double sensor = analogRead(A1);
The full project code can be seen in the ArduinoCode.rar file. The code in the file was adjusted for an inverting driver. The inverting driver had the following effect on the circuit duty cycle meaning new_dutycycle = 255 -dutycycle. This can be changed for non inverting drivers by reversing the above equation.
Step 4: Testing and Conclusion
The circuit was finally tested and measurements were taken to determine if the desired result has been achieved. The controller was set to two different speeds and uploaded to the arduino. The power supplies turned on. The motor accelerates quickly past the desired speed then settles at the selected speed.
This technique of controlling a motor is very effective and would work on all DC motors.
We have a be nice policy.
Please be positive and constructive.