Which Arduino for Quadrocopter?

Hello guys

I'm planning a quadrocopter. This means controlling 4 brushless motors, a 10 DoF Sensor (serial), 6 ultrasonic sensors (special project), a GPS module, an XBee module, 2, 3 LEDs and maybe a beeper/speaker. the arduino should be really fast. does this mean i need a mega 2560? its not a problem cause of size or weight, but i dont want to have an oversized microcontroller.

thank you

The main difference between UNO and MEGA is the number of IO lines and the MEGA has 4 hardware serials.

You should just add up the needed IO lines to see if an UNO will work. Or post the details / datasheet of every sensor / motor used so we can add them for you :)

Note that UNO's analog lines can be used as digital IO too.

let me count loud :) by the way, i guess the GND pin on the arduino allows more than the 40mA? So i could connect all the GNDs to this?

4x brushless motor: -4x signal (I/O) -4x GND -1x 5V (to power the arduino)

1x 10 DoF Board -1x 3V3 -1x GND -1x SDA -1x SCL

1x LEDs -1x 5V -1x GND

1x GPS -actually no idea, since i do not know the actual module yet,

1x XBee -im not sure if there are pass through pins, but it uses 14 pins

6x ultrasonic -6x 5V -6x GND -6x Trigger -6x Echo

soo? is this even possible? :)

GoingForGold: let me count loud :) by the way, i guess the GND pin on the arduino allows more than the 40mA? So i could connect all the GNDs to this?

There is only (likely) going to be a single ground path, so your number will really be as follows (along with my comments):

4x brushless motor: -4x signal (I/O) -4x GND -1x 5V (to power the arduino)

Usually you use r/c motors for such a beast, running at 7.2 or 9.6 volts; you must mean the motor controllers. The controllers would run off one or more BEC(s); so you really only have one servo signal wire to each controller, for four signal wires needed to control the motors.

I would actually use a small servo controller board to take the load off the Arduino; distributed processing, in other words.

1x 10 DoF Board -1x 3V3 -1x GND -1x SDA -1x SCL

Ok - so some kind of an SPI imu or something - if you can get your GPS and ultrasonic devices set up for SPI - all the better, since SPI is a bus, and you only need those lines for all devices.

1x LEDs -1x 5V -1x GND

Negligible - you only need a single line for an LED (remember the current-limiting resistor!)...

1x GPS -actually no idea, since i do not know the actual module yet,

As noted, SPI on this part would be nice, but if not, it likely has some kind of logic-level serial interface - so one or two lines.

1x XBee -im not sure if there are pass through pins, but it uses 14 pins

You might want to look into this further before committing to something - if you can find an XBee interface that offers serial or SPI, you'll be much better off. You might also want to look into using something other than XBee for communication (just a thought), something that is "lighter weight" in the "number of pins needed" department, unless you have a specific reason for XBee.

6x ultrasonic -6x 5V -6x GND -6x Trigger -6x Echo

Again, SPI here would be nice; alternatively, you could wire a single trigger line up to all of the modules, then fire all of them, and monitor the echo individually (you didn't say if the echo was a digital high signal, or an analog voltage?). The problem there, of course, will be timing and such. You might actually want to build and dedicate a "standalone" Arduino to this function, and communicate with it via SPI or serial.

Note that on everything I noted regarding SPI, that the parts, if they support SPI (or you implement it in some manner), have to have the capability to set the address on the bus, or not have any conflicting addresses, otherwise it won't work.

GoingForGold: soo? is this even possible? :)

In theory, it may be possible, if I've counted things correctly (especially if you use a servo controller for the motors, and get everything else as SPI and/or serial, and set up the ultrasonics using a standalone Arduino controller).

But you might be more comfortable using some minified form of the Mega (they exist, you'll have to look for 'em), just for the extra code and RAM space you'll need for all the libraries you'll be using. But I would still use a distributed approach for the design; you'll have a more modular system with fewer wires to debug (and/or come loose during flight), plus you can offload the processing and make your code potentially simpler (from a maintenance and debugging standpoint, you'll want that). For any "complete" Arduinos, use standalone versions, or miniature "bare" versions where ever you can (you can dev on standard boards, but you shouldn't use those for the flight packaged version). Remember, the less you carry on-board the machine, the longer the flight duration, and the more you can carry of other stuff (camera, sensors, telemetry, etc).

Have a look at these sites: http://code.google.com/p/arducopter/ http://code.google.com/p/arducopter/wiki/Purchase http://code.google.com/p/ardupilot-mega/ http://diydrones.com/ http://www.kkmulticopter.com/ http://translate.google.com/translate?js=y&prev=_t&hl=en&ie=UTF-8&layout=1&eotf=1&u=http://mikrokopter.de/ucwiki/en/MK-Hexa&sl=de&tl=en

The arducopter is arduino based.

--- bill

Thank you for your responses.

I dont like the arducopter, i want to make something myself. its to learn and not to have ;) but thank you for the idea!

thanks for counting. yeah sure, i mean the ESCs. i have a 11.1 LiPo, which powers the motors/ESCs directly, and i get 5V from there for the arduino. I have to check if i could get the other sensors working for SPI. I'm not that experienced with sensors and dont know the requirements for this. what if yes, would it save pins? i thought there are only 1 SCL and 1 SDA pin?

Well, i like the XBee because i think i can get the widest range. It's possible to regulate the sending power exactly to country-regulations, so ill get a range about 1km/0.6miles.

thank you!

SCL and SDA are the pins used for I2C (or two-wire interface as atmel calls it) and its a different bus than SPI

on the I2C bus you can use as many device (actually its limited but i don’t think youll run out of addresses) using just the 2 pins (SCL, SDA)
on the SPI bus every device which its connected to the master (aka arduino) needs one select line so fi you want to use 3 SPI devices you need 3 pins for the slave select + 3 pins used for SPI (SCK,MOSI,MISO)

now both I2C and SPI have advantages and disadvantages read a little about both and decide which could fit your needs better

also sensors usually work with only one data bus or you can find some that will work with more than one data bus but they are more expensive :stuck_out_tongue:

well, i think since the DoF board i I2C, itll probably the best to stay with it. But actually i havent understood the concept yet. so is it possible to “make” a sensor I2C with some IC or something?

sure but you must make sure if your making more devices to use different addresses you can check the wire examples from the arduino ide to understand how I2C its working and how you can make your own sensors :)

thank you. so my decision atm is either way that i'm going to buy a mega, since i do not know what comes in the future. concerning the sensors i'm going to think of it as step 2, when the copter works with those 10 degrees ;)

probably someone could give me one last tip:

obviously the wires from the sensors and ESCs must not fall off, but i dont want to solder anything to the arduino. are there any plugs or something?