paparazzi-devel
[Top][All Lists]
Advanced

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

Re: [Paparazzi-devel] Battery Measurement Problem


From: Chris
Subject: Re: [Paparazzi-devel] Battery Measurement Problem
Date: Tue, 28 Jan 2014 14:26:27 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

If you have a stm32 board i think there is some errors in the adc_arch.c file

  nb_adc1_channels = NB_ADC1_CHANNELS;
#if USE_AD1
#ifdef AD1_1_CHANNEL
  adc_channel_map[AD1_1] = AD1_1_CHANNEL;
#endif
#ifdef AD1_2_CHANNEL
  adc_channel_map[AD1_2] = AD1_2_CHANNEL;
#endif
#ifdef AD1_3_CHANNEL
  adc_channel_map[AD1_3] = AD1_3_CHANNEL;
#endif
#ifdef AD1_4_CHANNEL
  adc_channel_map[AD1_4] = AD1_4_CHANNEL;
#endif
  // initialize buffer pointers with 0 (not set). Buffer null pointers will be ignored in interrupt
  // handler, which is important as there are no buffers registered at the time the ADC trigger
  // interrupt is enabled.
  for (x = 0; x < 4; x++) { adc1_buffers[x] = NULL; }
  adc_init_single(ADC1, nb_adc1_channels, adc_channel_map);
#endif // USE_AD1

Here is what i think but i may be wrong as my daughter want me to play with her now and i can't think straight :-)
This will load the adc_channel_map the wrong way.
Suppose we use 2 channels then the first channel (AD1_1) should be loaded in "adc_channel_map[2]"
and the second channel (AD1_2) in adc_channel_map[3] but here adc_channel_map[0]=AD1_1
and adc_channel_map[1]= AD1_2.
With this order those channels will not get converted because only adc_channel_map[2]
and adc_channel_map[3] will be converted which contain the wrong adc input number.
Chris

On 01/28/2014 01:39 PM, Kadir ÇİMENCİ wrote:
Hello everyone
Today i have noticed that there is a problem with battery indicator at the GCS. I have fed a regulated 5v to the V_batt pin and i see the indicator shows 9.4 V. It is working regularly at the v5.0.3  release, but when i try to use master there is a problem with battery state like this. I don't change the voltage divider resistors (10k and 2.2k) and i have also tried to define the line

<define name="VoltageOfAdc(adc)" value ="(0.0045 * adc)"/>
which also the default value for Lisa m v2.0

 Anyone who have encountered with this problem?

Thanks

Kadir

Board : Lisa mv2.0
Version : master
Frame : Quadrotor


_______________________________________________
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]