5 Replies Latest reply on Oct 3, 2015 2:32 PM by user_14586677

    How to make simple PSoC audio processing?

    ararararara

      Greetings, my name is Ara and i'm new here

         

      so i am currently running a project of simple audio processor for educational standard which simply used to show colleagues example of how audio signal transformed with simple customizable algorithm. I was looking for possible hardware development and came across conclusions that several common microcontrollers only capable of doing analog output with either PWM or DAC, i wish i could find simple microcontroller that doesnt need any external add-on on it and came upon on PSoC. so is it true i can accomplish my hardware development with PSoC?

         

      I've embedded simple diagram to show exactly what my intentions here, i hope you guys can help and guide me till i could walk by my own legs with PSoC. I'm just starting to dwell in hardware programming and only got dummies level of C programming, but i could at least say i'm familiar with the field.

         

      By the way on my college i've already got PSoC 5 on my hand which is the reason i post this here, i hope i weren't on wrong place and if it is could you kindly guide my where should i go. Sorry for any mistake or misunderstanding i might have caused as english is not my main language

         

      Thank you sincerely

        • 1. Re: How to make simple PSoC audio processing?
          user_1377889

          Yes, You can! And: Welcome in the forum, Ara!

             

          One of the components a PSoC5 has got is a two channel digital filter block which you may use to have your signal manipulated.

             

          A fast ADC is used to digitize the signals, and internal voltage DACs are used to generate the output signals.

             

          So a PSoC5 contains (apart from the signal conditioning as input limiting and output power amps) all the needed blocks.

             

          And more: You need something for educational purposes? Cheap but handy?? Have a look at the CY8CKIT-059

             

          This kit mounted onto a breadboard is unsurpassable for experiments of any kind.

             

           

             

          Bob

          • 2. Re: How to make simple PSoC audio processing?
            user_14586677

            If you go to start page Creator, "Find Example Project" link, there is an

               

            example project "Filter_ADC_VDAC" that would be the basis for a

               

            project. See atatched.

               

             

               

            Regards, Dana.

            • 3. Re: How to make simple PSoC audio processing?
              ararararara

              Thank you very much Bob and Dana for your time and answer, i have now myself tinkering around with the PSoC5LP and PSoC Creator! your reply absolutely introduce me to what should i do as as PSoC zero starter!

              I've taken a look at the filter example but it feels sophisticated that i might not be able to follow up anything from there, but i think i kinda get it that to achieve what i want is change the filter block with a DSP block, but i cant understand how to apply the customizable algorithm. I'm sorry if it seems i lack of knowledge and eagerness, i hope you guys can help me till i can do all this on my own, but can i ask for example of the code of how to do this some simple signal processing? like what is the variable name of the ADC output and VDAC input name that i could process mathematically and how and where to write it?

                 

              Example like:

                 

              if the ADC output is x(t) and the VDAC input is y(t) and i want my algorithm as y(t)= maxamplitude * cos( 2 * pi * ( samplerate * t  + dev * x(t) ))

                 

              i thought if i could get the example of how such algorithm applied on PSoC Creator and written to the PSoC5LP i would get the hang of the whole PSoC and maybe can do this all by myself and eventually mastering the PSoC itself.

              Thank you sincerely, Ara

              • 4. Re: How to make simple PSoC audio processing?
                user_1377889

                Ara,

                   

                a transfer function as you wrote down will not be possible with the filter block. But you could write it down in C-Language although the cos() calculation will take some time, here a lookup table could shorten the needed CPU-time. This is something you could do with any microprocessor. The PSoC filter component could apply filter types as biquad, bessel chebychew and others as high-pass, low pass and bandpass with different sample rates and center/cutoff frequencies.

                   

                 

                   

                Bob

                • 5. Re: How to make simple PSoC audio processing?
                  user_14586677

                  Actually the DFB is precisely the component you would use to do custom algorithims,

                     

                  you would have to use the DFB assembler to do it. The DFB is a general purpose DSP

                     

                  engine that can do lots of math intensive stuff, or general purpose hi speed control/ALU.

                     

                   

                     

                  http://www.cypress.com/?rID=60720     DFB Assembler, MAC Topics

                     

                  http://www.cypress.com/?app=forum&id=2492&rID=76907     DFB Assembler

                     

                  https://www.youtube.com/watch?v=2UC4gCohrk8      DFB Video Part I

                     

                  https://www.youtube.com/watch?v=6tr_CNWIA8M     DFB Video Part II

                     

                  https://www.youtube.com/watch?v=nIa4X7gES3k     DFB Video Part III

                     

                   

                     

                  But the learning curve on this is a tad steep, as Bob suggested the DFB filter

                     

                  wizard is a super tool for creating FIR, IIR, BPF, LPF, Band Stop, HPF filters,

                     

                  just put the module on your schematic and play with the tool and view the response

                     

                  curves. Keep in mind sample rates should be 10 - 20 X the critical cutoff frequencies.

                     

                   

                     

                  Regards, Dana.