lundi 21 mai 2012

Quadcopter - Part 3

Motors testing

Introduction

I have received most of the parts I need. I still miss the frames but I have what is needed to play with motors and sensors. I'll describe my first tests with the motors in this article.

Items

You don't control a "brushless" motor directly. Instead, an Electronic Speed Controller (ESC) receives an input, from a receiver or an Arduino per instance, and takes care of sending a signal to the motor (more details in the next section).

On the picture below, the motor is already attached to an arm. We can see the 3 wires that have to be plugged in the ESC. The ESC (yellow thing) receives power on the thick black and red cables ending with a Deans connector. The power comes either from a battery (not shown) or from a power supply.

The ESC finally has 3 thin wires to power a receiver or controller (black and red) and to receive the control signal (white). For test purpose the signal will come from the arduino and not a radio receiver.


All the plugs you see (banana on the motor, banana and Deans on the ESC, Deans to jack) had to be soldered and of course the power plugs all differed forcing to build adapters for them. I was pretty excited about soldering stuff as I had never done it before. Believe me, it is a lot more difficult than one could think ! 

ESC and power

Several important points about the ESC and the power:
  • Input comes from the Arduino through the white thin wire and is controlled with the class Servo.
  • The thin black wire (ground) must be connected to the ground of the Arduino
  • The 3 cables to the motor can be randomly connected. If the motor turns in the wrong direction, swap two, and only two, cables. 
  • Battery power is counted by "cell". 3 cells is 11.2 V. Basically you have 3.5 per cell.
  • The power supply is useful for the tests and debugging because the battery won't last very long. Be careful however not to pull too much power. My supply only gives 2 A max whereas the battery goes up to 20 or 25 amps. The supply will shutdown if it goes to high and you will wonder why the motors stop all of a sudden.
  • The ESC I chose are programmable and communicate with us humans by beeping. It is a pain to follow what they "say" using the little instructions shipped with them.

Arduino Control

Code for calibration and for run

Test and ... failures !

Eager to see my motors run I launched the calibration code but the ESCs kept beeping (1-2-3) as expected once at startup. After some investigations, I realized that my battery was of only 1 cell whereas I needed 3 cells. As a consequence the ESC was starting and shutting down continuously.

After buying a new battery and a power supply I tried again but the motor only chattered and staggered continuously even after the calibration. The forum of DIYDrones has been of great help. See here the thread. 

Test again and ... (partial) success !

The problem appeared to be my poor soldering skills. The 3 wires between the ESC and the motor are very sensitive to bad soldering.
After I removed the plugs and soldered the cables directly together the motors finally ran !
Well, they don't accept to go above a certain limit but still it is a first step !

Aucun commentaire: