New thoughts needed on consistant trigger levels

Thread Starter

Calltronics

Joined Nov 20, 2020
19
Hi, so I want to do a current detection on mains voltage. To tigger an event. The trigger will feed into a micro-processor to measure the time it took to reach a predefined current level. Therefore, the trigger can be any sort of suitable digital signal.
1) The voltage in line with EU regulations can vary between 216 to 253 Volts.
2) As soon as the current flow reaches 100mA I want to trigger the microprocessor.
a) The 100mA does not have to be an accurate 100mA.
b) It can be in the range say 90mA to 110mA
c) The requirement is that it must be a consistent repeatable level that triggers the event.
d) It can trigger for example on 105mA, the requirement is that no matter what the voltage the trigger will occur at the same 105mA consistently.
3) The trigger processing time must also be consistent.
a) Again, as per the level detection, not an absolute measurement just a consistent repeatable time to generate a trigger.
b) For clarification, the time from the source reaching the example 105mA, to the generation of the interrupt must be consistently the same.
c) Or at least within a few micro-Secs (+/- 5µS).

I did originally think of using a simple resistor network drop and triggering the current with an OP Amp across the current measuring resistor. But this trigger current would vary with the changing voltage.
Next, I considered using A to D to measure and compensate. But the repeatability of conversion times is not accurate enough. Sampling times would be the min and max variations.
I am going around in circles trying to get the consistently repeatable time and level. I welcome any new ideas and thoughts.
 

ericgibbs

Joined Jan 29, 2010
18,766
hi,
Could you post the project documentation, circuit etc, you have tried.
What is the purpose of this current level detection.?
E
 

Thread Starter

Calltronics

Joined Nov 20, 2020
19
hi,
Could you post the project documentation, circuit etc, you have tried.
What is the purpose of this current level detection.?
E
I have not designed anything yet.
Still searching for a possable solution.

Difficult to explain the application without reams of text and diagrams. Basically I need to switch on a circuit at a precise time dependent on the rise of the mains current to the main assembly. To then achieve a syncronous peak time.
 

Marc Sugrue

Joined Jan 19, 2018
222
I have not designed anything yet.
Still searching for a possable solution.

Difficult to explain the application without reams of text and diagrams. Basically I need to switch on a circuit at a precise time dependent on the rise of the mains current to the main assembly. To then achieve a syncronous peak time.
Take a look at power factor correction IC's they typically have a current sense circuit, a line voltage sense circuit and a PWM output. you may be able to repurpose the PWM which typically drives the mosfet into a pulse stream that varies frequency with voltage / current to a GPIO or counter timer pin on the micro. The rest could be algorithm based.
 

AnalogKid

Joined Aug 1, 2013
10,986
I did originally think of using a simple resistor network drop and triggering the current with an OP Amp across the current measuring resistor. But this trigger current would vary with the changing voltage.
True, but only in a good way.

The current through a shunt resistor sets the voltage across it. Nothing else. Ohm's Law. Just like in the books.

The shunt resistor is the "bottom leg" of a two-impedance voltage divider, with the other impedance being the load. So if the shunt voltage variies proportionally with the line voltage, it is because the load is resistor-ish and the load current also is changing. But if the current through the string goes up with line voltage, so what? Isn't that exactly what you want to sense and act upon?

The only real problem with a simple resistive shunt is isolation from the AC mains. An alternative is - wait for it - a current sense transformer. "Current Sense" - get it ? - I swear I'm not making this up.

OK, let's all calm down. The CT output is a sine wave just like with the shunt resistor, but it is fully isolated from the line. You can either send that signal directly to the uC to sample and process, or rectify it, filter it, send the DC level to your uC system. Either way you will have a time constant to deal with in your signal flow.

ak
 

crutschow

Joined Mar 14, 2008
34,280
You could use a current-transformer for safety as AK suggested, a comparator (e.g. LM339/393) with a precision voltage reference (e.g. TL431) to get an accurate trip point at the first 100mA peak of the rising current waveform.
The comparator will need some hysteresis (small amount of positive feedback) to prevent oscillations at the trip point.

So what repeatability of the trigger point do you need (1mA, 0.1mA, .....)?
 

Thread Starter

Calltronics

Joined Nov 20, 2020
19
True, but only in a good way.

The current through a shunt resistor sets the voltage across it. Nothing else. Ohm's Law. Just like in the books.

