Thursday, June 30, 2016

Sport Air/Engine Data Collector

So I've written a new "firmware" (yeah it's just an Arduino sketch) based on the old SportVFR sketch.  This is designed specifically to be a generic data collector/emitter.  The idea is that SportVFR board when paired with an ATMega32U4 Pro Micro dev board is a multi-purpose data collection tool.

Here's how it works.  There are 25 "Channels", 3..21 are numbered after the actual channel (see picture)


0,1,11-13,16,22-24 are not usable as such.  22-24 are "virtual" and represent the Tachometer, Altimeter and Compass virtual output channels.

It is entirely commanded externally via 9600 baud serial.

Commands:
* NAME- Name channel
^ Val - Set Max
v Val - Set Min
< Val - Set channel value (for output)

All channel configurations are saved into EEPROM and are restored on reboot.

Channel names are 4 character and the first denotes its purpose.


Channel 1st character enumeration:

> Digital Input
$ PWM Output
~ Analog Input
< Digital Input
^ Input w/Pull-Up resistor
| Virtual (for internal only, don't use)

Overall grammar:

{MsgId}{Command}{Channel},{Parameter}

Example:

1*1,~TST    Names channel 1 to "~TST" which an analog input field  
3^2,100       Calibrate max 100 is the mapped output value of current reading

For its part the device serially dumps the polled data in this format;

-HDR-<TST-DAT-32

Here's the CodeBender Source

No comments:

Post a Comment