Signal Conditioning of Split Core Current Transformer Frequency Counter

I am using a split core current transformer as the input to an Arduino Uno to calculate and display the frequency in the range of 1-100 Hz.

When clamped around the signal wire, the output of the SCT013-005 (5 Amp/1 Volt) starts a 0 volts and climbs to a peek voltage of 2.1 volts and then drops to -0.407 volts and returns to 0 in about 30ms. The pulse width is 5 ms.

When I use the SCT013-010 (10 Amp /1 Volt) the pulse starts a 0 volts and climbs to a peek voltage of 1.1 volts and then drops to -0.135 volts and returns to 0 in about 30ms. The pulse width is 5 ms.

How should I condition ("square up" the pulse & remove the negative voltage) of the input voltage to protect the Arduino and provide a good pulse to count.

Thanks in advance,
Franke39

Since the voltage rises to over 0.7, you can use a diode in series to keep the voltage from going negative.
Since the frequency is low, you can use an analog input and a small sketch to watch for the end of the rising edge. Count these transitions in a time period to calculate frequency.

What about using a Schmitt Trigger.

How about a capacitor for AC coupling; voltage divider to apply an offset; comparator that compares to a same voltage divider. Should give you a very nice block wave.

But before we go there: how come the signal is lopsided? I expect to see the same value for both the positive and negative halves.

Thank you all for the quick response.

• 6v6gt: Use a diode to cut the negative voltage
That would work, but I don't want to reduce the peak voltage, I would like it to be at a TTL level for interrupt usage.

• Riva Schmitt Trigger
I considered that, but I don't think the waveform (as is) will meet the 74HC14 threshold amounts: VT+ 1.7 - 3.15 volts, VT- is 0.9 - .2 volts (Vcc @ 4.5 volts)

Schmitt Tiger question:
Why is the threshold (VT+) such a large range?
In my example if the VT+ was always 1.7 volts, it would work well.
BUT what if it is 3.15 volts it would never trigger.

• wvmarle: capacitor voltage divider to apply an offset; comparator:
That will give me the exact output wave I am looking for, but has many components.

The reason the pulse is lopsided is due to the magnetic field collapsing in the current transformer when the pulse drops to 0 volts.

After much reading last night, I would like to shape the input signal to a TTL level, so I can use it to trigger an interrupt.

Any thoughts on these options:
• 4N25 / 4N35 Optocoupler
• Using the built in analog comparator with a voltage divider to create the reference voltage (AIN0) and the signal feeding the other input.(AIN1)

Thanks again for you time!

Franke39:
• wvmarle: capacitor voltage divider to apply an offset; comparator:
That will give me the exact output wave I am looking for, but has many components.

Not that many.
schematic.png
I count six, plus decoupling cap for the comparator. An OpAmp would work just the same in this situation, signal is slow enough. The problem of your low frequency is that you need a fairly large C2 and R1/R2 to keep the signal at a meaningful offset. C2 must be non-polarised, so ceramic.

The values I just realise are a bit overdone; 4µ7 & 2x470kΩ (effectively in parallel!) gives a time constant of 1.1 seconds where ~0.5s is more than enough for you. So 2µ2 & 470kΩ will work as well (RC = 0.52s). Better chance to have those values in your parts box.

Any thoughts on these options:
• 4N25 / 4N35 Optocoupler
• Using the built in analog comparator with a voltage divider to create the reference voltage (AIN0) and the signal feeding the other input.(AIN1)

Will your device put out the current needed to drive an optocoupler? A few mA is a bare minimum.
Also the LED in an optocoupler has a forward voltage of 1.2-1.5V so you only get conduction when you reach >1.5V. As it's an LED you must add a current limiting resistor, and the current draw will increase with increased voltage of your signal.

You can't use the comparator due to the negative part of your signal. The voltage itself must stay positive. A diode may help.

schematic.png

Franke39:
• Riva Schmitt Trigger
I considered that, but I don't think the waveform (as is) will meet the 74HC14 threshold amounts: VT+ 1.7 - 3.15 volts, VT- is 0.9 - .2 volts (Vcc @ 4.5 volts)

Schmitt Trigger and a voltage divider offset to put peak in correct range.

wvmarle:
schematic.png
I count six, plus decoupling cap for the comparator. An OpAmp would work just the same in this situation, signal is slow enough. The problem of your low frequency is that you need a fairly large C2 and R1/R2 to keep the signal at a meaningful offset. C2 must be non-polarised, so ceramic.

