-
Notifications
You must be signed in to change notification settings - Fork 6
Audio input and modular levels
The Teensy audio adapter has a line an mic input. Only one can be used at a time.
The mic input is located under the Teensy and is a 2 pin header. You an connect an electret, piezo, dynamic, or even a small speaker. Polarity doesn't really matter.
The line input is stereo and can be attached to a jack to accept most audio signals. This includes guitars but you might have to amplify the signal with a booster pedal or a simple mixer before sending it into the Teensy. Going over the 3.3 limit of the device will result in clipping but you won't damage the device UNLESS you send in a modular level signal.
Modular audio is -5V to 5V which is above the safe level to send into it. You'll need to attenuate and buffer the signal first with a circuit like this can be used. Note that the signals will be flipped but this can easily be dealt with in code.
The line and microphone inputs are AC coupled, meaning a constant level will not be transmitted. This means you can't send CV into it like you could into an analogRead pin.
You can hack a audio adapter to make the line in and out DC coupled. The caps in the pink square AC couple the signals. You can use a soldering iron to heat them up and remove each cap then jump their pads together.
Then in the code you need to call sgtl5000.adcHighPassFilterDisable()
to remove the input coupling.
The input and output level are also controlled by the sgtl5000 object but they will max out around 3.3V. You'll need to use opamps to get them to the correct levels. Input can be done the same as above but output needs a modular power supply if you want to put out more than 0-3.3V. Here's an example.
Here's more info about the audio adapter board.