9
Simulation , Design , Implementation and Control of a Welding Process Using Micro - controller T.C. Manjunath , S. Janardhanan and N.S. Kubal Research Scholars, IDP in Systems and Control Engineering, Syscon Lab, 114 B, ACRE Building, Indian Institute of Technology Bombay, Powai, Mumbai-400076, Maharashtra, India. Telephone : +91 22 25780263. Emails : [email protected] ; [email protected] ; [email protected] Abstract This paper presents the design, fabrication of a micro- controller based resistance welding system which is used for performing a welding process. The paper is divided into 4 sections. First, a brief introduction to the what is welding, methods of welding control such as resistance and spot welding is given. Secondly, the critical factors in the design of a welding process is dealt along with the principle of the welding process. Following this, the introduction to the design of the control scheme employed by us with the basic block diagram of the welding system and the functioning is presented. Thirdly, the design and development of the control software algorithm is dealt with. Finally, the conclusions is drawn along with its working and future improvements. Keywords : Resistance welding, Micro-controller, Firing angle, Constant current control. 1 Introduction Welding in the simplest terms is the process of fusing or joining two or more metal pieces with the application of heat and pressure. Resistance welding uses the concept of heat generated due to the current flowing through a resistance. The heat energy generated is large enough to weld two work-pieces together. Automated resistance welding machines use micro-controller based control systems to regulate and ensure consistent welds. The design hopes to achieve complete automation of the resistance welding process. This is done by accepting various process inputs from the user and after due process, controlling various parameters like the current, conduction angle, weld count, etc.,. This is achieved by using a micro-controller, which will acquire data from the user and process it to generate suitable control signals as and when required during the welding process. The use of a µC makes the operation extremely fast, reliable and flexible. In the design, the most important parameter to be monitored and controlled is the primary welding current. For this constant current control method, an adaptive algorithm takes care of the past and present values, to predict the firing angles of thyristors in the next cycle, to ensure the preset value of the current is maintained. Also, various other parameters like the weld count, job count, conduction angle, etc., need to be monitored. This is done by using a micro-controller which will take care of all the processes parameters with minimum of supervision. 2 Resistance Welding It is a general term used to describe a group of welding processes, which depend on the passage of high electric current for the generation of heat. Resistance welding is defined as any welding processes in which, at some stage, force is applied to surfaces in contact and in which the heat for welding is produced by the passage of an electric current through the electrical resistance at, or adjacent to these surfaces. The amount of heat produced is determined by the relationship between the electrical resistance and the current being passed and the time for which the current is allowed to flow. The heat produced is proportional to the square of the current multiplied by the resistance multiplied by the time duration. The resistance values are commonly very low and the time cycles are usually required to be very short. This results in the need for exceptionally high welding currents upto about 20 KA. Equipments capable of delivering such high currents for closely controlled brief intervals of time is naturally expensive and the resistance welding processes are therefore suitable only for mass production applications where the expense is justified.

Resistance Welding and Thyristor Contol

Embed Size (px)

Citation preview

Page 1: Resistance Welding and Thyristor Contol

Simulation , Design , Implementation and Control of aWelding Process Using Micro - controller�

T.C. Manjunath , S. Janardhanan and N.S. KubalResearch Scholars, IDP in Systems and Control Engineering, Syscon Lab, 114 B,ACRE Building, Indian Institute of Technology Bombay, Powai, Mumbai-400076,

Maharashtra, India.Telephone : +91 22 25780263.

Emails : [email protected] ; [email protected] ; [email protected]

Abstract

This paper presents the design, fabrication of a micro-controller based resistance welding system which isused for performing a welding process. The paper isdivided into 4 sections. First, a brief introduction tothe what is welding, methods of welding control suchas resistance and spot welding is given. Secondly, thecritical factors in the design of a welding process isdealt along with the principle of the welding process.Following this, the introduction to the design of thecontrol scheme employed by us with the basic blockdiagram of the welding system and the functioningis presented. Thirdly, the design and development ofthe control software algorithm is dealt with. Finally,the conclusions is drawn along with its working andfuture improvements.

Keywords : Resistance welding, Micro-controller, Firingangle, Constant current control.

1 Introduction

