How to set reference for a sine wave with dc supply - Page 1
Forum section: electronics / beginners

author: anishkgt
author_rank: Frequent Contributor
timestamp: June 18, 2018, 03:12:39 pm
content: Hey all,I am trying use a comparator to read an ac voltage and get HIGH when the voltage goes below 30vac and a LOW it goes above 30vac. Can somebody please help me here. I can understand setting a reference voltage for a dc when sensing the same but sensing the AC is something new.

author: pelule
author_rank: Frequent Contributor
timestamp: June 18, 2018, 04:44:56 pm
content: Do you want to controle/regulate VAC peak to peak 30VAC (+/-15V referred to zero/gnd)?So you could use a AC-to-DC circuit - a bridge rectifier (diodes) and a buffer capacitor to convert the AC voltage to a DC level and compare with a comparator./PeLuLe

author: anishkgt
author_rank: Frequent Contributor
timestamp: June 18, 2018, 04:56:58 pm
content: Well i just need to monitor the 30vac. I did think of using a bridge but had a few concerns,would the dc voltage change as the voltage ac changesthe same line would have a mains supply as wellThe LOAD here is a MOT (microwave oven transformer). The 30vac is the voltage when the MOT is not energized for spot welding but will have this voltage just to sense the voltage drop when the secondary are shorted, which simulates a weld.

author: exe
author_rank: Unknown
timestamp: June 18, 2018, 06:08:29 pm
content: I'm not sure I understand the task because there are so many things on the schematic that look to redundant.Please see "my" way. It's not ideal, but should be good enough. As a precation, I picked random opamp, no clue if it's suitable for this application. Also, many opamps have diode clamp between input, those are not suitable for this. Also, opamp works quite slow because output has to swing a lot. I'm pretty sure there are better comparators.

author: anishkgt
author_rank: Frequent Contributor
timestamp: June 18, 2018, 06:14:33 pm
content: Thank you exe. Yes the schematic is not the best just on the paths of learning and following google images.I've got one as well which i've done with the best i've learned. The truth table for a comparator is like thisIf V+ > V- then, VccIf V+ < V- then, Veebut i don't see any change in the output, wonder why.

author: anishkgt
author_rank: Frequent Contributor
timestamp: June 18, 2018, 07:08:08 pm
content: Realized it was the voltage follower that was connected in the wrong manner.

author: exe
author_rank: Unknown
timestamp: June 18, 2018, 09:00:45 pm
content: What's the purpose of voltage follower?

author: anishkgt
author_rank: Frequent Contributor
timestamp: June 18, 2018, 09:04:38 pm
content: I read it would be a good to have it in designs to keep the voltage stable. but i guess those are used when a heavy loads are used ? i just have a NPN transistor connected to an LED and a microcontroller.Is it necessary in this design ?

author: exe
author_rank: Unknown
timestamp: June 19, 2018, 07:26:58 am
content: Quote from: anishkgt on June 18, 2018, 09:04:38 pmI still not sure I fully understand what your circuit does (like, why there is a resistor from V+ to output? why U2 in inverted configuration? Is R6 for hysteresis?), but no, U2 doesn't add any value _in this case_ as it has same driving capabilities as U1. I'm pretty confident just one opamp is enough.

author: anishkgt
author_rank: Frequent Contributor
timestamp: June 19, 2018, 09:33:03 am
content: Here is the final schematic that i think would work. The load here is a MOT. The contact sense part was what i was designing.The idea is to avoid manually triggering the SCR via switch. Here the voltage drop at the primary of the MOT is sensed by the comparator and send to the microcontroller which switches ON the SCRs. The Spot welding can be done by just shorting the secondary.

author: exe
author_rank: Unknown
timestamp: June 19, 2018, 11:51:55 am
content: Sorry, can't follow the schematic. It's not drawn a conventional way. Like, inverted T3 that has GND on top makes it hard to read. Or single +5V port used for all the connections. R23/R23 divider drawn in a very strange way making it hard to see it's just a divider. The picture is also too small so some symbols not readable.

author: anishkgt
author_rank: Frequent Contributor
timestamp: June 19, 2018, 12:27:12 pm
content: Hopefully this should be better.

author: anishkgt
author_rank: Frequent Contributor
timestamp: June 28, 2018, 10:43:38 pm
content: Well, things are never as it seem on a computer simulated environment than in real life.I just got the boards made, soldered them and they don't seem to be working as i thought it would. I checked to see the ac voltage it is 33vac and at pin 4 (Non-inverting pin) the voltage does not change when there is a voltage drop at the ac line. The voltage drops to 28vac.Would it be because of the the filters cap and the diode ?

