584,866 active members*
5,141 visitors online*
Register for free
Login
Results 1 to 10 of 10
  1. #1
    Join Date
    May 2012
    Posts
    537

    Current Transformer to Analog input?

    Hi Tom,

    Wondering if there is any easy way I can connect a current transformer to one of my analog inputs for a load meter? The load meter signal out of my drive is all over the place. I think I would be better off just monitoring current input to drive.

    Did a little googling on how to convert the output of a CT to DC voltage and there seems to be quite a lot of different opinions and circuits out there. People seem to run into trouble using diodes as it chops off the lower part of the signal.

    Wonder if I could just use a CT with a resistor across it and then connect leads to kanalog ground and one of the analog inputs? This would be ac signal. Would I be able to use C code to convert this? Would the init program loop fast enough to do this accurately? Or am i better off with some kinda circuit to give me DC signal? If so what would you recommend? Thanks.

    Mark

  2. #2
    Join Date
    May 2006
    Posts
    4043

    Re: Current Transformer to Analog input?

    Hi Mark,

    That should be possible. Either the forever loop with something like:


    FiltCur = 0.99 * FiltCur + 0.01 * ADC*ADC;
    DispCur = sqrt(FiltCur);


    Depending on what you have in the forever loop it may be fast enough.

    Or you might use the 90us Callback to do the sampling.

    However you should realize that supply current is not the same as motor power. In fact when braking there may be high current where power is actually negative.
    TK
    http://dynomotion.com

  3. #3
    Join Date
    Nov 2012
    Posts
    1267

    Re: Current Transformer to Analog input?

    Quote Originally Posted by mmurray70 View Post
    People seem to run into trouble using diodes as it chops off the lower part of the signal.

    Wonder if I could just use a CT with a resistor across it and then connect leads to kanalog ground and one of the analog inputs?
    This seems a bit extreme to me. It should be much easier to improve the accuracy of the AC to DC conversion.

    For instance, you could use an opamp-based "ideal rectifier": https://en.wikipedia.org/wiki/Precision_rectifier.

    Or you could simply use the lowest Vfwd diodes you can find and disregard some nonlinearity at low load values.

  4. #4
    Join Date
    Dec 2003
    Posts
    24216

    Re: Current Transformer to Analog input?

    Remember with a current transformer you are measuring the secondary Current, the average ratio produces a current in 1 to 5 amps range, they must always have a suitable load, never open or high impedance.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  5. #5
    Join Date
    May 2012
    Posts
    537

    Re: Current Transformer to Analog input?

    Quote Originally Posted by CitizenOfDreams View Post
    This seems a bit extreme to me. It should be much easier to improve the accuracy of the AC to DC conversion.

    For instance, you could use an opamp-based "ideal rectifier": https://en.wikipedia.org/wiki/Precision_rectifier.

    Or you could simply use the lowest Vfwd diodes you can find and disregard some nonlinearity at low load values.
    Sorry im a mechanical guy with limited electrical knowledge. I saw other recommendations about using opamps but I really know nothing about them or where to even start. Can I buy a device like this circuit or would I need to make my own?

    I like the low voltage diode idea! I didnt realize you could get them with such low voltage drops. Would this be a good choice? https://www.digikey.ca/en/products/d...F30H3F/5114298 this has 220mv Vf

  6. #6
    Join Date
    May 2012
    Posts
    537

    Re: Current Transformer to Analog input?

    Quote Originally Posted by TomKerekes View Post
    Hi Mark,

    That should be possible. Either the forever loop with something like:


    FiltCur = 0.99 * FiltCur + 0.01 * ADC*ADC;
    DispCur = sqrt(FiltCur);


    Depending on what you have in the forever loop it may be fast enough.

    Or you might use the 90us Callback to do the sampling.

    However you should realize that supply current is not the same as motor power. In fact when braking there may be high current where power is actually negative.
    Tom, Can you explain those 2 lines of code?

    I realize its not exactly ideal. This drive has a braking unit that dumps power to resistor, not regenerative, so no worries about braking. And my spindle drive seems to throw low voltage alarms whenever i overload it (probably due to my phase converter)... so measuring input current should at least let me know when im close to that low voltage alarm, more current should go hand in hand with low voltage im thinking.

    How much trouble am I in if I miscalculate the resistor or get a spike somehow and send more then 10v to that input? Will i likely loose the input or fry the whole board?

  7. #7
    Join Date
    Nov 2012
    Posts
    1267

    Re: Current Transformer to Analog input?

    Quote Originally Posted by mmurray70 View Post
    Would this be a good choice? https://www.digikey.ca/en/products/d...F30H3F/5114298 this has 220mv Vf
    Yes, this diode should work well.

    Tom's code calculates the RMS (root mean square) value of the input voltage. The first line is a simple averaging algorithm.

  8. #8
    Join Date
    May 2006
    Posts
    4043

    Re: Current Transformer to Analog input?

    Hi Mark,

    FiltCur = 0.99 * FiltCur + 0.01 * ADC*ADC;
    DispCur = sqrt(FiltCur);

    Tom, Can you explain those 2 lines of code?
    This is a low pass filter applied to the square of the measured current. It computes the weighted average of the previous average with the new value. The 0.99 takes 99% of the previous filtered value weighted with 1% of the new sample. The closer the first constant is to 1 the slower the response and the more averaging. The square root only needs to be performed when the value is displayed. This formula can be used to calculate the coefficient for a given sample rate and time response (Tau)

    KLP = exp(-TIMEBASE/Tau);

    the coefficients for a 1 second response with a 90us TIMEBASE are: 0.99991 and 0.00009



    How much trouble am I in if I miscalculate the resistor or get a spike somehow and send more then 10v to that input? Will i likely loose the input or fry the whole board?
    The Kanalog ADC inputs pass through a 70K ohm resistor and the ADC inputs can clamp up to 10ma absolute maximum. So theoretically the input could go to 700V before causing damage. But I wouldn't try it Hard to say how any damage would spread.
    TK
    http://dynomotion.com

  9. #9
    Join Date
    May 2012
    Posts
    537

    Re: Current Transformer to Analog input?

    Quote Originally Posted by TomKerekes View Post
    The Kanalog ADC inputs pass through a 70K ohm resistor and the ADC inputs can clamp up to 10ma absolute maximum. So theoretically the input could go to 700V before causing damage. But I wouldn't try it Hard to say how any damage would spread.
    Wow talk about a safety factor on that. I was afraid if i had a spike to 15v or something I might do major damage.

    Any suggestion on what size CT to order? Drive is 200v 7.5kw, guessing peak current is 30a or less. Whole machine is fused at 40a. Probably just get a CT from mcmaster. They have them in a range of 300:5 inpututput amps, all the way down to 50:5.

  10. #10
    Join Date
    May 2006
    Posts
    4043

    Re: Current Transformer to Analog input?

    Hi Mark,

    I'm not familiar with CTs. Here is a 50A 1000:1 at Digikey:
    https://www.digikey.com/en/products/...AC1050/3881360

    50A / 1000 = 50ma into a 100 ohm 1/4 W resistor should be 5V.

    Check with an AC voltmeter before connecting to Kanalog.
    TK
    http://dynomotion.com

Similar Threads

  1. analog input
    By dbunyip in forum Viper Servo drives
    Replies: 7
    Last Post: 11-01-2016, 11:31 PM
  2. Problem with Analog Input mode
    By speedydumpster in forum CNC Machine Related Electronics
    Replies: 6
    Last Post: 05-14-2012, 07:03 PM
  3. Question about analog input on servo drive
    By jsheerin in forum Servo Motors / Drives
    Replies: 6
    Last Post: 12-10-2011, 04:25 AM
  4. analog input VFD speed Hitachi SJ100
    By Karl_T in forum Phase Converters
    Replies: 10
    Last Post: 11-22-2008, 10:09 PM
  5. How to drive Analog Servo Input +/- 10V
    By gurvy in forum CNC Machine Related Electronics
    Replies: 1
    Last Post: 05-31-2007, 05:31 AM

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
  •