2 Replies Latest reply on Jan 14, 2014 4:48 AM by user_14586677

    Envelope extraction based on rectifier/LP filter with PSOC 5 LP

    xuan.zhong

        Hi there,

         

      I have built an envelope extraction processor with PSOC 5LP. Overall it is working, but the rectification is not a full rectification, and the envelope is usable but not very neat.

         

      The design was a rectifier followed by a low pass filter, as shown in the attachment. 

         

      The rectifier was based on an old technical note. Found it in EE times archive. Both on-board voltages were set to 5V. The comparator was comparing the input signal to VDD/2 (reference signal) which yield either a positve or a negative unity gain depending on the level of input signal as compared to that of the reference. A mixer they multiply the output of comparator to the input signal, so the negative waveforms are automatically assigned a gain of -1, and flip to the positive side.

         

      The reference of VDD/2 was made up of a op-amp based follower.

         

      The low-pass filter was a rather simple design based on an interanl op-amp.

         

      The main.c only include start instructions for the components involved.

         

      The output waveform of the rectifier was as if the negative side was not flipping over as the nice chart shown in the technical note. Rather, the negatives were still negatives, only the amplitude was a lot smaller. I would post the shape as soon as my oscilliscope is functioning again.

         

      My questions are:

         

      1. Is the old rectifier design supposed to work on PSOC 5LP? Is there anything altogether wrong with the way I am doing it?

         

      2. The note said the output of comparator would be -1 if the input is lower than the reference. May it be zero instead? Is there a parameter of the comp block  for this?

         

      3. Are there alternative ways of getting the envelope with PSOC 5LP?

         

      Thanks!

        • 1. Re: Envelope extraction based on rectifier/LP filter with PSOC 5 LP
          user_14586677

          2. The note said the output of comparator would be -1 if the input is lower than the reference. May it be zero instead? Is there a parameter of the comp block  for this?

             

          3. Are there alternative ways of getting the envelope with PSOC 5LP?

             

           

             

          2) The output will be Vss if Vsine < Vref.

             

          3) When you say envelope, are you looking for RMS or Average value, or actual

             

          extrema of the input waveform ? Like mode you would use to examine jitter on a

             

          DSO ?

             

           

             

          Regards, Dana.

             

           

             

          Note there is a polarity control for the output of the comparator -

             

           

             

           

          • 2. Re: Envelope extraction based on rectifier/LP filter with PSOC 5 LP
            user_14586677

            1. Is the old rectifier design supposed to work on PSOC 5LP? Is there anything altogether wrong with the way I am doing it?

               

             

               

            The basic design of using a switch to rectify will work on any psoc as long as the G

               

            in each path is equal. eg. +/- G.

               

             

               

            Lastly your input waveform is offset by Vdd/2 ? If not use attached possibilties for

               

            offsetting a ground referenced waveform.

               

             

               

            Regards, Dana.