Need help with various motors

I have had my arduino since christmas and havent created any thing but lights,. not because of the fact that i dont spend 2 hours a day at least on this thing. but the plan is to make an underwater rov. i have 2 hobby dc motors i want to run continually while i have full directional control on 2 7v-9v brushless. i also need to controll 2 seperate micro servos and a 12v dc solenoid valve. what i have is 3; tip 120, 2; l293d, various resistors, transistors and diodes. i understand how they work but cant figure out anything past that. i have no idea where to place these pins, even if i did i have no idea how to create the code. im a full time cook and dont have as much freedom as most when it comes to time and actually sitting and watching hours of videos. was hoping someone can direct me into a direction where i can find all my answers quick and easy. i spent money on everything i thought i would need, so if it takes the part i probably have it. any guidance would be appreciated.

just a simple schematic and starter code on these things.
powering these things with any kind of portable power source. so give me your best shot.

Hi,

Take one thing at a time and get it working and THEN start to integrate them.

The Brushless motors: Like those used on Quadcopters, Model Boats and planes? If so, see
the ArduinoInfo.Info WIKI on Servos HERE:

(Scroll to bottom and look at Electronic Speed Controls and follow the links).

You need to post what the voltage and current requirements of all these devices are for people to help you. Pointers to the supplier online page helps.

You need to itemize your to do list and post each item separately unless they are very similar.

An ambitious project involving lots of different technologies, and no time or willingness to learn how to use those technologies, is not a promising combination. It's not going to be quick and easy, and if you approach this thinking it is then I'm afraid you're setting yourself up for a frustrating and expensive failure.

If you don't have time to understand why you are doing what you need to do then perhaps you should wait until you can devote the appropriate attention to the details involved. If you want something plug and play then you should buy something plug and play.
1

but the plan is to make an underwater rov.

2

i have 2 hobby dc motors i want to run continually while i have full directional control on 2 7v-9v brushless

3

i also need to controll 2 seperate micro servos

4

and a 12v dc solenoid valve

5

. . what i have is
2; l293d,
various resistors,
transistors
and diodes.

6

i understand how they work but cant figure out anything past that.

7

i have no idea where to place these pins

8

even if i did i have no idea how to create the code

This is a recipe for disaster.

You need to throw your time schedule out the window and forget about throwing this all together on a weekend and getting
someone on the forum to write your code because that probably is not going to happen. We are more than willing to guide you to all the tutorials and examples you need but in the end, the only way that rov is going to get programmed is if you understand what you are doing and not plugging things together blindly with no understanding of why. This may come as a surprise to you
but that's not the way we operate. This isn't 7-11 or Mc Duino.

Pick a subject and start learning.

"We are more than willing to guide you to all the tutorials and examples"

That is pretty much what i asked. the issue with the time is that i search for 2 hours and all i find is worthless internet clutter. i do understand that i will be spending allot of my free time on programming because i can do some software. creating a ten minute game takes ten hours sometime. i don't want any of you to write my code because you guys don't know whats on my mind, non of my ideas, or the design and schematic. BUT allot of you know how to make a motor go left and right, accelerate and decelerate, how to make a servo go back and forth, how to do the same with a solenoid valve, and how to use the plethora of switches and input devices with the Arduino.

I understand all of these things are one kind of motor. i may be wrong as i suspect, that they should all run pretty much the same. not the code but the functioning.

i know you guys don't have the time nor the patience to type a whole tutorial on how to use each and individual piece listed.

correct me if i'm wrong BUT every person who replied knows where the proper information is. that's what i was asking. I do greatly appreciate your motivating responses, but they where off topic. i have a good brain, 4.3 GPA Status. not the best but enough. just need a guide through the forest of knowledge.

Sincerely
The life of party,
Doopa

