I'd like to add two timer/counter related features to ArduPlane 2.28:
1. Simple 32-bit event up-counter, capable of counting input pulses at up to 1kHz, and logging the count. (Counter clears at power on, for now).
2. Shaft RPM counter, capable of measuring between 480RPM to 9000RPM (8-150 Hz), and logging the value as RPM. Sample period of 1/4 second is sufficient, or other if dictated by existing system)
I'm trying to determine which, if any, timer channels are available for these.
Good news: I'm not using any RC PWM outputs right now, and only plan to use 4 in the future.
So it looks like PH7(T4) becomes available if I sacrifice PH3 and PH4 output. Is that really available?
Suggestions? Thanks in advance... I'm lurking on IRC #ardupilot.
Tags:
Permalink Reply by Lex Ein on March 17, 2012 at 7:06am Apparently all timer/capture/counter resources and interrupts are used. So I used PK0/AIN8/PCINT16 and PK1/AIN9/PCINT17 as PCINTs. Used a shaft encoder index pulse for the upcounter, and optocoupled tachometer output pulse from the ignition system.
Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.184 members
24 members
51 members
1288 members
78 members
© 2013 Created by Chris Anderson.
Powered by
