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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/09/12 13:19
Read: times


 
#186523 - So what have you done?
Responding to: ???'s previous message
So you have a full sine wave reaching the ADC. Negative peak at about 0.5V and positive peak at about 1.5V?

So one question then - why only use a span of 1V of your ADC? You say the ADC can measure 0 to 3.3V. You have lost about 1.5 bit of the total resolution of the ADC just by not being closer to the full voltage range.

Is it because you have non-linear components that will interfere close to 0V and close to 3.3V?

Is it because you expect that input signal to sometimes be twice as strong - i.e. modulate between 0V and 2V? But even then, you should have increased the DC level to center the signal at 3V3/2 for maximum dynamic range of the ADC.

If you measure many samples of the input signal for a number of full periods, you can take the average of these values as the calibrated "zero", i.e. representing the DC value. This will of course not be true if there are non-symmetric distortion on the signal - for example the positive half-wave getting slightly flattened by a load that have a half-wave rectifier.

Google - and this forum - have lots of examples of the formulas for computing true rms. I have posted quite a lot of information about power meters that computes power factor (which is not just a phase shift for real-world loads), true rms, ...

Of course, people can duplicate previously posted information. But it is far better to not spend time duplicating what have already been posted.

But before you start to consider these issues - have you tried to perform the ADC measurements in the background, letting the program do other things while waiting for a conversion?

How many bits can your ADC measure with? You can use a standard pocket calculator to compute how fast you need to sample. For example - how much time is it from the voltage peak until the voltage has dropped 0.1%? How long time until it has dropped 1%?

You talk about zero-crossing detection. But you don't have a zero - unless you have computed the calibrated DC offset for that specific unit. So if you do want to play with zero-crossing detection - how many ADC ticks will the AC voltage vary in 1ms? How long time corresponds to 1 ADC tick? It's quite simple math. But you need to do it.

You must make a decision what precision you want in your design. You must look into the required resolution of the ADC. How often to sample. How many periods to measure on. How much a 1-bit sampling noise affects the end result of the computation. If the design contains any component with a temperature coefficient that makes your device require a recalibration.

So a big issues here is: You say you have made a flowchart but haven't produced any. So what have you done? What measurement method (there are more than two) will does your flowchart describe? Do you see any problems mapping that flowchart into code? Do you see any issues getting that code to produce real measurements of the intended quality?

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