PIC 16f877 A/D conversion Allegro ACS712


Closed Thread
Results 1 to 33 of 33

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default I trust your experience.

    Quote Originally Posted by Darrel Taylor View Post
    Nope, can't go that route.

    You ARE measuring currents from inductive loads (submersible pumps).

    So you have to get an RMS reading.
    You would be surprised just how far off the numbers will be. >100%

    I know this too well, because I went down that same road my first time too.
    It was horrible.
    Down right embarrassing actually, since the customer saw it too.
    <br>
    I trust you.

    I just wanted to double check myself. I am just playing around now with the min/max on an 85w bulb and just this 85w bulb gives me a bad reading. I get for MAX 132 and MIN is 124 so it's a little off if I run this through the calculation you provided me I get
    (132 - 127 ) * 196 / 66 = 1.48
    (127 - 124 ) * 196 / 66 = .89
    Even avergaing these 2 I come up with 1.18 that is that is double what the clamp meter is telling me is .66 which I tend to believe now because since it truly should be .7 the fact the clamp is telling me .66 and how can I really tell if this bulb is putting off truly 85w.

    Here is something I am seeing that is strange. If I plug the 1600w hairdryer that has 2 settings I get 2 readings as you would expect on low I get 152 MAX and 103 MIN then for the high setting I get 179 MAX and 76 MIN but when I plug in the 10 amp hot air gun which also has 2 settings when I set it on low I get 172 MAX and 127 MIN with the reading I get from the hair dryer I would have expected the min reading on the hot air gun to go to 82 that is goofy why would the hot air gun get such a different result then the hair dryer?

    The LTC is on it's way I found those at digikey looking for the little board for it now. Also getting the TLV324 would it be to much trouble to get a look at how you wired that up with both components to the pic?
    Thanks
    David

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


    Did you find this post helpful? Yes | No

    Default

    The LTC is on it's way I found those at digikey looking for the little board for it now.
    OUCH!

    You should have searched for 33108 at digikey before ordering.
    http://search.digikey.com/scripts/Dk...keywords=33108

    I'm betting UPS does well this quarter.
    <br>
    DT

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


    Did you find this post helpful? Yes | No

    Default

    And no, I can't really show the schematics or anything, but It's no big secret ...

    If you were to trace out the components in the picture I showed above ...
    You would find the EXACT schematic shown in the datasheet under the heading "Single Supply RMS Current Measurement". The only difference is that I used a different current transformer, and changed the "burden" resistor to 51 ohms. Otherwise, identical.

    Add a little gain for the PIC's A/D and you're good to go.

    hth,
    DT

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


    Did you find this post helpful? Yes | No

    Default Did I miss something?

    Quote Originally Posted by Darrel Taylor View Post
    And no, I can't really show the schematics or anything, but It's no big secret ...

    If you were to trace out the components in the picture I showed above ...
    You would find the EXACT schematic shown in the datasheet under the heading "Single Supply RMS Current Measurement". The only difference is that I used a different current transformer, and changed the "burden" resistor to 51 ohms. Otherwise, identical.

    Add a little gain for the PIC's A/D and you're good to go.

    hth,

    Did I miss something or are you using the ACS712 in this circuit or not at all? It sounded like you were running this 712 into this but reviewing this schematic I don't think you are even using the 712 now.

    David

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


    Did you find this post helpful? Yes | No

    Default

    It does not use an ACS712 in that circuit.

    I'm showing the LTC1966 RMS convertor, which is needed whether the signal comes from a current transformer, a hall-effect sensor, or just a BIG honken shunt resistor that would heat your toaster oven.

    It's the RMS conversion that matters.
    <br>
    DT

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


    Did you find this post helpful? Yes | No

    Default understood.

    Quote Originally Posted by Darrel Taylor View Post
    It does not use an ACS712 in that circuit.

    I'm showing the LTC1966 RMS convertor, which is needed whether the signal comes from a current transformer, a hall-effect sensor, or just a BIG honken resistor that would heat your toaster oven.

    It's the RMS conversion that matters.
    <br>
    I am sorry I am not trying to tick you off or anything but I have to question this one last time. What is pumping the same signal through the LTC1966 going to give me that I can't figure out myself? I guess that is the part I am having trouble comprehending. The ACS712 data sheet says it's good for sensing current for motor control, load detection, etc... 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 I need to go do something else for a while and stop thinking about this.
    I'm not giving up on this I know I will get it.

  7. #7
    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

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


    Did you find this post helpful? Yes | No

    Default got it!

    Quote Originally Posted by Darrel Taylor View Post
    OUCH!

    You should have searched for 33108 at digikey before ordering.
    http://search.digikey.com/scripts/Dk...keywords=33108

    I'm betting UPS does well this quarter.
    <br>
    I got the little boards from there as well. I meant on it's way meaning it was in my cart. I know better to wait until the end of the day to place my order and commit

    I'm having trouble locating that op amp though...

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