13 Replies Latest reply on Nov 2, 2012 8:31 PM by userc_43830

    How to convert AD from sensor output = 5mV and calip it at 21 percent?

      Hi everybody,

         

      I am a newbie of PSoC designer. Now I am taking a project that is converitng from Oxycell Sensor in orfer to display percentage on the display. The sensor output  is 5mV and I don't know how to calip it at 21 percent? So I would like to use CY-PSOCEval1 PSoC 1 EVALUATION KIT. I had this kit already . I am now learning urgently how to prgram with this chip.

         

      I think it will take a lot of time to reach the result unless receiving the support all of you. Could you please give me the sample or instruction that you have done with the same project. I need the sample of Assembly code.

         

      - The first question is that can I connect directly sensor to the PSoC Kit? Or I have to make an amplifier circuit between them?

         

      - When sensor is operrating in normal atmosphere (21% standard), we need calip the display at 21 % when connect sensor to kit. Because the output voltage from sensor will be reduce gradually. For example, Noe its output is 5mV, but after 5 days of using, its voltage will be 4 mV. But the display must show 21% at any time when it running in normal atmosphere.

         

      I look forward to your reply soon. Thank you in advance.

         

      Please see picture of the kit and Oxygen Sensor below:

         

      [IMG]http://i1142.photobucket.com/albums/n614/sphong138/PSoC1andOxygenSensor.jpg[/IMG]

         

      Regards,

         

      Phong138

        • 1. Re: How to convert AD from sensor output = 5mV and calip it at 21 percent?
          DaKn_263916

          If sensor single ended connect to onchip PGA and sets its gain to get the

             

          desired voltage swing to digitize the signal. Max gain of the PGA is 48. If

             

          differential then use INSAMP amplifier. Again max gain 48.

             

           

             

          When using PSOC Designer there are a number of projecdts in the tool you

             

          can look at, in the start page menu.

             

           

             

          Regards, Dana.

          • 2. Re: How to convert AD from sensor output = 5mV and calip it at 21 percent?
            DaKn_263916

            To handle sensor droop over time -

               

             

               

            1) Is it a time dependent sensor in its drift, or a gas concentration being depleted ?

               

            This would determine strategy for solution.

               

             

               

            2) Post the sensor datasheet or its part number so we can take a look at it.

               

             

               

            Regards, Dana.

            • 3. Re: How to convert AD from sensor output = 5mV and calip it at 21 percent?
              JoMe_264151

              The 21 percent-calibration smells like fresh air which indeed contains that amount of oxigen. As Dana already mentioned, the datasheet or rather a link to it would be very helpful.

                 

               

                 

              Bob

              • 4. Re: How to convert AD from sensor output = 5mV and calip it at 21 percent?

                Dear Dana and Bob,

                   

                Thank you very much for your soon reply. I attached here the datashet of Medical Oxygen Sensor OOM102-. It is produced by EnviteC-Wismar GmbH.

                   

                I am reading document of PSoC 1 Evaluation Kit in order to run this kit in the right way. It would be grace if you could tell me any advice for the person who is the first touch with this kit.

                   

                Thank you so much,

                   

                Regards,

                   

                Phong138
                 

                • 5. Re: How to convert AD from sensor output = 5mV and calip it at 21 percent?
                  DaKn_263916

                  Since you are dealing with such a low level signal, have offsets, noise,

                     

                  you might want to try CDS technique. Attached is an ap not and a

                     

                  project you could use as the basis for a design. Note the ap note

                     

                  is in the expanded folder when you unzip.

                     

                   

                     

                  Regards, Dana.

                  • 6. Re: How to convert AD from sensor output = 5mV and calip it at 21 percent?

                    Dear Dana,

                       

                    Thank you very much for your sending sample file to me. It is very useful for me to make the same project. However, it is not easy to understand at this first time. I am now learning from basic to more difficult. I will learn and practise urgently this kit. After that, I will ask you more questions about this project.

                       

                    Thanks and best regards,

                       

                    Phong138

                    • 7. Re: How to convert AD from sensor output = 5mV and calip it at 21 percent?
                      JoMe_264151

                      Hi Phong,

                         

                      the PSoC1 evaluation kit is commonly used by many different users, so probably there is no "guru" or "Sensei" just for that kit.

                         

                      But there is one thing I always tell the newbees: The opportunities to debug programs on a (any) PSoC1-Kit are rather simple and only few. To overcome this there is the ICE-Cube, an In-Cicuir-Emulator that allows for setting breakpoints at a line of your code, inspecting variable values (or changing them) or even have a trace run. They (Cypress) just reduced the costs for an ICE to 300 US$ which still is a lot of money.

                         

                      Development kits for PSoC3 or 5 have debugging capabilities already integrated so for a newbee this could be VERY helpful.

                         

                      Hopefully you already learnt to program in C, if not here is a link to my favorite manual http://publications.gbdirect.co.uk/c_book/ 

                         

                       

                         

                      Happy coding

                         

                      Bob

                      • 8. Re: How to convert AD from sensor output = 5mV and calip it at 21 percent?
                        DaKn_263916

                        Bob is referring to this -

                           

                         

                           

                        http://www.cypress.com/?rID=3411

                           

                         

                           

                        Regards, Dana.

                        • 9. Re: How to convert AD from sensor output = 5mV and calip it at 21 percent?

                          Dear Bob and Dana,

                             

                           

                             

                          Thanks for your sending me information. However, I don't understand much about your advices. Please make it more clear by answer some questions below:

                             

                          1. You mean that I have to change Evaluate Kit 1 by ICE kit? Anh with ICE kit, I can program to calibrate output (21%) equal to current voltage input from Oxygen sensor?

                             

                          2. If I sill use this Evaluate Kit 1 for the first time of practice, Is it good or not? Do I need to buy you ICE kit immediatly? I don't like to waste my time for long time study because this project is very urgent. So that if you confirm that the ICE kit will meet all of my demands, I will ask my Boss import this kit immediatly.

                             

                          3. Of course, after practice in your kit is good, we will go to mass production with your PSOC chip. At that time we will import your chipwith a big quantity. So that, the effective solution is needed to reduce the cost. When you give me advice, please consider this matter, too.

                             

                          I would like to hear your advice one more time in order to make it clear.

                             

                           

                             

                          Thanks and best regards,

                             

                          Phong138

                          • 10. Re: How to convert AD from sensor output = 5mV and calip it at 21 percent?
                            JoMe_264151

                            1. No, that's not quite right. You have to write a program in C for your PSoC1 to calibrate and use your sensor. Since it is not possible to look into that small black chip when something in your program does not work as you expected it will be VERY difficult for you to find out what the reason is (This is named debugging). The ICE is a tool that gives you such an insight. When you are not bound to use a PSoC1 and you can efford the money you can get a Kit-030 which uses a PSoC3 and is already equipped with debugging capabilities. Especially when you are new to PSoCs. You can use the code for a PSoC3 with a few modifications for a PSoC1.

                               

                             

                               

                            2. You will have to study PSoCs regardless of having an ICE or not. The very first Kit I bought (as I red recently Dana did the same) was a PSoC1 - kit together with an ICE. This combination helped me to instantly create and solve some projects.

                               

                             

                               

                            3. For mass quantities it is a fact, that PSoC1s are cheaper than PSoC3 or 5.

                               

                             

                               

                            So to put it all together: Ask your boss to get you an In- Circuit-Emulator.

                               

                             

                               

                            Bob

                            • 11. Re: How to convert AD from sensor output = 5mV and calip it at 21 percent?
                              DaKn_263916

                              You should contact your local regional Cypress sales office and/or manufacturers representative to get
                              a PSOC 1/3 quote done for various packages and FLASH densities. If you anticipate project completion out
                              a year or more ask for future pricing. By contacting the Cypress staff in your area you will be able to
                              get advice for the longevity of a specific part, and recommendations of parts to stay away from, for
                              various reasons. Additionally there is a field applications engineer in your area (typically) that can
                              be of aid and assistance, a resource to you.

                                 


                              Note there is a new family of lower cost parts with more capability coming soon that Cypress sales can
                              possibly give you some insight into.

                                 


                              If you find the PSOC 1/3 pricing converging for the package and FLASH density in the future years you
                              should consider using PSOC 3. Confirm with Cypress that PSOC 3 is in a smaller geometry process, if it
                              is as I suspect, then it ultimately will be a cheaper device to manufacture. And PSOC 3 has more
                              flexibility and capability for growth in your product line. And faster development time. In the case of
                              PSOC 3 the development kit looks like either of these two kits

                                 


                              http://www.cypress.com/?rID=49524 for just PSOC 3
                              http://www.cypress.com/?rID=37464 for PSOC 1/3/5

                                 


                              Regards, Dana.
                               

                              • 12. Re: How to convert AD from sensor output = 5mV and calip it at 21 percent?

                                Dear Dana, Bob,

                                   

                                 

                                   

                                Thank you so much for your rerply. Your explanation is very clear. I understood and now I have started making program with PSoC Evaluation Kit 1. I will ask your advice more when  I have any trouble with this kit.

                                   

                                Wishing you good heathy and success,

                                   

                                 

                                   

                                Phong138

                                • 13. Re: How to convert AD from sensor output = 5mV and calip it at 21 percent?
                                  JoMe_264151

                                  Phong, you are always welcome!

                                     

                                   

                                     

                                  Bob