Teensy LC and the SD adaptor?

Status
Not open for further replies.

3049t

New member
I have a project that basically reads from a mic element by polling analog pins and writes waveform data to the SD. Can I pull this off with the RAM of the LC or do I need to just get the 3.1? Thanks

I can code but I don't want to spend a lot of time on this so I'm just going to use libraries to abstract as much as possible.
 
Assuming you have a properly amplified mic - giving a usable signal for the 3.3 analog reads? I'm starting with an ADMP401 board form Sparkfun.

Waveform data? Are you planning on an FFT_256 type analysis? The LC can't use the AUDIO library but the one sample I did for my 3.1 shows this on compiling - with no SD code:
Sketch uses 101,356 bytes (38%) of program storage space. Maximum is 262,144 bytes.
Global variables use 12,328 bytes (18%) of dynamic memory, leaving 53,208 bytes for local variables. Maximum is 65,536 bytes.

Here you'd be over on 8KB RAM - and would need to minimize other elements to get the code inside 62KB as well. If you went to a 3.1 there would be more libraries and features available without worrying about running out of anything.

It you want a challenge - the LC should have what you need, similar things have been done on 8 bit Arduino hardware.

This Oscilliscope runs FFT and more on on a Mega with 36KB flash and 4KB ram.

These first 2 don't show FFT processing but do use a mic and SD on an UNO type device. There are @kpc forum posts on FFT outside the Audio library I haven't gotten to yet that may fit. There are Arduino FFT libraries that if 'c' added and not AVR specific:
http://www.instructables.com/id/Arduino-Audio-Input/?ALLSTEPS
http://www.instructables.com/id/Arduino-Frequency-Detection/?ALLSTEPS
https://www.youtube.com/watch?v=8Urj9ugsV58
https://www.youtube.com/watch?v=tCmaOb-VAEo
 
I have a project that basically reads from a mic element by polling analog pins and writes waveform data to the SD. Can I pull this off with the RAM of the LC or do I need to just get the 3.1? Thanks

I can code but I don't want to spend a lot of time on this so I'm just going to use libraries to abstract as much as possible.

For the "don't want to spend a lot of time on this" part, I'd highly recommend using Teensy 3.1 and the already developed Teensy Audio library. Start with File > Examples > Audio > Recorder. It can continuously record incoming 16 bit, 44.1 kHz audio to the SD card.

It's designed for I2S audio from the audio board. The audio library lets you reconnect its many components, so you should be able to replace the I2S input with the ADC input. Be aware than the audio lib ADC input works at 48 or 96, but not 72 MHz (a known bug).

Hopefully that already written library should get you very close to your needs.

It's probably possible on Teensy-LC, but you'd be starting from scratch. The audio lib hasn't been ported yet. The extra $8 for Teensy 3.1 will save you a tremendous amount of time.
 
Status
Not open for further replies.
Back
Top