Question about motors and external power supply (quadcopter whooosh)

Hey guys ! Recently I got my Arduino Uno and played with it for a while :) Now I'm trying to make something a bit more complicated, but I came across a problem ...

Basically, I want to control 4 motors with propellers on a single Arduino, control each motor's speed independantly (making some basic quad copter project). So if I understood correctly (correct me if I'm wrong), if I want to control speed of a single motor, I would just put one wire to one of the pins, other one in ground and give it a "juice" with analogWrite 0-255 (0 - off, 255 - fastest) ?

In few days I'm getting several 3 volt motors (which are probably too weak for this project, but still I'll give it a try before I buy some more expensive motors), and I'm 100% sure I can't just shove them into my Arduino since it can support only up to 5 volts, so it wont be enough to power up four 3 volt motors ?

So my question is this: -is it possible to plug the motors into external power supply, and control their speeds with Arduino somehow ? -how ? :)

Thanks !

The current the Uno can source is more the issue, not the voltage per se.

From memory they can only source 40ma from an output pin? You definitely need to provide some form of motor driver for it. Beyond that I can't help - no experience yet!

Good luck!

Thats what I thought, I just wasn't sure :) Is that motor driver something like this:

It sais it can control 2 stepper motors, or 4 dc motors, but how does that work ? I can attach external power supply to it, and just control their speeds by sending some voltage to it using arduino or ?

For the kind of motors on a quadcopter you'll be using the Servo library, and driving the brushless motor with a suitable ESC from a LiPo battery.

So I need Motor Shield ? The one I can buy fast is Motor Drive Shield L293D, will that be enough for me ? So I can use that motor shield to control speeds of 4 motors independently, and having 4 of them attached to external power supply ?

or can we use a power supply rigged through a couple of transistors for the motor and give inputs from the arduino to the transistors so as to have the transistors act as switches??? crap sorry... just realised we needed servo control...

If you want it to fly, tiny hobby-grade DC motors have insufficient power. They need to be 3-phase BLDC motors, and the easiest way to control those is with an off-the-shelf ESC (electronic speed controller). The BLDC input is just a servo signal, and those are really easy to generate from an arduino.

So: buy 4 BLDC motors and 4 ESCs, control them all using the Servo library. And then the hard part (the control loop) begins...

Basically, I want to control 4 motors with propellers on a single Arduino, control each motor’s speed independantly (making some basic quad copter project).

You can build it, and you can make the motors spin, but I guarantee you can’t ‘fly’ it in any controlled manner. You will have built a Flying Blender which will zoom off in any random direction.

First, all multicopters have flight controllers with solid state gyro type sensors that keep track of which way the vehicle is pointed, which way the pilot asks the vehicle to move, and then adjusts the motor RPMs to make the vehicle go in that direction. No -human- can control 3 or 4 motors fast and precisely enough to manage vehicle motion in 3 dimensions.

Look up:

Best, Revolution
Middle: Arducopter
Low budget but works (and often out of stock and hard to find -because- it’s cheap): KK2

Next, even with a flight controller, without a LOT more advice you’ll never be able to pick out the right -match- of weight, power, RPM, battery voltage and mAh, and most importantly prop diameter and pitch. Typical results might be…

Motors spin but it never lifts off. Wrong prop, or purely too heavy for the motors.

Motors spin and it lifts off but lasts only 20 seconds, because the batteries ran down. Which results in loss of power to the flight controller, crash and destruction.

Motors spin and it flies nice for 30 seconds, a motor overheats and burns out in flight. Again the result is crash and destruction.

It flies, and 2 minutes later the battery overheats and catches fire. Crash, destruction, plus fire.

An electric powered flight system is a -designed- -package- not just random parts put together.

Yes you can plug in the gyros, but you’ll spend months of not years writing the code, which is why I mentioned Arducopter. (Arducopter isn’t an Arduino with plugged in gyros, it has them already built into the main board.)

See and start reading… Find out how to design a copter and you’ll have a much better chance of success. Oh BTW -you- can’t do the first flights yourself either. You’ll need to find an experienced pilot to try it and find out if it’s even -potentially- flyable.

There are standard parts kits that have everything already designed as a package. If you really need to do a lot more DIY, which is of course half the fun, you’re much better off finding a known proven standard design that already tells you all the parts you need that work right together. Experimental design is only for the very experienced.