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

Wed Sep 18 2019, 08:48 PM
Caryn Kover
Thank you for your time,
ExperimenterUK
Mon Aug 05 2019, 07:09 PM
@Ismail ..post in forum, give details
Mon Aug 05 2019, 04:33 PM
Ismail balghmi
Hello. Please I won't download
ExperimenterUK
Wed Jul 24 2019, 12:47 AM
@BUSTER123 Please post in the forum
Tue Jul 23 2019, 06:13 PM
BUSTER123
hello! newbie here. i am kind of a guy who hates using ready - made existing libraries, so this helped a lot as i was trying to control and write to a character lcd display. however, i can't figure out how to set the cursor position. for example, i want to set it to the 5th column in the first row, so position 5. so according to the table, i am sending 10000101 on the 8 data lines of the lcd (register select pulled low). the cursor does not move there however. and i cant move the cursor left or right too. is it something wrong that i am doing? thank you.
ExperimenterUK
Thu Jul 11 2019, 07:55 PM
@ramos https://www.theengineeringprojects.com/2017/09/l298-motor-driver-library-proteus.html
ExperimenterUK
Thu Jul 11 2019, 07:44 PM
@praveen123. Can you give a link to the project ?
Thu Jul 11 2019, 04:47 PM
ramos
buenos dias alguien podria ayudarme necesito saber como descargar la libreria del l298n para proteus
Thu Jul 11 2019, 11:11 AM
praveen123
anyone can help me
Thu Jul 11 2019, 11:11 AM
praveen123
i need source code for 8051 -smart trolley rfid

Downloads

Comments

ramon_vsc
Fri Sep 20 2019, 04:53 PM
youssoufba
Thu Sep 19 2019, 11:57 AM
Taiphan000
Tue Sep 17 2019, 04:21 AM
mawantha
Fri Sep 13 2019, 10:42 AM
jonelily954
Mon Sep 02 2019, 12:34 PM
electrobyte
Sat Aug 31 2019, 03:24 AM
Moutonajj
Sun Aug 25 2019, 09:30 PM
jualanled
Sat Aug 17 2019, 03:41 AM

Online

Guests: 34, Members: 0 ...

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

Members: 38092
Newest member: ramon_vsc
Forum Activity
nick@IT Avatar
Posted By [email protected]
Wed Aug 07 2019, 10:38 AM
I am trying to execute USSD codes through my GSM m...
ExperimenterUK Avatar
Posted By ExperimenterUK
Sun Jul 28 2019, 08:55 PM
An LM339 may not be fast enough for reliable SPI ...
sakibnaz Avatar
Posted By sakibnaz
Sun Jul 28 2019, 06:40 AM
Hi All.I need to connect my MCU with an external S...
ExperimenterUK Avatar
Posted By ExperimenterUK
Wed Jul 24 2019, 10:42 PM
Your unit is communicating, so I assume the GPS si...
ExperimenterUK Avatar
Posted By ExperimenterUK
Wed Jul 24 2019, 10:32 PM
Have you read this ?http://www.8051projects.net/wi...
manu8193 Avatar
Posted By manu8193
Wed Jul 24 2019, 04:57 AM
any one tell me the explaination and 'c' code for ...
3AAPC Avatar
Posted By 3AAPC
Sun Jul 21 2019, 12:51 AM
3AAPC Avatar
Posted By 3AAPC
Sun Jul 21 2019, 12:47 AM
With the GPS antenna in the outdoors, I use the ub...
ameya123 Avatar
Posted By ameya123
Fri Jul 19 2019, 07:42 AM
Hello,Please share 8051 Assembly language code for...
figureyang Avatar
Posted By figureyang
Fri Jul 05 2019, 04:37 AM
here is the source code prepared for you download ...