7 Replies Latest reply on Oct 30, 2015 8:50 AM by user_1377889

    AD5933 impedance measurement with PSoC

    alexander.bromm

      Hey community, I hope creating a new topic will arouse more attention for my problem. Does anybody have any experience to measure the impedance using the AD5933 and a PSoC? I managed to measure the temperature with the AD5933 and read out the results. But I am in despair, not able to use the takeaway from the temp measurement for the impedance measurement. Maybe someone has some advice or code with a similar device from the company "analog devices". Thank you in advance, Alex

        • 1. Re: AD5933 impedance measurement with PSoC
          user_78878863

          What is your actual question? When you are able to read the temperature, it seems communication with the AD5933 works fine.

             

          The data sheet for the AD5933 explains in detail how to use the freuency generator to excite the impedance, and how to calculate the impedance from the measurements.

          • 2. Re: AD5933 impedance measurement with PSoC
            user_1377889

            Your view on how I2C works is not quite correct.

               

            You should use a Restart() only when you switch from writing to slave to reading from slave (or the other way round)

               

            Do not use Restart() after a stop condition

               

            A complete I2C transaction runs from SendStart() to SendStop(), it is no good idea to have delays within, since that keeps the bus busy.

               

            A delay within one I2C transaction is usually handled by the slave by extending the clock to the required time.

               

            What are the lines

               

                status=status<<5;
                status=status>>5;

               


            good for?

               

            Every I2C-command except ReadByte() returns a status information which is zero (0) at normal completion. As long as your device does not run smoothly I would suggest to check every  returned value and stop at the first non-zero to analyze/correct the reason.

               

            Write a function: void I2C_Analyze(uint8 Status) , set a breakpoint when Status is non-zero and use in your program something like

               

            I2C_Analyze(I2C_MasterSendStart(0x0D, I2C_WRITE_XFER_MODE));
            I2C_Analyze(I2C_MasterWriteByte(0x8F));

               

            and so on. This will reveal any errors instantly.

               

             

               

            Bob

            • 3. Re: AD5933 impedance measurement with PSoC
              alexander.bromm

              Thanks for the advice Bob! Since I need to write different values to different register addresses, instead of using Restart(), would you suggest to just use one SendStart() and then write all my values one after another to their adresses, or should I use SendStart() and SendStop() for each value?

                 

              The lines status=status<<5;
                              status=status>>5

                 

              is just some bit-shifting to change the output form of my value.

                 

              I will check my code with the analyze function and will then text here again what I found out.

                 

              Best regards, Alex

              • 4. Re: AD5933 impedance measurement with PSoC
                alexander.bromm

                Hi hli,

                   

                this exactly is my problem, my temperature measurement is working, so I thought by just adjusting my code for the different addresses, the impedance measurement should also be fine. But somehow I am missing something.

                • 5. Re: AD5933 impedance measurement with PSoC
                  user_1377889

                  Writing blocks of data generally is faster than a Sendstart(), WriteByte()..., SendStop() sequence. So it is up to you what is easier for you to use. Have a deep look into your AD5933 Datasheet, page 28. There reading, writing and blockread/write is explained in detail.

                     

                   

                     

                  Bob

                  • 6. Re: AD5933 impedance measurement with PSoC
                    alexander.bromm

                    So finally it is working! I simply used SendStart() ......... SendStop() around every register I wanted to adress.

                       

                    Thanks for the help guys

                    • 7. Re: AD5933 impedance measurement with PSoC
                      user_1377889

                      You are always welcome!

                         

                       

                         

                      Bob