Welding in the simplest terms is the process offusing or joining two or more metal pieces with theapplication of heat and pressure. Resistance weldinguses the concept of heat generated due to the currentflowing through a resistance. The heat energygenerated is large enough to weld two work-piecestogether. Automated resistance welding machines usemicro-controller based control systems to regulate andensure consistent welds. The design hopes to achievecomplete automation of the resistance weldingprocess. This is done by accepting various processinputs from the user and after due process,controlling various parameters like the current,conduction angle, weld count, etc.,.

This is achieved by using a micro-controller, whichwill acquire data from the user and process it togenerate suitable control signals as and when required

during the welding process. The use of a µC makesthe operation extremely fast, reliable and flexible. Inthe design, the most important parameter to bemonitored and controlled is the primary weldingcurrent. For this constant current control method, anadaptive algorithm takes care of the past and presentvalues, to predict the firing angles of thyristors inthe next cycle, to ensure the preset value of thecurrent is maintained. Also, various other parameterslike the weld count, job count, conduction angle,etc., need to be monitored. This is done by using amicro-controller which will take care of all theprocesses parameters with minimum of supervision.

2 Resistance Welding

It is a general term used to describe a group ofwelding processes, which depend on the passage ofhigh electric current for the generation of heat.Resistance welding is defined as any weldingprocesses in which, at some stage, force is appliedto surfaces in contact and in which the heat forwelding is produced by the passage of an electriccurrent through the electrical resistance at, oradjacent to these surfaces.

The amount of heat produced is determined by therelationship between the electrical resistance and thecurrent being passed and the time for which thecurrent is allowed to flow. The heat produced isproportional to the square of the current multipliedby the resistance multiplied by the time duration.The resistance values are commonly very low andthe time cycles are usually required to be very short.This results in the need for exceptionally highwelding currents upto about 20 KA. Equipmentscapable of delivering such high currents for closelycontrolled brief intervals of time is naturallyexpensive and the resistance welding processes aretherefore suitable only for mass productionapplications where the expense is justified.

Page 2: Resistance Welding and Thyristor Contol

The main advantages of resistance welding are it issuitable for mass production, accurate control, noneed for filler metal, fluxes, ability to join dissimilarmetals and negligible metal loss. Some of the typesof resistance welding are spot welding, gun welding,shot welding, flash welding and seam welding andprojection welding. All of these operations arefundamentally the same but the preparation of metaland the construction of the machines may bedifferent.��

3 Spot Welding

Spot welding is the most common form of resistancewelding and is defined as a process in which a weldis produced at a spot in a work piece between theelectrodes, the weld being of approximately the sameareas as the electrode tips, or as the smaller tipwhere they differ in size. Force is applied to thespot, usually through the electrodes and continuouslythroughout the process. The term ‘spot’ is anobvious one from the shape and appearance of theweld. The process is almost always applied to thelap joints. The basic assembly is shown in the Fig. 1below.

WeldingPowerSupply

Weldingcurrent Pressure

Electrode

Work-piece

Nugget

Figure 1 : Spot welding assembly

The joint to be welded is placed between the towelectrodes and the pressure is applied to ensure goodcontact. The electrodes are made of copper of highconductivity copper or lead and this ensures that aminimum amount of heat is produced where theymake contact with the work piece. Heating of theweld area begins where the parts to be joined toucheach other and is largely due to the contactresistance.

Any heat, which is generated near the electrodes,tends to be conducted away by the mass of theelectrodes. The generation of the heat at the centralinterface continues until a slug of metal is in themolten condition and the current flow is terminated.This molten metal then cools and solidifies whilststill under the forging pressures of the electrodes.Success in spot welding depends on the correctbalance between current, time and pressure and thatthese must suit the characteristics of the materialsbeing welded.

4 Critical factors in welding

Understanding the resistance weld process requires anunderstanding of the main factors involved and how

they work together. The critical factors involved inwelding are the current, voltages, power, resistance andthe transformer specifications, transmitting force,current density, throat dimensions and the electrodes.

The current is usually measured in KA. A resistanceweld cannot be made unless there is a sufficientweld current.If current is the amount of electricity flowing, thenvoltage is the pressure or force that’s causing theflow.

Power is voltage measured by current and is in wattsor KVA. This means the amount of current flowingtimes the pressure that’s causing it to flow equalsthe amount of power generated.

Resistance is the opposition to flow of current. SinceR to I is what generates the heat in the work piece,it is critically important that the area with thegreatest resistance be at the interface between t he twoparts being joined. The heat is where the resistanceis, and the resistance is where the heat will be.

The transformer used is of high rating as is shouldbe capable of supplying that much weld current.