Thank you for your time and effort that you put into answering my question!

wvmarle:
Will your device put out the current needed to drive an optocoupler? A few mA is a bare minimum.
Also the LED in an optocoupler has a forward voltage of 1.2-1.5V so you only get conduction when you reach >1.5V. As it's an LED you must add a current limiting resistor, and the current draw will increase with increased voltage of your signal.

I did some testing this afternoon. With the split core current transformer clamped around to the 11 amp pulsing wire, and the output connected to a 500 ohm resistor in series with a LED it flashed and I had a loaded peak voltage of 1.7 volts across the LED.

wvmarle:
You can't use the comparator due to the negative part of your signal. The voltage itself must stay positive. A diode may help.

I wasn't aware of this. I assumed if the pin voltage was within spec (min allowed -0.5v) it would work.
Thanks for the time saving tip!

For some sill reason, I like the idea of it being optically isolated.
Tomorrow I will test current clamp connected to the 4N35 opto-coupler, which drives a 74LS14 Schmitt trigger:


(Also I just happen to have the parts... The 74LS14 is from when I went to school in 1986. I hope it still works!)

That is very promising for the optocoupler indeed.

Do add an appropriate resistor - that 1.7V typical for the forward voltage of a red LED. The 500 Ohm (unusual value!) will do fine here. You best add a diode to the opto input (pointing the opposite way) to protect against the negative voltage: the reverse voltage rating of an LED is usually a mere 5-6V.

Use a pull-up resistor on the output of the optocoupler and you probably don't need the Schmitt trigger, I don't expect noise on that output (which is the most common reason to add Schmitt triggers), usually an optocoupler will produce a pretty nice block wave by itself, at least good enough for the Arduino to read.

Do mind to only read either rising or falling edges, as your duty cycle is very likely far from 50%. So you read complete cycles, not half cycles.

For your optocoupler circuit you're probably better off using a weaker pull-up, so the opto doesn't need that much current through the LED to pull down the line (especially with a 1k current limiting resistor on that side). 10-20k will be better. Or if you connect it to the Arduino's input directly, use its built-in pull-up resistor.

Riva:
Schmitt Trigger and a voltage divider offset to put peak in correct range.

As I understand it, since the voltage already too low for the Schmitt trigger's threshold (Vt+), a voltage divider won't work.

However, tomorrow I will be testing a opto-coupler connected to a Schmitt trigger.
See the above post for a schematic.

wvmarle:
That is very promising for the optocoupler indeed.

Do add an appropriate resistor - that 1.7V typical for the forward voltage of a red LED. The 500 Ohm (unusual value!) will do fine here. You best add a diode to the opto input (pointing the opposite way) to protect against the negative voltage: the reverse voltage rating of an LED is usually a mere 5-6V.

Use a pull-up resistor on the output of the optocoupler and you probably don't need the Schmitt trigger, I don't expect noise on that output (which is the most common reason to add Schmitt triggers), usually an optocoupler will produce a pretty nice block wave by itself, at least good enough for the Arduino to read.

Do mind to only read either rising or falling edges, as your duty cycle is very likely far from 50%. So you read complete cycles, not half cycles.

Thanks for your insights on this.

The reason for the 500 ohm resistor is that I simply wanted to test some value less than 1K, so I used 2 1K resistors in parallel, just to see the difference. The higher the If (forward current) the quicker the opto output switches and that results in a longer Schmitt trigger pulse width.

The max reverse voltage (Vr) on the opto (4N35) is 7 volts, so I don't think I need the extra diode and I don't think I can afford the extra voltage drop. From my scope, the max negative voltage is 0.436 volts.

I like the idea of using the Schmitt trigger since it provides such a nice clean (and square) output:

Hey vmarle,
I just had a quick look in the simulator using a 20K pull up (close to Arduino's pull up, I think) on the output of the opto and that may work well without the Schmitt trigger.

Tomorrow I will test in the actual circuit. Thanks for pointing this out :slight_smile:

Output of the Schmitt trigger is cleaner for sure - but the output of the opto is absolutely good enough.

A Schmitt trigger is mostly used for either slow changing signals (where it otherwise may linger very close to the switch-over point of an Arduino input, or the input of a regular logic gate), or noisy signals which for that reason could give multiple triggers on an input.