[#5] IIR Filters - Audio DSP On STM32 with I2S (24 Bit / 96 kHz)

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ก.ย. 2024
  • In this video I want to show you how you can setup a realtime audio signal processing chain on a STM32F4 microcontroller running on 96 kHz with 24 Bits resolution (how to setup the hardware modules and how to use the DMA correctly).
    See my Github to download the code:
    github.com/Yet...
    Used hardware:
    Pmod I2S2 Stereo In/Out Board
    store.digilent...
    STM32F407G-DISC1 Evalboard
    www.digikey.de...
    Music: www.bensound.com
    Other videos of my channel:
    How to design a Class-D amplifier?
    • [#2] Designing A Discr...
    How to design a fully discrete Class-AB amplifier?
    • [#3] Designing A Fully...
    How to get a cheap 3D printed speaker sounding great?
    • [#1] 3D Printed Speake...

ความคิดเห็น • 184

  • @demoncloud6147
    @demoncloud6147 4 ปีที่แล้ว +5

    So good, Your channel is not just 'YetAnotherElectronicsChannel' that blinks LED ! It's deep.

  • @MickeyMishra
    @MickeyMishra 3 ปีที่แล้ว +1

    24:05 signal before the crossover
    25:02 crossover two-way applied/
    thank you so much for giving us this example it really does mean a lot of people like me that don't necessarily ingest code very well and are more of a visual and audible kind of folk.

  • @thatboy_mikejones2094
    @thatboy_mikejones2094 4 ปีที่แล้ว +13

    Awesome video, can't wait for more dsp vids

  • @jonatanrrz
    @jonatanrrz 10 หลายเดือนก่อน

    I just reproduced your project. I used the WM8782 ADC with the same settings, it worked perfectly. The HAL complete callbak is already fixed in newer versions. Your video detailing the settings in STM32_Cube_IDE was very useful. Thank you very much for providing such educational material on this subject.

  • @AdilKhan-jp7hn
    @AdilKhan-jp7hn 3 ปีที่แล้ว +4

    This is exactly the audio signal details I needed to get my project working. Thank you for such detailed video and excellent content. Thanks

  • @wolfgangbeginners-mind2853
    @wolfgangbeginners-mind2853 3 ปีที่แล้ว +2

    Thanks for taking the time to go through all the STM32CubeMX parameters, and offering the code as well. It has been invaluable to getting me past the WALL of ARM stuff, and has maid it much clearer to dive in and get things working. Skoll!

  • @pelotonnoob2123
    @pelotonnoob2123 4 ปีที่แล้ว +3

    Please keep these series going. It is awesome

  • @harrykaradimas857
    @harrykaradimas857 4 ปีที่แล้ว

    Great video ! I understood for the first time how IIR filters can be implemented "by hand" !

  • @GilgaFrank
    @GilgaFrank 4 ปีที่แล้ว +4

    Many thanks for this! An excellent discussion of I2S DSP.

  • @soyboy3274
    @soyboy3274 4 ปีที่แล้ว +9

    Really a great explanation! Hope you stay in the lane of audio processing, because there is little simple to understand information out there with code examples to look at etc. Really appreciate the video! Also a little PS: im really curious about the audio enhancement algorithms / for example the harmonic generator you showed of in your first video.

  • @mUbase
    @mUbase 4 ปีที่แล้ว +3

    Yes!! Brilliant video. Excellent descriptions of the hardware and nice diagram of the input, filter and Z transform. Thanjks!!

  • @TheGmr140
    @TheGmr140 4 ปีที่แล้ว +42

    finally a 21st century blog on electronics and DSP, well done Sir.

  • @AAFX-OM
    @AAFX-OM 4 ปีที่แล้ว +1

    I am so glad I stumbled upon this channel... Thank you for making these...

  • @damny0utoobe
    @damny0utoobe 4 ปีที่แล้ว

    This is an excellent video. I searched for audio filtering with STM32. I wasn't disappointed as this jumped right into an actual implementation using cubemx.

  • @HxcTufty
    @HxcTufty 3 ปีที่แล้ว +3

    One thing worth noting, as I develop a similar project and I use this as an example, is that the callbacks with the default configuration are called twice per sample. One time they are called for Rx and one for Tx. In this example it doesn't matter as the code does the same thing twice with no consequences to data. However in my application I had counters and I would notice that they would count the double amount from what I ve seen on the analyzer. The workaround is to disable either Tx or Rx DMA interrupt so that the callbacks are called one time per half/full transfer.

    • @YetAnotherElectronicsChannel
      @YetAnotherElectronicsChannel  3 ปีที่แล้ว

      Thank you. Someone else also mentioned this already. I would pin your message here in comment field..

    • @giorgitsintsadze9919
      @giorgitsintsadze9919 3 ปีที่แล้ว

      did you just trust STM32 to finish handling each interrupt before moving to other ? or did you calculate how much time it would take to process data and compared to time it takes to fire each interrupt. I kind of got lost there. In case of FFT, where I believe you need to fill much bigger buffer (because of frequency resolution and etc) you would not process it before another RxReceived callback would be fired.

    • @edgeeffect
      @edgeeffect 3 ปีที่แล้ว

      Do you have a link to your project's code?

    • @HxcTufty
      @HxcTufty 3 ปีที่แล้ว

      @@giorgitsintsadze9919 What I do in that project is double buffering because I dont want to mess up with timings and disabling interrupts. So in case of FFT you can have 2 buffers of same size. One should gather data from i2s until is full. Once full you would switch to the other buffer and simultaneously calculate fft on first buffer.

    • @HxcTufty
      @HxcTufty 3 ปีที่แล้ว

      @@edgeeffect nope sorry I cant share

  • @robertmonroe9728
    @robertmonroe9728 3 ปีที่แล้ว +1

    Amazingly useful video to start!

    • @MKRCLabs
      @MKRCLabs 3 ปีที่แล้ว

      Good

  • @kissingfrogs
    @kissingfrogs 3 ปีที่แล้ว

    nice. i finally get to see an implementation of IIR from block diagram theory to DSP code. It helped answer so many questions. thanks

  • @JimJaws-u1q
    @JimJaws-u1q 11 หลายเดือนก่อน

    Thank you so much for sharing this. It was very helpful in getting started with audio DSP!

  • @YetAnotherElectronicsChannel
    @YetAnotherElectronicsChannel  4 ปีที่แล้ว +6

    Take a look on my video about how to use the ARM CMSIS DSP library to implement IIR filters more professional and efficient on the STM32 th-cam.com/video/vCcALaGNlyw/w-d-xo.html

    • @Chitrang62
      @Chitrang62 4 ปีที่แล้ว

      how do you know the sampling frequency is 96Khz

    • @jeremiasvargas1077
      @jeremiasvargas1077 4 ปีที่แล้ว

      Hi !! I am doing a 2x vias Crossover (LP and BP) and the problem that I having is that I listen pulses but not "Music", any IN signal, the "Output" is a pulse.
      I need to use onboard ADC/DAC, is for the universtiy. Is it possible to share your mail in order to talk about that? Many thanks

  • @hlw8051
    @hlw8051 4 ปีที่แล้ว +5

    great stuff! Keep it up brother

  • @mathemabeat009
    @mathemabeat009 4 ปีที่แล้ว +1

    That!!! That is amazing!!! Thank you so much for sharing this video

  • @tamtam4321
    @tamtam4321 4 ปีที่แล้ว +1

    thank you so much, I've learned a lot from your videos. Keep up the good work !

  • @PATRIK67KALLBACK
    @PATRIK67KALLBACK 2 ปีที่แล้ว

    Nice project! I think I will test this, as well as your pitch shifter project

  • @awaterplease7885
    @awaterplease7885 4 ปีที่แล้ว +1

    Great video dude! Looking forward to more content.

  • @ralfaralf6805
    @ralfaralf6805 4 ปีที่แล้ว +2

    Wow, thanks so much for this!

  • @arkadiuszkrupinski6225
    @arkadiuszkrupinski6225 3 ปีที่แล้ว

    Really nice job. Thank you for the video!

  • @dmitr8194
    @dmitr8194 4 ปีที่แล้ว

    Awesome!
    I should try it on ESP32
    Also I find your another one video with reverberation very interesting. I had experiments in my childhood with IC chips. There was TTL like RAM for delay and a opam for ADC for implementing the reverberation machine. It was device sized like shoes box. Haha.. After four of mounts assemble and fix wired issue its had been working!

  • @syedafzal2062
    @syedafzal2062 2 ปีที่แล้ว

    you are great Sir ....................... I hope you will make more such videos

  • @lekmamiex1634
    @lekmamiex1634 2 ปีที่แล้ว

    Very good.... Waiting for the next tutor to combine with VHF transmitter
    Kind regards....

  • @alarmkoguvenlik
    @alarmkoguvenlik 6 หลายเดือนก่อน

    You are great. Thank you.

  • @josemq0x158
    @josemq0x158 3 ปีที่แล้ว

    gracias amigo por compartir tus conocimientos

  • @nicknagy8903
    @nicknagy8903 4 ปีที่แล้ว +2

    Great video, thank you!
    I'm using an STM32F767ZI, it does not have full-duplex I2S interfaces but does have multiple half-duplex ones. Instead of HAL_I2SEx_TxRxCplt(), I have HAL_I2S_TxCplt() and HAL_I2S_RxCplt(), etc. For two half-duplex I2S interfaces do I need to make sure the transmitting interface is initiated / started first? Does it matter which interface is connected to the Pmod ADC and which to DAC? Does it matter which one is in master mode and which is in slave mode?
    Any pointers would help me out, thanks!

    • @sebastienvezina9158
      @sebastienvezina9158 3 ปีที่แล้ว +1

      Hi! Did you ever figure that one out? I'm having that exact same issue on the F730. Thanks!

  • @jonathanwogerbauer2703
    @jonathanwogerbauer2703 2 ปีที่แล้ว

    Hallo, eine Frage:
    am Anfang sagst du ja deine Master Ck ist 6,144MHz und deine BLCK ist 24,576 MHz. Aber in deiner Clock Configuration (7:55) hast du bei deiner I2S Clock 96 MHz eingestellt? Wie ergibt sich da der Zusammenhang? Und über welche Parameter steuert man die Bit und Master Clock?
    Liebe Grüße

    • @YetAnotherElectronicsChannel
      @YetAnotherElectronicsChannel  2 ปีที่แล้ว

      Du hast natürlich recht - das ist bisschen verwirrend. Mit 96 MHz wurde das I2S Modul getaktet. Eigentlich keine valide Frequenz, wenn man die Audio-Clocks exakt treffen will. Korrekterweise hätte die Clock da z.B. 98.304 oder 49.152 MHz sein müssen. Damit würde man dann durch 2^x Teiler dann entsprechend die Frequenzen wie 24.576M, 96k, 48k, 6.144M treffen. Normalerweise reserviert man für das audio-clocking eine eigene PLL, die diese "krumme" Frequenz dann erzeugt. In dem Beispiel war die reale sampling-requenz dann eher 93.75 kHz statt 96k

  • @sampaths82
    @sampaths82 3 ปีที่แล้ว

    Useful project .thank you

  • @ajoyraman1409
    @ajoyraman1409 ปีที่แล้ว

    Great job!

  • @na5y
    @na5y 4 ปีที่แล้ว

    Great video. A couple of questions if I may. I saw that the I2S_ex drivers are available for the STM32F4 but not for the F7 - any ideas why that might be? The I2S support is there in Cube for F7 but the Full duplex mode isn't supported. Also - did you capture both the half and full complete callbacks to give you and extra window of processing? I didn't quite understand that. Anyway - great series of videos, thank you !

  • @Synthetech
    @Synthetech 2 ปีที่แล้ว

    Hi. Great video. I've been doing a lot of work with a DAC and looking to dabble in ADC.
    In your vid
    at around 9:30 you said the uC can't generate exactly 96kHz.
    Did you try to tune it in any further using the PLLI2S multiplier in Clock Config? (seen at ~7:50 at the bottom)
    You should be able to increase or decrease the multiplier a bit to tune the error percentage in closer to the target frequency.
    It usually won't pull it in exact, but it should be able to tune in to less then 1% error.

  • @TheRein10
    @TheRein10 6 หลายเดือนก่อน

    Hi, excellent project. I would ask about signal input and output to board. Are you connect signal output (from PC) direct to LINE IN on board and LINE OUT from board to microphone input on PC? I’m afraid about signals level. Could you describe how are you connect this ? Thanks.

  • @chaowang2771
    @chaowang2771 4 ปีที่แล้ว +2

    Great video! I'm a complete newbie here. I have a couple of questions. 1. Should the Pmodi2s2 be set as master mode or slave mode? 2. Should the VCC of Pmodi2s2 be connected to 3V or 5V output of STM32F407? 3. Is the LineIn of Pmodi2s2 connected to computer and LineOut connected to a headphone? Look forward to your answer. Thanks!

  • @perceptron9834
    @perceptron9834 2 ปีที่แล้ว

    Great tutorial

  • @LOFIAD
    @LOFIAD ปีที่แล้ว

    As i don't have the exact same chip, My configuration does not end up being the same and so I just hear white noise. The callback line is not there as well as some peripheral related stuff. Help! --- Update: my setup only worked with half word for reasons I don't understand

  • @michaelzemah1476
    @michaelzemah1476 11 หลายเดือนก่อน

    I'm working on a project using STM32F411 Disco board, and it is connected via Fullduplex I2s and DMA like you described.
    I have a hard time getting the samples right and having math manipulations not corrupting the output.
    I'm stuck on this issue for 2 days now, and I watched your video & Phil's Lab's videos multiple times, and no matter what bitwise operation I perform on the input data, the output is getting corrupted.
    Can you maybe help me via a short zoom meeting?
    of chat about it privately ?

  • @isoslow
    @isoslow ปีที่แล้ว

    I still hope you would reply on how to generate correct audio clock... Is this even possible with STM32F series?! More than 2.34% deviation is unusable if I say want to stream predefined sample rate stream from USB for example. In fact, any deviation would be unacceptable in this case :( .

  • @Andy-ph1qj
    @Andy-ph1qj 4 ปีที่แล้ว

    Great video!

  • @robertbristow-johnson6362
    @robertbristow-johnson6362 2 หลายเดือนก่อน

    These two lines *must* be in error (assuming int is 32 bits).
    int lsample = (int) (rxBuf[0]

  • @paulg.3067
    @paulg.3067 4 ปีที่แล้ว

    great work

  • @tosicz
    @tosicz 3 ปีที่แล้ว

    Good work!

  • @alessiobianchi8039
    @alessiobianchi8039 3 ปีที่แล้ว

    Thanks for your video. May I ask you the connection between the PMod I2S2 board and the STM32F407 Discovery board? I don't know where to connect the pins of the DAC of the I2S2. Thanks in advance!

  • @adamskii0170
    @adamskii0170 ปีที่แล้ว

    I have tried to follow along with this but am having trouble when connecting the PMOD ADC and DAC, and cannot seem to pass through audio. Do you have any recommendations or can you indicate how to wire this? I noticed the LR clock connection is not shown on your block diagram and want to know where this connection would be applied :)

  • @oldhabbitsdiehard
    @oldhabbitsdiehard 2 ปีที่แล้ว

    Hi, Can i implement this on STM32F103C8T6 Blue Pill Development Board or STM32L100C-Discovery board?

  • @StudentoftheUniverse-f7z
    @StudentoftheUniverse-f7z ปีที่แล้ว

    Is it possible to provide a link to the researchgate information you have displayed?

  • @nhatcomnhom
    @nhatcomnhom ปีที่แล้ว

    hi bro, at the schematic, i connect those stuff like your draw but it seem like WS, MCLK, SCLK cannot be connect at the same port (TT), i used i2s3 with audio jack out on board and pmod i2s as an input (i put it on slave mode), can you show how to connect it on board plz. Further more, seem like void HAL_I2SEx_TxRxCpltCallback and void HAL_I2SEx_TxRxHalfCpltCallback cannot work (i mean they dont fire even thought i fix the bug like your video). when i test HAL_I2S_Transmit_DMA to output sin wave sound it works , but HAL_I2SEx_TransmitReceive_DMA dont work (TT), hope you see my comment
    best regards

  • @isoslow
    @isoslow 2 ปีที่แล้ว

    Is it possible to get proper 96 kHz instead of proposed 93.75?

  • @warrencookson8549
    @warrencookson8549 3 ปีที่แล้ว

    Great video, I am going to use this as my introduction to DSP with a microcontroller! I was wondering what the input signal looks like? Can I use a bi-polar input or do I need to do the whole biasing thing between 0 - 3V's?

  • @felipeyoshino640
    @felipeyoshino640 2 ปีที่แล้ว

    Hi there.
    Can you suggest me a ST MCU that can process 7.1 audio (8ch) through 4 stereo I²S lines, streaming it to my DAC? I'm actually working on my final eng grad project and I need to process multi channel decoded audio comming from HDMI interface. It has been so hard to research such kind of content on YT.
    Nice video. Thanks!

  • @babotvoj
    @babotvoj 4 ปีที่แล้ว

    how did you wire up your boards, because i wired them up with some jumpers and connected my headphones to the DAC. The result is that I can hear the music but I have noise.

  • @andrewandrosow4797
    @andrewandrosow4797 4 ปีที่แล้ว

    Good work! Is (there) any way to configurate an I2S bus with LL drivers?I tried to build a project with stm32f303vct6, but there in the CubeMX ( "ProjectManager->advanced settings" ) is a one pukt next to I2S: it is HAL.

  • @dansnazelle8553
    @dansnazelle8553 4 ปีที่แล้ว

    do you have any advice on Where in the code to control TIME with a pot (say time= time*(float) pot1; when i put that into the main it breaks. but without that line my adc works and sound and reverb work. so just need to figure out where it doesnt break the i2s. thanks :)

  • @panaromattt2177
    @panaromattt2177 3 ปีที่แล้ว

    Teacher, How can I get the microphone on stm32f4 to realize some applications about Dsp. Thank you

  • @AlexLisiReal
    @AlexLisiReal 3 ปีที่แล้ว

    thank you

  • @shibillkhadri1937
    @shibillkhadri1937 3 ปีที่แล้ว

    Is it also possible to have a real time auto tune effect based on Fourier transformations. How could one go about such an idea?

  • @MKRCLabs
    @MKRCLabs 3 ปีที่แล้ว

    Good job

  • @lucastosetto2900
    @lucastosetto2900 3 ปีที่แล้ว

    How can I configure the DSP to communicate with windows via USB? So I can use a similar system as an audio interface

  • @valdeciribeiro7839
    @valdeciribeiro7839 4 ปีที่แล้ว

    Hello, congratulations on your work.
    what is the possibility of building a musical keyboard with stm32, how to do that. Can I play musical notes with this?grateful

  • @eventhatsme
    @eventhatsme 3 ปีที่แล้ว

    Excellent video! Is it really necessary with the "Master Clock Output" selection? I see that there are two lines that appear to have a clock signal: I2S2_CK and I2S2_MCK. Could you tell me the difference? Another thing: Have you set the DMA buffers to byte (8 bits), half word (16 bits) or word (32 bits)?

    • @eventhatsme
      @eventhatsme 3 ปีที่แล้ว

      I guess I'll answer my own question: If the I2S unit has internal PLL it would suffice to disable the master clock output and use only the I2S2_CK line as input to the SCK of the unit. I think your setup use half word for the DMA, as this was working out nicely for me.

  • @Mr_ASIC
    @Mr_ASIC 4 ปีที่แล้ว

    please keep posting

  • @felipegarciaencina5117
    @felipegarciaencina5117 4 ปีที่แล้ว

    Hello, I'm looking to implement filters on a ESP32, you have experience in that platform?. Would be only 16 kHz sampling. with bandpass filters.

  • @НиколайКрасиков-ы8й
    @НиколайКрасиков-ы8й 4 ปีที่แล้ว

    Thank you, I will try, I would show you directly in the video how everything on the Board is tested. How much does Jack 3.5 need? There's only one on the Board, won't it be enough?
    2) Is there a project implementation on SPL (LL)?

    • @YetAnotherElectronicsChannel
      @YetAnotherElectronicsChannel  4 ปีที่แล้ว

      Yes there is an audio-codec on the board for audio output. However you don't have any audio input besides a microphone and you also have to configure the audio codec before with I2C. Using the PMOD I2S2 board here is quite more easier as you don't have to do software configurations first.

  • @HB9GZE
    @HB9GZE 3 ปีที่แล้ว

    very good!! Thank you, I did learn a lot! The ADC takes an Input of 0 - 3.3V. Do you use an op-amp adder with 1.5V at the ADC to allow for the AC audio input? How much CPU load does this example finally take? What is the heaviest load; the IIR filter, the int handling...?

    • @HB9GZE
      @HB9GZE 3 ปีที่แล้ว

      I do have a question: did you ever compare the STM32F4 IIR filter response to the theoretical/calculated transferfunction? I find an offset of several hundert Hz and cant explain why (the true sampling freq. is lesss then 96kHz; but only 2% or so)...

  • @elakeee2921
    @elakeee2921 3 ปีที่แล้ว

    How can we read and copy the uploaded code from STM32F405RGT6? Please can you explain

  • @kerimzengin6317
    @kerimzengin6317 2 ปีที่แล้ว

    Unfortunatelly,i dont have pdm microphone so i have to use stm32 microphone but i couldnt do that please someone help me?

  • @skylercornell7996
    @skylercornell7996 4 ปีที่แล้ว

    Thank you, I learned a lot! One question: The incoming i2s data stream is 24 bit left aligned, so I would have expected to see a shift right by 8 to restore the incoming data to how the processor interprets data (right aligned).
    int lSample = (int) (rxBuf[4]

    • @YetAnotherElectronicsChannel
      @YetAnotherElectronicsChannel  4 ปีที่แล้ว +1

      I²S is transmitting the data in signed integer format (means 2's complement) with the sign-bit being transmitted directly at the beginning.
      In 32-bit integer, the sign-bit is also most MSB bit.
      Of course you could shift the data low by 8, but you have to care, that still the sign-bit is on the correct position for also 32-bit integer data type (means that is not just a bit-shift but an arithmetic bit-shift).
      In the end it doesn't care if all the data values are scaled up by 255 or not. The risk in my implementation for sure is that you can get faster numeric overflows then if you are near to clipping level.

    • @skylercornell7996
      @skylercornell7996 4 ปีที่แล้ว

      @@YetAnotherElectronicsChannel that makes perfect sense, can't wait to learn more from your videos !

  • @drdream123
    @drdream123 3 ปีที่แล้ว

    I'm trying to do what you do except with Analog Devices Blackfin BF533 for 8 channels.. can I hire you to help?

  • @Scytherfreak
    @Scytherfreak 4 ปีที่แล้ว

    Hi, with regards to the DMA interrupt..
    I have a suspicion that the TxRxHalfCpltCallback is called twice and then the TxRxCpltCallback is called twice due to both DMA streams triggering everytime. Is this possible?

    • @theimunten6325
      @theimunten6325 4 ปีที่แล้ว +1

      O yes!..you found that to..:-).. I put that remark at the bug report on github
      Quick fix: comment out the Dma interrupt associated with the send

  • @KenDedes94
    @KenDedes94 4 ปีที่แล้ว

    Hello, thank you so much for the video. I have a question about debugging it in STM 32 IDE, It kept saying debugging connection lost? Can you tell me what kind of configuration you used for debugging it? Or maybe the way I flash it to the board wrong?

    • @S-MKim
      @S-MKim 3 ปีที่แล้ว

      Did you find the answer? Is it an error?

  • @tims4773
    @tims4773 4 ปีที่แล้ว +2

    Would it be possible to do this using entirely the onboard STM32 ADC and DAC instead of the CS I2S modules?

    • @thecrikster
      @thecrikster 4 ปีที่แล้ว +2

      Yes. You can enable DMA on both ADC and DAC, then have both triggered by hw timers. The samples will be interleaved so you need to split them. Use a DMA call back (as shown here) to process the ADC input.
      You will find that the filter order (number of taps), the sample rate and the max ADC clock speed are dependant on each other. For embedded systems the ADC clock speed has a max value much lower than "normal" systems. The sample rate will determine the sound quality of the output and should go no lower than 44.1KHz. Therefore, you will need to design your filter so that the order/taps achieve the required frequency response whilst not becoming too computationally expense to affect the sample rate. In other words, your ADC clock will be "maxed out" and it will be a trade off between sample rate and frequency response. As the cutoff frequency gets lower, the passband becomes narrower and it becomes increasingly difficult to create a cheap and effective filter.

    • @babotvoj
      @babotvoj 4 ปีที่แล้ว

      @@thecrikster Are you talking ybout the IIR filter ? How does it effect ADC clock of the internal ADC but works fine with the external?

    • @jeremiasvargas1077
      @jeremiasvargas1077 4 ปีที่แล้ว

      @@thecrikster I am doing a 2x vias Crossover (LP and BP) and the problem that I having is that I listen pulses but not "Music", any IN signal, the "Output" is a pulse.

  • @p_mouse8676
    @p_mouse8676 4 ปีที่แล้ว

    It wasn't totally clear to me, but do you know the max samplerate? Is 192kHz possible for example?

  • @vahidsamavatian8324
    @vahidsamavatian8324 4 ปีที่แล้ว

    This video is really interesting. Thanks for sharing it. I have some problems with its implementation. rxBuf[0] is allocated to MSB of L-channel and rxBuf [1] is allocated to LSB of L-channel. LSB has to be in this format/: 0xKL00 in which K and L can be anything. But the most important thing having to be noted that the least Byte of LSB is 00. However, in my implementation based on your explanation, it is not.
    Another Thing I have problem with is that float out of filtering is unreasonably high. I checked filtering parameters. Everything seems OK.
    Could you please help me in this regards.?
    Many thanks

  • @iotworld9673
    @iotworld9673 ปีที่แล้ว

    Hii sir big fan of your content, just in case you have some work or any project and you want some helping hand i am in.

  • @theo5773
    @theo5773 3 ปีที่แล้ว

    Good video

  • @babotvoj
    @babotvoj 4 ปีที่แล้ว

    The ADC you used is for audio signals, because it has ainr and ainl inputs. Do you know a similar adc that can be used for single signal? Or can I just use one of the input ports of the ADC and connect the other to ground?

    • @YetAnotherElectronicsChannel
      @YetAnotherElectronicsChannel  4 ปีที่แล้ว

      Audio ADCs are typically always in stereo. There also some on the market which even have 4 or 8 audio channels. But always a multiple of 2.
      And yes, you can keep one input floating or connect to GND via a capacitor and then process only the samples of one channel inside the DSP

    • @babotvoj
      @babotvoj 4 ปีที่แล้ว

      @@YetAnotherElectronicsChannel thank you very much for the quick answer

  • @RixtronixLAB
    @RixtronixLAB 3 ปีที่แล้ว

    Cool info :) Is it possible that I use PCM5102 Decoder Board ?

  • @SuperLeoSG
    @SuperLeoSG 4 ปีที่แล้ว

    really cool, but i'm curious to know, why you need such LF HF filtration? What is for?

  • @damonmccartney1168
    @damonmccartney1168 4 ปีที่แล้ว

    Loving these videos, very clear explanations! However, when I upload to my board the results are noisy af! Any tips? Wires leading to the DAC/ADC are short etc, not sure how you get such crisp recordings. I get some strange artefacts.

    • @YetAnotherElectronicsChannel
      @YetAnotherElectronicsChannel  4 ปีที่แล้ว

      How did you distribute the clocking? What converters are u using? Did u check the I2S signals with the scope ?

    • @damonmccartney1168
      @damonmccartney1168 4 ปีที่แล้ว

      @@YetAnotherElectronicsChannel hello! Just loaded up your project files and uploaded. Same boards etc as you are using in your video! Will have a scope tonight and see if it's something obvious. A fellow audio and electronics enthusiast so love your videos!

    • @YetAnotherElectronicsChannel
      @YetAnotherElectronicsChannel  4 ปีที่แล้ว

      Damon McCartney what I was doing always wrong is that I exchanged sometimes the datelines from/to ADC / DAC ... and for sure the clocking signals like MCLK, SCLK und WS are only available once on STM side but need to be spreaded to both ADC and DAC. The 3.3V supply can be taken directly from the STM32 board

  • @dansnazelle8553
    @dansnazelle8553 4 ปีที่แล้ว

    is there anything special about this codec or would these videos work for example with the WM8731? thanks for this great series

    • @YetAnotherElectronicsChannel
      @YetAnotherElectronicsChannel  4 ปีที่แล้ว

      dan snazelle WM8731 will also work, but will need some modification as it needs to be configured before

    • @dansnazelle8553
      @dansnazelle8553 4 ปีที่แล้ว

      @@YetAnotherElectronicsChannel yes i tried to build it :) but i am now reading it needs to enabled..however i am not sure where to do this. (seems it must be enabled via i2c?) anyway excellent videos.

  • @marceldolnak3604
    @marceldolnak3604 4 ปีที่แล้ว

    Hi
    What program do you use to calculate the IIR filter in your project ?.

    • @YetAnotherElectronicsChannel
      @YetAnotherElectronicsChannel  4 ปีที่แล้ว

      Marcel Dolnák have a look here: www.earlevel.com/main/2013/10/13/biquad-calculator-v2/ ... or if you are interested to calculate it yourself look here www.w3.org/2011/audio/audio-eq-cookbook.html

    • @marceldolnak3604
      @marceldolnak3604 4 ปีที่แล้ว

      @@YetAnotherElectronicsChannel Well thank you :-)

  • @kardanium
    @kardanium 2 ปีที่แล้ว +1

    uint16_t rxBuff[8];
    int lSample = (int) (rxBuff[0]

    • @aubinpougnant8691
      @aubinpougnant8691 2 ปีที่แล้ว

      Works great too ! Was wondering, what are becoming the rxBuf[1] bits ?

  • @antoniomartos2343
    @antoniomartos2343 3 ปีที่แล้ว

    First, thanks for the great video!!! Second, does DSP library work on nucleo-L476RG?

    • @asunavk69
      @asunavk69 3 ปีที่แล้ว

      No, since that board has no i2s, i also was researshing for that, and according on this site:stm32duinoforum.com/forum/viewtopic_f_29_t_4181.html, there's some way to make it work with i2s, but it would mean more work.

    • @antoniomartos2343
      @antoniomartos2343 3 ปีที่แล้ว

      @@asunavk69 Oh but thats for the final part of the video. I just need fft and FIR lowpass filters. I tried a low pass filter and it worked perfectly. Thanks for everything and continue with the good work.

    • @asunavk69
      @asunavk69 3 ปีที่แล้ว

      @@antoniomartos2343 idk what fft is but if a FIR low pass works for you then ok, did you do it with the l476rg?

    • @antoniomartos2343
      @antoniomartos2343 3 ปีที่แล้ว

      @@asunavk69 fft means fast fourier transform for having signal in frecuency domain. FIR lowpass worked perfectly. Thanks a lot!!

  • @davidkain9046
    @davidkain9046 3 ปีที่แล้ว

    How connect stm32 board to i2s board?

  • @IvanEng747
    @IvanEng747 ปีที่แล้ว

    What about voice?

  • @vectorsize
    @vectorsize 4 ปีที่แล้ว

    Great example, thank you!
    did you use the default pins for the STM board?
    could you please share the pin to pin STM/Pmod connections you used for this to work?
    thanks ^^

    • @YetAnotherElectronicsChannel
      @YetAnotherElectronicsChannel  4 ปีที่แล้ว +1

      The pinning of the STM32 you can see in the block diagram quite at the beginning of the video

    • @vectorsize
      @vectorsize 4 ปีที่แล้ว

      @@YetAnotherElectronicsChannel oh, sorry I must have missed that detail..., thanks!

    • @YetAnotherElectronicsChannel
      @YetAnotherElectronicsChannel  4 ปีที่แล้ว +1

      Check out roughly 3:10 for example

    • @vectorsize
      @vectorsize 4 ปีที่แล้ว

      @@YetAnotherElectronicsChannel yep, there it is... I somehow overlooked it thinking this diagram was more conceptual 😅

    • @patrickmojica6558
      @patrickmojica6558 4 ปีที่แล้ว

      @@YetAnotherElectronicsChannel Thank you your videos and code are very helpful. I'm trying to implement your phase vocoder to do pitch shifting in a DSP project i'm working on for school. I do have a question to solve a problem I've encountered:
      I see that the PmodI2S2 has separate pins for the ADC and DAC side, but both need the same clock signals: MCLK, LRCK (WS), and SCLK.
      Did you short these pins together on the pmod board somehow or did you configure pins on the STM32F4 to give you duplicates of the clock signals ?

  • @serkansatuk4784
    @serkansatuk4784 3 ปีที่แล้ว

    Hi, thanks for this great video. I used stm32f411ceu6 board ( stm32-base.org/boards/STM32F411CEU6-WeAct-Black-Pill-V2.0.html ) and activated i2s2 on full duplex master mode. İ2s2 Clock frequency to 96 kHz. After that i generated code but not worked. I checked İ2s2 pins with logic analyzer. O couldn't get any clock signals on the pins. Could you help me, please?

  • @kekecjan
    @kekecjan 3 ปีที่แล้ว

    Hello, i have one problem, yesterday i uploaded your code on stm32F4 Discovery and connected PMOD I2S2 and it was working as expected. Today i wanted to try new STM32 (STM32F401) i uploaded same code, i only changed clock configuration in STM32Cube nothing else, but i only heard cracking noise. I hooked up back to STM32F4 Discovery board and again cracking noise. Did i somehow destroied PMOD I2S2 ???? I checked wiring twice and it's correct. What do you think it's the ploblem?

    • @S-MKim
      @S-MKim 3 ปีที่แล้ว

      Perhaps you could kindly make a detailed video on how you make it realized. I am still working on it for a week but no clue.

    • @kekecjan
      @kekecjan 3 ปีที่แล้ว +1

      @@S-MKim I did fixed it... i was using male to female wires and ofcourse somewhere was no connection between pins. That was the reason.

    • @kekecjan
      @kekecjan 3 ปีที่แล้ว

      @@S-MKim well i used 6x2 female header and i soldered pins to STM32F4 and worked.

    • @S-MKim
      @S-MKim 3 ปีที่แล้ว

      @@kekecjan Congratulations. So the codes seem alright. I will buy a new Pmod I2S2 (mine seems dead) and try it again.

    • @kekecjan
      @kekecjan 3 ปีที่แล้ว

      @@S-MKim yeah code works great. why dont you make your own PMOD I2S2 ? one board costs 50€ with shipping isn't that much for one PMOD? i made my own PMOD and work well... also i could make 5 of them for the same price. Up to you... all you need is already in documentation for PMOD.

  • @johnsaeid95
    @johnsaeid95 4 ปีที่แล้ว

    I have an urgent question to me
    when you use 24 bit I2S
    Does the STM send 24 bit frame or send a 32-bit frame and the consider the least 8-bit ro be zeros ?
    plz respond

    • @YetAnotherElectronicsChannel
      @YetAnotherElectronicsChannel  4 ปีที่แล้ว

      Hanna Nabil u are right, 24 bit audio is actually transmitted in 32 bit frames. The 8 LSB are 0‘s

    • @johnsaeid95
      @johnsaeid95 4 ปีที่แล้ว

      @@YetAnotherElectronicsChannel but when use DMA ( half word) and you use I2S_dma which take 16-bits data
      Does the I2S still preserve the 32-bit frame ?

    • @YetAnotherElectronicsChannel
      @YetAnotherElectronicsChannel  4 ปีที่แล้ว

      Hanna Nabil DMA is working in 16 bit mode, but two 16-words behind each other are building a 32 bit word. You can cast the 16-bit pointer directly to a 32-bit pointer

    • @johnsaeid95
      @johnsaeid95 4 ปีที่แล้ว

      @@YetAnotherElectronicsChannel you are right
      But
      Does the I2S will still send clock cycle for the least 8-bit even they are always zeros
      Um asking because I am using a codec with 24-bit DAC which let me choose between 24 , 32 bit I2S

    • @YetAnotherElectronicsChannel
      @YetAnotherElectronicsChannel  4 ปีที่แล้ว

      Hanna Nabil yes there will be another 8 clock cycles even if it is 0‘s

  • @tallabrianmonde3021
    @tallabrianmonde3021 3 หลายเดือนก่อน

    Thanks so much for your generousity Sir

  • @diggleboy
    @diggleboy 4 ปีที่แล้ว +3

    Fantastic video! Never knew I2S with DSP could perform so well at audio frequencies. Great walkthrough on how you learned and overcame some of the challenges you faced.

    • @einball
      @einball 3 ปีที่แล้ว +1

      I2S, not I2C

    • @diggleboy
      @diggleboy 3 ปีที่แล้ว

      @@einball Thanks for the correction.

    • @einball
      @einball 3 ปีที่แล้ว

      ​@@diggleboy You're welcome! I didn't want to be nosy but I also couldn't let the thought that 'someone is wrong on the internet' bug me during the night! :-^)

  • @nicknagy8903
    @nicknagy8903 4 ปีที่แล้ว

    Also what should the data width be set at for the circular mode DMA settings in STM32CubeMX? Byte? Half word? Word?

  • @hunterwhyte1208
    @hunterwhyte1208 3 ปีที่แล้ว

    incredibly useful and well put together video, thanks so much

  • @0x80O0oOverfl0w
    @0x80O0oOverfl0w 4 ปีที่แล้ว

    I like this video, and your series as well. I have several STM32 dev boards so I'm looking forward to trying out some more examples. One thing I noticed missing was your clock configuration. With the steps presented in the video, the option to select an external 8MHz clock was grayed out. It wasn't until I did some digging that I learned the option was unlocked when you configured RCC in the System Core category, but the problem is I have no idea what the correct settings are supposed to be for the RCC. Also, it would be cool to figure out how to use the mems microphone and audio out that is already on the board, without having to use an additional (pmod) component. Keep up the good work!

  • @personalsergio
    @personalsergio 4 ปีที่แล้ว

    Thanks so much! awesome video!