Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Robotics Chat


Robotics Chat Specific to discussions about robots and the making of.

Reply
 
Thread Tools Display Modes
Old 26th February 2008, 03:56 PM   (permalink)
Default Problem with L293D

Just wanna ask i have this problem in my line follower that my when i turn on the power the left motor always running even if there is no detection from my sensor?
Klitzie is offline   Reply With Quote
Old 26th February 2008, 10:19 PM   (permalink)
Default

I assume you connected 2 motors onto the L293D, on pin 3- 6, and 11- 14.

Check the control pins, ie pin 2 and 7, pin 10 and 15. May be your wiring's incorrect?
__________________
May the force be with you.


My project: Simple White Line Follower

http://au.youtube.com/watch?v=8Z_MmrdH4oc

http://i271.photobucket.com/albums/j...nefollower.jpg
Wingmax is offline   Reply With Quote
Old 27th February 2008, 07:30 AM   (permalink)
Default

Pin 3-6 for Left Motor, Pin 11-14 Right Motor
Pin 2-7 Connected from RB0-RB1 of my PIC16F877a
Pin 10-15 Connected from RB2-RB3
Klitzie is offline   Reply With Quote
Old 27th February 2008, 10:27 AM   (permalink)
Default

Quote:
Originally Posted by Klitzie
Pin 3-6 for Left Motor, Pin 11-14 Right Motor
Pin 2-7 Connected from RB0-RB1 of my PIC16F877a
Pin 10-15 Connected from RB2-RB3
You have to isolate where is the problem. Have you got an oscilloscope to check whether there is PWM waveform (or noise) on the left motor control pins when there is no detection from the sensor. Or you can disconnect the connection from the PIC to the left motor control pins, if motor stops, that means the cause is from the PIC, if motor still running, the cause is from the L293D. Hope this helps.
__________________
May the force be with you.


My project: Simple White Line Follower

http://au.youtube.com/watch?v=8Z_MmrdH4oc

http://i271.photobucket.com/albums/j...nefollower.jpg
Wingmax is offline   Reply With Quote
Old 27th February 2008, 11:19 AM   (permalink)
Default

I had a similar problem but of course the cause might be entirley different from what t he casue might be in your case.