The amount of force needed to make a good weldvaries, depending on t he type of metal being weldedand other factors, but a general figure would beabout 600 to 800 lbs.Current density describes how much current is beingdelivered to a specific area. It describes theconcentration of the current in a small area of thework piece, viz., namely the area where the weld is.Throat dimensions is an important factor for currentdetermination.

Electrodes play a very important role in t hesuccessful operation of a spot welding machine. Theymust conduct the welding current to the workwithout overheating. They must at the same timeconduct heat away from the surface of the sheetbeing welded and they must apply pressure to thework without deforming.

5 Principle of resistance welding

Ohm’s law states that,

Voltage = Current × ResistanceV = I R (1)

Joules law states that,Heat = V * I * time for which the current flows

Heat = V I t = I 2 R t. (2)

Basically, it states that the heat energy required forwelding depends on the square of the weldingcurrent flowing between the two electrodes and onthe resistance offered to this current between the twoelectrodes. The resistance taken into account includesthe resistance of the welding electrodes and theresistance of the jobs that are being welded together.

Page 3: Resistance Welding and Thyristor Contol

6 Control variables in thewelding process

The welding process variables include the weldcurrent, squeeze time, weld time, hold time, electrodeforce, design of the electrode and the work piecematerial and is shown below in the Fig. 2.

The weld cycle : A typical resistance weld isbroken down into several distinct periods, as shownin the Fig. 2 below.

Slope 1 slope 2

Squeeze Weld 1 cool 1 weld 2 cool 2 weld 3 hold off

Figure 2 : The weld cycle of a welding process

The squeeze time is when the weld heads (electrodes)come together and build up to a specified amount offorce before the current is fired.

The weld time is when the current is actuallypassing through the work pieces. This is when themetals are being heated enough to melt and fusetogether to form what is called a weld nugget.

During the hold time, the electrode force is stillapplied, even after the weld current has ceased.During this period, the weld nugget cools and themetals are forged under the force of the electrodes.The continuing electrode force helps keep the weldintact until it solidifies, cools and the weld nuggetreaches its maximum strength.

The period of time from the release of theelectrodes from the work after cooling to the start ofthe next weld cycle is known as the off time of themachine.

7 Methods of welding control

Two methods of welding control has been used : viz.,Phase angle control and the integral cycle control –on / off control.

7.1 Phase angle control

The principle of phase shifting is used for varyingthe welding current. This is done where, for instance,slow cooling of the welds is required for themetallurgical reasons. A complete sequence ofcurrents may be automatically controlled to affect thewelding and heat treatment of welds. In specialalloys, where control of thermal cycles is essential toproduce satisfactory welds.

30°

α = 30°

α = 90°

α = 90°

Figure 3 : Firing angle instant

7.2 Integral cycle controlIt works on the principle of on / off control. Whenthe controller is in the ON mode, a number ofcurrent cycles are sent which are controlled. Thenumber of current cycles passed determines theamount of current that flows through the electrodes.This is the time when the welding takes place. Whenthe controller is OFF, no current passes through theelectrodes as shown in Fig. 4.

TON TONTOFF

Figure 4 : On-Off duty cycle

This is of course more to the operation of resistancewelding machines than the control of the electriccurrent. Mechanical handling, positioning, andclamping of the work piece and the application ofthe electrical pressure are usually accomplished bythe pneumatic circuits supplied with the compressedair. It is also common for the air pressure to actuatethe timer once it is exceeded a value which ensuresadequate contact pressure between the electrodes.

8 Designed and implementedcontrol scheme employed

We know that the power delivered to a resistiveload is given by the formula

P = V I, (3)where V is the voltage applied to the load and I isthe current delivered to the load. We know that in atransformer,

power in primary = power is secondary,V1 I1 = V2 I2, (4)

as V1 is the applied ac voltage and I1 is calculatedfrom the formula,

I1 =1T ��

α

πI2m sin2 ωt dt . (5)

The power delivered to the load isP = V1 I1 (6)

Page 4: Resistance Welding and Thyristor Contol

I

t0 α1 π α2 2π α3 3π

Figure 5 : Explanation of the firing anglemeasurement

From this equation, we can see that the currentavailable in the primary depends on the firing angleα. As α increases from 0 to 180°, the currentavailable at the load decreases and hence the powerdelivered to the load also decreases. Hence, bycontrolling the firing angle α, we can control thecurrent and power required for the welding process.In the designed control scheme employed by us, theconstant current control method is used which isexplained as follows.

