Stereo Audio Recorder

Status
Not open for further replies.

Clovis

New member
Hi everybody ! This is my first post on this forum.

I work as an hardware engineer in consumer Drone industry.
During development phase, we often have to record several analogue signals during flights. The logger hardware has to be the smallest/lightest available, since we want to limit the impact of the recorder on motors throttle and aerodynamics. Teensy boards are incredibly small, so it seems perfect for the job ! I already bought a couple of Teensy 3.2 and SD adapters (the small ones).

What I want to achieve :
  • size of an USB key
  • less than 17 grams
  • stereo 16-bit PCM WAV,@ 44100Hz
  • USB-MSD when plugged to a PC, to copy WAV files

If wav is a problem I can deal with recording raw data and encapsulate later, but I suppose SD latency is the real hard bit.
Since I am not familiar with these boards, I don't know if my project is feasable. I wouldn't like to waste my time on an insuitable solution.
Thanks

Clovis
 
OK th best tool for the job here is either the Teensy 3.2, or one of the newer 3.5/6 but they are longer and heavier so stick with a 3.2.

The Audio board should be able to do this to an SD card no problem at all and it has an SD card slot on board.

But it is a bit wider than the teensy 3.2 board to it wont quite be usb key sized.

But straight to RAW or WAV, both should be easily achievable at 16bit 44khz PCM.

Look here for a picture of the audio board - you can see where the teensy would sit in the middle of it.

But yes, it's feasible if you sacrifice the USB Pen drive element, if you need to stay off-the-shelf
 
Last edited:
just to clarify - i just weighed them for you:
Teensy 3.2 is 2.8g
audio board is 5.1g

assuming the solder pins, solder and microsd card weigh less than 9g then you're golden
 
just to clarify - i just weighed them for you:
Teensy 3.2 is 2.8g
audio board is 5.1g

Thank you Pensive ! It's good to know what is the Audio shield weight :D
I was at 7.3g with Teensy 3.2, a pin header and a SD shield. So I am not worried about weight. As for the dongle, it was only for size comparison. The large USB connector would be a dead weight anyway.

The Audio shield is too large indeed, but looking at your the pictures it seems to me that I can shrink it..
But it is basically just a codec. It doesn't help much since the teensy already has 16-bit ADCs, and I don't need any DAC, amplification, filter nor effect. The SD slot goes directly to the Teensy, so it probably doesn't improve SD access too.

The cool side is the graphical code generation. Maybe I will give it a try just for that because I don't think I am capable to code all from scratch.
As far as I know there are no Teensy projects on the internet to store 2 x 44100Hz 16-bit data in a micro-SD. It is very surprising ! Is the arduino environment not suitable for this kind of project ?

Clovis
 
Thank you Pensive ! It's good to know what is the Audio shield weight :D
I was at 7.3g with Teensy 3.2, a pin header and a SD shield. So I am not worried about weight. As for the dongle, it was only for size comparison. The large USB connector would be a dead weight anyway.

The Audio shield is too large indeed, but looking at your the pictures it seems to me that I can shrink it..
But it is basically just a codec. It doesn't help much since the teensy already has 16-bit ADCs, and I don't need any DAC, amplification, filter nor effect. The SD slot goes directly to the Teensy, so it probably doesn't improve SD access too.

The cool side is the graphical code generation. Maybe I will give it a try just for that because I don't think I am capable to code all from scratch.
As far as I know there are no Teensy projects on the internet to store 2 x 44100Hz 16-bit data in a micro-SD. It is very surprising ! Is the arduino environment not suitable for this kind of project ?

Clovis

Have you looked at the Teensy 3.6? Right now, the SD card support is in its infancy, but it uses a native (4 bit SDIO) micro SD card port. This should be at least 4x faster than anything that uses the standard 1 bit SPI mode. In addition, the 3.6 runs at 180 Mhz normally, and it can be over clocked to 240 Mhz. I haven't used it yet, but this thread talked about it: https://forum.pjrc.com/threads/36737-Try-SdFat-forTeensy-3-5-3-6?p=114355&viewfull=1#post114355
 
The reason I didn't suggest using the ADCs of the 3.2 was because I don't think it's currently supported by the audio library.

AFAIK you need to use mic or line in from the audio board and all the electronics is already done for you.

But adding the software side should be relatively easy, just a bit of electronics to bring it all in line perhaps?
 
Shows what I know. Input option of ADC1 is right there in the gui. I'll shut up now.

Never used it so hadn't noticed it!
 
You can record audio from the on chip A/D but you will not get 16 bit quality. You get more like 12 to 14 bits depending on how you interface it and how it is multiplexed. Best results come when driving the pin from a low impedance source. There are two A/D converters inside the chip which are multiplexed amongst all the analog input pins. It is not clear to me exactly how to assign one converter to a specific pin and the other to a different pin with no other analog inputs, such that no multiplexing occurs using the current version of TeensyDuino. Ideally you would want two single analog input pins assigned such that one is used for each stereo channel with no multiplexing. I believe that one converter is restricted to just a few specific pins on the T3.2 while the other converter is more flexible, but I can't remember exactly where I read that.
 
I believe that one converter is restricted to just a few specific pins on the T3.2 while the other converter is more flexible, but I can't remember exactly where I read that.
Recently I had to check into that, but don't have the details at hand right now. I need 3 pins for each ADC, and afaik I need to solder 1 or 2 inputs on the lower side of the T3.2. Means if you need 1 pin per ADC it should be possible without resorting to that; best is to check the pinout diagram at the Teensy info pages + schematic (to know the actual SoC pin numbers) and the pin/alt configuration options in the reference manual. Shouldn't be too difficult to find something. Might need some additional (pin/mux) configuration outside of the ADC library.
 
Thank you all
The Teensy 3.6 looks awesome ! Unfortunately it is not out yet, and we will need a recorder soon.
I ordered an audio shield, since it seems the most straightforward solution. I don't like to do "serious code" in the Arduino environment, but hey, if it works.
With Teensy 2.0, Arduino IDE proposes a "Disk(SD Card)" USB mode, but it is not available for Teensy 3.2. It seems that Paul Stoffregen did not implement USB MSD for Teensy 3.2, and doesn't plan to. (https://forum.pjrc.com/threads/24090-Teensy-3-SD-Mass-storage)
I will post my code as soon as I have somethin working :)

Clovis
 
Status
Not open for further replies.
Back
Top