In my case, I had a blown up pin on my PIC :-(
__________________
Its not the Practice that makes a man perfect. Its the Man who makes the practice perfect
----- Pradeep K. Shima -----
pkshima is offline   Reply With Quote
Old 27th February 2008, 02:23 PM   (permalink)
Default

I tried to disconnect the RB0-RB1 from the pic to the motor control pins of L293D when i turn on the supply the motor halt. I can figure out why in the world pin RB0 is always high?

By the way i didn't used PWM for this one.
Klitzie is offline   Reply With Quote
Old 27th February 2008, 10:20 PM   (permalink)
Default

Quote:
Originally Posted by Klitzie
I tried to disconnect the RB0-RB1 from the pic to the motor control pins of L293D when i turn on the supply the motor halt. I can figure out why in the world pin RB0 is always high?

By the way i didn't used PWM for this one.
At lease now you know the cause was from the PIC. May be there's programming error?

I'm working on a line tracking robot too, and I am using L293D, just curious, how do you adjust the motor speed if you not using PWM?
__________________
May the force be with you.


My project: Simple White Line Follower

http://au.youtube.com/watch?v=8Z_MmrdH4oc

http://i271.photobucket.com/albums/j...nefollower.jpg
Wingmax is offline   Reply With Quote
Old 28th February 2008, 11:19 AM   (permalink)
Default

Its just the factory speed of futaba when your not using a PWM. Can i post my source code here so that you can help me find the problem easily i know people here are all pro about electronics and robotics stuff.
Klitzie is offline   Reply With Quote
Old 28th February 2008, 11:26 AM   (permalink)
Default

Quote:
Originally Posted by Klitzie
Its just the factory speed of futaba when your not using a PWM. Can i post my source code here so that you can help me find the problem easily i know people here are all pro about electronics and robotics stuff.

I'm sure there're many people will help.
__________________
May the force be with you.


My project: Simple White Line Follower

http://au.youtube.com/watch?v=8Z_MmrdH4oc

http://i271.photobucket.com/albums/j...nefollower.jpg
Wingmax is offline   Reply With Quote
Old 28th February 2008, 01:13 PM   (permalink)
Default

Quote:
Originally Posted by Klitzie
Its just the factory speed of futaba when your not using a PWM. Can i post my source code here so that you can help me find the problem easily i know people here are all pro about electronics and robotics stuff.
You don't drive a servo motor with an H-Bridge.
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is offline   Reply With Quote
Old 28th February 2008, 02:55 PM   (permalink)
Default

Im actually using L293D as my h-bridge but i came across a problem where my left motor always running so i isolate it then came to conclusion it was the PIC sending high input to my driver that causes my left motor to run.

I tried a simulation using Proteus Wingmax everything is fine but when i try it in actual hardware my RB0 always high. Please try to review my codes here below: By the way pic-lite is my compiler.

#include<pic.h>

/* BLACK LINE = 1 */
/* WHITE SURFACE = 0*/

#define FORWARD 0x09
#define RIGHT 0x08
#define LEFT 0x01
#define L_SENSOR 0x01
#define C_SENSOR 0x02
#define R_SENSOR 0x04
#define STOP 0x00

void delayslow(int x);
void delayfast(int x);
void servoleft();
void servoright();
void forward();
void stop();

void main()
{

__CONFIG(0x3FF9);

TRISA = 0x1F;
TRISB = 0x00;

while(1)
{
if((PORTA&L_SENSOR)==L_SENSOR)
{
servoright();
}
else if((PORTA&C_SENSOR)==C_SENSOR)
{
forward();
}
else if((PORTA&R_SENSOR)==R_SENSOR)
{
servoleft();
}
else
stop();

}

}

void servoleft()
{
PORTB = LEFT;

}

void forward()
{
PORTB = FORWARD;
}

void servoright()
{
PORTB = RIGHT;
}

void stop()
{

PORTB = STOP;
}

void delayslow(int x)
{
int y,z;
y=5000;
z=5000;

while(x)
{
while(y)
{
while(z)
{
z--;
}
y--;
}
x--;
}

}

void delayfast(int x)
{
int y,z;
y=5;
z=5;

while(x)
{
while(y)
{
while(z)
{
z--;
}
y--;
}
x--;
}
}
Klitzie is offline   Reply With Quote
Old 29th February 2008, 03:55 AM   (permalink)
Default

Quote:
Originally Posted by Klitzie
Im actually using L293D as my h-bridge but i came across a problem where my left motor always running so i isolate it then came to conclusion it was the PIC sending high input to my driver that causes my left motor to run.

I tried a simulation using Proteus Wingmax everything is fine but when i try it in actual hardware my RB0 always high. Please try to review my codes here below: By the way pic-lite is my compiler.

}

Your code seems to be OK. Have you check the state of PORTA&R_SENSOR when the left motor is running?
__________________
May the force be with you.


My project: Simple White Line Follower

http://au.youtube.com/watch?v=8Z_MmrdH4oc

http://i271.photobucket.com/albums/j...nefollower.jpg
Wingmax is offline   Reply With Quote
Old 2nd March 2008, 12:06 AM   (permalink)
Default

Quote:
Originally Posted by Klitzie
Im actually using L293D as my h-bridge but i came across a problem where my left motor always running so i isolate it then came to conclusion it was the PIC sending high input to my driver that causes my left motor to run.

I tried a simulation using Proteus Wingmax everything is fine but when i try it in actual hardware my RB0 always high. Please try to review my codes here below: By the way pic-lite is my compiler.
Why not try to build an independent H-Bridge first, test it manually, then simulate your micro controller circuit with LEDs, test the signals, then, when everything is correct, connect the all.

take a look at that H-bridge build upon an L293D. this might help:
http://www.ikalogic.com/shm_hb_l298.php

Note: when a PIN is behaving such is such a stange way, this is usually cased by hardware short circuit, or sort-off..

good luck.
__________________
Ibrahim Kamal
check my electronics and robotics page: http://www.ikalogic.com/
ikalogic is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Latest
Keil C problem sarang1_in Micro Controllers 3 27th February 2005 05:05 AM
Problem; Random pic performance timothyjackson Micro Controllers 7 19th February 2005 06:19 PM
Big problem!! zezito Electronic Projects Design/Ideas/Reviews 4 29th October 2004 02:05 AM
12F675 Problem brodin Micro Controllers 10 29th December 2003 09:40 PM
strange color camera problem schrodingerscat Electronic Projects Design/Ideas/Reviews 5 4th October 2003 07:25 PM



All times are GMT. The time now is 05:28 AM.


Electronic Circuits  |  Electronics Wiki
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.