electrofriends.com  

...bringing innovative minds together       | HOME | ABOUT US | ARTICLES | SOURCE CODES | PROJECTS | EBOOKS |  FEEDBACK |  

DC MOTOR CONTROLLING SYSTEM

2.PIC MICROCONTROLLER

           It is used to control the rotation of the motor. This senses the input and process it using the program burned in it and gives the required PWM output on the required port pins. The program is given later. To control the speed we need to control the duty cycle (‘ON’TIME / PERIOD). That is controlling the ON time. In the program we have used a timer (TIMER0), this timer can be used as variable delay generator to control the ON, OFF times. Also the prescalar can be used to change the varying ON time because it provides internal timing for program execution. We have made use the prescalar to control the PWM output which in turn controls the speed. Initially timer0 is set with some value and some prescalar. When it overflows it generates an Interrupt. This sets TOIF flag in the INTCON register. At the same time the program execution is deviated to the ISR. Here a register is used to control the varying time and to shift alternatively to send high and low as output. This is nothing but the PWM output.

 3.OUTPUT

           The output from the portA is given to the H-bridge. It is the arrangement of four transistors as shown below. Here four power transistors 2N3055 are used (Q1,q2,Q3,Q4). At any time either Q1, Q3 or Q2, Q4 are made ‘ON’, hence current flows from the source (Vdd) to ground (Vss) through the motor. The direction of the  motor is dependent on the polarity of the current. Hence by changing the ‘ON’ transistor pairs we can control the direction of the motor. To ‘ON’ the transistor we need to give high to its base. On controlling output coming out of port we can achieve the control over the motor rotation direction.

 

 

 H BRIDGE CIRCUIT

PIC 16F84A IC PIN DIAGRAM

 

WORKING OF THE CIRCUIT

THE SIMPLIFIED CIRCUIT DIAGRAM

The circuit is built around the PIC IC 16F84A. The circuit is built as shown above. The power supply of 5V and ground is given to appropriate pin of the PIC IC and to the H Bridge circuit. A 4M Hz crystal oscillator (S) is connected as shown in the figure. Other type of oscillators can also be used. The crystal oscillator is more stable compare to other types. Oscillator acts as a clock source for the PIC IC operation.

The portB’s four pins are given to the H-Bridge as shown in the figure. These pins are the control lines (PWM output lines) given to H-Bridge to rotate in the desired direction and desired speed.

 To change the direction and speed we need two buttons S1, S2. These buttons are one side grounded and the other sides are connected to the pin of the appropriate port of the PIC IC. On pressing the button S2 the speed is shift between minimum and maximum .On pressing the button S1 the direction of rotation is changed either clockwise or anti-clockwise. 

FURTHER DEVELOPMENT

           On varying the prescalar of the PIC we can achieve different speeds. For controlling this speed we need to add extra instruction in the ISR. There are still 3 pins left in the PORTB which can be used for the control of these speeds.

            To handle a motor which requires more power, high power transistors or power amplifiers can be used.

            This is the method by which we can control the motor direction and speed digitally. This allows us to control the motor without a direct wire connection between control unit and the motor driving circuit. By using appropriate communication method this can be achieved.

 APPLICATIONS

            This project is built with the PIC IC. Hence become more compact. Here the speed and direction are controlled digitally. Hence wireless communication between the controller and the dc driver is possible by adopting suitable methods. This project can be used wherever there is a DC motor. The controlling becomes very easy because a very small circuitry is sufficient.

                This can be used in any industrial applications and in electronic devices, where a DC motor control is significant.

| previous page | next page |

Other Microcontroller projects and articles

 Digital IC Tester using 8951 Microcontroller

 Automatic Railway Gate Control

 Car parking system using 8051 Microcontroller

 Interfacing an LCD to the 8051 Microcontroller

 8051 microcontroller Instruction Set

 8051 Microcontroller port programming

 Programmable number lock system

 Water level indicator cum controller

 Robotic car

 Intelligent Train Engines

 For more projects click here

 

 

 | HOME | ABOUT US | ARTICLES |  SOURCE CODES | PROJECTS |  SITEMAP |  EBOOKS | FEEDBACK |   



  Copyrights © 2005-2007 electrofriends.com, All rights reserved. webmaster@electrofriends.com