Speed control of DC motor By 8051 Development Board -Robomart



Materials required

*Hex keypad
*DC motor

I assume u have basic knowledge of 8051 Kit online india programming in assembly 


Interfacing DC motor -L293D

L293D is a double H-Bridge motor driver, so with one IC we can interface two DC motors which can be controlled in both clockwise and counter clockwise course we can control rate of every dc motor by offering PWM to empower pin .L293D has yield ebb and flow of 600mA and top yield momentum of 1.2A for each channel. Besides for assurance of circuit from back EMF yield diodes are incorporated inside of the IC. The yield supply (VCC2) has a wide range from 4.5V to 36V, which has settled on L293D a best decision for DC motor driver.

   As should be obvious in the circuit, three pins are required for interfacing a DC motor (A, B, Enable). On the off chance that you need to control velocity empower pin is associated with the PWM pin of microcontroller. I have associated one and only motor and utilized the empower pin to control the pace of dc motor.

Interfacing LCD

I will not go in deep with LCD as it is a too vast topic I have mentioned some sites which are very use full

    LCD consist of 16 pin
    Vdd-positive voltage
    Vee-contrast setting
    data pin D0 to D7
    backlight pin LED and LED-

The LCD requires 3 control lines (RS, R/W and EN) and 8 (or 4) information lines. At the point when RS is low (0), the information is to be dealt with as a charge. At the point when RS is high (1), the information being sent is considered as content information which ought to be shown on the screen.
Whenever R/W is low (0), the data on the information transport is being composed to the LCD. At the point when RW is high (1), the system is successfully perusing from the LCD. The vast majority of the times there is no compelling reason to peruse from the LCD so this line can straightforwardly be associated with Gnd hence sparing one controller line. The ENABLE pin is utilized to hook the information present on the information pins. A HIGH - LOW flag is required to lock the information. The LCD translates and executes our summon at the moment the EN line is brought low. In the event that you never bring EN low, your direction will never be executed.


Interfacing HEX keypad

Hex key cushion is basically an accumulation of 16 keys orchestrated as a 4×4 network. Hex key cushion more often than not have keys speaking to numeric's 0 to 9 and characters A to F.

The hex keypad has 8 correspondence lines in particular R1, R2, R3, R4, C1, C2, C3 and C4. R1 to R4 speaks to the four lines and C1 to C4 speaks to the four sections. At the point when a specific key is squeezed the comparing line and section to which the terminals of the key are joined gets shorted. For instance if key 1 is squeezed line R1 and segment C1 gets shorted et cetera. The project recognizes which key is squeezed by a technique known as section checking. In this system a specific line is kept low (different lines are kept high) and the segments are checked for low. In the event that a specific section is discovered low then that implies that the key joined between that segment and the relating line (the line that is kept low) is been squeezed. For instance if line R1 is at first kept low and segment C1 is discovered low amid examining, that implies key 1 is squeezed

Complete code

Now as we know LCD, hex keypad and L293D interfacing we will now discuss the flow of program 

ANL A,#0FH                     ; MASK HIGHER NIBBLE

//---------CONVERT MOTOR--------------
        MOV R3,A      ; SAVE NUMBER IN R3
        MOV A,R1      ;
        MOV    R2,A      ;Put counter in R2

        MUX: MOV B,#10
        MUL AB          ; MULTIPLY 10
        DJNZ R2,MUX       ;depending on position
        ADD A,R7
        MOV R7,A

when first number is entered it is multiplied by 100 then saved in R7 a counter in R1 is used to keep the track of digits place then the second number is multiplied by 10 and added to first number saved in R7 and the number unit place is added to get the PWM

after this execution the program jumps back to LCD to change the display ,and then PWM loop to rotate the motor with new PWM and the cycle continues.    


Speed control of DC motor By 8051 Development Board -Robomart Speed control of DC motor By 8051 Development Board -Robomart Reviewed by Unknown on 13:18:00 Rating: 5

No comments:

Most Viewed

Powered by Blogger.