Do-it-yourself spot welding on a microcontroller. Resistance welding from a microwave and a homemade timer on PIC

The power electrical circuit of the spotter has long passed the stages of development and experimentation and is used for straightening cars in a variety of ways. After gaining experience with the device, the question of automatic control of the device’s operating modes with more precise adjustments and the necessary protections arose. A spotter with a mode and a spotter as a welding machine for working with an electrode must have different pulse durations and power. The welding point may turn out to be weak or too strong, which will create additional difficulties when repairing the car.

Photo 1. The spotter is indispensable when carrying out automotive body work.

The main parameters that require precise adjustment for a high-quality work result are the pulse power and its duration. The proposed scheme will allow you to select and save parameter settings both in the welding machine mode and when doing spot welding.

The circuit is assembled on three boards and consists of two functional parts:

  1. The board on which the power supply is located. The appearance can be seen in photo 1.
  2. Two boards, one of which contains a controller and the second with switch buttons and a four-digit indicator.

Power supply and its circuit

The power supply diagram is shown in Fig. 1. Conventionally, it can be divided into three components:

  • power circuit of the primary winding of the step-down transformer;
  • a step-down transformer;
  • secondary winding with diode bridge and voltage stabilizer.

A surge filter, usually used in switching power supplies, is installed in the primary winding circuit of the transformer. Here it is used to protect the controller chip from impulses created in the mains voltage during operation of the spotter.

Any transformer with a voltage of 220 V/24 V can be used when operating from a 220 V network. When operating from a 380 V network, you need to use an appropriate transformer and a surge filter.

A diode bridge with smoothing capacitors and a voltage stabilizer on the LM2574 chip are connected to the secondary winding. From the output of the microcircuit, a nominal voltage of 5 V is supplied to the output connector X1 through an LC filter chain to eliminate high-frequency interference. The connecting lines marked with a dotted line should be of a minimum length and located as close as possible to the second leg of the IC1 chip.

Figure 1. Power supply diagram.

The voltage at terminal 1 of connector X1 is used by the controller to determine the zero level.

The voltage from terminal 7 of connector X1 is used to start the controller at a positive half-wave of the mains voltage.

A self-made circuit, if there are no errors in the assembly, starts working without additional settings. The presence of a voltage of 5 V will control LED1.

Starter K1 is designed to connect mains voltage when switch S1 is closed.

Instead, you can use a circuit breaker with protection of the required rating or connect the voltage directly, if there are fuses in the supply network.

Return to contents

Control of power thyristor spot welding spotter

Photo 2. External view of the control unit board with controller.

To control a power thyristor or triac, the MOS3052 microcircuit is used. This series of microcircuits is specialized for use in devices of this type and when replaced with analogues. In this case, it is necessary to carefully evaluate the technical characteristics of the proposed option.

When powering the circuit from a mains voltage of 380 V, it is necessary to use a triac of type VTA40 - 800v, ​​respectively, the operating voltage of capacitor C11 is 630 V, protective varistors R14 and R15 of type 20D241. To install a triac, you need to use a radiator. The design of the element is safe and has no connection to the heat sink. To control the temperature, it is advisable to install a thermostat with a contact opening temperature of 60-80°C on the radiator. A power transformer can be equipped with similar control. An alarm signal from thermostats can be connected to the controller to stop operation when the temperature exceeds the permissible temperature, with the corresponding signal displayed on the indicators.

For high-power spotters, we can recommend another version of the thyristor control circuit. It uses 70TPS12 type thyristors, which are controlled by MOS3052 optocouplers. Thyristors of this type have an electrical connection to heat sinks and must be installed on separate radiators or with dielectric spacers.

Return to contents

Control circuit with indicator block for spot welding spotter

Figure 2. Diagram of the control unit for the spotter.

The appearance of the control unit board with the controller is shown in photo 2.

The photo shows the appearance of the indicator block with control buttons without a decorative panel. The indicator panel with buttons and installed decorative panel is shown in another photo 3.

