The Dx4e transmitter (currently that's what I'm using) creates alot of noise when used with arduino. It's quite clear that the receiver has a tuned low pass filter that needed to be emulated for the code.
A low pass filter was implemented with a stategy of using a the gradient of 3 values to determine whether allow input to the servo signal stream or not. Here's the pseudo code below:
// check for ascending/descending trend in signal prior
// to including current filtered signal - then update servo signal
if ((temp_pulse[1] > temp_pulse[0]) && (temp_pulse[2] > temp_pulse[1]))
{
*out_pulse = temp_pulse[2];
}
if ((temp_pulse[1] < temp_pulse[0]) && (temp_pulse[2] < temp_pulse[1]))
{
*out_pulse = temp_pulse[2];
}
This works quite nice and combination of a low pass filter improved the signal interrupt to the servos while the other sub-systems are executing. First flight test with sensor logging capability.
A low pass filter was implemented with a stategy of using a the gradient of 3 values to determine whether allow input to the servo signal stream or not. Here's the pseudo code below:
// check for ascending/descending trend in signal prior
// to including current filtered signal - then update servo signal
if ((temp_pulse[1] > temp_pulse[0]) && (temp_pulse[2] > temp_pulse[1]))
{
*out_pulse = temp_pulse[2];
}
if ((temp_pulse[1] < temp_pulse[0]) && (temp_pulse[2] < temp_pulse[1]))
{
*out_pulse = temp_pulse[2];
}
This works quite nice and combination of a low pass filter improved the signal interrupt to the servos while the other sub-systems are executing. First flight test with sensor logging capability.
Comments
Post a Comment