How to read and store the potentiometer data

Am discussing about angle of attack .so i need angle of attack data so am using potentiometer external so how to read and store the date

If you attach and configure AOA sensor, the data will be right there in the dataflashlogs

Can you refer the AOA SENSOR and which port connect. Log file which parameter that was show

Sorry, I saw the request that long ago, and then AOA log data, and assumed it was implemented already.
Apparently, there is no ready-to-use AOA sensor.
Then you will need to make your own using pot meter or some hall or other sensor, then use a microcontroller to translate that into MAVlink DATA packages, so they could be sent to GCS and logged there.

Can u explain clearly .i have 360 rotation potentiometer . The potentiometer how to connect pixhawk and how to read the data along with flight data

there is no simple way to connect, and get the data unless you connect it to the AD channel and compile your own ArduPlane/Copter/Rover.
My previous solution would work without modification to the ArduPilot.

We should probably add analog input bindings for scripting…

Can show pictorial representation of connection diagram and log file

@andre-k can explain clearly .and pictorial representation . because am new to pixhawk and ardupilot .

You will have to connect the potentiometer to a microcontroller like an arduino. The arduino reads the position of the potentiometer and sends the data as a mavlink package to a serial port of the flightcontroller.
Since there is no AOA sensor message, you will have to send the data as another message, not used by arduplane, so it does not get mixed up with other data. An easier way would be to use the arduino as a data logger with a time table. This way you could sync the data with the dataflash log after the flight.

thanks for replying . can you explain how to connect to potentiometer to aruduino and ardudino to pixhawk

There are many tutorials and examples on how to connect and read a potentiometer with an arduino.
To connect the arduino to the pixhawk, use a serial connection.
You will have to use the mavlink protocol to transmit the data from the arduino to the pixhawk. There is a thread here in the forum, where you can learn how to make the arduino talk mavlink.

Hey @count74 !

I’m currently implementing that and everything works great between potentiometer to arduino and arduino to pixhawk 3. However I am not able to find an easy way to give the potentiometer value to the pixhawk. Could you explain me what you mean by “An easier way would be to use the arduino as a data logger with a time table. This way you could sync the data with the dataflash log after the flight.” ? What message should I use for that ? Did some general configurable input are existing ?

Otherwise, I was thinking to publish this value with another system ID and be able to publish it on whatever message type I want. But it isn’t a really elegant way…

By “implementing that” you mean a poti to meassure AOA?

1 Like