Yes . Everyone who replied knows where the information is.
We are just going around in circles. My suggestion to you is just forget this post completely because it is really too many different things in one category. You need to do what I suggested in my last (off-topic) post which is pick a subject and start learning.
If you are so smart , then you know you have to learn each component (or sub-component) one at a time.
Start a new post for one of the many things I created on the list. I am not as smart as you . I don't have a 4.3 GPA, but I have the common sense to itemize the hardware and prioritize the project. If you already have all the hardware then my suggestion is start with the L293 and the motors. If you want to start there then start a new post for that and post the datasheet or vendor link for your motors . If you are using a shield , post the vendor link for that. If you are breadboarding the circuit, post a schematic of your
circuit (draw it with a PEN (not a pencil) and take a PHOTO).
Post your code. I am just a little puzzled how someone so smart has not realized that if you put the word "arduino" at the beginning of your Google (not Bing, which SUCKS) searches on each of the topics. There's like zillion example circuits and sketches for everything you have mentioned. Posting here should be resevered for when you have already tried that and now something is not working the way you expect or you need help coding some part that is not straight-forward. Aside from those cases, everything you need can be found with a google search.

i search for 2 hours and all i find is worthless internet clutter.

It took 2 seconds to find this:

http://www.instructables.com/id/Control-your-motors-with-L293D-and-Arduino/

 // Use this code to test your motor with the Arduino board:

// if you need PWM, just use the PWM outputs on the Arduino
// and instead of digitalWrite, you should use the analogWrite command

// --------------------------------------------------------------------------- Motors
int motor_left[] = {2, 3};
int motor_right[] = {7, 8};

// --------------------------------------------------------------------------- Setup
void setup() {
Serial.begin(9600);

// Setup motors
int i;
for(i = 0; i < 2; i++){
pinMode(motor_left[i], OUTPUT);
pinMode(motor_right[i], OUTPUT);
}

}

// --------------------------------------------------------------------------- Loop
void loop() { 

drive_forward();
delay(1000);
motor_stop();
Serial.println("1");

drive_backward();
delay(1000);
motor_stop();
Serial.println("2");

turn_left();
delay(1000);
motor_stop();
Serial.println("3");

turn_right();
delay(1000);
motor_stop();
Serial.println("4"); 

motor_stop();
delay(1000);
motor_stop();
Serial.println("5");
}

// --------------------------------------------------------------------------- Drive

void motor_stop(){
digitalWrite(motor_left[0], LOW); 
digitalWrite(motor_left[1], LOW); 

digitalWrite(motor_right[0], LOW); 
digitalWrite(motor_right[1], LOW);
delay(25);
}

void drive_forward(){
digitalWrite(motor_left[0], HIGH); 
digitalWrite(motor_left[1], LOW); 

digitalWrite(motor_right[0], HIGH); 
digitalWrite(motor_right[1], LOW); 
}

void drive_backward(){
digitalWrite(motor_left[0], LOW); 
digitalWrite(motor_left[1], HIGH); 

digitalWrite(motor_right[0], LOW); 
digitalWrite(motor_right[1], HIGH); 
}

void turn_left(){
digitalWrite(motor_left[0], LOW); 
digitalWrite(motor_left[1], HIGH); 

digitalWrite(motor_right[0], HIGH); 
digitalWrite(motor_right[1], LOW);
}

void turn_right(){
digitalWrite(motor_left[0], HIGH); 
digitalWrite(motor_left[1], LOW); 

digitalWrite(motor_right[0], LOW); 
digitalWrite(motor_right[1], HIGH); 
}

BUT allot of you know how to make a motor go left and right, accelerate and decelerate, how to make a servo go back and forth, how to do the same with a solenoid valve, and how to use the plethora of switches and input devices with the Arduino.

You mean like the sketch above ? (that took me 2 seconds to find ?)
http://arduino.cc/en/tutorial/button

or this:
http://playground.arduino.cc/Learning/SolenoidTutorial