The control circuit has a minimum of auxiliary elements. All processes are controlled by an AtMega 16 microcontroller installed in the DIP version. The element from the manufacturer Atmel has a low cost and a large number of pins. The controller device allows the use of input and output signals on any legs of the microcircuit, so the board is as simplified as possible. In addition to configuration capabilities, the controller is equipped with high-capacity RAM and non-volatile memory, etc. In the spotter control circuit, its capabilities are used by approximately 20%.

Return to contents

Brief description of the operation of spot welding spotter

The schematic diagram of the control unit is shown in the figure (Fig. 2). When the supply voltage is supplied, the data stored in non-volatile memory for the first button is loaded. The indicator displays the information provided by the controller. In parallel with the output of information, the state of the buttons is monitored; when a triggered button is detected, the corresponding subroutine is launched. The information on the board is updated in connection with the new request.

Each time the button contacts are activated, a sound signal is heard; its absence means that the controller is malfunctioning or frozen.

Photo 3. Spotter indicator panel.

Using the buttons, you can select the desired operating mode and set the desired pulse parameters. The selected mode can be saved in memory for later use.

In the "Operation" mode, the controller operates as follows:

  1. The indicators turn off, the controller monitors the voltage level at the AIN1 contact.
  2. When the voltage drops to zero, the counter starts with a set pause period.
  3. At the end of the countdown, a command is issued to the thyristor (triac) control chip. The process is repeated at each cycle of the mains voltage to use only the positive half of the cycle. This improvement avoids the magnetic saturation mode of iron.

Mains voltage control occurs along the chain from the power supply, through the X-1 connector contact to the SIN controller contact. Elements VR2 and Q2 correct the signal shape. The voltage to open the triac is supplied to connector X3, pins 1 and 2.

I stripped the ends and tried on the lugs - they dangled freely on the wire.

There is definitely something wrong here and I really wanted to figure it out.
I measured several copper wires more precisely with a Soviet micrometer - an average of 0.365 mm came out
And I settled down to count them more comfortably...


Counted 433 pieces
Through simple mathematical calculations, the actual cable cross-section was determined to be 45 sq mm.
It won't be enough, it won't be enough!
How can this be, since you saw the tag on the cable with your own eyes? And this is how they deceive gullible buyers. In many specialized stores, when purchasing cables and wires, sellers even ask whether the cross-section is required (according to GOST) or underestimated (according to TU). Moreover, even the cross-section of the wire according to GOST is also underestimated - it has been checked several times. Stranded wires are underestimated more than solid wires, because... It is difficult to check their real cross-section. In this case, the PuGV 1x50 wire with an already reduced cross-section was signed as PuGV 1x70.

So, the actual cross-section of the wire is 45 sq. mm, which is still not enough for such a transformer. It was not possible to quickly find a meter of wire with a real cross-section of 70 sq. mm, so I will test it on what I have (later I may redo it). I also decided not to change the tips, because... I will not press them, but solder them.

The process of soldering such thick wires at home is not a trivial task, so I will describe in a little more detail how this is done.
Take the most powerful soldering iron available and put it aside - you won’t need it :)
However, you can try it with a soldering iron.

An assistant to increase the number of hands is highly desirable. Unfortunately, no one helped me, so the process was not as convenient as it could have been and, of course, I didn’t take photos during the process - my hands were very busy, I’ll have to describe it in words :)
Soldering was carried out with a Chinese gas torch of medium power (1 kW stated)


The soldering location was chosen in accordance with fire safety requirements, away from flammable materials.
I stripped the ends of the wires with a margin so that the insulation around the tips did not burn too much.


I first put on heat-shrinkable tubes to later isolate the soldering areas.


The transformer was lifted and secured higher, the wires were bent down vertically - in this position they should be soldered. I wet the wire with flux, put on the tip, and bend the wires sticking out in the control hole so that the tip stays on the wire. A wire with a fair cross-section will not fall off anyway, since it is inserted into the tip with considerable force.
I heat the tip together with the wire to a temperature of approximately 220-230 degrees (in about 1 minute) and insert POS61 solder wire into the gap, which melts and fills all the free space. This takes a couple more minutes, while I continue to slightly warm up the tip. As soon as solder appears in the control hole, I stop soldering and slowly cool everything. The second wire was soldered in the same way

