can't solve this voltage measurement problem


Closed Thread
Results 1 to 14 of 14

Hybrid View

  1. #1
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    It also wouldn't hurt to take an average. Since 60 Hz has a period of 16.66 milliseconds, and an A/D conversion takes about 30uSecs, you could average 16 samples (a full cycle) something like this:

    Code:
       ADCAvg = 0            ; Clear the variable
    For X = 1 to 16
       ADCIN,x, ADCresult
       ADCAvg = ADCAvg + ADCresult
       Pauseus 1000  
       Next X
    ADCAvg = ADCAvg >> 4    ; divide by 16
    This should do a pretty good job of smoothing the result.
    Charles Linquist

  2. #2
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425


    Did you find this post helpful? Yes | No

    Default

    I've tried all kinds of software routines but nothing seemed to help. I think the AC ripple is not a normal sine wave, maybe that's why.

  3. #3
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Put a 1uF Electrolytic... or even a 10uF... across the 0.1 Capacitor.

    It's a Battery Charging circuit - you don't need instantaneous results. If your filters time period is a few hundred mS then goodbye to any 500Hz noise! Make sure you haven't got any noise on your 5v line - that could be throwing +VRef as well.

Similar Threads

  1. Replies: 19
    Last Post: - 27th May 2010, 04:56
  2. Expanded Scale Voltmeter
    By Pic_User in forum Schematics
    Replies: 6
    Last Post: - 8th February 2008, 21:32
  3. Replies: 6
    Last Post: - 10th January 2008, 11:38
  4. Help with final project
    By OvERKiLL in forum General
    Replies: 4
    Last Post: - 15th December 2006, 21:35
  5. Need Help in Measurement of Voltage
    By apache in forum General
    Replies: 5
    Last Post: - 5th June 2005, 16:39

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts