paparazzi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Paparazzi-devel] Problems with magnetic field


From: Thomas Kolb
Subject: Re: [Paparazzi-devel] Problems with magnetic field
Date: Wed, 26 Aug 2015 18:27:41 +0200

Hi Edwoud,

thanks for the fast reply.

> Indeed there was a possibility of getting a non-real number, I think
> it should be fixed with
> https://github.com/paparazzi/paparazzi/pull/1314

This works for me, thank you.

> The addition of an
> offset would indeed be nice, as you show an offset at 0 throttle.
> Actually, a better current estimation would be better solution, maybe
> we can create a define MILLIAMP_AT_ZERO_THROTTLE.

I have done some experiments [4] in python and it seems like this
calculation works:

current = (FULL - \
           (((FULL - ZERO)**nonlin_factor - \
            ((FULL - ZERO) * x)**nonlin_factor)**(1. / nonlin_factor)))

FULL and ZERO are the corresponding MILLIAMP_AT_... constants.

I would like to implement this myself, to get some insight in the
Paparazzi code.

What is the right way to determine if the motors are on? I found
autopilot_motors_on, which exists for the rotorcraft firmware. However,
electrical.c seems to be shared between both firmwares, so fixedwing
firmwares would fail to build if I just hacked it in using
autopilot_motors_on(?).

> From your picture it looks like all power is running through the pcb
> below the autopilot. It *might* be better to have wires as you can
> twist them (voltage and ground) to reduce their magnetic field Also,
> it might improve if they run on the other side of the quad instead of
> underneath the autopilot.

Yes, the idea was to have a power distribution board for easy
soldering. The bottom layer is connected to ground and the top layer
has the supply voltage in the center. The corners are ground and
connected to the bottom layer.

I expected that this setup should even reduce the magnetic field, as
ground an voltage are mostly very close together. Obviously I was wrong,
but I will still try how good the calibration works before rewiring.

Regards,

Thomas

> > Date: Wed, 26 Aug 2015 12:04:50 +0200
> > From: address@hidden
> > To: address@hidden
> > Subject: [Paparazzi-devel] Problems with magnetic field
> > 
> > Hello everybody,
> > 
> > I'm currently trying to do the current calibration for my
> > quadrocopter. The calibration for the Earth magnetic field was done
> > with motors turned off and has worked quite well (the yaw angle
> > looks correct in all directions). With motors on, there is serious
> > drift in the yaw angle (40° to 80° difference).
> > 
> > As I don't have a current sensor, I have set
> > MILLIAMP_AT_FULL_THROTTLE = 60000, which is a rough estimation from
> > the motor specification. Then I ramped the throttle up and down
> > according to the wiki. You can find a screenshot of the log in [1]
> > and the log data in [2].
> > 
> > The current estimation does not seem to distinguish between motors
> > off and on, but idle (estimated current is 0A after starting the
> > motors). However, the magnetic field is influenced quite heavily
> > already by the idle current, which should really be about 2A. This
> > change in the magnetic field already causes the yaw angle
> > estimation to drift for about 40°.
> > 
> > Is it possible to give some “idle offset” to the current
> > estimation, so that “motors on” means 2A minimum?
> > 
> > Another problem is that the current estimation “overflows” when
> > reaching the maximum. This could be related to my transmitter, which
> > can also set the throttle to 102% (according to the GCS). What
> > would be the best approach to fix this?
> > 
> > In case it helps, [3] is a photo of the setup I'm currently using.
> > Maybe you could give me some hints where the magnetic field might
> > come from. It might be possible to improve on it through hardware
> > changes.
> > 
> > Thank you for any advice.
> > 
> > Greetings
> > 
> > Thomas
> > 
> > 
> > [1] http://temp.tkolb.de/paparazzi/mag_cal.png
> > [2] http://temp.tkolb.de/paparazzi/mag_cal_log.zip
> > [3]
> > http://gallery.tkolb.de/Fotos/Basteln/Quadrokopter/IMG_4868.JPG.html
> > 
> > _______________________________________________
> > Paparazzi-devel mailing list
> > address@hidden
> > https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
>                                         



reply via email to

[Prev in Thread] Current Thread [Next in Thread]