Next, I pulled the tubes to the tips and pressed them with a hairdryer in two layers.

To transmit maximum power, the power wires should not be too long, but very short wires make the welding process difficult. My length turned out to be 35cm, it could have been made a little shorter.


For convenient starting, the button was attached to the power cable next to the tip (visible in the photo)

To weld batteries, I cut out copper electrodes from 2mm plates


And bolted it into place



The display is very fragile, it is advisable to protect it better during installation, I didn’t do this, maybe I’ll redo it later.

The first thing I checked was the nickel tape.


Width 6mm, thickness 0.14mm and length 500mm
The cross-section is 0.84 sq mm, the measured resistance is 0.051 Ohm, the specific conductivity is 0.086 Ohm*mm2/m, which corresponds to nickel.
The conductivity of nickel is 5 times less than copper, which, together with the small cross-section of this tape, does not allow it to be used for assembling batteries for powerful power tools. For such assemblies, you need to use 10x0.2mm tape with a cross-section of 2 sq. mm or even solder the batteries with a copper conductor of 1 sq. mm or more (which is what I usually do).

Testing the welding controller and the welder itself
Adjustment limits:
Pulse duration 10-200ms, default 40ms
Number of pulses 1-10, default 2
Pulse shift relative to zero: 0-10ms, default 2ms
The pause between pulses is equal to the pulse duration
The operating mode is not saved after a power failure, but you can overwrite the default settings by holding the encoder button for 10 seconds.
There are no presets or profiles, but due to the small number of settings they are not needed

After pressing the start button, the indicator says WELDING (welding), a loud warning signal sounds 3 times, then the welding itself begins and at the end the welding end signal sounds 2 times.
The green LED on the board indicates ready mode. It goes out during the welding process.

As in any business, to obtain a normal result you need skill and training. Resistance welding has its own area of ​​application and this must be taken into account.
Do not try to immediately cook new expensive batteries, because... There's too much chance of ruining them. Train on old or faulty batteries to select the shape of the electrodes, clamping force and welding modes.
A little theory.
The specific power at the contact point is (I x U x T) / S
T (pulse duration) can be selected in the controller parameters
U (voltage at the contact point) depends on the transformer and the passing current
I (current) depends on the transformer, electrodes, clamping force at the point of contact
S (contact area) depends on the shape of the electrodes and their pressing force
As you can see, there are quite a lot of influencing parameters, so we have to select them.
For example, you should not try to make blunt electrodes or put too much pressure on them, because... Despite the high current, the voltage at the contact point will be very small and naturally there will be no normal heating. You should also not space the welding points too far apart, because the current will not be able to reach the required value due to the high resistance between the contacts.

Due to the synchronization of pulses with the network, the repeatability of weld points is quite high. All tests are tied to a specific device - the results may naturally differ on another device.

Welding a battery in different modes (from left to right)
1/10 1/20 1/40 2/40 2/60
The first is the number of pulses, then the pulse duration


The optimal value is 1/40.

Welding AAA battery, mode 2/20

Welding paper clips

Below is shown how not to cook batteries :)


Dull electrodes and high clamping force.


In this case, the power is released not at the point of contact, but in the wire itself - naturally, nothing is welded and the plate easily flies off

Welding a battery at one point with blunt electrodes (one electrode on the battery, the second on the plate)
There are 2 points due to welding 2 times


It’s too easy to burn out the battery, and the welding doesn’t last


If you really need normal welding at one point, make one electrode blunt - and press it harder against the battery so that heat does not generate in this place.

Burnout in 2/60 mode


Overburning may compromise the seal of the battery, which is unacceptable.

Welding in the wrong place on the side surface


Left - 1/40ms mode, right 2/60ms (overburn)
There is no protective gasket on the inside side surface and welding can damage the battery roll.

