Tawreos
Posts: 2
Joined: Thu Jun 09, 2016 8:33 am

Possibilities?

Thu Jun 09, 2016 8:38 am

Hi everyone, i'm new to the Raspberry, i wanted to ask if a Raspberry could handle 4 servo motors, I2C and SPI communications and a PID algorithm in order to creatre a quadcopter. I'm an expert Arduino user and i know the theoric bases required to create a drone, but seraching on the internet i couldn't find out how many servos a Raspberry can handle

mutley
Posts: 61
Joined: Sat Jan 02, 2016 8:06 pm

Re: Possibilities?

Thu Jun 09, 2016 2:25 pm

With something like the below, yes.
https://www.adafruit.com/products/2327

It easily has the power to controlling everything and run PID algorithm, but like everything else it will completely depend on how well it's written. There is a lot of "junk overhead" on the Pi compared to an Arduino for this type of project that it will make it super easy to setup and make work, but potentially be challenging to make run efficiently and reliably depending on your understanding of Linux and languages like C.

darkbibble
Posts: 602
Joined: Mon Mar 09, 2015 5:20 pm
Location: corby, england

Re: Possibilities?

Thu Jun 09, 2016 2:36 pm

I one of the Magpi magazine articles was about a pi zero quadcopter in one of the issues.
https://www.raspberrypi.org/magpi/zoe-t ... uadcopter/
Q; How many Windows users does it take to fix a Linux problem??
A; Whats a Linux problem

mthomason
Posts: 113
Joined: Sun Apr 24, 2016 12:28 pm

Re: Possibilities?

Thu Jun 09, 2016 2:43 pm

Something I'd be tempted to do, if you can handle the extra payload, is this:

Raspberry Pi
\/
Arduino (a cheap Nano or Mini clone ought to work well, and weighs next-to-nothing)
\/
Servo Driver Board, Compass/Accelerometer/Gyroscope

Then use the Pi as the "brain" for things like navigation that can be sat and calculated outside of real-time, with the Arduino as the "nervous system" for making real-time adjustments from instrument feedback, keeping the thing balanced, etc. The Pi then just has to communicate with the Arduino to issue high-level commands. You could also add a GPS to the Pi.

That's effectively the setup I'm using in my (grounded) robot build right now. One of the nice features that gives me is a very low-power standby mode where just the microprocessor (in my case, I'm using an ESP8266 instead of an Arduino) is running and mostly in a sleep mode, while the Pi is turned off completely and can be turned on and off with a relay. If you're making longer flights, you could even figure that in and leave the Pi off for most of the time between checkpoints, conserving quite a lot of power as a result.
Last edited by mthomason on Thu Jun 09, 2016 2:44 pm, edited 1 time in total.

User avatar
joan
Posts: 14935
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Possibilities?

Thu Jun 09, 2016 2:44 pm

A Pi can handle as many servos/ESCs as you can find spare GPIO. You do not need to use external PWM hardware. The Pi is quite capable of providing the control signals.

Tawreos
Posts: 2
Joined: Thu Jun 09, 2016 8:33 am

Re: Possibilities?

Sun Jun 12, 2016 9:20 am

Thank you everyone for clearing my mind about this topic and the ideas merged like the raspberry working along with the arduino, i'll start this project as soon as i can and i hope i can finish before the end of the summer ;-)

Return to “General discussion”