Consider a full wave rectified current signal asshown in Fig. 5. Let a complete half cyclecorrespond to Irms of 50 KA. Now, for a weldingcurrent of 20 KA, the firing angle α1 can becalculated from the above equation to be around125°. i.e., for I1 = 20 KA, α1 = 125°. But, due to aninherent error present the actual firing angle may b e127°. This causes a difference of 1 KA in thecurrent. This has to be compensated for in the nextcycle.

Hence, the firing angle is recalculated to compensatefor the shift in the desired value as 122.2°. If wenow even consider the inherent phase angle differenceof 2°, the new firing angle will therefore become120.2°. Hence, in the next half cycle, the thyristorswill be triggered at the new firing angle. Theprocess is repeated so as to keep the current at thedesired value for the entire welding cycle process.

9 Block diagram

The overall working of the designed system which isshown in the block-diagram in Fig. 6 can beexplained as follows :

The user inputs the welding current, no. of cyclesrequired for squeeze, weld and hold cycles and thejob count. The micro-controller reads this data andcalculates the approximate firing angle required toobtain the desired welding current. A control voltagecorresponding to this firing angle is applied to theTCA785 phase control IC through a DAC. Thephase control IC is used to trigger the high poweranti-parallel thyristors in the main weldingtransformer.

This IC recognizes the zero crossing of the ac linevoltage through a stepped down transformer and thiszero crossing is indicated to the micro-controller

through a port line. The micro-controller synchronizesthe firing of the thyristors with the zero crossing inevery half cycle. The firing of the thyristors takesplace for the number of cycles that the user has theinput. During this time, the micro-controller receivesfeedback about the actual welding current that isbeing made available through an ADC. Appropriateaction is taken to ensure that the actual weldingcurrent is very close to the desired welding current.

Once a particular job has been welded, the micro-controller has to display the relevant information,which is required by the user. This includes theactual welding current and the number of jobscompleted. If during the welding process, errorsoccurs, provision is made to indicate the occurrenceof the error. A 12 V power supply for the phasecontrol IC and DAC, a 15V supply for the DAC anda 5V power supply for the rest of the circuit isdesigned and incorporated in the overall systemdesign.

The design also includes provisions to store an entireschedule for later use. This helps in avoidingmistakes from occurring and eliminates the need toreenter all the datas.

The block diagram of the designed controller systemhas the following major units :

Pulseamplification

Pulse Generation& ZC Detector

ControlPowersource

DisplayDriver

DisplayModule

Inputswitches

Input -Output Unit

Micro-controller

Memory

A to DConversion

Toroidalcoil

Weldingtransformer

Workpiece

ThyristorsWeldingPower

230 V / 50 Hz

ACmains230 V

/ 50 HzControl PowerTransformer

Fig. 6 Block diagram of the entire designedresistance welding control system

9.1 Control Power Source

A separate power circuit is also required to providepower to all the circuits of the controller. The powersupply requirements of various circuits are +5V,+12V, –12V. The control power source provides thesedifferent power supplies from the same circuit thussaving the use of different power supplies.

9.2 Thyristors triggering unit

This unit triggers the thyristors at adjustable firingangles so as to control the amount of current flowingthrough the primary and hence the secondary of thewelding transformer. This unit provides the basicfeedback actuation in the controller circuit. The twoanti-parallel thyristors are fired at calculated firing

Page 5: Resistance Welding and Thyristor Contol

angles thus controlling the current flow of thewelding current.

It takes in the control voltage and gives outputpulses, which controls the conduction angle of thethyristors. The reference is obtained from the zerocrossing of the AC mains and the output of thisblock is given to a pulse amplifier circuit, whichgives the firing pulses to the thyristors. So, anydiscrepancies in the current value can be brought tothe required value by the proper processing at themicro-controller unit and the proper firingmechanism.

9.3 Micro-Controller Unit [MCU] and its functionsThe MCU is the most critical part of the system.The entire process of welding has to be monitoredand collected by the controller. The micro-controllerinterfaces with several other circuits to effectivelycontrol and vary the numerous parameters that arevital to the successful functioning of the system. Allthe incoming data, which mainly consists of analogsignals, is digitized and then processed by the micro-controller. The micro-controller also controls thedisplay panel, which is an interface between theoperator and the machine.

The MCU controls the various parts of the system.Some of them are :

• The thyristors triggering circuit, which controlsthe firing of the contactors detects the sourcevoltage and its phase