(I'm up to 5 minutes now....)

have a good brain, 4.3 GPA Status. not the best but enough. just need a guide through the forest of knowledge.

You must be off the charts because I thought 4.0 was the maximum.
What do you have to do to get a 4.3 GPA ?

never herd of instructables. thanks for that. also you get a 4.1 or higher by placing in AP classes. AP stands for Advanced placement which are just college courses. you finding this info in 2 seconds was because you knew where to find them. i however do not. so you really don't have to be a cyber douche. questions like these are why they created Forums in the first place. this specific Thread is for project guidance. which is what i asked for and what in your last post did. even though you had an undesirable tone, you provided enough information to keep me busy for at least a week. thank you very kindly.

Your welcome.
As I said, if you just remember to put the word "arduino" (without quotes) at the beginning of your searches it will screen out the PIC info.

If you look at this google search:

you will see that the Instructable is the SECOND link in the search using the keyword phrase:

arduino L293 MOTOR driver example

As far as your project guidance, I think the consensus was in 25 words or less was that if you want a tutorial on the L293 then
just ASK for it instead of listing other stuff that you can ask about later.

i understand how they work but cant figure out anything past that. i have no idea where to place these pins, even if i did i have no idea how to create the code. im a full time cook

If it is any help to you, I was a restaurant cook for 12 years before I cross-trained myself in my offtime to Electronics using Cookbooks (the electronic kind) and Heathkit homestudy courses , before there was ever an internet, so consider yourself lucky that you have Google. I had no such tool. I eventually went back to school and got a BS in Electronic Engineering Technology from
DeVry ("DeVry launched my career !").
If you want Project Guidance then here it is:

1
Start a file on every project you build . Keep all the schematics and pinouts and if necessary , printouts of sketches in that folder.
2
Never power up a circuit until you have done a continuity check to make sure you have NOT miswired it.
3
When you are breadboarding chips, use little pieces of colored wire as placeholders in the breadboard while you connect all the pins or if you prefer, leave the chip in and then remove it BEFORE you turn on the power to check the voltages. If they are ok, turn off the power and install the chip.

4
Backup you Libraries folder to different HD.
5
Create separate folders for each subject (see attached screenshots of my file tree)
6
When ordering parts. , always order at least one SPARE
7
Create a Library Repository Folder and put copies of newly installed libraries in there. That way you can DELETE everything your NOT using from your REAL library folder so you can see the ENTIRE menu of "File\Examples" in the IDE because if you have too many libraries the menu gets cut off and it doesn't scroll, forcing you to use "File\Open" instead.
8
If you have a backup of everything in your user Libraries folder you can delete anything at any time and copy it back later.
9
Create a special folder for PINOUTS ONLY . You'll find it handy.
10
If you are in the USA, buy a 25 foot rolls of red and black 22 guage insulated Hookup wire from Radio shack.
11
Get a LOW PROFILE (about 3" high) plastic storage container and some #1 COIN envelopes (Office Depot Item#478-259) to organize your resistors and caps. (Unless you have the plastic electronic component trays) It may take a while to get them all in order but once they're organize it speeds everything up after that.

project guidance. which is what i asked for and what in your last post did. even though you had an undesirable tone,

Maybe it was because I read this

was hoping someone can direct me into a direction where i can find all my answers quick and easy

The implication is that you don't mind us spending hours to learn something so we can serve it to you on a silver platter so it only takes you 15 minutes. Like I said before , we're here to help you learn, not to do all the work for you. If that constitutes an undesirable attitude in your book then so be it. It's a two-sided coin . From our point of view, you asking for everything delivered "quick and easy" is an undesirable attitude. We get enough of that as it is.

We don't have much sympathy for people who are not willing to put in the time....(to learn)

why be so negative!

that wasnt to you at all mr.sir. see im at home maybe 13 hours a day if im lucky 8 is sleep 2 is getting ready the rest is seperated from my family and my own spare time. im off one day a week. i have plenty of cash but no time but when i get it its infront of the arduino. i took the time and learned all the skills involving lights by my self its simple enough to find the info easy. i knew i was looking for keywords like led matrix and other words i know. i am completly new to motors and learned where to find the neccesary pieces to get started but the workings of the transitors and h-bridge are different from led drivers and such. when i said i need to be pointed in the right dirrection, it ment, " please give me a web site with down to earth easy to understand tutorials. try typing "controlling a motor with arduino" you get a whole lot of "put one end in pin 13 and one end in grd". not enough, its enough for the 2 dc motors. but thats about it. but again thank you for the valueble info. no thank you for the harrasing tone.

I'm trying to help you learn how to search using google.
ALWAYS PUT "arduino" AT THE BEGINNING OF YOUR SEARCHES.
second, use the major keywords like the part number of the chip ie: "L293"
if you want a dual motor application , include something like "robot" (since they must have two motors)
if you want BIDIRECTIONAL include that keyword and so on...

Doopa, have you ever heard of the expression "give a man a fish and you feed him for a day; teach a man to fish and you feed him for a lifetime"

If you can spend 2 hours looking for l293d information, or how to use a motor on the arduino and not find anything at all... then you're in desperate need of some fishing lessons.

All they're trying to say to you (but you'd rather be offended and dense it seems), is that this information is findable. Also your thread did start with the perfect recipe for disaster:

  • i want information on these gazillion items
  • to build my extremely difficult project
  • for which i have no time at all to actually build it
  • or learn about electronics & programming
  • and i'm struggling grasping the very basics
  • please do all the work for me?

You may not have meant it like that, but it sure read like that.

Try their suggestions on how to find data. I'm fairly new to arduino myself, and when first googling around, and looking around on these forums it was sometimes a bit frustrating to encounter tons of newbie threads, the same way too simple tutorials over and over again, which didn't go deep enough to actually learn anything etc...
Looking for arduino related pages on google, with very specifically mentioning your components is great advise the people are giving you here. And also try to read the data sheets. At first they're very intimidating, and i still don't understand everything they say. But if you search for an l293d tutorial, and also read the data sheet at the same time, you'll learn a lot :). And you'll become faster and faster in learning everything yourself :).
You'll need to understand every component you got there very well, and get some very good basic grasp of the programming to get even close to making the project you envision :).