During the welding process, the batteries, transformer and triac do not have time to heat up, but if a more powerful transformer is used and welding is intensive, forced cooling may be necessary

Wishes to the manufacturer.
1. Add a welding mode without a preparatory delay (for pedal control)
2. Add a welding mode by holding the button (for welding massive elements with long exposure times)
3. Provide the ability to turn off the loud squeak (at least with a jumper)
4. On the board, change the rotation of contacts to the display (so that they match)
5. Make the pulse duration setting scale two-zone, for example from 10 to 100ms - in 1ms steps, over 100ms - in 10ms steps

Conclusion: the controller performed well and can be recommended for use

Fluffy refused the photo shoot - the suspicious piece of iron with thick wires scares him.

The product was provided for writing a review by the store. The review was published in accordance with clause 18 of the Site Rules.

I'm planning to buy +97 Add to favorites I liked the review +136 +240

So resistance welding appeared in my arsenal.

The reason was a transformer from a microwave oven, thrown into the trash, but literally intercepted in flight and carefully delivered for diagnostics.

An external inspection showed that the primary winding was made of aluminum wire. And the first desire was to resume the interrupted flight to the garbage heap. But something told me, and somehow it worked, even though it was aluminum...

Carefully, I got rid of the secondary windings. I wound 4 turns of the mounting wire. And I got these results:

  • Mains voltage 234V.
  • The secondary winding voltage is 3.76V (0.94 volts per turn).
  • Then the primary winding has 249 turns.
  • The current (h.h.) of the primary winding is 2.4A, which is a little more than half a kilowatt for dissipation.

I wind 4 turns of the secondary, but with a soft 32mm^2 tire. I shorten the secondary, attach clamps to the bus to measure the short circuit current. I turn it on... the digital tester measuring the current in the primary winding managed to show a current of 17A and lost its fuse. Having quickly re-equipped with a new 50A device, I turn it on.

Results in the picture:

Primary winding current 26A

The voltage at the terminals of the primary winding is 215V (in the network 235V, 20V loss on the line).

That is, somewhere around 5 kilowatts of clean energy (500W power loss).

The device showed 902A secondary current. Of course, I can’t vouch for the correctness of the readings (the limit of this Chinese is 400A), but based on what is available, it turns out 902 x 3.76 = 3.4 kW.

That is, another 5 - 3.4 = 1.6 kW were added to 500W. And these 1.6 + 0.5 = 2 kW simply heat the windings. Indeed, the network winding heats up from 30*C to 75*C in 2 seconds of operation in a short circuit. True, this is only for a duration of 2 seconds; it has not yet been used in practice. Basically working with a timer of 0.02 seconds.

That's basically all the diagnostics are. I’ll also add that I took measurements with six turns of the secondary. But the power consumption on the network was less (22A and 217V), obviously influenced by the fill factor of the transformer window. In the last version with four turns it turned out to be higher.

I almost forgot, overall power it turned out: (3.4 + 5.6) /2 = 4.5 kW

Another jamb came out with insulation of the secondary from the transformer iron. It is necessary to take into account that the temperature of the windings can be significant and pay special attention to the type of insulation. In my version I used regular masking tape. But I covered the sharp corners with fiberglass.

The insides of the window were also insulated with the remaining gaskets from the original secondary winding.

A temperature sensor (bimetallic) is installed between the windings. Has a shutdown temperature of 80*C. Turns on at 56*C. In the future, use the DS1821, its inertia interferes, and you can also set the desired temperature and hysteresis. But I don’t know how it will behave in strong magnetic fields.

The entire structure is mounted in a Z-2A housing

The terminals are attached to copper plates made of 2mm thick copper sheets.

To increase the reliability of fastening, the copper plates are soldered together. The plates themselves are glued to the body with glue, only to secure them during assembly. The main fastening is done with staples. Also, with the help of staples, the leads of the secondary winding are pressed (electrical contact) to the copper plates.

