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

Sun May 20 2018, 01:16 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, 09:51 AM
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, 04:09 PM
ashutosh jain
IR Remote Switch using TV remote (RC5 Protocol) is not working properly. opp1 & opp2 is in problem.plz help
ExperimenterUK
Fri Apr 27 2018, 11:24 PM
@kaiserslautern Post in forum
Wed Apr 25 2018, 10:24 AM
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
Sat Apr 21 2018, 11:05 PM
This is a community site. Feel free to help anyone needing advice
hareeshchamiyar
Thu Mar 29 2018, 02:02 PM
please help me for the configuration bits for dspic30f2010
hareeshchamiyar
Thu Mar 29 2018, 02:00 PM
can any one using dspic30f2010.
Thu Mar 29 2018, 09:18 AM
Neena
can anybody give solar tracking in 8051 using proteus and keil to mail [email protected]
ExperimenterUK
Mon Mar 19 2018, 10:48 PM
sorry bedo.. maybe next time

Downloads

Comments

bdmehta
Tue May 22 2018, 02:30 AM
kmag1953
Sun Apr 29 2018, 07:09 PM
udiwonder
Sat Apr 28 2018, 12:41 PM
pirpiri
Sat Apr 21 2018, 03:35 PM
Pater
Fri Apr 20 2018, 02:38 PM
jamiel
Sat Apr 14 2018, 12:47 AM
akrepkral76
Wed Apr 04 2018, 07:51 PM
samanthaeaves
Mon Apr 02 2018, 06:27 AM

Online

Guests: 59, Members: 0 ...

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

Members: 37998
Newest member: bdmehta
Forum Activity
ExperimenterUK Avatar
Posted By ExperimenterUK
Thu Jul 12 2018, 08:27 PM
I'm glad we got there in the end :)>whats differen...
LAMBO Avatar
Posted By LAMBO
Thu Jul 12 2018, 06:51 AM
hi sir as u mentioned above to change crystal and ...
ExperimenterUK Avatar
Posted By ExperimenterUK
Tue Jul 10 2018, 07:20 PM
I assume you meant a AT89S52.It seems to me that...
LAMBO Avatar
Posted By LAMBO
Tue Jul 10 2018, 06:06 AM
hi sir i have checked now much of the distortion ...
ExperimenterUK Avatar
Posted By ExperimenterUK
Mon Jul 09 2018, 06:55 PM
Okay that is very interesting.I have attached two ...
LAMBO Avatar
Posted By LAMBO
Mon Jul 09 2018, 08:14 AM
hi sir as u mentioned above program i have tried ...
ExperimenterUK Avatar
Posted By ExperimenterUK
Fri Jul 06 2018, 11:58 PM
Okay..That motor creates a lot of sparks which mig...
LAMBO Avatar
Posted By LAMBO
Fri Jul 06 2018, 01:33 PM
hi sir as u told >Try the original code againi hav...
ExperimenterUK Avatar
Posted By ExperimenterUK
Mon Jul 02 2018, 06:20 PM
>is it ok to work on 12.10 v Yes, that is ok.>now...
LAMBO Avatar
Posted By LAMBO
Mon Jul 02 2018, 08:22 AM
hi sir as u mentioned in the program i have checke...