Discussion in "Project Help" started by    kks    Mar 1, 2018.
Thu Mar 01 2018, 02:19 PM
#1
I posted a question before on the working of my project in Proteus. With the help from this website o successfully manged to run it on Proteus, but now when connecting the GND of motor driver ic to the GND of the 8051 programming board, the programming board doesn't even start. For better understanding (since the image its difficult to understand the connections) hers is the pins which i have connected to the 8051 programming board (i followed the proteus simulation circuit diagram which i am posting)

L293D MOTOR DRIVER IC :
A1 - P2.4
A2 - P2.5
EA - 5V
VCC - 12V
GND - GND

I also tried connecting the +ve to 12v and - ve to Gnd, still not working. Help me out here!


[ Edited Thu Mar 01 2018, 08:23 PM ]
Thu Mar 01 2018, 02:24 PM
#2
Here's the attached images.






#include<reg51.h>

#include<string.h>

#include<stdio.h>

#define lcdport P1


sbit rs=P3^7;
sbit en=P3^5;
sbit rw=P3^6;
sbit m1=P2^4;
sbit m2=P2^5;

char i,rx_data[50];

char rfid[13],ch=0;

char pass[4];

void forwardmotor(void) ;
void stopmotor(void);

 void delay(int itime)
{
    int i,j;
    for(i=0;i<itime;i++)
    for(j=0;j<1275;j++);
}

void daten()
{
    rs=1;
	  rw=0;
    en=1;
    delay(5);
    en=0;
}

void lcddata(unsigned char ch)
{
    lcdport=ch & 0xf0;
    daten();
    lcdport=(ch<<4) & 0xf0;
    daten();
}

void cmden(void)
{
    rs=0;
    en=1;
    delay(5);
    en=0;
}

void lcdcmd(unsigned char ch)
{
    lcdport=ch & 0xf0;
    cmden();
    lcdport=(ch<<4) & 0xf0;
    cmden();
}

void lcdstring(char *str)
{
    while(*str)
    {
        lcddata(*str);
        str++;
    }
}

void lcd_init(void)
{
    lcdcmd(0x02);
    lcdcmd(0x28);
    lcdcmd(0x0e);
    lcdcmd(0x01);
}

void uart_init()
{
 TMOD=0x20;
 SCON=0x50;
 TH1=0xfd;
 TR1=1;
}
char rxdata()
{
  while(!RI);
    ch=SBUF;    
    RI=0;
    return ch;
}

void forwardmotor()
{
  m1=1; 
	m2=0;    
	delay(500);
  stopmotor(); 
	delay(500);
  m1=0; 
	m2=1;    
	delay(500);   
	stopmotor();
}


void stopmotor()
{
  m1=0; 
	m2=0;
}

void main()
{
    uart_init();
    lcd_init();
    lcdstring("  RFID Based    ");
    lcdcmd(0xc0);
    lcdstring("Security system "); 
    delay(400);
    while(1)
    {
        lcdcmd(1);
        lcdstring("Place Your Card:");
        lcdcmd(0xc0);
        i=0;
        for(i=0;i<12;i++)
        rfid[i]=rxdata();
        rfid[i]='\0';
        lcdcmd(1);
        lcdstring("Your ID No. is:");
        lcdcmd(0xc0);
        for(i=0;i<12;i++)
        lcddata(rfid[i]);
        delay(100);
        if(strncmp(rfid,"160066A5EC39",12)==0)
        {
            lcdcmd(1);
            lcdstring("Access Granted ");
            lcdcmd(0xc0);
            lcdstring("Person1");
            forwardmotor();
          }
        
        else if(strncmp(rfid,"160066BD7AB7",12)==0)
            {
            lcdcmd(1);
            lcdstring("Access Granted ");
            lcdcmd(0xc0);
            lcdstring("Person2");
            m1=1;
            m2=0;
            delay(300);
            m1=0;
            m2=0;
            delay(200);
            m1=0;
            m2=1;
            delay(300);
            m1=0;
            m2=0;
            }
            
                else if(strncmp(rfid,"160066203060",12)==0)
            {
            lcdcmd(1);
            lcdstring("Access Granted ");
            lcdcmd(0xc0);
            lcdstring("Person3");
            m1=1;
            m2=0;
            delay(300);
            m1=0;
            m2=0;
            delay(200);
            m1=0;
            m2=1;
            delay(300);
            m1=0;
            m2=0;    
            }

        else 
        {
           lcdcmd(1);
           lcdstring("Access Denied");
           delay(300);
        }
  }
}


[ Edited Thu Mar 01 2018, 08:38 PM ]
Thu Mar 01 2018, 08:40 PM
#3
The motor driver module.

Thu Mar 01 2018, 09:31 PM
#4
EA is "Enable A".
It can be switched on and off by logic, or tied high, but not both.
Disconnect EA from pin P2.3 or the 5Volt supply.
If using P2.3 , set it high when the motor is running.


Vcc is 5 volts, by connecting to 12v you may have damaged the chip.
Worse, 12 volts may have fed back onto the main board and damaged it.

Supply the 12 volt power to the screw connections labelled + V -