Features of software solutions:

  • Synchronization with the network is now for a full period (20ms).
  • Dynamic display segment-by-segment (I would like to see the advantages).
  • Settings control using +/- buttons.
  • Faster scrolling of values ​​when holding the button.
  • Protection against restart when holding the pedal.
  • Saving the setting in the MK memory when the power is turned off.
  • Protection for overheating of transformer windings.
  • Maintains operability from 100V mains voltage.

Hello, dear visitors. This article will focus on a digital timer designed for a spot welder. The device diagram is shown in Figure 1.

The basis of this timer is the PIC16F628A microcontroller. In general, the program written to the controller is a subtractive counter program. To operate the microcontroller, its internal oscillator is used. The countdown is performed with a period of 100ms. I did the maximum exposure time, so as not to complicate the program, twenty-five and a half seconds. The exposure time setting is set using the SB1 and SB2 buttons. Using the SB1 button we increase the time delay value, and using the SB3 button we decrease it. Moreover, when setting the time, the period of changing readings is not constant. At first, the readings will change with a period of half a second. Then this period will decrease to 25ms. This is done to increase the efficiency of setting the required shutter speed.
When you turn on the timer for the first time, a delay of 10.0 seconds will be displayed on the indicator from the EEPROM of the controller. Subsequently, your values ​​will be written to non-volatile memory.
The timer is started by the “Start” button, after pressing it, the edge of the control signal appears at pin 15 of DD1 and the countdown of the set dwell time immediately begins. After this time, the voltage at pin 15 of DD1 drops to almost zero - the control pulse declines. Pressing the button again is possible only after 3 seconds, if the set shutter speed is less than this time, or after the end of the control pulse, if the pulse duration is more than 3 seconds.

A jumper J1 has been introduced into the timer circuit, which makes it possible to use indicators with both a common anode and a common cathode. If the jumper is missing, then the indication program will work for an indicator with a common anode, and if the jumper is installed, then the program will work for an indicator with a common cathode.
The values ​​of pull-up resistors R1... R4 can be anything from 4.7k to 10k. The values ​​of quenching resistors R5... R12 are selected in accordance with the required brightness of the indicator segments. I always use 510 ohm resistors. This reduces the load on the microcontroller outputs and increases the service life of the indicator itself. The DA1 microcircuit voltage stabilizer can be installed at any appropriate load current and output voltage of five volts. For example, KR142EN5A. The maximum input voltage depends on the stabilizer chip you choose. The maximum input voltage for the KR142EN5A microcircuit is 15 volts. Since resistance welding produces very large electromagnetic fields, the entire device must be carefully shielded to avoid program failure, and the supply voltage may have to be supplied through an LC filter. When installing the circuit, capacitor C2 is soldered directly to the corresponding pins of the microcontroller. The program and circuit were developed at the request of one of the site visitors, so it is not yet possible to test this circuit in hardware. The timer was modeled in Proteus.

The term “spotter” in this article refers to a resistance spot welding installation, used primarily by motorists and bodybuilders, for quick spot welding of various auxiliary elements to the body, such as washers, hooks, wire, etc., for subsequent drawing and leveling of the surface.

Spot welding is based on the principle of heat generation at the transition resistance of the contacting welded elements.

Therefore, the task of the spotter is to supply a powerful current pulse (I=800..1200A, U=5V) to the place of the welded contact when pressing the corresponding button on the “gun”. When spot welding, it is necessary to control the pulse duration (usually it does not exceed 0.5 s). Further in the article the principle of operation of the power circuit, the circuit and the principle of operation of the timer will be discussed.

A fairly common circuit for the power part of a homemade transformer spotter is the circuit shown in Figure 1.

As can be seen from the diagram, switching is performed by a thyristor on the side of the primary winding of the power transformer. You can also use a triac, then there will be no need for a diode bridge.

To set the duration of the current pulse at the output, it is necessary to maintain the voltage at the control electrode of the thyristor for the appropriate time (duration of the output pulse). But it should be borne in mind that even if the control voltage has already been removed, a conventional non-turn-on thyristor will not close until the current passing through it drops below the holding current (in this circuit, the current reaches zero 100 times per second).


