535,144 active members*
2,354 visitors online*

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

Hi Mark,

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

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.

Originally Posted by mmurray70
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.

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.

Originally Posted by CitizenOfDreams
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

Originally Posted by TomKerekes
Hi Mark,

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

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?

Originally Posted by mmurray70
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.

Hi Mark,

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.

Originally Posted by TomKerekes
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.

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.