author: anishkgt
author_rank: Frequent Contributor
timestamp: June 28, 2018, 11:30:37 pm
content: Quote from: pelule on June 18, 2018, 04:44:56 pmThat was something I had done but I am not sure if I have the wiring correct. I have the return from the ac voltage divider back to the neutral. Should it be back to GND ?When I reduce the voltage at the ac I can see a drop in voltage the cap but that voltage cannot be fed in the opamp as it is quite high, 38v. Should I drop the values on the resistors of the voltage divider at the ac side ? I have a 5K trim pot.Www.Georgehobby.wordpress.comEquipments: DSO104z, Hakko FX888D, Brymen BM869s

author: exe
author_rank: Unknown
timestamp: June 29, 2018, 06:26:28 am
content: Quote from: anishkgt on June 28, 2018, 10:43:38 pmHod did you measure the voltage? Before diode it is AC and normally measured with RMS voltage. After diode it is half-wave and I wouldn't measure it as as AC. Rather, I'd looked at peak value.Concerning the circuit, I don't understand the whole upper block. Doesn't look right to me. Like, why it uses thyristor and not triac. Or why fuse on live_out and not on live, etc. Why using C3? I think it shouldn't be there, as it rectifies voltage, that's not what you want for peak detector.But even if it was needed, it should have been placed after resistor divider. This way it can be much smaller, smaller voltage rating, and less current through diode.

author: anishkgt
author_rank: Frequent Contributor
timestamp: June 29, 2018, 09:16:13 am
content: QuoteThe RMS voltage was what is measured at 33vac. Earlier i did not measure the peak it was from a DMM. But now checked it with a scope and it reads about 76vac max.Talking about the upper block, It is quite common to use Thyristors in an industrial environment as they handle more current in a back-to-back configuration. A triac would also work but i decided to go ahead with thyristors. There are two fuse to the whole circuit one at the input and the second at the output (LIVE_OUT). The C3 was used to get a DC voltage for the comparator to compare against the reference voltage of 2.6v. Secondly, at the put, there is 240v as well. The reason being the once the opamp output goes high the microcontroller would switch on the thyristors for welding.Attached two screen shots from scope. Transformer_OUT is the voltage from the spot welder transformer. Since i did not have way of isolating the mains voltage to use a scope. Second, After_DIODE is the voltage (referenced to GND) after the diode into the cap C3.The voltage 33vac is applied via a microcontroller with a phase shift after the zero cross is detected, a common way to control power on ac. as explained herehttp://www.bristolwatch.com/arduino/arduino_power_control.htm

author: exe
author_rank: Unknown
timestamp: June 29, 2018, 10:12:16 am
content: Ah, now I noticed the second SCR. They are drown a little bit apart, so didn't notice at first glance, sorry.Did you fix the lower circuit? E.g., removed the capacitor? Without fixing it first taking waveforms doesn't make much sense. I'd also removed upper circuit until the lower part proven to be working.Labels are also sort of confusing to me. There is live and neutral on the schematic (making me thinking this is important), but it doesn't really matter. I'd just call it AC1 and AC2 or something.I know you think I'm nit-picking, but what I suggest really helps reading the circuit for a random reader.

author: anishkgt
author_rank: Frequent Contributor
timestamp: June 29, 2018, 11:05:09 am
content: Thank you for the time. I've removed C3 and attached the wave form.I can't remove the upper circuit which is where the voltage is coming through as they are driven from microcontroller. I'don't have a bench power supply or a wave form generator.The LIVE and Neutral are actually how the wiring goes. The neutral the one connected the one of the primary of the transformer and the LIVE goes through the thyristors which is why it is LIVE_OUT. Basically and switch in series with the transformer.Do let me know if there is anything more i would need to help you understand better.

author: Zero999
author_rank: Super Contributor
timestamp: June 29, 2018, 12:24:12 pm
content: What's the purpose of the project?If you want to control a load, with zero crossing, then an opto-coupler can be used with built-in zero crossing, such as the MOC3041.If it's an undervoltage protection circuit, then use a low pass filter, before the comparator circuit, to get the average voltage of the rectified waveform.

author: exe
author_rank: Unknown
timestamp: June 29, 2018, 12:51:42 pm
content: To me the resistor divider and diode work: I see truncated sine wave. Not sure where 4V offset comes from. But!Do you have opamp's ground connected to neutral? They must be connected for this to work. **But this also makes this circuit unsafe.**

author: Zero999
author_rank: Super Contributor
timestamp: June 29, 2018, 01:04:27 pm
content: Quote from: exe on June 29, 2018, 12:51:42 pmWhy? I think you've forgotten this circuit is ELV.

