I am not sure how to quatitize ripple, but i do need a clean signal or the FC would end up crashing into the ground. Faster the better. The FC uses the ultrasonic sensor to range the ground during automated takeoffs and landings, once above the min_sonar value, the pressure sensor and GPS are used for altitude. I have been toying with the idea or using a arduino mini to do an analogRead (pwm read) but then i do not know how to present that on another pin as a pure dc voltage proportional to the PWM duty cycle. From my research, the arduino does not appear to have a DAC that would allow me to output the analog voltage. Any suggestions for a small compact mirocontroller that would have the ability to accept PWM input and then output a proportional voltage on another pin?
On the integrated filter, with my frequency being so low, to get a good steady signal, my calculations show i would need some massive capacitance to keep the signal up after the PWM pulse has ended. I have tried up to 2000uf without any luck. I end up with a nice sin looking hump that then tapers off to nothing before the next pulse. I believe that the low pass filter could work and does work with higher PWM frequencies but my challenge with that approach seems to be the RC time constant and the ability to respond to change. The UAV during landing will need fairly quick reporting on the distance to ground, or into the ground we go, or it will never land.
Thank you for everyones help, and please forgive me if i seem somewhat ignorant to some of the finer points of circuit engineering.
Thanks!
sirmuzz