Fri Mar 02 2018, 07:25 AM
#5
I don't know whether i damaged it or not. The board is behaving strangely though. Sometimes it works, sometimes it doesn't display anything on the Lcd with the same connections.
I have given both 5v and 12v both to vcc. I even tried giving 12v to the + V - pins. But whenever i try to give 12v to either vcc or - /+, the lcd brightens up a little more and the text that was appearing before disappears. Plus there is the problem with the Gnd connection. Doesn't matter what i do as soon as i connect the Gnd pin to the gnd of microcontroller, the board doesn't work. What should i do?
Fri Mar 02 2018, 08:27 PM
#6
The first thing is to check the microcontroller.
Disconnect the motor driver board completely.
Does the microcontroller board (the main board) work normally ?
Fri Mar 02 2018, 11:59 PM
#7
Yes it works fine enough. I have successfully managed to run the program without the motor driver module. When i give Gnd then on giving Vcc Lcd stops working and vice versa.
Sat Mar 03 2018, 10:13 PM
#8
It sounds very much like the driver module is damaged.
Replace the L293 chip.
Do not connect Vcc to 12 volt.
Sun Mar 04 2018, 02:20 AM
#9
😔 Guess you are right. Isn't there any other way in which i can run the motor?
Sun Mar 04 2018, 09:18 PM
#10


😔 Guess you are right. Isn't there any other way in which i can run the motor?

kks


As this is an academic project, do you really need a motor ?
Can you use another way to indicate a door being unlocked.. say an LED ?

Getting a motor to go one way then the other is quite difficult.
You can use relays,but I assume you don't have any.
The L293 chip is the simplest way.

How much current does your motor draw ?


Get Social

Information

Powered by e107 Forum System

Conversation

Mon Nov 12 2018, 05:58 AM
Pavan_user
i have seen your replica of I2C programming using AT89C51 but i am unable to understand the "ack_bit" variable usage ...looks like it is always 1...can you elaborate how acknowledgment is working....
bgk3678
Tue Nov 06 2018, 02:36 PM
kindly any one give solution for my problem
ExperimenterUK
Mon Nov 05 2018, 09:48 PM
Pins high is the normal state. You need a program to set them low
mayengbam
Sun Nov 04 2018, 05:41 PM
hello, i am niranjoy, alll the port of my 8051 is always high, even i erase all the program. why is it so happen and what is the problem. any one please help me!
Sun Nov 04 2018, 02:16 PM
BASAVARAJ g kudamble
hi I am interfacing GSM 300 to 8051 microcontroller to receive message from mobile
ExperimenterUK
Sat Sep 29 2018, 06:28 PM
Please post questions in the forum.
Sat Sep 29 2018, 11:26 AM
Ashfaq Ch
hi i have some AT89C51RC microcontrollers already programed. some one help us to how to download from AT89C51RC and after study and edit all corractions reload to AT89C51RC controller
shshistiem
Wed Sep 12 2018, 10:58 PM
hii!! some1 please let me know how i ll get rfid code to 8051 by WEIGAND mode
DrNossberg
Tue Sep 11 2018, 08:09 PM
is there anyone here?
Mon Aug 27 2018, 07:30 AM
bun
Hello everyone!

Downloads

Comments

atalnet
Fri Nov 16 2018, 07:44 AM
genius784
Wed Nov 14 2018, 09:25 AM
katherineamt
Mon Nov 12 2018, 03:14 PM
wimac
Sun Nov 11 2018, 03:36 PM
suryanspn
Sat Nov 10 2018, 02:52 AM
RubenMarques
Tue Nov 06 2018, 06:35 PM
mayengbam
Sun Nov 04 2018, 05:36 PM
bgk3678
Sun Nov 04 2018, 02:27 PM

Online

Guests: 52, Members: 0 ...

most ever online: 182184
(Members: , Guests: 182184) on 06 Aug 2010: 05:37 AM

Members: 38021
Newest member: atalnet
Forum Activity
ExperimenterUK Avatar
Posted By ExperimenterUK
Mon Nov 19 2018, 01:11 AM
ExperimenterUK Avatar
Posted By ExperimenterUK
Thu Nov 15 2018, 06:48 PM
Unfortunately I have no experience of LabView,but ...
katherineamt Avatar
Posted By katherineamt
Mon Nov 12 2018, 03:22 PM
I have never used LabView and I have to implement ...
ExperimenterUK Avatar
Posted By ExperimenterUK
Mon Nov 12 2018, 01:21 AM
wimac Avatar
Posted By wimac
Sun Nov 11 2018, 04:03 PM
bgk3678 Avatar
Posted By bgk3678
Sun Nov 11 2018, 07:25 AM
ExperimenterUK Avatar
Posted By ExperimenterUK
Tue Nov 06 2018, 06:10 PM
bgk3678 Avatar
Posted By bgk3678
Sun Nov 04 2018, 02:52 PM
bgk3678 Avatar
Posted By bgk3678
Sun Nov 04 2018, 02:48 PM
Xuenan Avatar
Posted By Xuenan
Sat Nov 03 2018, 01:08 PM
Make the 8051 frequency exactly 11.0592 MHz in pro...