Hi All,
I’ve just finished my first mongoose project (tnx ianlee74 for the mongoose tip!). There is an bad mobile phone quality image attached for illustration. It was surprisingly simple reading the mongoose values, but off course I do have some new questions.
I created a cross with a multi color led on each end. If you hold it perfectly stable all leds will be green. If one of the axis drop out of balance, that ax will be blue. I intend to make the leds blink slower / faster if the difference becomes smaller / greater for the next version.
This works perfectly and extremely fast. As soon as I move the cross a bit I can immediately see that I should correct one of the axis. Within code I also know the amount of degrees I should correct.
So an ax will have 2 legs running from the center. I think I should just increase engine speed if one of those legs get below the stable degree if Im not at the set altitude or decrease speed of the engine that gets above the set altitude. That should probably keep it stable in the air (Ill worry about moving later).
I already use PWM to control the leds so it should not be difficult to control the engines later on. I cant imagine that the FEZ would have any trouble with GC or anything performing this simple job (the mongoose already delivers angle values for pitch, roll an yaw from 180 to 180).
But deciding the altitude is a lot more difficult. The mongoose returns a pressure value and thats far from accurate. Ive had all leds blink 3 times if the pressure difference gets higher than 10. If so, Ill set that pressure value as the next reference value, so it will blink again after pressure differentiates more than 10 again.
Sometimes this happens 3 times within 10cm, sometimes only after moving up/down by a meter and sometimes once while walking it down the stairs. So my conclusion is that its terrible for deciding altitude and creating stabilization logic based on this altitude (pressure) value would probably be a bad idea.
But I cant think of any alternatives as well. Most altitude sensor has a range between 20cm and 2 meters. I intend to fly a bit higher. I dont think other pressure sensors would be more accurate. How should you normally get an accurate altitude value? Should you use the pressure value more like an indication for Im now probably heading up or probably heading down?
The yaw does seem to work very accurate, If I point the cross to a specific angle all leds blink red twice and its surprisingly exact on the angle every time. I first tought I should exactly place the mongoose at the center, but its placed without exact measurements and still does a great job correcting the axis.
I am thinking about a calibrate function that saves the stable degree values as reference information later on.
Now to build the actual quad frame before the engines arrive
Thanks for reading this!