author: anishkgt
author_rank: Frequent Contributor
timestamp: June 29, 2018, 08:33:16 pm
content: QuoteThis is part of a spot welder using a MOT. This part of the design is used to avoid using a pedal to trigger the MOT for a weld. The difference in voltage is seen when the secondary are shorted. hence using that as a way to detect when the electrodes touch the nikel plates for a weld.The idea of a optocoupler with built-in zero crossing is good. But in a inductive load it should not start at zero but has to be at the peak of ta sine wave as to overcome the inrush current from the core of the transformer. Supporting notes (http://www.te.com/commerce/DocumentDelivery/DDEController?Action=srchrtrv&DocNm=13C3206_AppNote&DocType=CS&DocLang=EN) and (https://www.st.com/content/ccc/resource/technical/document/application_note/2f/f7/75/f5/9d/3d/44/04/CD00003867.pdf/files/CD00003867.pdf/jcr:content/translations/en.CD00003867.pdf)This is not a protection circuit but yes it does require a low pass filter but i was concentrating on this and latter add it.Quote from: exe on June 29, 2018, 12:51:42 pmI was thinking of connecting the Neutral to the common GND as the opamp does. Should i do that ?I've attached the schematic as well with some changes. My PCB is made as per this.

author: anishkgt
author_rank: Frequent Contributor
timestamp: June 30, 2018, 09:26:03 am
content: QuoteNope that did not work either. no voltage at all.

author: C
author_rank: Super Contributor
timestamp: June 30, 2018, 12:07:53 pm
content: anishkgtThere are two ways to do what you want.You can sense the voltage between the spot welding contacts.You can sense the current when the spot welding contacts are shorted.So think of it this way, When you short the spot welding contacts it turns on a light, The light turning on causes trigger to fire your high current source.As Hero999 stated you can use a opto-coupler in place of the above light and get isolation from your micro-controller,So you have an opto-coupler led in series between one connection from transformer and a spot welding contact.Your high current output switch(SCR's) is connected in parallel to this.When on the SCR's will cause1. opto-coupler above to go out, the scr's are placing a short across the opto-coupler input.2. Enable the high current path to the spot welding contact.Now the input led of opto-coupler does not turn on at 0 Volts but requires some voltage & current. Here you will need a series resistor to protect the LED from full voltage of transformer. By using a combination of voltage divider and series resistor you can make the turn-on of led higher.To say the above a different wayYou are using a opto-coupler to detect the state of the SCR's when your spot welding contacts are shorted.You havespot welding contacts open, opto-coupler output off, SCR's offspot welding contacts shorted, opto-coupler output on, SCR's offspot welding contacts shorted, opto-coupler output off, SCR's onC

author: anishkgt
author_rank: Frequent Contributor
timestamp: June 30, 2018, 02:25:40 pm
content: Can you please share a rough diagram. I feel you have a valid point but i am unable to follow it completely.

author: C
author_rank: Super Contributor
timestamp: June 30, 2018, 03:02:55 pm
content: In the PDF of yours you haveA circuit containing a VOM160NT controlling two SCR'sBelow that you have a box labeled Contact Sense.Delete this box and replace with spot welding contacts.If you were to connect a lamp to "Live" & "Line_Out" the lamp would light when you short the spot welding contacts.When you trigger the VOM160NT, the lamp would go out and you would do a spot weld.The lamp is just an AC Voltage sensor.It can be replaced with an opto-coupler led & a series resistor.If the opto-coupler is only one LED then you need to add an external diode in parallel but reversed across LED to work with AC.You can find the circuit in data sheet for opto-coupler.Just guessing, but think circuit connected to VOM160NT pins 1 & 2 is wrong.C

author: anishkgt
author_rank: Frequent Contributor
timestamp: June 30, 2018, 03:16:44 pm
content: Quoteits labeled "LIVE" and "LIVE_OUT" basically they are live line and this part of the circuit is in series. That is, one terminal at the primary of the transformer is connected to the LIVE_OUT and the other terminal is connected to neutral. The mains live goes into "LIVE".hence connecting a lamp at "LIVE" and "LIVE_OUT" would not work but connecting at "LIVE_OUT" and neutral would glow.QuoteThe pulse from MUC is TRDRIVER and not PULSE. They work as expected.The way you suggested, are they at the mains side or the secondary ?

author: anishkgt
author_rank: Frequent Contributor
timestamp: June 30, 2018, 03:38:09 pm
content: Was this something you had in mind ?

author: C
author_rank: Super Contributor
timestamp: June 30, 2018, 04:56:40 pm
content: Your something like this drawingneeds a series resistor for LED.You select resistor value to prevent over current of LED at peak AC voltage.This is a AC voltage sensor.With out the series resistor you would have a AC current sensor for very low current. But you need to remember that the forward voltage drop of an LED is much greater then a Power Diode and would not handle the spot welding current.What I described was secondary side control with SCR's connected to secondary. These let the led current of the AC Voltage sensor supply the contact sense current.Now lets look atQuoteTo sense contact closure you need to sense voltage or current.Simple would be to use your transformer to supply the sense current, and you do not need much current for this.If you connect your meter(#1) to "LIVE" and "LIVE_OUT" you would be measuring the state of your SCR's.Today's meters are very high input resistance so very little current will flow through the meter. If the measure the secondary voltage with a second meter you would measure close to 0 Volts AC.Start with a high value resistance between "LIVE" and "LIVE_OUT".As you decrease the resistanceMeter #1 will start decreasing.Meter #2 will start increasing.This is creating a sense current for contact sense.Now if you short out the secondary of a transformer, The primary will change to supply more current. The effect is that the primary of transformer will act more like a short.Here the primary current is limited by that resistor connected between "LIVE" and "LIVE_OUT".This will cause the meter #1 voltage to increase due to increased voltage drop across the resistor & SCR's.Now think the same in a simple way.You have a transformer rated for X volts on the primary. If you connect a lamp rated for X volts in series with one wire of primary of transformer you have a voltage divider.Going from open to short on secondary changes the voltage divider. The lamp gets brighter as it now has more voltage.The lamp is acting just like the above resistor with meter sensing the voltage.So summeryThe resistor between "LIVE" and "LIVE_OUT" is supplying the low current to secondary so you can do secondary contact sensing. The Voltage change across the resistor lets you sense secondary contact change on the primary side.You replace the meter #1 with your AC Voltage sense opto-coupler.You have three things in parallel.1. the SCR Switch2. the resistor3. the AC Voltage sense opto-coupler.You just need to adjust the resistance value such that you get a good contact sense with your spot welding contacts.When you fire the SCR's you have your high current to spot weld.When SCR's are off you have a low current limited lower voltage on the spot welding contacts that is used to sense contact.C

author: anishkgt
author_rank: Frequent Contributor
timestamp: June 30, 2018, 08:10:42 pm
content: i get what you mean, well partially. A schematic would have helped.QuoteThe SCR that you are referring, is it a third one excluding those in the schematic ? How would it be connected ? like it does require a gate voltage to trigger. Would it be like a crowbar between the optocoupler ? The resistor, is it just one resistor or a series of them before the opto-coupler ?

author: exe
author_rank: Unknown
timestamp: June 30, 2018, 08:26:20 pm
content: Quote from: anishkgt on June 30, 2018, 09:26:03 amYes, GND and neutral must be connected. That's because for electric current to flow there must be a return path.Concerning your circuit. If it still doesn't work after all suggestions, then there is a mistake in wiring or something. I suggest start from scratch and add "building blocks" one by one: diode, resistor divider, zener clamp, opamp, and output circuitry. Strictly in this order checking with the oscilloscope the circuit works the way it should. Otherwise troubleshooting may take forever.

author: anishkgt
author_rank: Frequent Contributor
timestamp: June 30, 2018, 08:28:19 pm
content: Thank you for your time.I think i would go with the optocoupler idea and see how that goes.

author: anishkgt
author_rank: Frequent Contributor
timestamp: June 30, 2018, 08:37:29 pm
content: Quote from: anishkgt on June 30, 2018, 08:10:42 pmSomething like this ?

author: anishkgt
author_rank: Frequent Contributor
timestamp: June 30, 2018, 09:47:53 pm
content: if i understand it correctlyNote: Replaced attachment.

author: anishkgt
author_rank: Frequent Contributor
timestamp: June 30, 2018, 09:57:52 pm
content: Scope view at the secondary.

author: C
author_rank: Super Contributor
timestamp: June 30, 2018, 10:05:58 pm
content: hereNice an simple

author: anishkgt
author_rank: Frequent Contributor
timestamp: June 30, 2018, 10:18:44 pm
content: Thank you.That looks like it is driving the AC side of the transformer Which was not my initial question or did i misunderstand it. I was looking at the secondary side of the transformer.Secondly those SCR's would need a gate current in order for them to conduct.

author: C
author_rank: Super Contributor
timestamp: June 30, 2018, 10:32:53 pm
content: The SCR's shown and VOM are your existing ones, use your circuit.Think about what happens to transformer and secondary when you spot weldAll kinds of nasty happens.R2 just reduces the line voltage to transformer to a lower value and restricts current. This gives the secondary side a source for contact sense.Feed back through transformer on contact closure will cause a voltage change on R2you just have to adjust R2 value to your transformer.When you know how voltage across R2 changes you can adjust the voltage sense of opto-coupler voltage sense.

author: C
author_rank: Super Contributor
timestamp: June 30, 2018, 11:52:05 pm
content: As I understand it,You are wanting to replace a foot switch that triggers the spot weld.You are trying toQuoteBut to create a good spot weld you also need to force the Nickel against something, a second Nickel plate or a battery terminal.So in-place of detecting contact, I think you want a force sensor or displacement sensor.The better spot welders have spring loaded contacts, so you could just detect the spring deflection to trigger the spot weld.This would guarantee that you had enough pressure for the spot weld and be much simpler also.

author: anishkgt
author_rank: Frequent Contributor
timestamp: July 01, 2018, 08:15:41 am
content: QuoteThe existing schematic has one of the SCRs inverted but yours has them parallel, was that an error or intentionally drawn. So based on my circuit shouldn't R2 be connected to the anodes of the SCRs as you have drawn it ?i checked the voltage at the LIVE and LIVE_OUT and it reads mains voltage of 240V but i read 33V at the primary of the transformer and zero volts at the secondary. The primary voltage of 33V was intentionally induced for the whole idea for sensing.QuoteSorry did not get what meant here.

author: anishkgt
author_rank: Frequent Contributor
timestamp: July 01, 2018, 08:36:33 am
content: Quote from: C on June 30, 2018, 11:52:05 pmThat is correct, as a replacement for a foot pedal. Initially i did think of such a design but then that would take some time to get the hardware fabricated with a spring loaded electrode and a switch, takes valuable time. Sensing when the electrodes makes a contact is easier and pushing down on the electrodes was ok.For another reason i feel sensing the contact at the secondary would help in the future as well, reason being measuring current passed on to the spot during the weld.Edited: primary replaced with secondary.

author: C
author_rank: Super Contributor
timestamp: July 01, 2018, 04:39:40 pm
content: https://www.eevblog.com/forum/beginners/how-to-set-reference-for-a-sine-wave-with-dc-supply/?action=dlattach;attach=459484In the above you is your AC Switch where you use SCR's, This is my #1. The doted box part is removed.This is the power switch to Spot Weld Power. ( state #3 in below list)You have a microwave oven transformer.guessRated for a Primary voltage of 240VSecondary of 30VAC peak to peak with nothing connected.A large transformer, could be rated for over 1000 Watts.Would be nice to know the transformer primary resistance(impedance) with nothing connected to secondary( transformer's idle current).You want to sense a contact change.This is a resistance change to V= I x R.This requires a power source to supply V & I.A sensor that detects a change in V or I,To sense this you need a second point of change that prevents short circuit current.Now to be clear, here are the states I see for the secondary of transformer.1. OFF no power.2. With Contact sense Power.2a. Open contacts2b. contacts shorted3. With Spot weld Power.3a. Open contacts3b. contacts shorted.Note that a & b are limits of a large resistance change range.You should note that with #3 you have very high currents & No current states. At these current levels just wire will act like an inductor. You could have large voltage changes from inductive kick.So #3b above is a nasty state that wants to destroy things. Here the max current is only limited by transformer. The transformer is not operating as designed.Now think about #3 above Spot weld power to secondary.You have #3a where you have transformer idle current.You have #3b where you nave more current then transformer is rated to handle.There is a huge current change between these two states.In the above list, State #2 needs protection from state #3There are many ways to create power for #2 above.My R2 is part of a AC based Ohm meter with line power source.You have a voltage divider composed of R2 & transformer primary winding. It is using the bidirectional nature of a transformer.Line voltage is the #2 power source with R2 supplying the Current limit.This voltage divider lets you sense a spot weld contact resistance on secondary. The transformer is actually providing some protection to this voltage divider from the nasty secondary side.With R2 being part of voltage divider, it is also setting the spot weld contacts open circuit voltage.so #2a is open circuit secondary voltage R2 creates by supplying power to transformer primary.#2b is short circuit secondary current limited by R2.Now run some values for R2If R2 = idle current of transformer primary you have.1/2 line voltage across R2 & primary.Secondary voltage = 1/2 of when powered by line. If Line gives a 30 volt P-P then secondary is 15 volt P-P when open circuit.The ratio of R2 & primary changes as resistance across spot weld contacts decreases to a point where you have min voltage across primary and max voltage across R2.You are working with ratios.The ratio of R2 resistance and Transformer resistance.#2a is R2 and idle current(secondary open)#2b is R2 and primary resistance with secondary shorted.You have a voltage sense that detects change from open to desired contact resistance.InYou have a AC voltage sense circuit composed of R1 & SFH6206 parts.This will detect very low levels of AC. The R1 resistor is protecting the SFH6206 from over current, but also setting the turn-on voltage of SFH6206. Increasing value of R1 will increase turn-on voltage.Output of SFH6206 will be in form of pulse as AC input voltage changes above or below the turn-on voltage for each half cycle of line..In addition to adjusting R1, you could connect one input to a line power voltage divider to adjust turn-on. The AC voltage sense would then be between voltage divider and junction of R2 & primary winding.Need to keep in mind that when secondary is shorted, you could have full line voltage across R2 so the wattage rating of R2 needs to handle this.In the past I worked with a circuit that had a power button shorting the secondary of a transformer. The primary of transformer was in series with a relay. The power button would cause the relay to change to energized state. With the power button open, the relay would not energize. This change allowed a Line voltage relay to be used instead of a low voltage relay connected to secondary.

author: anishkgt
author_rank: Frequent Contributor
timestamp: July 01, 2018, 05:38:02 pm
content: Thank you, appreciate the time you took to write this.QuoteInput as in pin 2 ? but what is the poin in connect mains power to the input ? Just to make sure we are in the same page, the schematic is meant to be put in series with the secondary.QuoteWhat about the zener diode D1 does wattage matter ? The max amps the transformer can put out is 800A but will not be driving to that much. The secondary open voltage is 3.2vac. So a 3.6v @500mW zener and 3W resistor as R1 would be ok ? attached updated schematic with a triac

author: C
author_rank: Super Contributor
timestamp: July 01, 2018, 06:56:08 pm
content: Start with thisNow break it downIt takes two connections to measure voltage.It takes opening a connection and putting something is series to measure current.You have a series circuit composed of R1 & DK1. This gives two connections that need voltage & current to function.At some voltage enough current will flow to cause output of DK1 to change. with AC connected you would get two pulses per cycle as long as AC voltage is high enough.Now look at the remaining part.A trac is a device that when triggered starts conducting until current drops below holding current.As connected the trac can only turn off DK1 until 0 current( <holding current).So the result would be just shorter ON time for DK1.The second change caused by trac would be the very low voltage drop across trac between AC1 & AC2.The when the two happen is controlled by trac trigger.Now with NO AC connected to AC1 & AC2 nothing happens.Now look at zener diode D1. One direction it conducts a a low voltage, other direction at rated zener diode D1 voltage.The result is a almost full half cycle with other half cycle starting at higher voltage after 0 cross.Now if AC1 & AC2 is in secondary and in series with spot weld contacts, trac will need to survive the 800A+ amps.QuoteSo you could have 1/2 of secondary voltage across trac in on state.I see a mess===========Now think about your contacts.3.2 volts is not much to work with poor contact.========You need to look at some resistance values.Just the resistance of the wires connecting the transformer to spot weld contacts will limit current.You need some force to reduce the contact resistance between two Nickel strips.======The advantage of circuits in primary is the higher voltages and lower currents.

author: anishkgt
author_rank: Frequent Contributor
timestamp: July 01, 2018, 08:18:23 pm
content: A more refined schematic. The TRIAC is triggered by the same pulse to trigger the SCRs when a weld is initiated but i see a problem with the TRIAC, would it be able to withstand the current passing through. Would it be ideal to have 2 in parallel ? i guess i would have to test it out and see how it goes.And to be honest i still haven't got your circuit completely.

author: C
author_rank: Super Contributor
timestamp: July 01, 2018, 09:13:17 pm
content: -Voltage drop across TRIAC = ____?

author: anishkgt
author_rank: Frequent Contributor
timestamp: July 01, 2018, 09:28:26 pm
content: Haven't found a TRAIC of suitable rating. Getting a feeling that this idea would be close to impossible.

author: C
author_rank: Super Contributor
timestamp: July 01, 2018, 09:39:17 pm
content: Quote from: anishkgt on July 01, 2018, 09:28:26 pmYou are starting to get the picture.3.2 vac is not much to start a high current needed to spot weld.As current increases the connecting wire is actually limiting max current.The lower the starting voltage the cleaner the parts need to be to get the current started.

author: anishkgt
author_rank: Frequent Contributor
timestamp: July 01, 2018, 09:44:20 pm
content: Quote3.2 vac ? what measurement is that ?Quotewhich voltage and to start what current ?

author: C
author_rank: Super Contributor
timestamp: July 01, 2018, 10:43:11 pm
content: Quote from: anishkgt on July 01, 2018, 05:38:02 pmA spot weld is process of producing a lot of local heat.To produce heat you need power. To produce a good spot weld you need a lot of power concentrated in a small area.You need to heat the small area faster then you heat the larger area.

author: anishkgt
author_rank: Frequent Contributor
timestamp: July 01, 2018, 10:56:00 pm
content: That voltage is VPP at the secondary with an RMS of 35vac at the primary. The actual voltage at the secondary is VPP 8VA and RMS 2.6VAC. Can you please explain your circuit on the same pdf as i've attached, i find it hard to follow the previous.QuoteBut why would you consider this voltage as something to start a spot weld. Spot welding has low voltage and High current. Here the voltage is 2.6V RMS.

author: C
author_rank: Super Contributor
timestamp: July 01, 2018, 11:22:35 pm
content: I did not catch that you were driving the transformer with 35 VAC.Using 35 VAC is a great idea during test.To properly design something you need facts.Need to know the power consumed by transformer with nothing connected to secondary_______Using your 35 VAC sourcePut a resistor in series with primary winding.Source voltage = 35 Vac?Resistor Voltage = ____Transformer primary voltage = ____Resistor value = ____You will need to use resistor that handle the power dissipation.With above values, can compute now load power use.I do not want you to harm your 35 VAC source so for the following select a low resistor value that will not harm you 35 VAC if connected across this supply.Use this resistor as above in series with primary.Short the secondary of transformer.Do above measurements again for this state.while I look at last attachment.

author: C
author_rank: Super Contributor
timestamp: July 02, 2018, 12:14:20 am
content: In SWP.pdf you have a box labeled Zero Cross Detect.The source to this box is 9 VacIn the data sheet for this AC opt-coulpler you will find some facts or graphs of the led's voltage & current.You will also find the max safe current for this LED'sPeak voltage 12.72 = 9 Vac x 1.414Resistor voltage = supply peak - LED forward voltage.Resistor value = Resistor voltage / <Peek LED currentNow it is a good idea to stay away from limits and a higher value resistor will allow higher peak voltage from source.Now looking at data sheet again you should find some facts about how the output transistor changes due to current through the LED.From this you can compute what source input voltage will cause output to change.Now there is no real need to use such high currents through the LED. Increasing series resistor value will lower LED current and cause a small change in turn-on voltage.You show an AC input opto-coupler. So from 0 to X volts the output is off and above this voltage output is on.With AC input this results in output being on except a short time around 0 Vac. Two on's per cycle of AC

author: anishkgt
author_rank: Frequent Contributor
timestamp: July 02, 2018, 09:21:07 am
content: They work as of now. Just need some help with the contact sense part of the design. Did you manage to ad your version into it.

author: C
author_rank: Super Contributor
timestamp: July 02, 2018, 01:17:12 pm
content: To select a value for my R2 need facts about the microwave oven transformer.Asked you to do some tests using your 35 Vac supply to get these facts two posts back.

author: Zero999
author_rank: Super Contributor
timestamp: July 02, 2018, 02:30:59 pm
content: Have you considered a current transformer?A precision rectifier circuit and comparator could then be used to monitor the current and it has the added bonus of being able to adjust the threshold, rather it being fixed, as in the case of an opto-coupler.

author: C
author_rank: Super Contributor
timestamp: July 02, 2018, 04:04:00 pm
content: Hero999This chain of posts is about changing from a foot switch to trigger spot weld to a contact sense trigger.Think when it's all done, anishkgt will find that having spot weld contacts spring loaded and sensing pressure/displacement will do a better job.Yes a current transformer could do sensing part, but first need current limited output to get contact sense with out doing spot weld.

author: anishkgt
author_rank: Frequent Contributor
timestamp: July 04, 2018, 05:07:07 am
content: So i just checked the optocoupler with the input voltage from the secondary and they seem to be working. I was thinking of a low pass filter to cut off at 100Hz comprising of a resistor of 15.9k and a ceramic cap 0.1uf.Can i use 5x1k and a 10k resistor all in series or should it be one 15k resistor ? About the TRIAC short pulse of 50ms Max should be ok as long as they are not continuous.Attached schematic with a current sensor and a fuse.

author: C
author_rank: Super Contributor
timestamp: July 04, 2018, 01:45:03 pm
content: If the optocoupler output is an input to a micro controller you can easily handle the pulses in software.In addition with a little better software, you can get a better check as if it is not a series of pulses then something is wrong.Resistors in series is same as total series resistance. With proper layout series resistors will allow higher voltage across the chain.A TRIAC is for AC, Easy to turn on and stays on until less then holding current.Not normal to try to turn off TRIAC.

author: anishkgt
author_rank: Frequent Contributor
timestamp: July 04, 2018, 07:24:23 pm
content: I have two things to decide on, should i go with a TRIAC or an SCR. TRIACs have lower current ratings than SCRs but conduct both ways unlike an SCR which only conduct one way.If i were to go with SCRs i would need two in a back to back configuration.

author: C
author_rank: Super Contributor
timestamp: July 04, 2018, 08:14:28 pm
content: First look at primary side vs secondary side.1 to 1.5 volts drop while on is a small % of line voltage compared to secondary side voltage.In primary side you have smaller currents and less heat generated in Trac or SCRYou also have much less power loss from these.To get a good spot weld, you need to keep all secondary loses low and have a very low resistance path.So keep it simple, on primary side the trac or scr will just need to survive primary side current while secondary is shorted, much less.You stated a microcontroller, when done correctly the analog part can be very simple.First step is better data about your microwave oven transformer.With out this data, you are just guessing on currents. The secondary short current during spot weld could blow the house breaker.The power line is dangerous so use your 35 Vac supply to get some facts.Just need some simple tests with good facts.As I asked a few posts agoA series resistor to primary winding with you measuring some Vac values.Source voltage, Resistor voltage, primary voltage, secondary voltage.Do two sets of measurements for each series resistor. One with secondary open, One with secondary shorted.Start with a resistor with higher resistance as too small could harm your 35 Vac supply.Need to see some change between open & short for all but Source voltage.Source voltage should be close to 35 Vac but will change due to load.Even with this data it will still be some of a guess as to what will happen at 240 Vac.

author: anishkgt
author_rank: Frequent Contributor
timestamp: July 04, 2018, 09:27:11 pm
content: QuoteThe only resistor i have with a decent current rating is 1K 1W, Would that be ok ?Well values are as followsAC voltage: 34vvoltage at Primary: 29.3v@Resistor (1K 1W): 16.8vSecondary open : 0.19vSecondary shorted resistor voltage: 26.3v

author: C
author_rank: Super Contributor
timestamp: July 04, 2018, 09:42:30 pm
content: Should grab the shorted values for others due to load change.

author: anishkgt
author_rank: Frequent Contributor
timestamp: July 04, 2018, 09:48:07 pm
content: QuoteThis is the voltage at the resistor when the secondary was shorted.Voltage at the primary when secondary (with resistor in series)is shorted : 27.4v

author: C
author_rank: Super Contributor
timestamp: July 04, 2018, 10:10:45 pm
content: Think you some wrong values.Source voltage = resistor voltage + primary winding voltage when you have 1K resistor is seriesQuoteThis = 46.1 volts for source voltage.or meter is lag from transformer

author: C
author_rank: Super Contributor
timestamp: July 04, 2018, 10:17:00 pm
content: If your meter gives these values you will need to look at signal with OSope.The inductance of transformer can cause current lag from a pure resistance circuit.

author: anishkgt
author_rank: Frequent Contributor
timestamp: July 04, 2018, 10:23:09 pm
content: I am not sure if it would ok to check the ac voltage with a scope. The 34v does not come from isolated source but comes from the same line as the PCB is powered. The 34v is just a phase shifted voltage.I could check secondary side but not sure how to do it at the primary without blowing the scope.

author: C
author_rank: Super Contributor
timestamp: July 04, 2018, 11:06:11 pm
content: OKmight not be a great idea with scope.Starting over.To sense a contact between the two spot weld contacts you need to create a current flow or voltage change.You stated you are using a microcontroller.I see you have created a Zero-voltage cross circuit.This way is not nice to power lineFpr creating spot weld you turn on TRIAC after zero volt cross but near 0. Due to inductance causing current lag, TRIAC will actually drop below holding current after zero volts.For contact sense you turn on TRIAC a short time before Zero cross. Again off is after Zero cross.This will create a short voltage spike on secondary side and can show with a primary side current sensor. Open will be one low current value. Contact will be higher current value.Just so you know, how hot a spot weld gets is heat vs time or here number of 1/2 cycles of AC in this case.Contact would be too to little heat to do anything but sense contact.The advantage is no series resistor in primary as contact will use current sensor.To keep it simple, really should use ADC to measure Current but this will take better software then just contact & no contact.Creating digital input is not that hard so software could be just a digital input pin.So micro will sense Zero cross of lineWill sense primary current with ADC or digital pinWill control TRAC with driver that does NOT have zero cross switching.

author: anishkgt
author_rank: Frequent Contributor
timestamp: July 08, 2018, 08:32:14 pm
content: I am trying to make sense of what your trying to say but half way through you seem to jumping between ideas and the first part leaves me puzzled.Just to make it clear the 33vac is actually produced by the microcontroller by switching on the SCRs at 9000ms after the zero cross. I could increase the voltage by switching on the SCRs few seconds after the zero cross, like maybe 7000ms or 8000ms. So you say i put a resistor in series with the primary and determine when electrodes short by measuring the voltage difference ? well what happens when at full voltage ? I may have misunderstood but without a clearer schematic am just guessing.Mean time I've been thinking at the secondary side. The TRIAC here is the BTA440Z-800BT (http://www.ween-semi.com/documents/BTA440Z-800BT.pdf) The non-repetitive peak on-state current (I-tsm) at 20ms is 400A. So based on that comment in the datasheet i guess this should work but not sure about the heat dissipated and how long the TRIAC would hold up.

author: anishkgt
author_rank: Frequent Contributor
timestamp: July 09, 2018, 08:44:04 am
content: Quote from: C on June 30, 2018, 10:05:58 pmIn your schematic, as i understand it, the resistor in series with the opto-coupler should be high enough drop the voltage to zero when the secondary are shorted and low enough such there is some voltage for the LED in the opto-coupler to work, am i correct ?

author: anishkgt
author_rank: Frequent Contributor
timestamp: July 09, 2018, 08:14:08 pm
content: seems to be simple but just not sure if D8 should be a zener or just a generic Diode ?