• The display panel that indicates the present stateof operation and the other information. It alsoaccepts parameters from the user, which are readand processed by the micro-controller.

Another vital function of the micro-controller is tomonitor the primary and the secondary currents. Sincethe primary and the secondary currents a re in theorder of several KA, ct coils or the toroidal coils a reused to step d own the current to a measurable level.The output of these coils is usually an industrystandard of 1A or 5A. This is passed through signalconditioning and current to voltage converter circuitsthat provide a signal that can be digitized.

For digitizing the signals, a ADC is employed. Itconverts the signal to digital inputs that the micro-controller can process. These digital inputs are thencompared and processed, taking into account theparameters entered by the operator and anappropriate action is taken.

For ex., if the constant current mode is selected, andthe measured current is slightly above the set value,then the firing angle of the thyristors of thecontactors is adjusted so that the average currentover the entire cycle is equal to the set value. Thisapproximation is done at every half cycle intervalthus, making the controlling mechanism veryaccurate.

The components of the designed micro-controllerbased welding controller consists of the 89C52micro-controller, the input-output ports like the8255’s, analog signal interface, the DAC0808 and theADC 0809.

The micro-controller selected for this weldingapplication is the Atmel AT89C52, which is a low-power, high-performance CMOS 8-bit micro-computerwith 8K bytes of flash programmable and erasableread only memory. The MCU interacts with all theunits of the controller using an Harris 8255A PPI,which provides a 8-bit bi-directional i-o ports, whichare used to communicate with devices such asDAC’s and ADC’s.

Input-Output ports : The MCU interacts with allthe units of the controller. This demands asignificant amount of input / output ports from themicro-controller. Since the number of available i/oports on the micro-controller is limited, it is requiredto interface an external i/o peripheral device toexpand the i/o capability of the MCU. This isachieved by interfacing the 8255 ProgrammablePeripheral Interface PPI to t he micro-controller.

The 8255 provides three 8-bit bi-directional ports,which are used to communicate with the devicessuch as the DAC and the ADC, as well as theexternal switches of the user interface. The 8255 isinterfaced in the memory –mapped fashion for easyaccess of other peripherals. The peripherals isselected using the address lines provided in the8255.

Analog signal interface : As mentioned previously,the µC controls the SCR triggering unit as well asmonitors the welding current. Such signals are analogin nature that the µC is required to handle. Sincethe µC cannot directly manipulate analog signals,digitization of these signals is necessary. This isachieved by using D/A and A/D converters.

DAC : The µC controls the thyristors triggering unitby generating a control voltage that controls thefiring angle of the thyristors. Depending on the valueof the welding current entered by the user, the µCgenerates digital data corresponding to the requiredvalue of the control voltage and feeds it to theDAC. The DAC performs the conversion andprovides the analog voltage to the triggering unit.The DAC IC that is selected for this application isthe DAC0808.

ADC : The µC monitors the welding current bymeasuring a DC analog voltage that is downscaled tobe made compatible with the inputs of the µC unit.This analog signal needs to be converted into adigital value to be manipulated by the µC. An A/D

Page 6: Resistance Welding and Thyristor Contol

converter is employed for this purpose. The ADC ICthat is selected for this application is the ADC0809.

9.4 User interface

This consists of the front panel, which can bebroadly classified into two sections.

9.4.1 User InputsThis section consists of all the user-enteredparameters like

Current : This is welding current required in thesecondary of the welding transformer for the actualwelding process. It can range from 5 to 50 KA.

Cycles : This is the number of complete weld cyclesrequired for each of the welding processes likesqueeze time, weld time, cool time and the holdtime. They can be set anywhere between 0 to 99cycles.

Job counts : This is the total number of jobs thathave to be welded.

Schedule Number : If a set of welding parametershave already been saved in the memory of the µCand those are the parameters required for welding,then provision is there for the user to reload thoseparameters required for welding, then provision isthere for the user to reload those parameters andthen continue welding.

Start : On pressing this key, the µC will accept allthe inputs that have been entered by the user.

Weld : Until this key is pressed, the welding willnot start. This is like a safety switch, which preventsaccidental welding and possible injuries to theoperator.

Reset : During the welding process, if any troubleoccurs then by pressing this key the entire weldoperation can be stopped immediately. Also, if anerror occurs, this key has to be pressed before theentire welding process can be restarted.

9.4.2 Status Display

