What an amazing tutorial and experiment - thank you! I'm trying to get audio into the Teensy for triggering LEDs (audio quality is not important), so this ADC method is perfect!
sorry to be off topic but does any of you know of a trick to log back into an Instagram account? I was dumb lost my account password. I would love any tips you can offer me.
@Coen Kaden I really appreciate your reply. I got to the site through google and im in the hacking process now. Seems to take a while so I will get back to you later with my results.
For those who interested in the PWM DAC material, shown in the video, here are the links www.openmusiclabs.com/learning/digital/pwm-dac/dual-pwm-circuits/index.html www.edn.com/combine-two-8-bit-outputs-to-make-one-16-bit-dac/ www.edn.com/a-faster-pwm-based-dac/ www.edn.com/cancel-pwm-dac-ripple-with-analog-subtraction/
It would be interesting so see this with the 4.6 that came out last month. There has been some MAJOR MAJOR upgrades including 600Mhz clock speed on a 32bit processor
A summing amplifier might work better for multi PWM. The other one seems to be impedance dependent. Also, you didn't nearly filter the pwms hard enough if you intend to run that signal through a tweeter, should be fine for midrange speakers though . If you use a dual opamp, you can use the first side to make the summing amplification to stack the signals and the other side of the opamp for a 2nd or 3rd order filter.
THX ! very interesting. You are a pro! One qustion. I am building an Teensy FX Pedal for my fender electric bass. just looking at the schematics: What do you think is better to us as an input mic in or line? now i am using line in but the low frew are distorted - i already played with the gain but no difference...
I haven’t tried the mic input on the audio shield and I haven’t seen the schematic lately to see if there’s anything obvious on the board, for example I wonder if there might be some interaction between the output impedance of a pickup and any input components on the audio board, so maybe an op amp in between would help isolate everything and keep everything from interacting. And possibly use the opamp to reduce gain even further if the hardware itself is being over driven. Do you have an oscilloscope to look at any signals? Is the bass an active pickup output? I wonder if its signal swing is a bit strong and it’s just over driving the input, and attenuating it would help before it even gets to the audio board. Is there any difference if you turn the volume way down on the bass itself to help lower the signal going in to the audio board?
Thanks for this video! What’s the deal with the stepping on the DAC, that’s due to sample rate not bit rate right? Why can the Teensy write to the audio board faster than it can the DAC?
The audio board runs with a data clock a couple of MHz so it would have enough time to get stereo audio and do what it needs with it. I can't remember all the details of the experiment now but yeah the sample rate on the analog input would be un-optimized with all the arduino overhead code and configurations causing it to sample inefficiently, and moving the data from ADC to DAC adds overhead after the sampling is done, and if it's at 10 bits (I think that's the default) it's losing resolution there too. I've used 3 different I2S audio chips on various boards and it's way better.
@@GadgetReboot Ah, makes more sense that it's losing fidelity sampling on the way in, forgot that your test used the board input. I guess it could also be on the way out if the I2S pin gets faster writes than the DAC does due to the way the chip is set up.
Was hoping to learn how this PWM addition werks! I have a guess. Some MCUs, like the Logic Green clone of the ATMega328, have multiple internal voltage references that can be tied to an I/O pin. If you have 10 bits to scale a voltage reference of 1.024V, each tic is 1mV. If you use the 4.096 reference, each tick is 4mV. Add them together and get a 5V range at 1mV, which is more steps than can be represented with 10 bits. Teensy probably has INTERNAL1V1 and EXTERNAL 3.3V reference capabilities, at least. (shrug) May be completely wrong though.
I think the teensy does have an internal 1.2 and external 3.3 option. I feel like I have a 95% understanding of it in my brain but only a 23% capability of expressing it to the rest of the world using stick figures and crayons. Kind of like how I was frustrated a year ago when I did the video on the audio spectrum analyzer using FFT and I couldn’t exactly figure out how it worked so I had to gloss over it. Still bugs me.
What an amazing tutorial and experiment - thank you! I'm trying to get audio into the Teensy for triggering LEDs (audio quality is not important), so this ADC method is perfect!
I had no idea this tool was interactive! The schematic sidebar was extremely helpful. Thank you!
Loving this series, thanks so much for the time and effort.
sorry to be off topic but does any of you know of a trick to log back into an Instagram account?
I was dumb lost my account password. I would love any tips you can offer me.
@Roman Stetson instablaster :)
@Coen Kaden I really appreciate your reply. I got to the site through google and im in the hacking process now.
Seems to take a while so I will get back to you later with my results.
@Coen Kaden It did the trick and I now got access to my account again. Im so happy!
Thanks so much you saved my ass :D
@Roman Stetson no problem xD
Amazing lesson !! great balance between theory and practice
Awesome video friend! Can't wait to watch more
Thank you, i've learned a lot, love the way you explain things!
Good video! I am waiting for my Teensy 4.0 to arrive. Im very interested in doing some audio effects with it.
Just a heads up. Teensy 4.0 doesn't support AudioInputAnalog yet. Found this out the hard way.
@@roccotuna Anny updates ?
Very very interesting, thank you! 👍
Yeah I actually learned a few things along the way on this project so I think it’s even helpful to me.
Really nice demo! Thank you !
Nice DSP project i ve never used a teensy but after this i gotta
For those who interested in the PWM DAC material, shown in the video, here are the links
www.openmusiclabs.com/learning/digital/pwm-dac/dual-pwm-circuits/index.html
www.edn.com/combine-two-8-bit-outputs-to-make-one-16-bit-dac/
www.edn.com/a-faster-pwm-based-dac/
www.edn.com/cancel-pwm-dac-ripple-with-analog-subtraction/
It would be interesting so see this with the 4.6 that came out last month. There has been some MAJOR MAJOR upgrades including 600Mhz clock speed on a 32bit processor
Did you mean 4.1? There's Teensy dev/platform 4.6.0, but I haven't seen a Teensy newer than 4.1
A summing amplifier might work better for multi PWM. The other one seems to be impedance dependent. Also, you didn't nearly filter the pwms hard enough if you intend to run that signal through a tweeter, should be fine for midrange speakers though . If you use a dual opamp, you can use the first side to make the summing amplification to stack the signals and the other side of the opamp for a 2nd or 3rd order filter.
Helpful video 👍
THX ! very interesting. You are a pro! One qustion. I am building an Teensy FX Pedal for my fender electric bass. just looking at the schematics: What do you think is better to us as an input mic in or line? now i am using line in but the low frew are distorted - i already played with the gain but no difference...
I haven’t tried the mic input on the audio shield and I haven’t seen the schematic lately to see if there’s anything obvious on the board, for example I wonder if there might be some interaction between the output impedance of a pickup and any input components on the audio board, so maybe an op amp in between would help isolate everything and keep everything from interacting.
And possibly use the opamp to reduce gain even further if the hardware itself is being over driven. Do you have an oscilloscope to look at any signals? Is the bass an active pickup output? I wonder if its signal swing is a bit strong and it’s just over driving the input, and attenuating it would help before it even gets to the audio board. Is there any difference if you turn the volume way down on the bass itself to help lower the signal going in to the audio board?
Very nice!
Thanks for this video! What’s the deal with the stepping on the DAC, that’s due to sample rate not bit rate right? Why can the Teensy write to the audio board faster than it can the DAC?
The audio board runs with a data clock a couple of MHz so it would have enough time to get stereo audio and do what it needs with it. I can't remember all the details of the experiment now but yeah the sample rate on the analog input would be un-optimized with all the arduino overhead code and configurations causing it to sample inefficiently, and moving the data from ADC to DAC adds overhead after the sampling is done, and if it's at 10 bits (I think that's the default) it's losing resolution there too. I've used 3 different I2S audio chips on various boards and it's way better.
@@GadgetReboot Ah, makes more sense that it's losing fidelity sampling on the way in, forgot that your test used the board input. I guess it could also be on the way out if the I2S pin gets faster writes than the DAC does due to the way the chip is set up.
Is called PWM DAC, two-path PWM.
Was hoping to learn how this PWM addition werks! I have a guess.
Some MCUs, like the Logic Green clone of the ATMega328, have multiple internal voltage references that can be tied to an I/O pin.
If you have 10 bits to scale a voltage reference of 1.024V, each tic is 1mV. If you use the 4.096 reference, each tick is 4mV. Add them together and get a 5V range at 1mV, which is more steps than can be represented with 10 bits. Teensy probably has INTERNAL1V1 and EXTERNAL 3.3V reference capabilities, at least.
(shrug) May be completely wrong though.
I think the teensy does have an internal 1.2 and external 3.3 option. I feel like I have a 95% understanding of it in my brain but only a 23% capability of expressing it to the rest of the world using stick figures and crayons.
Kind of like how I was frustrated a year ago when I did the video on the audio spectrum analyzer using FFT and I couldn’t exactly figure out how it worked so I had to gloss over it. Still bugs me.
The weird amplidute Modulation you See at 20khz is aliasing 😉