![]() |
![]() |
![]() |
|
|
|||||||
| Robotics Chat Specific to discussions about robots and the making of. |
|
|
Thread Tools | Display Modes |
|
|
(permalink) |
|
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?
|
|
|
|
|
|
|
(permalink) |
|
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 |
|
|
|
|
|
|
(permalink) |
|
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 |
|
|
|
|
|
|
(permalink) | |
|
Quote:
__________________
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 |
||
|
|
|
|
|
(permalink) |
|
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 ----- |
|
|
|
|
|
|
(permalink) |
|
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. |
|
|
|
|
|
|
(permalink) | |
|
Quote:
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 |
||
|
|
|
|
|
(permalink) |
|
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.
|
|
|
|
|
|
|
(permalink) | |
|
Quote:
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 |
||
|
|
|
|
|
(permalink) | |
|
Quote:
|
||
|
|
|
|
|
(permalink) |
|
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--; } } |
|
|
|
|
|
|
(permalink) | |
|
Quote:
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 |
||
|
|
|
|
|
(permalink) | |
|
Quote:
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. |
||
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
|
|
||||
| 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 |