10DOF model sensors
Re: 10DOF model sensors
That's something I thought of doing, nice to know it wasn't such a bad idea. Magnetic fields generated in flight don't seem to bad (although I did quite limited testing so far) it seems that running motors on the increasing speeds simply adds to magnetometer readings depending on the speed, so hope it would be possible to correct.
Re: 10DOF model sensors
Hmm, that's not a bad plan, it'd be reasonably easy to see the offsets from the motors at various speeds by logging the mag readings while the cf is strapped down and rev'd
Re: 10DOF model sensors
Sounds like a plan!
Re: 10DOF model sensors
I got some results using the magnetometer data. With my current very hackish changes to (mostly) the client, I can lock heading of CF and fly it around the room with its front always pointing the same direction. If I manually rotate it with joystick, it returns to pre-set direction in a few seconds.
Getting correct readings from magnetometer require calibration of CF to correct for soft and hard iron errors, and also calibration with the motors running at a different speeds.
In the next few days I plan to publish my changes. It would be nice as well to figure out a way to get some of it into the mainstream source, for example:
1. Read the raw magnetometer values in CF firmware, and report it to the client.
2. Display compass widget in the client
Regards,
Anton
Getting correct readings from magnetometer require calibration of CF to correct for soft and hard iron errors, and also calibration with the motors running at a different speeds.
In the next few days I plan to publish my changes. It would be nice as well to figure out a way to get some of it into the mainstream source, for example:
1. Read the raw magnetometer values in CF firmware, and report it to the client.
2. Display compass widget in the client
Regards,
Anton
Re: 10DOF model sensors
Looking forward to that, Anton!
Rich
Rich
VGer's v1.7.1 frame, 10DOF Crazyflie, Wireless Xbox360 Controller, Virtual Machine on VMware/Windows 7
Re: 10DOF model sensors
I was flying outdoors with the heading lock on, which is quite fun - you can trow CF up in the air - in almost in any orientation like sideways, hit the throttle and it steadies itself and rotates so you know where the forward is, and you ready to fly it.
In the process I crashed it, hitting the ground. This probably resulted in something moving, maybe a battery or the engine wires, because my calibration when off somewhat (the north moved ~20 degrees left). Now I have to re-calibrate it, which is good, so I have a chance to cleanup and rewrite my code a bit
In the process I crashed it, hitting the ground. This probably resulted in something moving, maybe a battery or the engine wires, because my calibration when off somewhat (the north moved ~20 degrees left). Now I have to re-calibrate it, which is good, so I have a chance to cleanup and rewrite my code a bit
Re: 10DOF model sensors
Great work Anton, I'm looking forward of trying it out!
Some thoughts. I'm actually thinking the battery wires and connector are the biggest cause of the dynamic magnetic field distortion. The motors are already so magnetized that the electric magnetization shouldn't do much of a difference. The motor wires on the other hand could generate some fields as well.
A long term goal of this would be to have a calibration tab in the client that is similar to what Fabio did (RIP): http://www.varesano.net/blog/fabio/free ... 3d-spheres
It is written in python and QT as well so it might not be that hard to port.
Some thoughts. I'm actually thinking the battery wires and connector are the biggest cause of the dynamic magnetic field distortion. The motors are already so magnetized that the electric magnetization shouldn't do much of a difference. The motor wires on the other hand could generate some fields as well.
A long term goal of this would be to have a calibration tab in the client that is similar to what Fabio did (RIP): http://www.varesano.net/blog/fabio/free ... 3d-spheres
It is written in python and QT as well so it might not be that hard to port.
Re: 10DOF model sensors
I've published my code for magnetometer calibration, it is available at:
https://github.com/ak1394/crazyflie-mag ... alibration
https://bitbucket.org/ak1394/crazyflie-pc-client
https://bitbucket.org/ak1394/crazyflie-firmware
Start with the README file available in Github repo.
https://github.com/ak1394/crazyflie-mag ... alibration
https://bitbucket.org/ak1394/crazyflie-pc-client
https://bitbucket.org/ak1394/crazyflie-firmware
Start with the README file available in Github repo.
Re: 10DOF model sensors
Excellent news, Anton. I definitely need to give that a try!
Tobias, during construction my thought was to minimize such fields by twisting together all two-wire leads between the board and battery or motors. Effectively this creates twisted pairs. Such twists help cancel out magnetic fields that grow with the current.
Here's a link: http://www.teamdelta.com/pdf/tde_an1.pdf
It is worth noting that the length of the motor wires are amenable to this although it is a bit tight for M4.
I would recommend adding such practice to the construction guide. Apologies if it is there and I missed it!
Rich
Tobias, during construction my thought was to minimize such fields by twisting together all two-wire leads between the board and battery or motors. Effectively this creates twisted pairs. Such twists help cancel out magnetic fields that grow with the current.
Here's a link: http://www.teamdelta.com/pdf/tde_an1.pdf
It is worth noting that the length of the motor wires are amenable to this although it is a bit tight for M4.
I would recommend adding such practice to the construction guide. Apologies if it is there and I missed it!
Rich
VGer's v1.7.1 frame, 10DOF Crazyflie, Wireless Xbox360 Controller, Virtual Machine on VMware/Windows 7
Re: 10DOF model sensors
rmirwin2 wrote:my thought was to minimize such fields by twisting together all two-wire leads between the board and battery or motors. Effectively this creates twisted pairs. Such twists help cancel out magnetic fields that grow with the current. [...] I would recommend adding such practice to the construction guide. Apologies if it is there and I missed it!
Assembly Guide wrote:2. Twist the two motor wires together so they are easier to handle
To be honest, it doesn't mention that twisting will also reduce electromagnetic noise, I just added that.
Also: AR.Drone 2.0 (RC-enabled thanks to self-soldered MiruMod) and Hubsan X4 H107