Gas station without pumps

2015 August 11

PteroDAQ will support Teensy LC

Filed under: Circuits course,Data acquisition — gasstationwithoutpumps @ 07:49
Tags: , , , ,

Adding the Teensy 3.1 board to the PteroDAQ data acquisition system only took a day of effort (see PteroDAQ supports Teensy 3.1), and it looks fairly straightforward to extend that support to the Teensy LC, which at $11.65 looks like the cheapest ARM development board available.  The KL26Z chip on the Teensy LC is very similar in its capabilities to the KL25Z chip on the FRDM KL25Z boards that I’ve been using with PteroDAQ for the last couple of years, though the Teensy LC uses one with less RAM, so the boards may be more limited in handling bursts of high sampling rate.

I just ordered a Teensy LC board this morning (direct from the PJRC store) and will probably do the coding and testing for the board this weekend.  I’m now leaning towards using the Teensy LC for the class, as it will provide a lower-cost option than the FRDM KL25Z boards, especially once the cost of headers is included (we can use the Teensy LC with mostly male headers and just a couple of small female headers, which cuts about $2/board off the price of the headers).  The maximum sampling rate will be a little lower than on the Teensy 3.1, but PteroDAQ is currently more limited by the ability of the laptop to accept the data than by the board’s ability to generate it.

If I can figure out a good way to get the Teensyduino code onto a FRDM KL26Z board, I might be able to do some debugging even before the Teensy LC arrives, because I have a FRDM KL26Z board that I bought some time ago but never used.  The Teensyduino uses the GCC ARM compiler, so I think all I’ll need to do is figure out where all the compilers, linkers, and format conversion routines are kept, and all the flags that get passed to them, and I should be able to get things in the right format for the MBED download firmware on the KL26Z board.  Running the Arduino IDE with “verbose” output should provide all this information.

All the Teensy boards have their schematics online, so the pin mapping can be set up now.  I’ll have to merge some of the code we wrote for the Teensy 3.1 and for the FRDM KL25Z boards to get the rest, after checking to see what registers are different between the KL25Z and the KL26Z. All the analog-to-digital conversion and timing is being done with bare-metal manipulation of the peripheral registers, to avoid the overhead of the APIs of the MBED, Arduino, or Teensyduino systems.

I think that we may end up reusing (or modifying) the usb-serial code from the Teensy LC for the FRDM KL25Z board also, so that we can get rid of the use of MBED code.  Moving code onto and off of the MBED site is a big pain, and it would be good to have everything compilable on the laptop without needing internet access.  The MBED USB stack is about all we’re really using of the MBED code, and the Teensyduino USB stack seems to work as well (comparing Teensy 3.1 and FRDM KL25Z, which is not really a fair comparison).

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: