5 Replies Latest reply on Jul 19, 2015 3:02 AM by user_14586677

    Questions about comparators

    rory.ohare_1407921

      I'm doing some research that requires a lot of comparators. Currently, for proof of concept, I'm using LM319's because their open collector outputs allow me to use any output voltage I want if the comparator is "high" and they allow me to tie their "ground" to different voltages as long as it is higher than Vsss so the output when the comparator is "low" is also configurable.

         

       

         

      The problem is that I need a heck of a lot of them and I'm looking for configurable solutions. So far the Cypress PSoC 3 looks like a candidate but I need to know more about them (maybe the 4 or 5 would be better, or some other product entirely). First, how many comparators can you get from one of the configurable analog blocks? I couldn't find much detail on the internals of the analog blocks. Second, how flexible are the comparators themselves? From reading the datasheet for the COMP module, it looks like high=Vdd and low=Vss. Is there any way to manipulate this so that the lows and highs are equal to some other intermediate voltage references?

         

      Thanks much for any help!

        • 1. Re: Questions about comparators
          user_14586677

          LM319s are fast parts, do yiou need that level of speed ?

             

           

             

          You can implement open drain but you are confined to pin voltages

             

          of Vssa and Vdda. Only one pin has extended voltage capability, SIO pin.

             

          You could use a transistor array external to create open collector outputs

             

          to get much higher voltages.

             

           

             

          Do all comparators have to be operated simultaneously and independently ?

             

          If not you could use a mux and get as many comparator inputs limited by

             

          package pin count. Also if sampling rate relatively low you could use SAR

             

          and simple to code and a mux to get a lot of comparator equivalents.

             

           

             

          You have 4 comparators and 4 OpAmps that could be used as comparators

             

          in the chip. Keep in mind OpAmps used as comparators much slower due

             

          to internal compensation used to handle C loads.

             

           

             

          Regards, Dana.

          • 2. Re: Questions about comparators
            rory.ohare_1407921

            Thanks for the reply!

               

            Just to make it more clear, I'm currently using a dual-supply +5/-5 and using the ground as an intermediate voltage. That way I can use the open-collector output to push +5 or Gnd and I can tie the ground pin of the comparator to either -5 or Gnd. That way I can get either of two different voltages outputs when the comparator is "high" or two different voltages when the comparator is "low" depending on how I wire it. I don't really care about dual-supply or single-supply, but using dual-supply got me around the common mode input voltage limitations.

               

            Speed is of no concern whatsoever. I really don't care if I'm "clocking" by repeatedly pressing a button at this point.

               

            I don't need to implement any output higher than Vdd or lower than Vss, but do need to be able to choose an intermediate voltage such as 1/2 Vss or thereabouts. It doesn't sound like this is the case though. What I'd really love is the ability to set a single voltage reference between Vdd and Vss and have that be the low or high side depending on what I need for a particular comparator. Of course, I haven't even begun to look at limits to common mode input voltage...

               

            All comparators and Op Amps would need to be in use simultaneously. Many, if not all, would be chained together. In some cases I would need to interject diodes, but even if I have to send an intermediate signal out to a pin and then back into another pin through a diode, that would be okay.

               

            I'm not familiar with the SAR. Is that one of the digital modules?

            • 4. Re: Questions about comparators
              rory.ohare_1407921

              Thanks, also good data there.

                 

              So what I'm getting is that the PSoC 3 and 5 series have 2-4 comparators, 2-4 Op Amps that can be configured as comparators, 4-8 special I/O pins that can serve as comparators, and the option to multiplex the primary comparators if appropriate. That means up to 16 comparators with some possible additional flexibility with multiplexing.

                 

              Part of my difficulty is that I am specifically avoiding any digital input or output whatsoever and maintaining strictly analog signals throughout. I'll be entirely ignoring the processor, memory, etc. The PSoC's are just a possible solution to cramming more analog voltage comparators into less space and making board design easier.

                 

              As to the specific capabilities (what voltages will be produced as a result of the comparator being high or low, common mode limits, etc.) of each type of comparator, I'll probably just have to get a dev board and experiment to see if they meet my needs.

                 

              If anyone has more details about the specific voltage ranges possible with each of the 3 types of comparators I would appreciate it very much. Otherwise, thanks for all the help. When I get to a level of complexity when LM319's just take too much board space, I'll probably look to the PSoC's as my alternative. Thanks again.

              1 of 1 people found this helpful
              • 5. Re: Questions about comparators
                user_14586677

                So what I'm getting is that the PSoC 3 and 5 series have 2-4 comparators, 2-4 Op Amps that can be configured as comparators, 4-8 special I/O pins that can serve as comparators, and the option to multiplex the primary comparators if appropriate. That means up to 16 comparators with some possible additional flexibility with multiplexing.

                   

                 

                   

                That's correct. Muxing can exceed 16 Comparators.

                   

                 

                   

                The Common mode range of the Comparators and OpAmps is Vssa and Vdda. The pins

                   

                comparator solution is not R-R.

                   

                 

                   

                The SAR is an A/D converter, up to 1 Msps. So using it and code and a VDAC for trip voltage

                   

                each channel can have its own trip point and hysteresis. But that solution is sequential in evaluating

                   

                each input.

                   

                 

                   

                Regards, Dana.

                1 of 1 people found this helpful