Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 3 of 3

Thread: Teensy 3.2 + Audio Adaptor : infrasonic posible ( 1-2Hz)?

  1. #1
    Junior Member
    Join Date
    May 2016

    Teensy 3.2 + Audio Adaptor : infrasonic posible ( 1-2Hz)?

    Dear all, I have a project which based on Teensy 3.2 and the Audio Board. Mainly this project is used to create a waveform analogue signal that has 1 Hz frequency. The waveform can be square or sawtooth. I have seen the tutorial code and the video, it can produce audible sound, which I dont know it can be applied for this infrasound case? I would be appreciate if you guys can suggest me any aproach. By the way, googling for very low freq signal shown me about anti alias thing, is that nessesary?

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    The main issue you'll face is the line-level outputs have 2.2 uF capacitors.

    As a quick test, I just ran this on a Teensy 3.2 and audio shield.

    #include <Audio.h>
    AudioSynthWaveformSine sine;
    AudioOutputI2S      audioOutput;
    AudioConnection c1(sine, 0, audioOutput, 0);
    AudioConnection c2(sine, 0, audioOutput, 1);
    AudioControlSGTL5000 audioShield;
    void setup(void) {
      Serial.println("setup done");
    void loop(void) {
    I measured the headphone output and the line-level output. Both show a nice 1/2 Hz sine wave!

    Click image for larger version. 

Name:	file.png 
Views:	154 
Size:	21.2 KB 
ID:	7130

    Click image for larger version. 

Name:	file2.png 
Views:	158 
Size:	21.2 KB 
ID:	7131

    Notice the first waveform is centered around 1.5V. That's the headphone output. The way it works is the signal is DC coupled, but the headphones get a "virtual ground" output, which is actually 1.5 volts DC. So from the headphone's point of view there's no DC voltage. But if you try to use this as input to some other system, you have to deal with the fact that the headphones don't have normal ground.

    The line-level output has a 2.2 uF capacitor in series. This forms a high-pass filter, together with the resistance of whatever load it's driving. In this case, the only load is a 10X oscilloscope probe, with is approx 10M ohm. The high-pass filter frequency is 1/(R*C*6.28). So for R=10e6 and C=2.2e-6, the high-pass filter frequency is 0.00723 Hz. That allows the 0.5 Hz signal through quite nicely.

    However, if you were to feed the line-level signal to something like a modular synth input, which is normally 100K ohm impedance, then the highpass filter becomes 0.723 Hz. It will greatly attenuate a 1/2 Hz signal, and it'll badly affect 1 Hz, and even have some small impact on 2 Hz.

    You could modify the audio shield, to increase the capacitor, or just replace it with a wire. If you go for DC coupled, you'll have to deal with the DC voltage. If you go with a huge capacitor, you should consider the length of time for the DC voltage to stabilize to zero volts. Even 2.2 uF takes many seconds with the 10M oscilloscope impedance.

  3. #3
    Junior Member
    Join Date
    May 2016
    Hi Paul, thank you for all your work for this example and that was an awesome post. You are my idol.

    Based on the result above, the target of creating low freq signal is possible.

    I think I will stick with increasing capacitor size to match my desired high pass frequency ( which is much smaller than 1Hz) as I use a designed amplifier to connect to a speaker, this professional amplifier will be connected with ground and use an input voltage of 3.472V(peak-to-peak) and this amplifier also have low-pass filter.

    So in this case, how can I measure the load and do I have to consider the capacitors inside the amplifier ? Please advise me.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts