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

shshistiem
Thu Sep 13 2018, 04:28 AM
hii!! some1 please let me know how i ll get rfid code to 8051 by WEIGAND mode
DrNossberg
Wed Sep 12 2018, 01:39 AM
is there anyone here?
Mon Aug 27 2018, 01:00 PM
bun
Hello everyone!
Sat Jul 21 2018, 11:51 AM
Dibakar Bhanja Chowdhury
By using a 555 timer how can I expand the range of the mobile phone jammer? Please reply me asap
Sun May 20 2018, 03:31 PM
justinb
how to write and execute a program that read the keypad button and display the number on 7 segment on intel8051 at89s52 in assembly language?
Thu May 17 2018, 12:06 PM
HAMZA TAJ
sir iwant to ask about controller of three phase supply by using back to back thyristor instead of triac....will u give me some guideline?
Sat Apr 28 2018, 06:24 PM
ashutosh jain
IR Remote Switch using TV remote (RC5 Protocol) is not working properly. opp1 & opp2 is in problem.plz help
ExperimenterUK
Sat Apr 28 2018, 01:39 AM
@kaiserslautern Post in forum
Wed Apr 25 2018, 12:39 PM
kaiserslautern
Hello everyone, using software uart is a very good idea for a second serial port. Thank you so much. I would kindly like to know how to connect this port to the PC?
ExperimenterUK
Sun Apr 22 2018, 01:20 AM
This is a community site. Feel free to help anyone needing advice

Downloads

Comments

PCBindex
Fri Sep 14 2018, 02:45 AM
sirkit
Thu Sep 13 2018, 04:46 AM
shshistiem
Wed Sep 12 2018, 10:36 PM
DrNossberg
Tue Sep 11 2018, 03:25 PM
ranjanvh
Thu Sep 06 2018, 02:28 PM
rbbhamre
Tue Sep 04 2018, 06:15 PM
Tressie
Sun Sep 02 2018, 02:20 PM
Sudhansudeep
Fri Aug 31 2018, 08:26 AM

Online

Guests: 50, Members: 0 ...

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

Members: 38006
Newest member: PCBindex
Forum Activity
ExperimenterUK Avatar
Posted By ExperimenterUK
Thu Sep 13 2018, 08:39 PM
First of all, by reading your reply, I abandoned m...
DrNossberg Avatar
Posted By DrNossberg
Thu Sep 13 2018, 03:49 PM
Hi, thanks you for your reply ^^ First of all, by ...
ExperimenterUK Avatar
Posted By ExperimenterUK
Wed Sep 12 2018, 12:12 AM
HiThere are several issues here.The original 8051 ...
DrNossberg Avatar
Posted By DrNossberg
Tue Sep 11 2018, 08:08 PM
Hello everybody!First of all let me explain some s...
ExperimenterUK Avatar
Posted By ExperimenterUK
Fri Sep 07 2018, 05:08 AM
The compiler thinks the micro doesn't have enough...
Sudhansudeep Avatar
Posted By Sudhansudeep
Fri Sep 07 2018, 02:59 AM
this is the build output message
Sudhansudeep Avatar
Posted By Sudhansudeep
Fri Sep 07 2018, 01:38 AM
Change the mobile number as [number removed] in t...
ExperimenterUK Avatar
Posted By ExperimenterUK
Thu Sep 06 2018, 08:56 PM
I don't know what the problem is, I get no errors....
Sudhansudeep Avatar
Posted By Sudhansudeep
Thu Sep 06 2018, 01:12 PM
the code is Attachment ...
Sudhansudeep Avatar
Posted By Sudhansudeep
Thu Sep 06 2018, 12:48 PM
the code is same as u sent me for 16 chars