PIC 16f877 A/D conversion Allegro ACS712


Closed Thread
Results 1 to 33 of 33

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    I must sound terrible in my replies.
    Everyone thinks I'm getting ticked off.

    Tuff!

    But when I see someone going down the same bad path I took, I'll just keep tugging on your belt trying to pull you back, saying ... Duuude, there's a cliff up there. Don't go that way.

    Let's see here ...
    The ACS712 data sheet says it's good for sensing current for motor control, load detection, etc...
    It IS!
    As long as you know how to compensate for the type of load you are measuring.

    No matter what the ACS712 is going to output a voltage that is in direct proportion to the current it senses. Granted it's going to follow the wave form of the AC current it's still going to be proportinate to the peak current arghhhhh
    Not at all.
    With RMS the peak doesn't matter anymore. The entire waveform is averaged over time, to represent the amount of current that flowed during a specified time period.

    Small motors will generate fairly high peaks, but since there's not much load it can overcome each magnetic pole fairly quickly. So a short duration current flow over the course of 1 AC cycle will average out to maybe one fifth of what you would read from a "Peak value".

    I'm not giving up on this I know I will get it.
    I hope not. You've already ordered the parts.

    When you get down to doing the math. Come back and describe the parameters. I got that part down.
    <br>
    DT

  2. #2
    Join Date
    Jan 2008
    Location
    Pennsylvania
    Posts
    113


    Did you find this post helpful? Yes | No

    Default Op Amp

    No your posts don't sound horrible I'm just anticipating or hearing you in my head "What don't you get you idiot!" I'm just struggling with this my knowledge about electronics is below novice. I'm having trouble though locating the op am you mentioned TLV324 it looks like that comes up as a switch of some sort not an op amp.
    Thanks
    David

  3. #3
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Oops, that would be a TLV274.

    I knew I should have checked that.

    TLV274 is a rail-rail version of the LM324.
    <br>
    DT

  4. #4
    Join Date
    Jan 2008
    Location
    Pennsylvania
    Posts
    113


    Did you find this post helpful? Yes | No

    Default just my luck

    Quote Originally Posted by Darrel Taylor View Post
    Oops, that would be a TLV274.

    I knew I should have checked that.

    TLV274 is a rail-rail version of the LM324.
    <br>


    Wouldn't you know it Digikey doesn't stock any.... argh

  5. #5
    Join Date
    Jan 2008
    Location
    Pennsylvania
    Posts
    113


    Did you find this post helpful? Yes | No

    Default Alternate

    Quote Originally Posted by DavyJones View Post
    Wouldn't you know it Digikey doesn't stock any.... argh
    How about the TLV271 I only need one for my test. I think I will ultimatley need the TLV272 because I am controlling and trying to read the current from 2 pumps.

  6. #6
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Yeah, only available in the TSSOP package.

    I agree, those are good alternates.
    <br>
    DT

  7. #7
    Join Date
    Jan 2008
    Location
    Pennsylvania
    Posts
    113


    Did you find this post helpful? Yes | No

    Default Thinking about this still this morning

    Darrel, I think I might understand now I know that we are off subject from a general pic discussion but I'm going to keep going in this thread it does pertain to working with a pic ultimately so....

    I think I am picturing this correctly now. If I take a thousand readings from the PIC and just keep track of the max at some point I will get a peak let's say it's 12 amps. But like you are pointing out that is truly a peak if we were able to get a sample at the top of each waverform over time it would average out to 9 amps which is the true power. The fact that when I sample the A/D I have know idea were in the wave form I am at, at any given point in time, makes it impossible to do just sampling the ACS712 by itself. If I could get a reading form the ACS712 at the top/bottom of each wave then it could be done but then that is what the RMS to DC is going to do for me give me a nice straight DC line.

    Did I get it?

  8. #8
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by DavyJones View Post
    If I could get a reading form the ACS712 at the top/bottom of each wave then it could be done but then that is what the RMS to DC is going to do for me give me a nice straight DC line.
    You are still making an unwarranted assumption that you have a sine wave. Darrell is suggesting the RMS chip and I suggested looking at the output of the Allegro chip with an oscilloscope (to see the waveform) because we don't think you have a sine wave. 0.707 x the peak will work with a sine wave and averaging ALL of the readings will work with any waveform (if the readings can be taken fast enough to get a good sampling of the wave form).

    There are at least three ways to do this with non-sinusoidal waveforms. See the web page I referenced earlier (via email)...
    I vaguely recalled a somewhat similar thread - it took me a while to find it.
    Last edited by dhouston; - 4th August 2009 at 16:41.

Similar Threads

  1. A/D conversion with PIC18F67J50
    By ScaleRobotics in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 8th May 2009, 01:48
  2. A/D conversion problem in 18F2520, 2523, 2550 etc.
    By selimkara in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 10th March 2008, 16:26
  3. 16f877 A/D help
    By 3adam in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 25th January 2008, 04:06
  4. A/D converter fails?
    By egberttheone in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 13th February 2006, 18:57
  5. Strange A/D conversion...
    By Christos_K in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th June 2005, 01:35

Members who have read this thread : 0

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

Tags for this Thread

Posting Permissions

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