first for the 9v batteries i only need for my project to run for a short period of time and also for the motors how would i put them in parallel and from that schematic do i need to multiply the components time 4 for each motor and will all four motors run at max power from one pin. also would it make any difference if i used the PWM pins from the duimilanove ATMEGA328. if so how would i make the programming to control all 4 motorsthank you for your help

I've updated focalist's schematic to (hopefully) make it more clear how to hook things up (and to label the pins of the transistor); the collector of the transistor goes to the motors, the base of the transistor to the resistor (and on to the Arduino), and the emitter goes to ground. I've shown three motors connected to the transistor in a parallel configuration - I'm sure you can see how to add the fourth:

p.s.s. would two motor controllers make it more complicated and time consuming?

The only real reason to use motor controllers (for this project) is if you need the capability to:

1) independently control each motor2) independently control the speed of each motor3) independently control the direction of each motor

If you don't need any of those capabilities, then using one or more motor controllers will only raise the cost of the project and make it larger while causing it to draw more current; if you insist on using 9 volt batteries, larger isn't the direction you want to be headed in (for your small motors, I agree with everyone else that using a 9 volt PP3 battery is the -wrong- choice; the battery will not last long at all, and they are expensive to replace as well).

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

focalist

All four motors as Crosh has shown. Using one of the PWM outputs would even allow you to vary the speed of the motors. PWM simply turns the power off and on really fast to provide what "looks" like a variable supply to the motors. However, it makes sense to walk before you run, so stick with off and on at first. Only the software will change (and only a few lines) to add PWM speed control, the hardware stays the same.

Stick with the idea that the transistor is a valve and the arduino "turns" that valve off and on via the base of the transistor. The valve lets the current flow, which turns the motors. It's really not all that different than waterand plumbing, and people understand pipes and valves pretty well. The 9v battery works in that model too- it's got plenty of water pressure, it's just got a tiny tank.

By the same token, the digital output of the arduino doesn't have a big enough tank to run the motors either.. but it does have enough to turn a valve off and on, which can be connected to whatever water reserve you want. The "water" flowing through the "pipes" (wires) is what makes the motors turn around... and Ground is simply where it all goes down the drain.

It's a really crude analogy, but it's helped me more than once.. and starting out, demystified things quite a bit- even if a bit inaccurate for the sake of making it understandable to a neophyte..

focalist

No prob, as long as the ticket is waiting at Logan. I'd love a few days in Frisco.. far too long since I've been, and I love the city. Almost as much as I like the Humboldt country and Big Sur. Heck, I find most things north and south of LA to be pretty great, just skip 100 miles on each side as a sort of quarantine, and California becomes a lot nicer place. I was born in San Diego but moved away as a young kid... Navy brat. Los Angeles is...ummm...Hmm. Gommorrah? Okay maybe that's a LITTLE overboard, but you get the sense of my feelings about that fine metropolis. I'd miss Cali if it fell into the ocean, LA not so much. I've not been to Frisco since I got back into photography.. and Frisco is one of the most picturesque cities in the world. Come to think of it, I think I might have to start ferreting away nickels and dimes. I didn't go anywhere this year, but I usually try to travel for a few days every late winter to just do photography and get away. Frisco would be a great destination.

Own a house on a fixed income, and you learn about tradeskills you never imagined you'd be doing... I can't afford a plumber or an electrician or a carpenter every time something dies or breaks. Sometime before the fall, I need to sweat a new solenoid valve, cutoff and about three feet of pipe into the heating system plumbing or I'll not have heat.. but I learned how last time one went, so this time it's just a matter of getting the parts and then having a time to do it. I tend to work in spurts when I'm feeling good, and plan/purchase during the other times so when I feel decent, I'll be looking "at" it, rather than looking "for" it, whatever it may be. I've gotten smart enough to stockpile things like PVC and Copper pipe, a small spool of 12/3 Romex, breakers and GCFI sockets in the basement on a shelf. Not a ton, just realistic amounts- I rarely buy ONE of anything, as if it broke once, it's gonna break again sometime, most likely. If I'm not Jerry-rigging one thing or another to an Arduino, I'm Jerry-rigging some appliance, device, chunk of furniture, wall covering, or family pet to avoid calling one "pro" or another... hehe. By the way, I don't suppose one can still get Ether very easily, and they want to know WHY you want to buy suture kits, whether or not it's LEGAL to buy them or not. Sometimes it's a good thing I can't get required supplies, I think.

