Author Topic: Kinda problem :D  (Read 1151 times)

0 Members and 1 Guest are viewing this topic.

Offline facepwnerTopic starter

  • Beginner
  • *
  • Posts: 6
  • Helpful? 0
    • Skype - sssvetlincho
Kinda problem :D
« on: September 04, 2012, 01:59:18 PM »
Hi guys im new to this forum but i write here because i seek help. Since some time i builded my self a robot (easy one) nothing very special 2 motors servo and IR sensor for a distance and for a controller im using arduino UNO. OK got it ? Now to the problem ... when i run my first test program i saw something terrible for my eyes servo is runing the code perfectly but that is not the terrible part ;D the motors are not doing anything NOTHING not at all but when i made a program to test the motors alone (with no code for servo) they are acting well and now im STUNED please guys give me some idea to catch ;D

Offline facepwnerTopic starter

  • Beginner
  • *
  • Posts: 6
  • Helpful? 0
    • Skype - sssvetlincho
Re: Kinda problem :D
« Reply #1 on: September 05, 2012, 01:07:39 AM »
I forgot to say that im using this schematic :

and that code :
Code: [Select]
#include <Servo.h>
Servo microServo;
int motor1APin = 4;
int motor2APin = 5;
int motor1ENPin = 9;
int motor3APin = 6;
int motor4APin = 7;
int motor2ENPin = 10;
int servoPin=11;
void setup() {
pinMode(motor1APin, OUTPUT);
pinMode(motor2APin, OUTPUT);
pinMode(motor1ENPin, OUTPUT);
pinMode(motor3APin, OUTPUT);
pinMode(motor4APin, OUTPUT);
pinMode(motor2ENPin, OUTPUT);
microServo.attach(servoPin);
}
void loop() {
microServo.write(0);
analogWrite(motor1ENPin, 250);
digitalWrite(motor1APin, HIGH);
digitalWrite(motor2APin, LOW);
analogWrite(motor2ENPin, 250);
digitalWrite(motor3APin, LOW);
digitalWrite(motor4APin, HIGH);
delay(3000);
analogWrite(motor1ENPin, 0);
digitalWrite(motor1APin, LOW);
digitalWrite(motor2APin, LOW);
analogWrite(motor2ENPin, 0);
digitalWrite(motor3APin, LOW);
digitalWrite(motor4APin, LOW);
delay(2000);
microServo.write(90);
analogWrite(motor1ENPin, 250);
digitalWrite(motor1APin, LOW);
digitalWrite(motor2APin, HIGH);
analogWrite(motor2ENPin, 250);
digitalWrite(motor3APin, HIGH);
digitalWrite(motor4APin, LOW);
delay(3000);
analogWrite(motor1ENPin, 0);
digitalWrite(motor1APin, LOW);
digitalWrite(motor2APin, LOW);
analogWrite(motor2ENPin, 0);
digitalWrite(motor3APin, LOW);
digitalWrite(motor4APin, LOW);
delay(2000);
microServo.write(180);
}

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Kinda problem :D
« Reply #2 on: September 05, 2012, 10:45:17 AM »
Hi,

I forgot to say that im using this schematic :
Could you post a real schematic instead?
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline facepwnerTopic starter

  • Beginner
  • *
  • Posts: 6
  • Helpful? 0
    • Skype - sssvetlincho
Re: Kinda problem :D
« Reply #3 on: September 05, 2012, 12:59:37 PM »
You mean a picture of the bredboard ?

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Kinda problem :D
« Reply #4 on: September 05, 2012, 08:53:27 PM »
No, a schematic, like this...


A picture of a breadboard (or a drawing of same), is not very helpful, as we have to "draw" a mental schematic from it, to see what's going on.

Save us from such head ache/waste of time and the quality of answers will rise exponentially :)
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline facepwnerTopic starter

  • Beginner
  • *
  • Posts: 6
  • Helpful? 0
    • Skype - sssvetlincho
Re: Kinda problem :D
« Reply #5 on: September 06, 2012, 04:29:13 AM »
oh its a bit hard for me i have never done so hard schematic but i will try my best ... :-[

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Kinda problem :D
« Reply #6 on: September 07, 2012, 07:50:14 PM »
Hi,

You don't need to draw the Arduino - just assign the 8 wires with direction (although I guess they're all out from the arduino (to the rest of the circuiit).
Just get the pin numbers for the L293D correct as you have connected it - shouldn't be all that hard :)
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline facepwnerTopic starter

  • Beginner
  • *
  • Posts: 6
  • Helpful? 0
    • Skype - sssvetlincho
Re: Kinda problem :D
« Reply #7 on: September 11, 2012, 07:01:57 AM »
ugh i tryed something but no idea how to do it ...  :-[

Offline facepwnerTopic starter

  • Beginner
  • *
  • Posts: 6
  • Helpful? 0
    • Skype - sssvetlincho
Re: Kinda problem :D
« Reply #8 on: September 11, 2012, 03:15:38 PM »
I think i found a clue now i saw that the individual battery for the servo isnt powering it at all and when i try to power the all parts 2 motors and servo i moves the servo only i made few tests with commands by deleting all the part of the servo and adding 1 line after every test and the motors stop runing at that line :
Code: [Select]
myServo.attach(servoPin); i think its all the powering ..

 


Get Your Ad Here

data_list