This section is used to indicate all the parameters,which have been monitored and / or measured duringthe welding process like

Current : This indicates the actual current that wasused for welding. It is the average value of currentover all the welding period cycles.

Job count : This indicates the number of jobsperformed. This display is incremented and displayedafter every job is completed and not only at the endof the entire welding process.

Cycle indicator : This indicates the current weldsequence cycle (squeeze, weld, cool, hold)

Error Indication : If during the welding process anerror occurs, then the error code is displayed so thatthe user can take corrective action.

The communication of various parameters of thewelding process and display of the status to t he useris achieved by employing Common Anode 7-segmentLED’s. There are 12 such 7-segment LED’s. Drivingthe LED modules individually is not advisable dueto the complications involved in designing thehardware. Hence, they are multiplexed.

This also reduces the current requirements and thusthe power consumption. Of the 12 LED’s, 8 aredriven by a single 8-Digit Display DriverICM7218C. The remaining 4 are used for job countdisplay and hence driven by a 4-digit display driver /programmable counter ICM7217. Both the IC’sinternally multiplex and generate corresponding digitdrive signals. This ICM7218 is a LED driver whichis used to interface with the µC.

9.5 Circuit Diagrams and ExplanationsThe thyristors triggering circuit using the TCA 785 –Phase Control IC TCA 785 is a phase control ICmanufactured by SEIMENS. It is used to control thefiring angle of the high power thyristors and triacs.The trigger pulses can be shifted within a phaseangle between 0 and 180°.

The firing pulses obtained have to be amplifiedbefore they can be used to trigger the high powerthyristors. In the present work, the TCA785 as aphase control IC to trigger anti-parallel thyristorscombination, once in each half cycle.

Micro-controller designIt is designed using the following IC chips, viz.,AT89C52 – the µC, 28C64 – High speed CMOSEEPROM, 8255 – PPI, 74LS373 – 3 state octal D Typetransparent latches, 74LS138 – Decoder / multiplexer.The micro-controller AT89C52 resides at the heart ofthe system. It is interfaced with external memory28C64 and 8255.

8255 PPI – DAC0808 InterfaceIt is designed using the following IC chips, viz.,8255, DAC0808, 741 opamp. The µC is responsible forgenerating the control voltage, which is given to thethyristors firing circuit. It does so through a DAC,DAC0808. This IC DAC0808 is interfaced to the µCthrough one of the ports of the 8255 PPI. SinceDAC gives a current as output, the current must beconverted into voltage. This is required since thethyristors triggering circuit requires a voltage. Forconverting the output current to voltage, a resistornetwork is used.

The output voltage needs to amplified so as tomake it compatible to t he requirement of the SCRtriggering circuit which is ∼9V. For this, anamplifier of gain 3.3 is incorporated. Between the

Page 7: Resistance Welding and Thyristor Contol

DAC0808 and the amplifier, a buffer stage isincluded to provide isolation and to prevent loading ofthe DAC circuit.This buffer stage is a voltage follower implementedusing the OPAMP 741. The output of the amplifierstage is given to the thyristors triggering circuit asthe control voltage to the phase control IC TCA785.The amplifier is designed as

V0 = ��

��1 +

Rf

RiVi ; Gain = �

���1 +

Rf

Ri= 3.3, where Rf

= 33 K and Ri = 10 K.

8255 PPI – ADC0809 InterfaceIt is designed using the following IC chips, viz.,8255, ADC0809 and the multiplexer. The multiplexeris responsible for maintaining the current for thewelding process constant. To achieve this, some sortof feedback mechanism must be incorporated.

The actual value of the welding current is measuredexternally and a 0 to 5 V analog input is madeavailable to the µC unit. An ADC is therefore,interfaced to the µC unit through one of the ports ofthe 8255 PPI.

Microcontroller – ICM7218C interfaceIt is designed using the following IC chips, viz.,AT89C52, ICM7218C – 8 digit LED multiplexeddisplay driver, 74LS373 – a octal latch. The variousparameters of the welding process as well as thestatus of the operation need to be displayed to theuser. For this purpose, common anode 7-segmentLED’s are employed. The LED’s are multiplexed anddriven by and 8 of them are driven by the commonanode 8-digit display driver IC 7218C.

Microcontroller – ICM7217 InterfaceIt is designed using the following IC chips, viz.,AT89C52, ICM7217 – the 4 digit LED display driver,programmable up / down counter. One of theparameters that the display panel shows is the jobcount. This is a counter that is incremented afterevery successful weld operation. For displaying thepresent job count, 4 seven segment LED’s are used.These are driven by the ICM 7217.