You become a master of Duct Tape, PVC pipe (both for plumbing and for building lightweight frames and supports), Epoxies of every flavor, goops and sealants, and eventually even how to do some things right. I plumbed in our kitchen sink, all the way to the outflow including cleanouts.. and it has one of those nice pull-out-kinda-thing spouts and all that, a Boiling Water tap (neato toy I got as a gift), as well as garbage disposal and dishwasher... not a single leak in five years.. The thing is a deep-bowl double sided monster.. made of Black synthetic granite. More durable and lighter, kinda like Corian, but I forget the name. DuPont polymer something or other. Looks pretty snappy.

Heck, I find most things north and south of LA to be pretty great, just skip 100 miles on each side as a sort of quarantine, and California becomes a lot nicer place.... ...Los Angeles is...ummm...Hmm. Gommorrah? Okay maybe that's a LITTLE overboard, but you get the sense of my feelings about that fine metropolis. I'd miss Cali if it fell into the ocean, LA not so much.

For anyone having never been to California, focalist has summed up the situation as precisely as a well written Arduino sketch. California has amazing almost unlimited diversity and things you will not see anywhere else in the world (I love giant Redwood trees) but by no means should the lure of Disney Land or Universal studios sucker you into visiting LaLa land.

focalist

We have the Pats... The Bruins.. The Celtics and of course the Red Sox. Nothing beats Fenway and a cold beer. It'll cost a fortune these days, but it's worth it once a year.

They don't always win (but often do)- but NOTHING on this PLANET is quite a New England sports fan. You guys like your teams, people LIVE AND DIE for who is on the ice for a B's game any given night. It's plain bizarre.

To be honest, the pretty new england winter gets old around the second of january, on either side is four months where sports is a reasonably good option as a timekiller to prevent cabin fever during blizzards..

You become a master of Duct Tape, PVC pipe (both for plumbing and for building lightweight frames and supports), Epoxies of every flavor, goops and sealants, and eventually even how to do some things right. I plumbed in our kitchen sink, all the way to the outflow including cleanouts.. and it has one of those nice pull-out-kinda-thing spouts and all that, a Boiling Water tap (neato toy I got as a gift), as well as garbage disposal and dishwasher... not a single leak in five years.. The thing is a deep-bowl double sided monster.. made of Black synthetic granite. More durable and lighter, kinda like Corian, but I forget the name. DuPont polymer something or other. Looks pretty snappy.

This is the truth. I don't live on a fixed income (and if something breaks beyond my ability, I call in a pro - depending on the need, it will either be a contractor I've hired in the past, or it will be someone via my TotalProtect plan), but I have done tons of my own little home plumbing and electrical jobs. One repair or another, indoors or out. I also have a large supply of goops and sealants (favorite two: Permatex Copper silicone gasket, and JB Weld - the Permatex is great for all kinds of gaskets, whether your car or your home - and JB Weld is the same way - provided you want it as nearly permanent as possible). I've got a few lawn sprinklers I need to fix, and I have to install a new mister system in our back yard. At some point my wife and I need to replace the bathroom sinks (that may turn into a "call the expert" thing, depending on how difficult it is to remove and replace the current sink and backsplash; they're almost 40 years old now).

Part of me loves being a homeowner, another part of me wonders if it's really worth it (glad to have my shop, though!).

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

Heck, I find most things north and south of LA to be pretty great, just skip 100 miles on each side as a sort of quarantine, and California becomes a lot nicer place.... ...Los Angeles is...ummm...Hmm. Gommorrah? Okay maybe that's a LITTLE overboard, but you get the sense of my feelings about that fine metropolis. I'd miss Cali if it fell into the ocean, LA not so much.

For anyone having never been to California, focalist has summed up the situation as precisely as a well written Arduino sketch. California has amazing almost unlimited diversity and things you will not see anywhere else in the world (I love giant Redwood trees) but by no means should the lure of Disney Land or Universal studios sucker you into visiting LaLa land.

Lefty

Northern California seems to be the saner end of Cali. California's basically nice if you avoid the southern end (though I do like the area around San Diego up thru Santa Barbara) and the middle valley area. I just wish the gun laws were more like Arizona's (well, except for the whole concealed carry into a bar - that's just a ticking time bomb, there).

The only real problem with California (if you discount the middle valley section) is how expensive it is to live there...

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

The only real problem with California (if you discount the middle valley section) is how expensive it is to live there...

That and our dysfunctional state government. Sometime starting in the 70s the government decided they would never be able to run out of spending other people's money. Probably something they learned back in D.C.

focalist

True that. Kids sent off to their rooms/neutral corners and they both have something to keep them busy, so we're going over to a neighbor's house for a cool one.

Have a "thing" tomorrow, only good part is that it's on the water down the Cape Cod way for a few hours, and I might see something worth pointing a camera at. The Cape and Martha's Vineyard really are gems that few outside of New England know about-- but it's where the Presidents go on their summer vacations- guess that says SOMETHING...