Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Need to design a current comparator

Status
Not open for further replies.
As I said before the peak voltage is √2 times the RMS voltage, the voltage across Cf is the peak voltage from the transformer multiplied by the gain of the non-inverting op-amp stage.

There's one thing I missed in my explanation: the purpose of R4 and R5.

They provide the comparator with some hysteresis so the turn on voltage will be slightly higher than the off voltage which will ensure that the relay doesn't chatter.

Hysteresis = Vout×(R4/R5)

Vout is the suppply voltage to the comparator minus the losses in the output stage, for convenience let's call it 10V.

The hysteresis is the difference between the turn on and turn off voltages and should be higher than the ripple on Cf.

Suppose R5 = 1M and R4 = 15k as per the schematic.

Hysteresis = Vout×R4/R5 = 10×15/1M = 150mV

Suppose Vref is 5V.

Von = Vref+hysteresis/2
Voff = Vref-hysteresis/2

hysteresis/2 = 150mV/2 = 75mV

Von = 5 + 75mV = 5.075V
Voff = 5 - 75mV = 4.925V

The ripple accross Cf should be <150mV which it was the last time I simulated it, if it's higher, increase the value of R4.



Von = 5 + 75mV = 5.075V
Voff = 5 - 75mV = 4.925V



I've reviewed back your theoretical calculation, so which means when both voltages compare,
will on when only (Vin+) 'above' 5.075V > (Vin-) (5V)
will off when only (Vin+) 'below '4.925V' < (Vin-) (5V)
Am I thinking right?

Another Example,

If my voltage after through transformer, gain of op amp and then across CF resulted 6V, so my Hysteresis Voltage must design more than > 6V.

Hysteresis = Vout x R4/R5 (R5 = constant which is 1M and Vout = 10V)
Let's say my Hysteresis set as 7V (>6V).

7 = 10* (R4/1M)
R4 = (7*1M)10
R4 = 700 kΩ

Set V ref as 6V
Von = 6 + (7/2) = 9.5V
Voff = 6 - (7/2) = 2.5V

Will on when only Vin+ above 9.5V >
Will off when only Vin- below 2.5V <

What about the voltage in between 2.5 > y <9.5

I'm confused ...


Best Regard,
Steve
 
No, the the amount of hysteresis you require will depend on the voltage ripple on Cf.

Run the simulation with the required current to give roughly the same voltage as the reference across Cf.

When the voltage across Cf stabilises look at the ripple i.e. the difference between the maximum and minimum voltage across the Cf.

As long as the amount of hysteresis exceeds the value you measure, don't worry about it.
 
Ok thank you very much.. very appreciate your comment :)

Now, I'm thinking in another "silly" situation, when my conditions are 0A and > 0A

So I design the comparator, provided there is a value of the voltage comes through the Input +, the comparator must on .. Hence, I make a -if value in Input- as Voltage Reference..

Erm, what do you think on that situation? Should I still need the comparator when compare something with the ZERO value? or is that unnecessary to use comparator anymore?
 
You can't go all the way down to 0A.

I'd suggest designing for low current such as 10mA but the gain would need to be 2500 if the reference is 2.5V so it's probably a better idea to use a more sensitive current sensor such as a hall effect.
 
If this is for a commercial application and I assume it is, earlier I suggested one of these as a current sensor. You get a 0 to 100 amp version. You get an output of 4 to 20 mA. Now your 0 to 100 Amps is 4 to 20 mA (driven off a 24 VDC supply. You take that 4 to 20 mA and run it through a 500 Ohm 1% precision resistor. Now you have 0 amps = 2 volts and 100 amps = 10 volts DC.

I use that type of sensor all the time. They work great, are accurate and last forever even in a harsh environment. The CT approach you are trying to use is not the best or accurate way to go about this.

Then if this is commercial you can easily purchase a good process meter that would either measure the 4 to 20 mA or 0 to 10 volts. Get a process meter with settable alarm outputs, get a process meter **broken link removed** Use an alarm relay output to drive your large contactor. You get an accurate display of current also.

That or use Hero's circuit and have much more room to move around. Build your comparator which you need to get on a board somehow and what Hero has provided will work fine. You never mentioned a budget? Using a CT you get AC, then need to amplify and scale it to something usable. Using a hall effect it is all done and accurate. Scaling becomes easy.

Just My Take
Ron
 
That's a point, I never thought that it might be runin a factory or something like that.

There are many options.

It might be overkill but have you considered using a PLC?

You could use a current sensor similar to the one posted above to get a constant current, most PLCs have 4mA to 20mA options for inputs so you don't need to worry about converting it to a voltage and you'll get an error if the current drops below 4mA which will tell you if the sensor has become disconnected.
 
You're right Ron, this is for commercial application. Ok, I tell you all my project purpose... Ideally, my project is running of the transformer, through the op-amp configuration and the current transformer to the relay ... the whole function is used as stabilizer purpose in order to save the energy.. STABLE the voltage in 220V

I've faced some problems,when my application is loading a small power product which is below 2A (Let's say the electricity product load is not over 2A), my transformer is unable to switch over to bypass.... so at the end the relay unable to switch on to another part as well to function as stabilizer..

I've considerate in many situations, current too small (the transformer I used was large power,heat dissipation and one of the idea is using the comparator to compare the current..

but it seems like not a good idea..


P.S the components I've used ~ LM324. TRIAC OPTO, ULN200A (current gain), transformer, current transformer, relay
 
Last edited:
I just feel if you want to accurately measure a small current accurately, small as in 2 amps of as much as 60 to 70 then a hall effect transducer is the way to go about it. I would have gone about it as I originally suggested.

I have several very large pumps at work I monitor using what I linked to. The pump motors run at very high temperatures and pressures. Measuring a phase motor current and comparing it to system flow I can predict failures before they happen and have the pump reworked.

The reason I asked if it was a commercial application is sometimes it is cheaper to work with off the shelf items than reinvent the wheel.

Ron
 
I just feel if you want to accurately measure a small current accurately, small as in 2 amps of as much as 60 to 70 then a hall effect transducer is the way to go about it. I would have gone about it as I originally suggested.

I have several very large pumps at work I monitor using what I linked to. The pump motors run at very high temperatures and pressures. Measuring a phase motor current and comparing it to system flow I can predict failures before they happen and have the pump reworked.

The reason I asked if it was a commercial application is sometimes it is cheaper to work with off the shelf items than reinvent the wheel.

Ron

Sound like interest.. but I have no idea gotta to do now.. I already made my application in a prototype.. now I'm in troubleshoot part.. still cant find out what the problem is .. it just cannot bypass switch over to 220V when the voltage is overload....

Forgot to tell you, my application is kind of Automatic Voltage Regulator AVR.. it uses to stabilize n protect the product from the incoming power supply..
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top