7 Segment LED display circuit12 seven segment LED’s are used to display variousparameters to the user. The LED’s employed are ofcommon anode type. Here, the digit drive isconnected to the supply and the segment that is tobe activated is connected to the ground. Of the 12LED’s, 8 are driven by ICM7218C and theremaining are driven by ICM7217.

Input switchesThe user enters the welding parameters through theinput switches which are of normally open type pushbutton switches. These NO switches are directlyconnected to the port B of the 8255 PPI through

connectors. The other end of the switches areconnected to the ground. Whenever the user pressesa switch, a logic low is detected at the port pin andan appropriate action is taken by the software,depending on the switch pressed.

Power supply circuitThe PS circuit is designed using the following items :Transformer of 230 V primary & 15-0-15 V secondary,diode-bridge network (IN4007), filter caps, voltageregulator IC’s (7802, 7812, 7912). The circuit providesall the other circuits with the power supply theyrequire. The different voltages provided by the circuitare +12 V, + 5V, –12 V and the reference ground.

10 Software

The hardware performs the various tasks forcontrolling the process as explained in the previoussections. However, for the successful working of thecontroller and to ensure satisfactory welds, a robustsoftware core is essential. The software drives theµC, which in turn controls the peripheral circuits.The software is coded in MCS-51 family assemblylanguage and is stored in the in-built 8K FlashEEPROM of the µC AT89C52. The code is writtenin 8051 assembly language. The software that drivesthe welding process control system is based on thefollowing designed and implemented algorithm.

1. Start2. Inhibit thyristors triggering circuit and reset the

