A little project I've been working on.
Autonomous altitude management for RC helicopters. Intended use is to reduce workload when carrying a camera for aerial photography.
(For the record, No connection to VTB activity is implied).
At 1:27 I hit the switch and my onboard computer takes over altitude control. It is disabled at 5:27 when you see the heli lurch upwards - I had the collective stick way up to make sure it didn't drop when disabled.
What's been keeping me occupied the past couple of months...
It's using a barometric pressure sensor for altitude.Ray wrote:Hey that's pretty slick - it sounds simple but I'm sure the programming behind that is rather complicated!
What inputs was it getting that caused the verticle oscillations? What type of data does it gather for its altitude control?
It's reading (and generating) 4 RC signals at all times, even when not "active" because it's hard wired into the control loop. It's reading in 3 control signals for collective/cyclic, plus its activation control. When it's off, it just "repeats" the inputs to the output side. When it takes over, it mixes in the cyclic input from the pilot with internally generated collective positioning.
Since most probably don't know this, some (most, but not all) RC helicopters do not use 1 channel for collective, 1 for "aileron" and 1 for "elevator"...they're shared/mixed similar to elevon / flaperon type controls.
Inputs causing oscillations include sensor noise and wind (some natural wind, some "wind" induced by a bit of lateral movement). Also some ground level turbulence. It still oscillates at higher altitudes, but not as much. That heli weighs about 3 pounds, maybe less. It doesn't take much to disturb it.
It'd be a lot easier if I had laser precision altitude measurement.
I'm hoping to tone it down a bit yet. Clearly it "works". What I'm balancing now is:
1: Filtering random 1-2 foot variations in sensor reading without losing real 1-2 foot changes.
2: Damping the response to small (real) changes while being able to deal with large (real) changes.
Oh, it's not rotor wash. Yeah, I have it shielded sorta, but the readings in flight are no stranger than sitting on my desk at home.Beaker wrote:Do you have the sensor shielded somehow? I can imagine some funny readings if it's under some rotor wash.
Sensor is basically underneath the body of the heli, with some gauze to filter any wind flow.
That's not to say there's not some strangeness due to the extra pressure of being under the rotor disc, but this is as minimal as it's going to get.