Thread: Discussion Open Flight Stabilizer
View Single Post
Old Jan 09, 2013, 02:19 PM
noobee is offline
Find More Posts by noobee
Registered User
Joined Dec 2006
1,461 Posts
thanks for the GREAT feedback!

the stages are currently decoupled, so we would expect the output to be async to the input.

the servo frame period is configured at 20ms. the code will keep rechecking in 1ms intervals until the 20ms window is met. in some cases, it will extend to 21ms if it the last check just misses (below) the 20ms mark and then adds another 1ms.

the jitter is interesting. mine has somewhat less (corona 939mg and hxt 900 servos) and very very little if i cause the rx to go into failsafe mode (which will generate very stable rx pulses).

can you try
- causing the rx to go into failsafe mode
- setting the aux gain to zero

and see if any of the two reduces jitter? i would like to trace the source of the noise.

i've some thoughts on how to reduce the cut through latency and improve the timing precision:
- use a true microsecond timer (eg timer1)
- keep the pid stage separate. right now, only the pid stage will sample and update the soft state of the rx and servo respectively. i think the main loop should more tightly couple (but still async) the rx to servo updates and use the last computed pid corrections until the next pid compute.
- implement the 10ms servo frame period support that ckleanth suggested.

thanks very much again..

Originally Posted by JohnRB View Post
I finally decided to solder wires to the RX3S board with a connector on the other end for the ISP. I was able to locate places on the board to solder the wires without getting solder on the etched ISP pins or on the processor.

First observation is that the output pulse train is completely asynchronous to the input channels.

The second observation is that the jitter is about twice as bad as with the HK firmware.

The third observation is that the output frame rate is mostly in the 20ms range but on occasion is jumps to about 22ms.

In addition to my scope connected to the inputs and the outputs I have a Hextronic 9g servo on the aileron output. This is not a high quality low dead band servo. It is always moving a little because of the output pulse jitter.

The aileron signal coming from my receiver usually has less than 1us of jitter. What I see at the output (with the RX3S laying flat on the table and steady) is about 33us of jitter. I cannot accurately measure the jitter on the input and output at the same time because they are asynchronous.

None of these things are show stoppers, just need to work on them one at a time.

I checked if the lock bits were set with the HK firmware and they were so I could not extract the existing firmware for backup before installing your new firmware.
noobee is offline Find More Posts by noobee
Reply With Quote