Monthly Archives: December 2013

Alfa1test. First results

After some delay I’ve been finally able to test the  alfa1 test.

As programmed, I first checked out the motor control.

After the start up phase (push enter when requested),a simple user interface shows the current roll , pitch and yaw. I can increase (a button)  and decrease (z button) the motor speed.Press space bar  to quit.

I can save the hover speed Wh ( n button) and set it again (h button).

For the specific setting that you cna find in th epicture the Wh is around 15/17%.

alfa1

Below some practical notes:

  • If the motor is turning clockwise (looking fro the top), mount a rigth prop.
  • Respect the first tests done , it is possible to simplify the esc start up procedure ,so i can leave the esc power on , evenif the pwm is still not  pulsed. I would underline that this tests are done specifically for my own hw set up. So first of all, put all teh necessary attention on safety.
  • Put a nut and a nut over the first one. The vibrations are so important that a sigle nut bifore or after will fall down, indipendently from which force you put to close it.

The sensor is recording for every cycle :total time,cycle timedt, r,p,y calculated by complementary filter  r_rate,p_rate,y_rate, from gyro e x_acc,y_acc,z_acc from accelerometer.

If we now take a look on the recorded data, the first thing that pops up is the cycle time increasing along time:

alfa1_dt

In this example,it moves from 8ms to 12ms in 2 minuts.

The possible causes are:

  • a bug in the sw for the dt measurements. I can exclude it after a first check.
  • a delay proportional to the dimention of the log.A simple test can confirm me this theory:it is enough to store for every cycle 3 time the nformation. If the dt will rise 3 time faster, it will confirm the theory.
  • a problem on the sensor. Could it be that I’m requiring  data from sesnor to frequently?I’ll investigate this case only if the second one is false.

Let’s now have a look on the result itself. The graphs with the roll below show the measuraments done with different sensor low-pass filter setting ,with motor running on the same speed.

The first case is a DLPF = 40Hz : (roll varies between  8 and  13 degrees)

alfa1_roll_DLPF_40Hz

In the second case DLPF: 10 Hz: (roll varies for some tens)

alfa1_roll_DLPF_10Hz

The last comment is the analisys of the roll obtained from gyro, acc and from complementary filter:

alfa1_roll_tau0_005

The comp roll (gray) has still a lot of oscillations. This graph has been obtained using a time constant tau of 0,005s.

The same log recalculated with a tau 0,2 s results as this:

alfa1_roll_tau0_2

Now the roll has no disturbance at all.

For time periods less then 0,2 seconds the value of the gyro is predominant (so we can eliminate the vibrations from acc) .For greater time periods the accelerometer value gets predominant ( so the gyro drift effect diasppears).

In conclusion , in the next steps of my development I ll use DLPF=10 HZ and tau=0,2 (those value are already in the available code).