One more thing. Since you seem to be more inclined to "cut corners" I don't know if this suggestion is going to be successful but when you breadboard a circuit for an L293 , single or dual motors, always add LED's with a 220 ohm resistor for the arduino control signals (2 for DIR,1 for PWM/per motor). You can see everything and you can tell if the direction is correct and if the PWM is changing. Also, make sure the PWM signal is connected to a PWM pin. Make sure your motor battery is grounded to the arduino ground as well.

with out assuming im lazy and stupid, lets start from square one.

i google every variation but when i type Arduino as the first word it pulls up internet clutter from this forum.

i type Arduino L293d Brushless motor control - i get the same tutorial that uses a dc hobby motor, a push buton and a variable resistor. now if it was a pentometer i would understand how to take that and implement it into my project. also i have a 3 wire brushless, the tutorial on the 2 wire dc motor is useless, i plan on using a direct lead to the motor to keep them moving continuasly.
how would i alter the tutorial to run a 3 wire brushless with a l293d.

if you ask me this is a very reasonable request of information. i know i threw alot out there but i never asked one person to answer them all. i put alot on my plate for a reason only i can understand. its my check list so to speak. learn this before continueing. after my hours of research i have discovered how to use a longer list of parts. so i am doing my home work.

If you're trying to use brushless motors then I suggest you buy a compatible brushless motor controller. This will be massively easier than trying to develop your own from first principles. If the motor controller you choose is designed for RC model use then it'll probably come with a standard servo control interface which is easy to control with an Arduino.

As for the rest of it - as other have suggested, separate your project into multiple smaller problems and each one will get easier to solve.

Pick an ESC here:
http://hobbyking.com/hobbyking/store/index.asp

Control it using the Servo Library.

Servos use PPM

NOT PWM (so analogWrite is useless for a servo)
If you have no RC experience then you need to know that the red wire on the servo cable of the ESC (it's called a servo cable even though it is on a ESC because it exactly the same size and number of wires and uses the same communication protocol) is a +5V
output of the BEC (Battery Eliminator Circuit) of the ESC ) and normally is plugged into a receiver to power all the servos in the aircraft. Since you already have +5V on your arduino , you need to cut that red wire unless you have some use for the 5V output of the ESC BEC regulator. Do NOT , under ANY circumstances, connect that red wire to the 5V pin on the arduino. That would be bad. Also , the INPUT for ANY ESC (Electronic Speed Control) is the battery so it will have a red and black thick wire input from the battery. You have to add your own connector. Because it is a BRUSHLESS ESC, the output wires will be THREE wires colored red,
white and blue. If the motor turns the wrong way , swap any two of the three wires going to the motor and that will reverse the direction. Using the Servo library and only the GND and yellow (or orange) Signal wire from the ESC, you should be able to mimic an RC transmitter signal coming from a receiver.