Show Posts
Pages: [1] 2 3 4
1  Using Arduino / Motors, Mechanics, and Power / Re: motor,servos cannoy work at the same time...HELP! on: August 03, 2013, 09:40:21 am
Yes. its connected to the motor driver, but powered from the uno. Standard when using 2 motors with that motor driver.
So should I increase the power output?put in more than 3 AA batteries?
2  Using Arduino / Motors, Mechanics, and Power / Re: motor,servos cannoy work at the same time...HELP! on: July 31, 2013, 12:57:03 pm
The servo( SG90 Mini Servo): 3.5-8.4V,
The two motors are fa-130 type motors. So 1.5-3v.
power source is 4.5V. Thats 3 AAA duracell duralock batteries. Also, connected to the jack plug is a 9v battery.
The wiring is an attachment.
3  Using Arduino / General Electronics / Re: Why do servos use so much power? on: July 28, 2013, 07:12:43 pm
Fair enough...thanks!
4  Using Arduino / General Electronics / Why do servos use so much power? on: July 28, 2013, 06:50:32 pm
Hello,
I was looking for a servo, and I was just curious to notice that a micro servo, with a very small motor,uses about 4.8-6V of power. Just out of curiosity, why is this. I've seen larger and more powerful dc motors go for 3v, 6v...but the one in a micro servo is tiny.
Thanks.
5  Using Arduino / Motors, Mechanics, and Power / motor,servos cannoy work at the same time...HELP! on: July 28, 2013, 06:40:19 pm
Hello,
I hooked up an Arduino UNO to two dc motors via sn746 motor driver ic(1.5-3V), a microservo(4.8-6v), and a ping))) sensor with a 4.5 power supply. I noticed that I cannot have them operate at the same time. For example, once the servo moves, both motors stop.
Why is this and how can I connect it differently ?
6  Using Arduino / Networking, Protocols, and Devices / Re: Android or iphone for arduino??? on: July 19, 2013, 05:18:10 pm
Ok, in that case, assuming ill be using an Android(my contract expires soon), how would I be able to move motors and servos with my phone(wirelessly, of course)?
7  Using Arduino / Networking, Protocols, and Devices / Android or iphone for arduino??? on: July 19, 2013, 12:24:33 pm
Hello,
I want to control an Arduino uno through a phone.My question is which phone(Android or iPhone) should I get to control it?
Also, just to make sure, would I control the arduino with the phone via bluetooth or do I need an Xbee shield?
Thanks.
8  Using Arduino / Project Guidance / Wireless Arduino Contol?? on: July 19, 2013, 12:20:51 pm
Hello,
I want to make a r/c controlled arduino robot. Im planning to control it via Android/iphone, computer(through zigbee).
Can anyone tell me if there are any other ways to wirelessly control an arduino?
9  Using Arduino / Motors, Mechanics, and Power / Power for Multiple Servos on: July 09, 2013, 02:05:07 pm
Hey,
I want to control 3 or 4 servos on an Arduino Uno, on 3 or 4 pins.  Each servo is 4.8-6V...and I was just wondering how many voltages is needed for my batteries?
-Thanks
10  Using Arduino / Programming Questions / Re: Serial Communication with dc Motors problem!! on: July 06, 2013, 08:43:18 am
I changed the enablepin2 to pin 6...but still, the same problem arises with lu.

What if I wanted to make the code a bit simpler by having the motors run at full speed. In the serial box, all I would need to write in is ru, rd, lu,ld. I'm trying to figure out how would I do that.
11  Using Arduino / Programming Questions / Re: Serial Communication with dc Motors problem!! on: July 05, 2013, 06:00:14 pm
Hey crossroads, the code is fine...just a couple of things.
1) Im not too sure how speeds work. Im relatively new to programming, so I would type in "ru150" and then it would change it to another value like "ru48"
2) pretty much every command works(ru__,rd__,ld__) except for lu__. Whenever I would enter it, the motor wont do anything, or if its already running, it will stop.

btw, your code is impressive and much simpler, so thanks!
12  Using Arduino / Installation & Troubleshooting / Re: ARDUINO Fading OFF!!! on: July 05, 2013, 11:09:36 am
ohhhh,
I just used a IR receiver from an stereo system. Is there any way of recuperating the datasheets for that?
13  Using Arduino / Programming Questions / Serial Communication with dc Motors problem!! on: July 05, 2013, 11:07:35 am
Hello,
I have 2 dc motors connected to the arduino with an sn756 driver, and with this sketch, im expecting the motors to run whenever I type in, for example,"R255".( R=right motor, 255 for the pwm). However, I upload, open the serial monitor, and type in "R255" and send, but then it disapears once I press send.  Then a few minutes later, the motor runs, but it keeps going no matter what I press.

Any suggestions to the coding would be great. The hardware is fine though.