control voltage..3. Accept the inputs from the user (welding current,

no. of cycles for squeeze, weld, cool, job count,etc.,.

4. From the value of the current, find the firingangle from a look-up table.

5. From the value for the firing angle, find thecorresponding value of the control voltage.

6. For that firing angle, find the correspondingcount for the reference counter.

7. Wait for a zero cross of the welding powersource.

8. For the squeeze time, let the required no. ofcycles pass without enabling the triggeringcircuit.

9. Set the required control voltage.10. When the next zero cross occurs, enable the

thyristors triggering circuit. Also start thereference counter.

11. Detect the triggering.12. When triggering is detected, stop the reference

counter.13. Inhibit the triggering circuit.14. Check for the counts. If count is more / less than

the expected count and out of allowable errormargin, then firing has occurred late / early.

15. Calculate the exact angle of the firing that hasoccurred.

Page 8: Resistance Welding and Thyristor Contol

16. Calculate the new firing angle and thecorresponding control voltage.

17. Also, find the corresponding count for the newfiring angle.

18. Increment the half-cycle count.19. If no. of weld cycles is not over, then go to

step 9.20. For hold / cool time, let the required no. of

cycles pass without enabling the triggeringcircuit.

21. Since all the 3 stages are complete, incrementthe job count.

22. If terminal job count has not reached, then go tostep 4.

23. Stop.

The micro-controller unit consists of severalcomponents. A failure in any one would result in afailure of the system. Also, before testing thecontroller, it is necessary for us to ensure that allthe IC’s are functioning normally and all theconnections are proper. For this purpose, a diagnosticroutine was written that would test all the IC chips.

A diagnostic routine written to test all the IC’s is asshown below.

.ORG 000hSTART :

MOV SP, #20HLCALL init_8255

_begin :LCALL mem_testLCALL disp_7218_testLCALL dac_testLJMP _begin

; INITIALIZE 8255init_8255 :

MOV DPTR, #2003HMOV A, #8BHMOVX @DPTR, ARET

; INIT_8255 ENDS; MEMORY TESTmem_test :

MOV DPTR, #000hMOV R0, #0FFH

_up1 :MOV A,R0MOVX @DPTR, AINC DPTRDEC R0DJNZ R0,_UP1

_up2 :MOVX @DPTR, AINC DPTRINC R0

CJNE R0, #0FFH,_up2RET

; MEMORY TEST OVER; 7218 TESTdisp_7218_test :

MOV DPTR, #400HMOV R0,#09HMOV R1,#07HMOV A,#80H

_digag :LCALL delay1MOVX @DPTR, AINC ADJNZ R0,_dig_AGANL A,#0F0HSWAP AINC ASWAP ADJNZ R1,_dig_agRET

; 7218 TEST OVER; 7217 TESTdisp_7217_test :

CLR P3.1LCALL delay1MOV R0, #0FFH

_incag :SETB P3.0LCALL delay1CLR P3.0LCALL delay1DJNZ R0,_inc_agRET

; 7217 TEST OVER; DAC TESTdac_test :

MOV DPTR,#2000HMOV R0,#0FFFH

_up6 :MOVA, #0FFFH

_up5 :MOVX @DPTR,ALCALL delay2DJNZ A,_up5DJNZ R0,_up6RET

; DAC-TEST ENDS; DELAY ROUTINE – BIG DELAYdelay1:

PUSH 00HPUSH 01HMOV R0,#0FH

_u2 :MOV R1,#0FFFH

Page 9: Resistance Welding and Thyristor Contol

_u1:DEC R1DJNZ R1,_U1DEC R0DJNZ R0,_U2POP 00HPOP 01HRET

; DELAY1 ENDS; ANOTHER DELAY ROUTIEN – SMALL DELAYdelay2 :

PUSH O1HMOV R1, #0FFH

_u3 :DEC R1DJNZ R1,_u3POP 01HRET

; DELAY2 ENDS.END

11 Future developments

In the further stages, as an improvement to ourpresent circuit, the number of preset schedules canbe increased according to the requirement. In thecircuit implemented by us, we have considered thesqueeze, hold, weld and cool time cycles. For amore precise operation, we may need a series ofsmall weld / cool cycles which can be furtherincorporated in the circuit so that the weld and coolcycles are interspersed by each other. (i.e., we canhave the following sequence W1 – C1 – W2 – C2 –W3). In addition to that we can also have anupslope and a downslope for the welding cycles suchthat in W1, the welding current is increased to itsmaximum value, in W2 the value of the weldingcurrent is at its required value and in W3 it reduces.This type of an arrangement is essential for thevarious metal jobs as a sudden high welding currentthrough the jobs may damage the work-pieces.

Further, on a more expansive error detection andcorrection scheme can be interfaced. Here, we candedicate one entire micro-controller port to the errors.We can give them as interrupts to the micro-controller. We can have various errors like theovershoot of the current, thyristors short circuit,invalid schedule number, thermostat burn out, coilbreakage, no power supply, etc.,. Our circuit can befurther improved by an implementation of thepneumatic control for the external pressure to beapplied to the work piece during the process. Anadditional amount of pressure is required during thehold cycle. A solenoid valve can control this, whichcan also be interfaced to the micro-controller.

12 Conclusions

Automated resistance welding control system isdesigned and implemented for a welding process inthe industry. The design is an improvement over thecommercially available resistance welding controllersbecause of the following reasons.

• Commercially available controller have analoginputs and outputs, whereas our designincorporates digital inputs and outputs.

• The controller is fully automatic and compactand easily upgradeable.

• Due to the presence of digital inputs andoutputs, human error can be drastically cut downmaking the process more accurate.

• Due to presence of non-volatile RAM, presettingof the schedules and storage of various processparameters will b e possible, which is notavailable in most of the controllers. Also, it willbe possible to detect and correct a wide rangeof errors than that are possible in commerciallyavailable controllers.

References

[1] Linnert, Welding Metallurgy, 3rd edn., AmericanWelding Society.

[2] Cary, Howard B., Modern Welding Technology, 3rd

edn..,

[3] General electric, SCR Manual, 6th edn., PrenticeHall.

[4] TTL / CMOS Data book.

[5] Intersil Databook.

[6] Linear Data book, National SemiconductorCorporation, 1982.

[7] Ayala Kenneth J., 8051 Microcontroller :Architecture, Programming and Applications,Penram Publishing, 1994.

[8] Gaonkar, G., Microprocessor Architecture,Programming and Applications with the 8085,3ed, Penram Publishing.

[9] http://www.nationalsemiconductor.com

[10] C. Ageorges and L. Ye,� Resistance welding ofthermosetting composite / thermoplastic compositejoints, Composites Part A : Applied Science andManufacturing, Volume 32, Issue 11, November2001, Pages 1603-1612.

[11] Meng Hou, Mingbo Yang, Andrew Beehag, Yiu-Wing Mai and Lin Ye, Resistance welding of carbonfibre reinforced thermoplastic composite usingalternative heating element, Composite Structures,Volume 47, Issues 1-4, December 1999, Pages 667-672.