Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/12/12 14:48
Read: times


 
#186608 - You do know sin(90+angle)? Or 2-log computations?
Responding to: ???'s previous message
Well, I did just prove that if you have a sampling rate of 1024 times / full period (which, for 50 Hz would be 20ms /1024 = 19.5us), then two samples 19.5us after each other at the peak can change with at most 1-0.99998 or 0.002 % relative the "DC-level" value. So I then played with 2-logariths since each bit of an ADC represents a factor 2. And if are a full sampling period (19.5us) off from the peak - the error is still so small that you need a 16-bit ADC to have a chance to catch it.

And you have already told us that your ADC is only able to do 8, 10 or 12 bits of resolution.

So it would then be quite obvious that 19.5us sampling rate (1024 samples in a full period) is way faster than needed for a system that only locates the highest and lowest values - the two extremes - to represent the top-to-top value and then approximates an rms value based on that.

Now, you could obviously perform the same computations with 512 samples/period, 256 samples/period or 128 samples/period (or any other sampling speed you may fancy) and see exactly how much the peak voltage can change for one sample interval. If that is much less than the resolution of your ADC, then you obviously can reduce the sampling rate.

Do you see any problem with my way of thought?

We are talking about a sine wave, aren't we?

So we can use a pocket calculator and compute either sine (90+angle) to see how much the voltage drops for a specific angle (representing the angle change between two samples).

Or we can compute the reverse - what angle will give a dip of let's say 1/256 of the peak value. And then compute what sampling rate that would represent.

Don't you agree that the sampling rate is deciding if we will get a measurement close enough to the absolute maxima and the absolute minima of the signal?

And the voltage reference, your signal conditioning and the resolution/precision of the ADC will decide how exact the ADC will then be able to convert that sample into a digital value for your program to then crunch on.

List of 66 messages in thread
TopicAuthorDate
Sine wave detection on microcontroller            01/01/70 00:00      
   Detect or measure?            01/01/70 00:00      
      not detection, measurement of sine wave signal            01/01/70 00:00      
         What are you measuring?            01/01/70 00:00      
            RMS and Average - 1st Priority            01/01/70 00:00      
               415 v            01/01/70 00:00      
                  I have to do using MCU            01/01/70 00:00      
                     Start simple            01/01/70 00:00      
                        if time is major isssue than.....            01/01/70 00:00      
                           People responding to specific questions            01/01/70 00:00      
                              Same Technique....            01/01/70 00:00      
                                 RMS            01/01/70 00:00      
                                    Sorry for my laziness            01/01/70 00:00      
                                 So what have you done?            01/01/70 00:00      
                                    Require more work...            01/01/70 00:00      
                                    Working on that            01/01/70 00:00      
                                       options, options            01/01/70 00:00      
   Help me            01/01/70 00:00      
      Okay            01/01/70 00:00      
         Are many threads available            01/01/70 00:00      
      when you save a char ...            01/01/70 00:00      
      Why don't you specify your problem COMPLETELY?            01/01/70 00:00      
         Already specify it            01/01/70 00:00      
            there are some details?            01/01/70 00:00      
               comparisions            01/01/70 00:00      
                  How are you calculating your needed sample rate?            01/01/70 00:00      
                     start with simple one....            01/01/70 00:00      
                        You do know sin(90+angle)? Or 2-log computations?            01/01/70 00:00      
                           ADC resolution............            01/01/70 00:00      
                              impossible or wrong            01/01/70 00:00      
                              double post, ignore            01/01/70 00:00      
                  Precision Rectify:            01/01/70 00:00      
                     SCR Chopped Wave            01/01/70 00:00      
                        What accuracy do you need?            01/01/70 00:00      
                           CT accuracy            01/01/70 00:00      
                              the fundamental            01/01/70 00:00      
                              50Hz            01/01/70 00:00      
                              Precision rectifier is suitable for any waveform            01/01/70 00:00      
                                 are u sure??            01/01/70 00:00      
                                    Depends            01/01/70 00:00      
                                    must be severely bandwidth limited            01/01/70 00:00      
                                       Maybe was circuit with top-voltage capacitor            01/01/70 00:00      
                                       Sorry for confusion            01/01/70 00:00      
                                          What accuracy do you need?            01/01/70 00:00      
                                             360/1024            01/01/70 00:00      
                                                Not what he (or me) have asked            01/01/70 00:00      
                                                   you are right....            01/01/70 00:00      
                                                Do you believe you can protect your circuit from noise?            01/01/70 00:00      
                                                   Very Noisy environment            01/01/70 00:00      
                                                      re Very Noisy environment            01/01/70 00:00      
                                                         Some of those rules are showing their age            01/01/70 00:00      
                                                            here we go again            01/01/70 00:00      
                                                               think about this for a minute            01/01/70 00:00      
                                                                  when discussing a FAQ            01/01/70 00:00      
                                                                     Well, when were those cap sizes determined?            01/01/70 00:00      
                                                                        Technology            01/01/70 00:00      
                                                                           Steady state currents do not need decaps            01/01/70 00:00      
                                                                              Often low capacitance so limited charge. But remember load.            01/01/70 00:00      
                                                                        fixations            01/01/70 00:00      
                                                                           Nothing. has been proven yet.            01/01/70 00:00      
                                                                              once more for the peanut gallery            01/01/70 00:00      
                                                                                 Where you sit determines what you see ...            01/01/70 00:00      
                                                                                    Off-topic            01/01/70 00:00      
                                                                                       difficult when ...            01/01/70 00:00      
                                                                                       Yes ... I don't know how we got here either            01/01/70 00:00      
                                                                                          i do            01/01/70 00:00      

Back to Subject List