paparazzi-devel
[Top][All Lists]
Advanced

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

Re: [Paparazzi-devel] current sensor


From: Felix Ruess
Subject: Re: [Paparazzi-devel] current sensor
Date: Sat, 20 Nov 2010 13:13:24 +0100

Hi Ana,

the easiest way is to add the appropriate subsystem to your firmware section:
    <subsystem name="current_sensor">
      <param name="ADC_CURRENT_SENSOR" value="ADC_4"/>
    </subsystem>

Which in this case will result in nothing more than one makefile line:
ap.CFLAGS += -DADC_CHANNEL_CURRENT=ADC_4 -DUSE_ADC_4

Then you just have to define MilliAMpOfAdc(_adc) in BAT as you
probably already did.
You can also have a look at the ENAC/fixedwing/funjet2.xml airframe as
an example.

So I guess the thing you missed is to define USE_ADC_4 to enable that
adc and to use ADC_CHANNEL_CURRENT instead of ADC_CURRENT.
That is if I understood correctly what you already defined... maybe
next time include the relevant parts of your config so it is more
clear.

Cheers, Felix

2010/11/20 Ana García Álvarez <address@hidden>:
> Hi all,
> I have recently purchased a current sensor in Sparkfun. It provides a
> voltage from 0-3,3V scaled to the current my motor consumes.
> I have installed the sensor in ADC4 defining the ADC_CURRENT and
> MilliAmpOfAdc(adc) in the BAT section of the airframe file, but the values I
> get in the FBW-STATUS message are not changing according to the %throttle I
> apply to the motor, they oscillate around a number.
> I have tested the sensor with a polimeter and I think the problem isn't
> there.
> I have looked at main_ap and main_fbw but don't know if I should change
> anything, or maybe should I define the ADC_GENERIC message instead...
> Any idea? Thanks
>
>
>
> _______________________________________________
> Paparazzi-devel mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/paparazzi-devel
>
>



reply via email to

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