How to compare an ac signal with a dc reference using a comparator?

DickCappels

Joined Aug 21, 2008
10,187
At that frequency the breadboard and the fact that your resistor is two resistors in series should not have any detectable effect on the circuit's operation.
 

DickCappels

Joined Aug 21, 2008
10,187
At 100 Hz, the signal would not care even with your total of six resistors.

What did you mean by "...it blocked the signal"?

With 15k and 0.1uf a 100 Hz sine wave would be down 3db or about 30% less than the amplitude of the incoming signal.
 

DickCappels

Joined Aug 21, 2008
10,187
Something is broken.

If you measure your series connected resistor, does it measure about 15k? Similarly, are you sure of the capacitor's value?

Edit: Those plastic breadboards have a tendency to develop intermittent or open connections.
 
Last edited:

Thread Starter

anishkgt

Joined Mar 21, 2017
549
Well i get the series resistance all right. Will check again for loose contacts.

This just crossed my mind, Thyristors can handle more current than a TRIAC so in order to get the positive and the negative half cycles would just one thyristor do the job or both of them. I understand Thyristor conduct only in direction but since this would be in series does this make it any different than using two thyristors ?
 

Thread Starter

anishkgt

Joined Mar 21, 2017
549
I did find couple of them that have the ITSM 20ms = 400A and 16.7ms = 440ms for 2.92USD which is the max a TRIAC can handle but SCRs can withstand larger transient currents.
 

DickCappels

Joined Aug 21, 2008
10,187
Use what you need + some reasonable margin. For semiconductor current I find staying at 80% of the manufacturers specification keeps me out of trouble. This will vary by manufacturer and application, thought.
 

ronsoy2

Joined Sep 25, 2013
71
A triac or SCR will require a certain forward voltage to remain in conduction. This is typically 1.2 to 1.5 volts for lower current devices (30 amp) but for high current devices (over 100 amp) you may have as much as 3 volts drop. If you only have a few volts available from your transformer you may not get anywhere near the current you are expecting.
I would switch the primary of the transformer if this is a spot welder. You will have drastically lower current (reduced by the ratio of the input to output voltage of the transformer) and can thus use a commercial solid state relay to do the job. (google "solid state relay" and read all the responses)
 

Thread Starter

anishkgt

Joined Mar 21, 2017
549
Aren't SSRs same as an SCR or TRIAC but with an optocoupler and a TRIAC built in ?

here this particular TRIAC has a non-repetitive peak on-state current of 400A for 20ms. For me that much would be an overkill for spot welding nickel strips. I could be wrong about the idea that the TRIAC would conduct that way but i guess i would need to give it a try and see.
 

Thread Starter

anishkgt

Joined Mar 21, 2017
549
protect a cheap optocoupler?
Not only as a protection but a low resistance current path as well. Could not think of anything better. I've made some changes to the circuit as attached.

The idea of the circuit is to sense when the electrodes make contact and measure the current during a weld. The circuit would go in series with one side of the secondary cable.
Capture.PNG
 
Last edited:
Hey guys, electrician here, to add some clarity for safety purposes as to how the ground and neutral should be treated, in terms of your circuit, this must connect to the neutral wire for ground, as that is the ground that your AC voltage has it's relationship to. Because you are dealing with line voltages, hopefully you have, or will have your circuitry in a durable physical enclosure. The ground wire on the electrical outlet is for grounding this, and all other metal parts that are not intended to carry current. All current that is to be used by the circuit must be grounded in reference to the neutral. The green ground wire is intended to carry fault currents, specifically to have a low impedance path to ground, low enough that if a wire shorts to the casing, the resulting current will be sufficient to pop the breaker or blow the fuse, ensuring that the fault current conducts for a minimal period of time. The other thing to note is that any device that causes current to flow on the green line voltage wire will immediately trip ground fault circuit interrupters, and therefore will not work on bathroom, outdoor, poolside plugs as these devices trip if there is even a very small difference in the current travelling on the line and neutral wires.
If you connect your circuit to a non-gfci outlet and use the green wire as your circuit ground, the circuit may still work, since the neutral wire and ground wires will be connected at places like panels and transformers, but for the purpose that is called "Ground" in electronics, that neutral wire functions as the ground specifically for that live wire or set of live wires it is paired with, for all current that is intended to flow and will have the correct voltage reference for the wires connected to it, whereas the green ground will connect back to the panel with basically every other metal object in the building that isn't intended to carry current, and because the white neutral wire is carrying an amount of current that is matched to and based on the current flowing on the live wire(s) paired with it, a volt drop over those wires could cause the actual green ground wire to be less accurate, aside from not being safe.
 