The shunt resistor is the "bottom leg" of a two-impedance voltage divider, with the other impedance being the load. So if the shunt voltage variies proportionally with the line voltage, it is because the load is resistor-ish and the load current also is changing. But if the current through the string goes up with line voltage, so what? Isn't that exactly what you want to sense and act upon?

The only real problem with a simple resistive shunt is isolation from the AC mains. An alternative is - wait for it - a current sense transformer. "Current Sense" - get it ? - I swear I'm not making this up.

OK, let's all calm down. The CT output is a sine wave just like with the shunt resistor, but it is fully isolated from the line. You can either send that signal directly to the uC to sample and process, or rectify it, filter it, send the DC level to your uC system. Either way you will have a time constant to deal with in your signal flow.

ak
True, but only in a good way.

The current through a shunt resistor sets the voltage across it. Nothing else. Ohm's Law. Just like in the books.

The shunt resistor is the "bottom leg" of a two-impedance voltage divider, with the other impedance being the load. So if the shunt voltage variies proportionally with the line voltage, it is because the load is resistor-ish and the load current also is changing. But if the current through the string goes up with line voltage, so what? Isn't that exactly what you want to sense and act upon?

The only real problem with a simple resistive shunt is isolation from the AC mains. An alternative is - wait for it - a current sense transformer. "Current Sense" - get it ? - I swear I'm not making this up.

OK, let's all calm down. The CT output is a sine wave just like with the shunt resistor, but it is fully isolated from the line. You can either send that signal directly to the uC to sample and process, or rectify it, filter it, send the DC level to your uC system. Either way you will have a time constant to deal with in your signal flow.

ak
Looked at using a CT but it is too vulnerable to environmental changes that would affect consistency at such a small current.

However , you are totally right with your prompting on the resistor network. No matter what voltage is applied, when the current reached say 105mA the voltage across the “shunt” resister will always be the same. (Given the stability of a resistor).
Now into an OP Amp with precision voltage reference and I have a somewhat isolated “switch”.

I believe?
Thank you Maslow.
 

Thread Starter

Calltronics

Joined Nov 20, 2020
19
You could use a current-transformer for safety as AK suggested, a comparator (e.g. LM339/393) with a precision voltage reference (e.g. TL431) to get an accurate trip point at the first 100mA peak of the rising current waveform.
The comparator will need some hysteresis (small amount of positive feedback) to prevent oscillations at the trip point.

So what repeatability of the trigger point do you need (1mA, 0.1mA, .....)?
Not convinced that the CT are stable enough to provide consistent representations.
But you have both prompted me to look at this solution further.
Thank you.

I am looking at +/- 0.1mA variation
 

Thread Starter

Calltronics

Joined Nov 20, 2020
19
hi,
My concern is the quoted Line voltage.
What is the load which determines the nominal 100mA.?

E
The final load current is approx 17.5A. I just have to detect the trigger when the ac current reaches 100mA (positive or negative).
The feed then switches to the direct feed line not through this detection circuit, which then becomes redundant.
 
Last edited:

AnalogKid

Joined Aug 1, 2013
10,986
Looked at using a CT but it is too vulnerable to environmental changes that would affect consistency at such a small current.
What "changes"?
Not convinced that the CT are stable enough to provide consistent representations.
Really? Your stated requirement is +/-10%. I can meet that with something hand-made. If you are concerned with movement of the primary wire within the aperture affecting the output, fill in the aperture with RTV.

Or use a sensor with a rigid sense wire already fixed in place:
Since you obviously have isolated DC power sources to power the sensor and uC circuits, Consider a hall effect sensor from LEM and others. There is a 25 A version that has the conductor through the coil built-in, so it is held firmly in place WRT the sense coil and hall element. IIRC accuracy is 1%-ish.

https://www.lem.com/sites/default/files/products_datasheets/hx_03_50-p_ver15.pdf

ak
 
Last edited:

crutschow

Joined Mar 14, 2008
34,280
Not convinced that the CT are stable enough to provide consistent representations.
Why do you think that?
Transformers are generally pretty stable with the environment.
What "environmental changes" would the transformer be seeing.
The final load current is approx 17.5A.
If you don't care about measuring the current much above 100mA, then you can use a small current transformer (say 0.2A-1A) for better accuracy.
The transformer will saturate above that point, but that won't hurt anything. Just clamp the transformer output voltage to prevent it going too high.
 
Top