Page 1 of 1

Crazy head with Crius se (solved)

Posted: Mon Jul 23, 2012 2:26 pm
by bartabas
Hello allbody

I bought a used drone with CRIUS SE card, I loaded Multiwii 2.1 and I am testing with Multiwii_conf 2.1.
I can see that all sensor values look OK : all 0 except ACC Z to 255-256 and MAG YAW which hesitates between -1 and 1. But the HEAD varies quickly and randomly from -180 to 180. I calibrated ACC and MAG several times, with the same result. With the previous version 2.0, it was the same behaviour.

I took a look in the code to see how the heading is calculated, it is 5 or 6 lines of code and I saw nothing related to this crazy behavior. Cound someone explain what is happening ? I can't understand that the head is varying so much while sensor outputs are so quiet.

I have another question : I am writing a python module that handles the new Multiwii Serial Protocol (MSP). With the drone connected to my desktop computer, it works as a charm. When I connect the drone on a BeagleBone computer, the serial connection does not work: when I send something to the drone, it answers by a long red led spot, then two seconds of silence, then 3 quick red led blink.
On both computers, serial ports are configured exactly the same way, with same drivers.
Could someone explain what the drone is trying to say by blinking the red led such a way ?

Thanks for the answers.

Re: Crazy head with Crius se

Posted: Mon Jul 23, 2012 3:00 pm
by bartabas
Well, I am answering myself...
I did not calibrate the mag the right way, now I have shaked the drone on the three axes during 30 s after clicking the calibration button, and after that MAG values are no more zeroed, and the HEAD is zeroed and stable. But I still don't understand how this heading is computed, and why it was so unstable while sensor outputs were very stables.

Re: Crazy head with Crius se

Posted: Tue Jul 24, 2012 3:42 pm
by chris ables
As far as the acc z it will be in the 250 range and that is correct ! And for the mag calibration you dont shake it you actualy roll it one complete roll then flip it one complete flip then spin it one complete turn ! And be sure the ftdi doesnt disconnect ! I have problems with disconnecting if moved sometimes ! Hope this helps you !

Re: Crazy head with Crius se

Posted: Wed Jul 25, 2012 8:23 am
by bartabas
Thanks Chris. I did not really shake it, it was a joke, I rolled it at 360° on each axe, as you say. Now the heading is fixed, it works correctly.
Have you an idea about my problem of serial line with the beaglebone ? I asked the support of the beaglebone, he said that it should work. Do you know what means the way the drone blinks? The red led is on during 1s, then off 2s, then blinks 3 times, one long and 2 shorts.

Thanks for your answer.

Re: Crazy head with Crius se

Posted: Wed Jul 25, 2012 12:16 pm
by chris ables
Maybe the links on this page can help ! http://beagleboard.org/static/BONESRM_latest.pdf i am not familiar with that . Sorry !

Re: Crazy head with Crius se (solved)

Posted: Wed Jul 25, 2012 12:42 pm
by bartabas
I solved my problem. In fact, the FC did not blink for an error, but it were resetted because the bone sent a low DTR. I found the parameter to pass to the stty command :

Code: Select all

stty -F /dev/sttyUSB0 -hupcl

Hote this could help someone.

Re: Crazy head with Crius se (solved)

Posted: Wed Jul 25, 2012 12:48 pm
by chris ables
That's great news !