I am a newbie to electronics and Arduino and I am currently building my own Quadcopter. I have a LiPo 2200mAh 30C Battery to power my drone and am currently looking at the schematics on how to build my quadcopter. I created a schematic but I am not sure if that's possible like that. Especially about the power supply for the Arduino. Currently, I'm planning on powering it by connecting the power output of the BEC of one of the ESC to the 5V pin.
Do I have to add any diodes or resistors anywhere? I'm new to all this, so I would be glad if you could explain to me why I should/shouldn't use diodes/resistors.
Some would advice against using an ESC BEC. For anything. Get and use an appropriate buck regulator dedicated to the job. Pololu has a bunch, but even their specifications can be a bit aspirational. Get one that will be 50 % better than you need. Avoid cheap but attractive products, they can srsly suck.
Are you following a plan you found, or are you winging it? See what I did there?
What exact ESCs? How many cells in that battery?
I don't see a receiver unless you've wired the blue tooth thing wrongly.
That could work, but it is never too early to start worrying about the size and weight of everything that you expect to go up into the air.
This and others like it should be used IMO
You can use the BEC for a pinch, then it would be good to add some good filter caps like 100 uF and 0.1 uF in parallel across 5 volts and ground. But don't use that 4ever, please.
I have no experience so far
Ppl have started with less than zero experience. There will be some excitement no doubt.
You may not have the budget or friends with anything prebuilt you could fly around w/o risking too much.
On the other hand, you can get very good simulators that will usually be able to listen to your transmitter. I use the DRL simulator "game" that runs on the Steam platform on the desktop. The physics is PDG and the crashes cost nothing. I conservatively estimate that I have destroyed hundreds of thousands of dollars worth of virtual quadcopters.
You didn't say what transmitter and receiver you have selected.
Buy at least 5 motors and ESCs, they are all too easy to fry (that's why its a bad idea to rely on the BEC from an ESC). Get multiple spare props of course.
For quadcopter use you want the ESC programmed appropriately for good control authority (standard RC ESCs assume you are controlling a plane, so that rapid and accurate speed response is not required) Control loops for quadcopters are typically run at 100 to 400Hz or even faster, so the ESC needs to match this performance (and the servo control signal too).
If you do derive power from the main battery you should use a suitable fuse to protect the wiring.
@dlladev If you're using an Arduino Uno then I'd connect the ESCs control signals to pins D3, D9, D10 and D11. This will allow you to control them with 490Hz PWM using the analogWrite() function.
Joop Brokking YouTube videos are an excellent guide, however (at least in his early flight controller designs) he used his own software generated ESC pulses, rather than taking advantage of the microcontroller's own hardware timer outputs.
Yeah 2011 called and wants its sampling rate back… I don't know that I'd want to build using an Arduino as the flight controller.
It's not like the OP is gonna be doing anything but cut and paste the software, to hazard a guess, so why not get a real FC? You can get amazing boards that aren't all that spendy, especially if you don't insist on the latest and greatest.
Then you get modern ESC protocols at the same time.
Experienced RC fliers never use an ESC BEC. They always add a STANDALONE BEC
since if the ESC frys, the ESC BEC will be useless. However if any one of the 4 ESCs
on a quadcopter frys, it's going to drop out of the sky or spin out of control anyway
so one might say you don't gain anything by using a standalone BEC. With FIXED
WING AIRCRAFT, that is not true, because you can lose power and glide in for a
dead stick landing using the standalone BEC and the receivers to control the flight
control servos. Most experienced RC enthusiasts have done it at least once.
Also wouldn't it be technically possible to connect the battery to the VIN Pin? The VIN Pin accepts 6V - 20V so that wouldn't need a step-down voltage converter right? Or is there a reason why not to do that
You could add a 0.1 uF cap in parallel with the 100 uF if you're going to bother with any.
And you may find that you have other uses for the 5 volts from the buck regulator, so while theoretically possible to use vin, that's wasteful at least as it is a linear regulator on the board, just throwing away as heat. A minor point but it's easier on everything just to use you good 5 volts. And you are powering the HC thing, better to not use the 5 volt output you'd need off the Arduino as it is limited.
You still haven't mentioned a radio set transmitter and receiver.
And I must ask, where are you coming up with the software? I know you want to write it yourself, but this is a complex undertaking and errors can be costly if not dangerous.
Like I said, lotsa questions. You might search these fora for the ppl who show up q]wanting to do something like you are starting and get a feel for how much trouble they get in and how fast.
Good luck! Please keep telling us more and answering the questions. A little thinking goes a long way. I admire your I don't even have a word for it.
Don't use arduino PWM to control the ESCs.
They take PPM, just like RC servos. You can
verify this for yourself by connecting an RC
servo and driving it using the Servo() library
and then if you can do that , disconnect the RC
servo and substitute the motor ESC signal
(WHT) and drive the propless motor from the
ESC by controlling the throttle min-max as you
would control the servo (0-180 degrees)
READ THIS: RC SERVO CONTROL
You will see the signal 50Hz (NOT 490 hz like
On the contrary, the servo library is definitely NOT the way to go to control quadcopter ESCs.
50Hz is great for controlling traditional fixed wing aircraft ESCs direct from an RC receiver, but not for multi-rotor use.
In the past, (till around 2014) there weren't any multi-rotor specific ESCs. All were designed for fixed wing and helis. As such, the control input of these ESCs were digitally filtered to provide a smooth and progressive throttle response. Muti-rotors by contrast, required fast constant corrections from the flight controller, in order to stabilise these aircraft in flight. 490Hz PWM was used by early flight controllers to overcome the ESC's digital filter, by making it converge on the desired throttle level more quickly, thereby providing a faster response.
A little later we had multi-rotor specific firmware from SimonK that required standard ESC's to be re-flashed, before eventually multi-rotor specific ESC became available, (usually supplied with BLHeli firmware). For a short while the 490Hz PWM standard remained, until new, faster ESC protocols appeared.
Modern multi-rotor ESCs are now capable of receiving a multitude of protocols, 490Hz PWM, Oneshot, Multishot, DShot, etc... The modern protocols simply allowing for even faster motor update rates, made possible the number crunching power of small microcontrollers today, that weren't so readily available back then.
I mean, let's face it:
Most small Arduinos (with maybe the exception of Arduino Zero) do not have enough computing power nor clock speed to 1. calculate the needed changes fast enough and 2. send these data over to the ESCs to have it taken care.
Even the most simple ones ($50 or below) runs the numbers blistering fast (30Hz or more).To deliver the 30Hz change to the ESC over a ... 50Hz PWM?
With ground vehicles, you can get away with as low as 0.5Hz (manual adjustment), even for fast ones from Traxxas. Also if the Arduino screws something up (8-bit is not considered accurate) it will be a less expensive (and dangerous) crash than a ... $200 drone kit, I suppose.