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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
Per Westermark
03/12/12 08:48
Read: 517 times
Sweden


 
#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      Yagnesh Mehta      03/07/12 04:59      
   Detect or measure?      Per Westermark      03/07/12 05:25      
      not detection, measurement of sine wave signal      Yagnesh Mehta      03/07/12 06:14      
         What are you measuring?      Andy Peters      03/07/12 10:05      
            RMS and Average - 1st Priority      Yagnesh Mehta      03/07/12 20:59      
               415 v      Mahmood Elnasser      03/08/12 22:07      
                  I have to do using MCU      Yagnesh Mehta      03/08/12 22:48      
                     Start simple      Mahmood Elnasser      03/08/12 23:17      
                        if time is major isssue than.....      Yagnesh Mehta      03/08/12 23:31      
                           People responding to specific questions      Per Westermark      03/09/12 02:14      
                              Same Technique....      Yagnesh Mehta      03/09/12 04:32      
                                 RMS      Maarten Brock      03/09/12 05:49      
                                    Sorry for my laziness        Yagnesh Mehta      03/09/12 20:50      
                                 So what have you done?      Per Westermark      03/09/12 06:19      
                                    Require more work...      Yagnesh Mehta      03/10/12 00:50      
                                    Working on that      Yagnesh Mehta      03/10/12 06:12      
                                       options, options      Per Westermark      03/10/12 06:49      
   Help me      Yagnesh Mehta      03/08/12 21:31      
      Okay      Joseph Hebert      03/09/12 06:13      
         Are many threads available      Per Westermark      03/09/12 06:29      
      when you save a char ...        Erik Malund      03/09/12 08:09      
      Why don't you specify your problem COMPLETELY?      Richard Erlacher      03/09/12 11:36      
         Already specify it      Yagnesh Mehta      03/10/12 02:07      
            there are some details?      Richard Erlacher      03/10/12 07:51      
               comparisions      Yagnesh Mehta      03/12/12 01:16      
                  How are you calculating your needed sample rate?      Per Westermark      03/12/12 01:54      
                     start with simple one....      Yagnesh Mehta      03/12/12 08:02      
                        You do know sin(90+angle)? Or 2-log computations?      Per Westermark      03/12/12 08:48      
                           ADC resolution............      Yagnesh Mehta      03/12/12 12:27      
                              impossible or wrong      Erik Malund      03/12/12 13:30      
                              double post, ignore      Erik Malund      03/12/12 13:30      
                  Precision Rectify:      Erik Malund      03/12/12 06:44      
                     SCR Chopped Wave      Yagnesh Mehta      03/12/12 07:48      
                        What accuracy do you need?      Kalpak Dabir      03/12/12 08:43      
                           CT accuracy      Yagnesh Mehta      03/12/12 12:58      
                              the fundamental      Erik Malund      03/12/12 13:41      
                              50Hz      Per Westermark      03/12/12 14:27      
                              Precision rectifier is suitable for any waveform      Kalpak Dabir      03/13/12 01:47      
                                 are u sure??      Yagnesh Mehta      03/13/12 08:03      
                                    Depends      Per Westermark      03/13/12 09:08      
                                    must be severely bandwidth limited      Erik Malund      03/13/12 09:11      
                                       Maybe was circuit with top-voltage capacitor      Per Westermark      03/13/12 09:17      
                                       Sorry for confusion      Yagnesh Mehta      03/14/12 00:18      
                                          What accuracy do you need?      Kalpak Dabir      03/14/12 01:23      
                                             360/1024      Yagnesh Mehta      03/14/12 01:41      
                                                Not what he (or me) have asked      Per Westermark      03/14/12 04:39      
                                                   you are right....      Yagnesh Mehta      03/14/12 11:51      
                                                Do you believe you can protect your circuit from noise?      Richard Erlacher      03/14/12 08:19      
                                                   Very Noisy environment      Yagnesh Mehta      03/14/12 11:57      
                                                      re Very Noisy environment      Erik Malund      03/14/12 12:23      
                                                         Some of those rules are showing their age      Richard Erlacher      03/14/12 20:00      
                                                            here we go again      Erik Malund      03/15/12 08:15      
                                                               think about this for a minute      Richard Erlacher      03/15/12 17:10      
                                                                  when discussing a FAQ      Erik Malund      03/16/12 06:49      
                                                                     Well, when were those cap sizes determined?      Richard Erlacher      03/16/12 09:53      
                                                                        Technology      Per Westermark      03/16/12 10:13      
                                                                           Steady state currents do not need decaps      Kalpak Dabir      03/16/12 22:48      
                                                                              Often low capacitance so limited charge. But remember load.      Per Westermark      03/17/12 06:41      
                                                                        fixations      Erik Malund      03/16/12 10:40      
                                                                           Nothing. has been proven yet.      Richard Erlacher      03/18/12 13:15      
                                                                              once more for the peanut gallery      Erik Malund      03/19/12 07:23      
                                                                                 Where you sit determines what you see ...      Richard Erlacher      03/20/12 01:56      
                                                                                    Off-topic        Per Westermark      03/20/12 02:01      
                                                                                       difficult when ...      Erik Malund      03/20/12 06:59      
                                                                                       Yes ... I don't know how we got here either      Richard Erlacher      03/20/12 09:32      
                                                                                          i do      Erik Malund      03/20/12 09:45      

Back to Subject List