I would like to add an Angle of Attack (AoA) sensor to my APM2.5 and downlink the data via my 3DR radio to the APM Mission Planner. However,my mechanical and aerodynamic skills are much stronger than my programming and electronic skills. Is there an easy way to read in an analog (0-5v) sensor and down link the data to a ground station.
I have determined a simple, lightweight, low cost way to make an AoA sensor using a small magnet attached to a low friction weather vane and hall effect sensor to read the magnetic field. The analog output can then be calibrated to angle of attack. It appears that this data could be read in on A1-A4 ports (similar to how the airspeed or voltage sensors are read). Is this possible? If so, what is required to get the data to be sent down in the MAVlink messages? The ultimate goal is to have the data recorded in the .tlog file along with the other information coming down the link.
Thank you for your help.
I was thinking in doing something similar with a differential presure sensor measuring in different places on the wing.
I usually fly in a Sky Arrow 650 TCNS and the stall warning is a trumpet that works with this principle. I thnk it could be easier and no need of magnetic fields making noise.
I have tried several different methods of angle of attack measurement. The main issue with multiple pressure taps is that a calibration must be done in a wind tunnel, varying angle of attack, angle of side slip, and wind speed. This requires a wind tunnel. The magnetic sensor is much simpler. I have done this before on a 1/5th scale piper cub and it worked flawlessly with very little noise. I am now looking at making a sensor about 1/2 the size (in the 2-2.5 inch long vane size). As long as the vane is put at least 1.5 times the thickness of the body it is in front of ( thickness of the wing, or size of the fuselage). It is also very easy to calibrate as all it requires is a protractor.
One simple way might be to use a potentiometer that has a reduced rotation range.
What was your setup like on 1/5 Cub?
Out of interest, I did some searching online... I got a lot of unsatisfactory results. Most are sensors are big & heavy or $$$.
Other sensors seem like they may have too much mechanical drag or they have large rotational angles and the resolution of the output would be very poor if only a fraction of the range is used.
The one sensor that I did find that may work is a Hamlin hall effect sensor.
The analog output from a sensor could be connected to one of the analog inputs on the APM such as the VOLTAGE or CURRENT inputs.
Using the Mission Planner hardware setup you could "re-calibrate" the values by entering a predetermined value into the MEASURED voltage box to provide a meaningful output, although, you would see this value labelled as VOLTS or CURRENT in the mission planner, but you would bypass the need for customizing the software.
Making changes to the APM code wouldn't be too difficult, it's just that the mav-link protocol may make it difficult to incorporate this sensor's data into the data stream and mission planner would have to know to look for it.
Yes, I wasn´t measuring the AoA, just measuring a loss of lift or pressure diference between upper and lower surface. that is more meaningfull for a stall warning, because AoA requieres speed and a calculation to detect stall. I prefer direct measures.
Below is an image of my 1/5th scale cub i used for my masters thesis. I used a Cherry AN8 stripped down and mounted at the end of a GWS gearbox (cheap low friction bearings). I tried numerous different potentiometers, but was unable to find any that were low enough friction for air speeds in the RC realm. I did have to do some basic calculations to account for the upwash from the wing, due to its close proximity. (I later managed to get some time in the university's 4x6ft tunnel that verified the method). The data was recorded by an Eagle Tree Flight recorder with an A-D expansion board.
The goal for my next AoA probe is to have it about 1/3rd the size so it can go on a 3ft span plane. I like the idea of using the Voltage or current pin, it is nice to have power data recorded on the Mission Planner, but i will need to get my RPM data from my speed controller, which also can log the power data (Castle Creations Phoenix Ice).
The mechanical drag force of rotary sensors is not indicated on most of the data sheets, though one can infer that sensors with low RPM limits have more friction...
I just found another sensor that looks better than the others that I linked to previously. LINK
I have no idea how much it would cost, but I think it maybe a good reference for further searching.
I like the OP's idea of the magnetic sensor, but if someone wanted to pursue a rotary sensor on the cheap, it might be possible to use an optical encoder wheel and sensor from an old mechanical (ball) mouse.
I'm doing something very similar for my master thesis and need to record alpha and beta values coming from two additional analog sensors for further post-processing of flight testing. Similarly also my electronic and programming skills are much less strong than my aerodynamic ones. How did you manage in the end to read the data coming in from the A0-A8 analog ports (I'm using an APM 2.6 board) and send the data via MAVlink? Actually I don't really need to see them in real time it's also ok to see them recorded in the .log files after I download the data from the flash drive after each flight.
Thank you very much for the help,
I have used hall effect sensors for anglular position sensors previously. Something like this for less than a dollar or so should do the trick: http://goo.gl/HQElZe. The output of this sensor should be readable directly on one of the APM analog inputs. The arrangement of the sensor and the magnet is critical. To be of use, you need to be sure that the way in which the orientation of the magnet is manipulated over the range of movement that you want to measure, produces an unambiguous change in magnetic field of a reasonable magnitude at the sensor. The linked A1302 has a sensitivity of 1.3 mV/G. You will also need to be careful that you do not saturate the sensor by using a magnet that is too strong/close.
I have also interfaced a number of custom sensors to both the APM and Pixhawk, including logging to both the dataflash and telemetry logs.
Unfortunately these examples all use old versions of the code and will no longer work without modification but I am happy to help out if you need it.