Originally posted on Robotics, but guess it's not active enough.

I'm looking to build a new (first) quadcopter without the conventional flight controller and radio, with an onboard RPi and applying some newfound knowledge on autonomous control to improve my coding skills.

Although, since I've never actually built a quadcopter, I don't actually have any experience in using brushless motors.

I'll be using a RPi B+, so controlling them over I2C was something I looked into. The B+ though only has two I2C interfaces. It also only has two hardware PWM pins and I'm unsure whether software PWM would be enough. I found the Afro SimonK-based ESCs from HobbyKing which have I2C (Intended for the MikroKopter).

I've looked around and people have used the Adafruit 16-channel PWM/Servo drivers to control them. Is this an option to look into? Or is there perhaps a better way?

Also, would be it particularly safe if the RPi is run off the ESC's BEC? It's confusing because, when the ESC is powered on, well, it'll be powered on before the RPi comes up. What do ESCs do when they have bad input?

  • \$\begingroup\$ Cross posting is not a good way to get answers, people don't like it. If you wish get your question migrated. Please also see electronics.stackexchange.com/help/how-to-ask as some of your questions are opinion based and not specific. \$\endgroup\$ – Voltage Spike Sep 1 '16 at 16:43

In terms of controlling the ESC's, I'd personally probably stick to PWM ESC's as they're a lot more popular, and therefore a lot cheaper and likely more reliable. I've never done PWM on the raspberry pi, but it does appear to support software PWM (http://raspi.tv/2013/rpi-gpio-0-5-2a-now-has-software-pwm-how-to-use-it), and PWM is all pretty much the same thing so I imagine this should work fine for you. The pi has way plenty of speed to handle executing PWM instructions in software, they're pretty simple. If you wanted to go the I2C ESC's, I2C can handle many devices per I2C channel - so only having two shouldn't be a problem (each channel can handle 100+ devices IIRC). The Adafruit option would work fine also, I imagine - lots of ways to skin the cat. Personally I'd probably just go the software PWM route though - seems the simplest.

If you put pull-down resistors on the PWM data channels I don't think you'll have a problem with boot-up noise, I imagine that the pi keeps their pins either floating or pulled down on bootup so it shouldn't be a problem.

| improve this answer | |
  • \$\begingroup\$ I looked around, and yes, a (decent) ESC will simply not do anything until it receives a legible initialisation sequence. \$\endgroup\$ – Shreyas Mar 21 '15 at 11:25

Not the answer you're looking for? Browse other questions tagged or ask your own question.