Thread Starter

anishkgt

Joined Mar 21, 2017
549
Hey guys, electrician here, to add some clarity for safety purposes as to how the ground and neutral should be treated, in terms of your circuit, this must connect to the neutral wire for ground, as that is the ground that your AC voltage has it's relationship to. Because you are dealing with line voltages, hopefully you have, or will have your circuitry in a durable physical enclosure. The ground wire on the electrical outlet is for grounding this, and all other metal parts that are not intended to carry current. All current that is to be used by the circuit must be grounded in reference to the neutral. The green ground wire is intended to carry fault currents, specifically to have a low impedance path to ground, low enough that if a wire shorts to the casing, the resulting current will be sufficient to pop the breaker or blow the fuse, ensuring that the fault current conducts for a minimal period of time. The other thing to note is that any device that causes current to flow on the green line voltage wire will immediately trip ground fault circuit interrupters, and therefore will not work on bathroom, outdoor, poolside plugs as these devices trip if there is even a very small difference in the current travelling on the line and neutral wires.
If you connect your circuit to a non-gfci outlet and use the green wire as your circuit ground, the circuit may still work, since the neutral wire and ground wires will be connected at places like panels and transformers, but for the purpose that is called "Ground" in electronics, that neutral wire functions as the ground specifically for that live wire or set of live wires it is paired with, for all current that is intended to flow and will have the correct voltage reference for the wires connected to it, whereas the green ground will connect back to the panel with basically every other metal object in the building that isn't intended to carry current, and because the white neutral wire is carrying an amount of current that is matched to and based on the current flowing on the live wire(s) paired with it, a volt drop over those wires could cause the actual green ground wire to be less accurate, aside from not being safe.
Thank you Kevin. You have explained the topic in layman’s language. I was a little confused with the GND of electronics with that that of line voltage.
 
I'm still not fully up on your project, just decided to clarify a few safety things, I've read a bit more now and I see now that you're measuring welding currents. If you want your device not to have to actually be in series in the circuit, you may wish to consider using or building a CT or current transformer. Basically you just wrap a coil of wire around the coil you want to measure and hook it up to a known low resistance. Rather than there being a fixed relationship between the primary and secondary voltages, a CT produces a fixed relationship between the primary and secondary currents, so you can make one with a 1:1000 ratio over a 1 ohm resistor, and if 100A flow on the primary, 0.1A will flow on the secondary, producing a much smaller current and removing the need to place a device in the conduction circuit. Note that if you decide to use a CT, you MUST NOT have the secondary circuit open while current is running on the primary. Ever. The CT will just keep pushing harder and harder, trying to maintain the relationship between current flowing on the primary and secondary until something bad happens. It may be worth considering for your project though.
 

Thread Starter

anishkgt

Joined Mar 21, 2017
549
Thanks for the suggestion.

but how many turns of it on the secondary ? i was thinking of going with the Allegro 200A sensor.
Capture1.PNG
Capture.PNG
 
You can purchase premade CTs with assorted ratios if you wish to use off the shelf components, but if you would like to build your own, it consists of a smaller wire wrapped directly around the wire to be measured. The number of wraps determines the ratio, so if you want to measure a 200A current by measuring up to 2A, you would need a 100:1 ratio, so you would wind the secondary 100 wraps around the primary, and make sure that the ampacity of the secondary was adequate to carry the current (the lower you can make the resistance of the secondary, the less ohmic losses, and the more accurate it will be.
The point of a current transformer is to safely measure a current with a device that is only capable of measuring a smaller current. If you are building it yourself, the ratio on your current transformer can be anything you wish, so you can arbitrarily decide how small the current you want to measure is, and arbitrarily decide the device you would like to use. If you measure 1A on the secondary of a 100:1 CT, you know that 100A are flowing on the primary. You should use a device with a decent safety margin obviously. I suppose one other thing of note is that a CT transforms AC currents. While I know there is a way to passively measure DC current through induction, I'm not familiar with the methodology. I assume it is at least somewhat more complicated due to the fact that DC clamp-on ammeters are typically more expensive than AC ones, or at least they were several years ago when I was last meter shopping. It likely involves pulsing an AC current on the secondary winding and measuring the distortion resulting from the magnetic field of the conductor on the primary, or simply measuring the inductance of the secondary. as the current on the primary changes.
All of the above said I'm not at all familiar with the device you are intending to use as I am an electrician and still novice in electronics, so there are people here who would be much better with that question, but I looked it up and it appears to be a specialized Hall effect sensor, intended for the purpose and electrically isolated from a control circuit. If I understand correctly how it works, it appears to work in a very similar way, and may be more safe and direct to begin with.
 
Top