The simplest way to control a thyristor is an RC circuit with an adjusting resistor (to change the time constant) and recharging the capacitor from an additional low voltage source. But this method is not considered further.

To more accurately set the duration, a simple timer based on the ATtiny2313 controller has been developed. The pulse duration is adjusted by two buttons and can take values ​​from 0.01s to 0.5s with a resolution of 0.01s.

The 7-segment indicator displays numbers corresponding to the specified duration in hundredths of a second. * But, due to the property of non-lockable thyristors described above, the actual duration of the output pulse may differ from the specified one by up to 10 ms (one half-cycle). The microcontroller-controlled spotter circuit is shown in Figure 2.
The scheme works as follows.

When power is supplied to the control circuit, program execution by the controller begins from the moment the capacitor on the Reset leg is charged to a logical one voltage. After startup, the controller performs the functions of dynamic indication and button polling. The buttons are polled on a timer approximately 4 times per second. When you press the pulse button on the “pistol” (indicated by a dotted line), a logical unit (5V) appears on the PD2 leg, the unit is removed after a specified time, which is displayed on the LED indicator in the form of hundredths of a second.


The signal from the microcontroller output is amplified by current by a repeater on the KT972, since to control the TO142-80 optothyristor used, it is necessary to supply a current of at least 120 mA to its internal LED. The optocoupler type of thyristor was chosen for the simplicity of organizing galvanic isolation of control circuits from power ones. The controller firmware implements two operating modes: pulsed (by default) and continuous.


Selecting a mode and setting the duration (more/less) is done using three buttons. In continuous mode, the duration of the thyristor control signal depends on the duration of pressing the button on the gun.


To explain the operation of the power section, a simplified diagram is shown in Figure 3. Figure 4 shows the timing diagram of the operation of a power circuit with an active load and an ideal thyristor (on time = 0, voltage drop in the open state = 0).
One of the simple solutions to the problem is the use of solid-state relays. In this case, the timer will control the solid state relay.


The relay is selected by current and voltage, number of phases (single-phase), and must be designed for switching alternating current of an active-inductive load.


Figure 5 - Image of a solid state relay.

Figure 6 - Using a solid-state relay in a spotter.

Files for the article:

spotter_002.zip (210 kb) - seals, firmware, model in Proteus, diagram + list of elements.
Added:

002_for_ca.hex (948 b) - controller firmware when using an indicator with a common anode.

The timer described above has been modified.

The basic principles of operation remain the same, isolation of the control signal has been added, and the fading of the dynamic display during the issuance of a control pulse has been eliminated. 04.11.2015
Comments
#46 message from admin 03.11.2015
Alexey, hello. I haven't tried it with charcoal. Theoretically, due to the high resistance of the coal, the welding current will be less. But the coal itself will heat up and melt the metal. If the current is insufficient, you can try to increase the secondary voltage.
#45 message from Alexey 02.11.2015
Hello! I want to assemble your circuit, tell me if it has the ability to work with a carbon electrode to heat the metal? Or how can you implement this yourself?
#44 message from admin 30.10.2015
If you need to do 3 seconds, I can remake the firmware for this hardware from the second version. It will be possible to regulate up to 10s and there will be no shortcomings that are in this version of the firmware (fading of the indicator, etc.). I am writing in ASM.
#43 message from Roman 24.09.2015
Good afternoon. Is it possible to change the pulse duration to 2-3 seconds? In what language was the MK program written? Is it possible to take the source?
#42 message from alex 08.09.2015
I will do it, I liked it! Tell me, what is connected to the connectors on the diagram to pin 8 of the MK and the collector of the transistor?
#41 message from Andrey 08.06.2015
Can anyone tell me if the fuses are set correctly in the avrdude program?
#40 message from admin 05.06.2015
Why extra? It is in the list and on the diagram, there is a place on the wiring.
#39 message from Alexander 04.06.2015
That is, an extra SMD that is 0.1 uF?)
#38 message from admin 03.06.2015
Good afternoon. Under C3 (which clings to legs 8-10) there are answers. But there is one SMD - C7.