quadcopter

I'm curious I have seen a lot of videos on quadcopters build with Arduino uno's. I was hoping someone could answer my questions.

  1. the rc motors have to be powered on an external supply however if you needed to control them could you use a transistor that uses a capacitor on the base pin and pulse width modulation so that the motor receives those pulses and the capacitor charges slightly through it and that's how much voltage is allowed through the transistor, controlling the speed of the motor? or is that thought process all wrong. do you use an Op-amp instead and still use PWM pins?

  2. are there libraries for operating that or do you have to write the code you self and if there are libraries can you view that code so you can learn and understand how it works on a fundamental level?

thanks a lot, sorry if these are basic questions!

Motors need their own driver circuits, depending on the motor type (stepper, servo, DC...), voltage and power. Such modules or shields are commonly available, also the standard libraries for Servo, Stepper etc., which reside in your Arduino\libraries and Arduino\hardware\arduino\avr\libraries directory.

  1. Transistors operatig in the linear range (acting as amplifiers) dissipate a lot of power. For DC motor control you would typically use a transistor (or MOSFET) as an ON/OFF switch and use PWM to control the duty cycle and thus average current. I would use a logic-level MOSFET because their on-resistance is much lower than a bipolar transistor. This makes them both more efficient and cooler running. You just need a roughly 200 Ohm resistor between your output pin and the Base/Gate of the transistor/MOSFET.

  2. The analogWrite() function is used to control the PWM outputs. It’s built in to the Arduino core and requires no separate library.

Anything larger than a micro or nano quadcopter will typically use brushless DC motors and an Electronic Speed Control (ESC). The ESC is controlled the same way as a hobby servo. For that you would use the Servo library.