Code:
//Serial Control 2 dc motors
 char buffer[18];
 
 //buffer>parametre
 
 
 const int motor1Pin = 3;    // H-bridge leg 1 (pin 2, 1A)
  const int motor2Pin = 4;    // H-bridge leg 2 (pin 7, 2A)
  const int enablePin = 9;    // H-bridge enable pin
 
  const int motor3Pin = 10;    // H-bridge leg 1 (pin 2, 1A)
  const int motor4Pin = 11;    // H-bridge leg 2 (pin 7, 2A)
  const int enablePin2 = 8;    // H-bridge enable pin
 
 
 
 
 void setup()
 {
   Serial.begin(9600);
   Serial.flush();     //flush out characters so its ready
   
     
     //Motors
      pinMode(motor1Pin, OUTPUT);
    pinMode(motor2Pin, OUTPUT);
    pinMode(enablePin, OUTPUT);
   
     pinMode(motor3Pin, OUTPUT);
    pinMode(motor4Pin, OUTPUT);
    pinMode(enablePin2, OUTPUT);
   
    //Enable them
     digitalWrite(enablePin, HIGH);
    digitalWrite(enablePin2, HIGH);
 }
 
 
 void loop()        //data type: buffer
 {
 
   if (Serial.available() > 0) {   //If serial availablegive it data...and index=0, numChar=serialavailable
 
 int index=0;
   delay(100);     //Let the buffer fill up
 
    int numChar=Serial.available();      //numChar=# characters in the string of data
 
 if (numChar>15){
 numChar=15;    //if #chars exceeds 15, constrain it to 15
 
 
 while (numChar--) {          // WHILE LOOP:loop that executes while a condition it true...Execute`` #Chars times, 1) check numchar and subtract 1
   buffer[index++]=Serial.read();    //Fills up buffer array with data you entered. This will loop depending on #Chars
 }
 splitString(buffer);    //This is the buffer[18] array, and youre calling it splitstring. Your entering SplitString
 }
 
 }
 
 }
 
 
 void splitString(char* data){    //POinter: lets you send  a character array to a f/n. By declaring data as a pointer, it be ause a data val that points to another val.
 
 Serial.print("Data entered:");   //send "data entered" to Serial Monitor
 Serial.println(data);   //send the "data"array to PC ...on next line????

char* parametre;  //NEW DATA TYPE. paramatre=> access elements of data array

 parametre=strtok (data, ",");     //splits the text string( R100___B300___g200) and making data=R100...AND IT SEEMS DATA WILL GET STRIPED OUT AND THEN SENT TO setLED function
 
 while (parametre !=NULL) {      //While parametre is [NOT EQUAL TO NULL] empty(!=NULL), call our next function setLED(where parametre is the new data type), and
 
setMotors(parametre);
parametre-strtok (NULL, ", ");

 }
 
 //Clear the text and serial buffers
 for (int x=0;x<16;x++) {
   buffer[x]='\0';
   
 }
 Serial.flush();
 
}
   
   
   
void setMotors(char* data) {        //NEW DATA TYPE from parametre
 
  if ((data[0]=='r') || (data[0]== 'R')) {
    int Ans= strtol (data+1, NULL, 10);
   
    Ans =constrain(Ans, 0,255);
 
  Serial.print("Right Motor is set to");
  Serial.println(Ans);
 
  digitalWrite(motor1Pin, Ans);
  digitalWrite(motor2Pin, 0);
  }
 
 if ((data[0]=='l') || (data[0]== 'L')) {
    int Ans= strtol (data+1, NULL, 10);
   
    Ans =constrain(Ans, 0,255);

  Serial.print("Left Motor is Set to");
  Serial.println(Ans);
 
  digitalWrite(motor3Pin,Ans);
digitalWrite(motor4Pin,0);
  }
 
 
 
 
 
 
}


BTW: This code is an altered code that I got from Michael McRoberts's, "Beginning Arduino"...I just changed the led parts to the motor parts.
14  Using Arduino / Installation & Troubleshooting / ARDUINO Fading OFF!!! on: June 10, 2013, 07:28:36 pm
Hello,
I bought an arduino about a year ago, and now I connected the arduino to an IR receiver. Suddenly, when I plug the arduino into the computer, the arduino turns on for a second, then turns off. However, the arduino stays on if their is noting connected to the arduino.(btw, i replaced the usb cable, but the same thing happened.)
15  Using Arduino / Motors, Mechanics, and Power / Re: Servo not rotating 180degrees. on: January 14, 2013, 02:20:42 pm
I used the first sketch, and my servo was running fine in the first part of the loop and reached 180deg without any loud buzzing. However, when it went back to 0deg(the second part of the loop), it could not make completely get to the 0deg position. So I made the minposition smaller(decreased it by 5u each attempt), but nothing really happened. Any way to fix this?
Pages: [1] 2 3 4