YHDC current sensor - the theory please


+ Reply to Thread
Results 1 to 24 of 24

Hybrid View

  1. #1
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    952


    Did you find this post helpful? Yes | No

    Default Re: YHDC current sensor - the theory please

    a "peak detector" can be as simple as a resistor and a capacitor in parallel "smoothing" the output of the sensor, or like Jerson wrote, of the op-amp, right?
    not really , it needs a rectifier too. if the wave is not symmetrical the neg and pos peaks may be needed. plus it still needs adc code to read it in anyway
    May I kindly ask for a principle circuit to start with the correct foot please?

    I don't see how to "rectify" a very low AC signal - I'm an electrician and used to easely handle voltages over 230VAC but when it comes down to millivolts.... 😬
    Roger

  2. #2
    Join Date
    May 2013
    Location
    australia
    Posts
    2,705


    Did you find this post helpful? Yes | No

    Default Re: YHDC current sensor - the theory please

    Why do want a nasty old analogue peak detector, When you can create a digital one as per my code ?
    Using the very cct you posted.
    If you realy need to try analogue google ""peak detector circuit"



    An accurate analogue peak detector uses an opamp to create an "ideal" diode [overcome the diodes vf ]
    Warning I'm not a teacher

  3. #3
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    952


    Did you find this post helpful? Yes | No

    Default YHDC current sensor - the theory please

    ...sorry Richard, didn't try your code by now - still in office.... 😬
    Roger

  4. #4
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    952


    Did you find this post helpful? Yes | No

    Default YHDC current sensor - the theory please

    Richard,

    I've connected my YHDC sensor one pin to ground and the other to RA5. Got readings (see hereunder).

    Because I'm not sure what I'm doing right now with the current sensor, I tried to add a 1Mohms resistor and a 100nF polarized cap between GND and RA5. Same readings.

    Just for info, my multimeter shows 0.157mVAC - I'm measuring a 230VAC 42W light bulb for now.

    I get readings on my serial monitor but the values don't make too much sense to me, for now - there's going to be some kinf of scaling to do, no?


    This is what I get for now with bulb "ON":
    Name:  Readings.jpg
Views: 175
Size:  36.9 KB


    And bulb "OFF":
    Name:  Bulb OFF.jpg
Views: 175
Size:  26.8 KB
    Roger

  5. #5
    Join Date
    May 2013
    Location
    australia
    Posts
    2,705


    Did you find this post helpful? Yes | No

    Default Re: YHDC current sensor - the theory please

    It can't work wired the way you described. The ac signal must be biased by vcc/2 and be less than vcc peak to peak.
    If the serial baud rate is too low it will ruin the sample rate.
    If the burden resistance is incorrect extremely high voltage may be possible

    Post code and schematic
    Last edited by richard; - 1st December 2025 at 22:14.
    Warning I'm not a teacher

  6. #6
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,624


    Did you find this post helpful? Yes | No

    Default Re: YHDC current sensor - the theory please

    Have you connected your CT as shown in your first post? That is, the bottom to 2.5V (or VRef/2) and the top to input pin AND - VERY IMPORTANT - a load resistor shown as 33ohms in diagram? You must have a load resistor or the output voltage across the secondary of the CT can get very high, possibly damaging the ADC input.

    Then, your CT produces 50mA with a 100A primary current. 1A primary give 0.5mA and so yout 42W load gives about 100uA secondary current. Keep that in mind when selecting the load resistor.

    EDIT: OK, Richard beat me to it while I was typing.

  7. #7
    Join Date
    Aug 2011
    Posts
    460


    Did you find this post helpful? Yes | No

    Default Re: YHDC current sensor - the theory please

    You might want to specify the model number of the sensor since there are a number of different types, and the circuit shown may not even apply

  8. #8


    Did you find this post helpful? Yes | No

    Default Re: YHDC current sensor - the theory please

    adjust resister to for the mid current used incase of some nonlinearity... shotkey diode has .3 volt drop
    Name:  ct.JPG
Views: 166
Size:  41.8 KB

Similar Threads

  1. Current sensor output modification. PIC or opamp or something else?
    By retepsnikrep in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 10th December 2020, 06:22
  2. Counter and interrupt theory
    By astouffer in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 23rd January 2014, 02:21
  3. Replies: 8
    Last Post: - 5th May 2009, 21:10
  4. current sensor interfacing
    By hell_pk in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 29th January 2009, 05:55
  5. PIC based mAh meter/current draw sensor
    By skimask in forum Off Topic
    Replies: 6
    Last Post: - 26th February 2008, 03:10

Members who have read this thread : 14

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