4 Replies Latest reply on Oct 6, 2015 12:09 PM by DaKn_263916

    WaveDac + ADC + UART, 5LP Prot. Kit


      Hi all,


      I'm making a easy project, but i haven't the results i'm expecting. In few days i will use a analog transducer, it give me back a voltage, around 100mV peak to peak, so i'm trying to 'simulate' it with the WaveDac component (generating a 0.5 volts sine wave), attached to a ADC_DeltaSigma configured to 16 bits, continuous mode, 16 bits.


      The convertion is sent via UART to my pc, i'm expecting a voltage from 0.250 v - 0.750, all i get is 0.350 and 0.650 results printed on the terminal.


      Any suggestions on this topic? It seems like i'm getting a 300 mV sine wave, i already try it with the buffered output on the WaveDac component with no improvements.


      Find attached my project.





        • 1. Re: WaveDac + ADC + UART, 5LP Prot. Kit

          Your sprintf result buffer str[10] is quite too small, so you will overwrite some data.





          • 2. Re: WaveDac + ADC + UART, 5LP Prot. Kit

            Your WaveDAC8 is running at 500 Hz, the sample rate of ADC at 4x that, 2 Khz.


            Should they be in exact sync you would get 4 repetitive samples, yet you are only


            reporting 2 ? That seems odd. Just for drill make either component at some non


            related rate, see if that affects your output.




            Place an additional pin and look at the sine you are digitizing, to make sure its


            what you expect. Look at WaveDAC8 out both buffered and un-buffered. Although


            as you observed values do not change as you are using the input buffer of ADC.


            Note that using ADC buffer limits input common mode range per the graphic in


            the properties configurator, eg. 100 mV off the ground rail.




            In this line of code -




                    ADCVolts = ADC_CountsTo_Volts(ADC_GetResult32());




            ADCVolts is a float, but the return from the function is int32, maybe you should cast it




                    ADCVolts = (float)  ADC_CountsTo_Volts(ADC_GetResult32());




            Regards, Dana.

            • 3. Re: WaveDac + ADC + UART, 5LP Prot. Kit

              Hi Bob and Dana,


              Just increase the size of str, made it 20, i see improvement, also changed the ADC resolution to 17 bits, Input Range to Vssa to 2.048V, Buffer Mode to Bypass Buffer. I had test this configuration with 5 000 sps and 10 000 sps, it seems better, i take the data printed on the terminal and make a graph with it, it looks like a sine wave now!!


              return value of ADC_CountsTo_Volts() is float32, just check it on the component datasheet. Just ADC_CountsTo_mVolts() and ADC_CountsTo_uVolts() returns integers.


              Attached the project, maybe you can see any improvement.





              • 4. Re: WaveDac + ADC + UART, 5LP Prot. Kit

                Thanks Carlos for pointing out my error, must have done post with my


                eyes closed.




                Bypass buffer mode yields true R-R input performance.




                Regards, Dana.