Spot Welder 1-2-3 Arduino Printed Circuit Board

7.5K1326

Intro: Spot Welder 1-2-3 Arduino Printed Circuit Board

Some time ago I wrote an instructable where I explained how to control a spot welder in a sophisticated manner using Arduino and commonly available parts. Many people built the control circuit and I received quite some encouraging feedback.

This is a circuit operating at mains voltage and high currents, so the quality of the build is important to guarantee safe operations. While it is ok to prototype the sport welder using a non permanent setup, if you plan to build and really use this a good PCB will help a lot to achieve both a professional and a safe result.

Please read the first instructable, called Part I for short in the following, if you have not done so already. There is a lot of information there that will not be repeated here.

DISCLAIMER: I am providing some links and suggestions for third party sellers/manufactures purely for your convenience and to anticipate the questions I know will come. I have neither any relationship nor any interest in any of the third parties I mention. They purely worked well for me.

STEP 1: Updated Schematic PCB

I have combined control and power circuit in a complete schematic, where several components are added to the simplified (albeit functional) one in Part I.

These include now fuse and line protection on board, and a buzzer to support producing sounds (a clicking sound when the encoder is rotated and a continuous tone when welding are quite nice). An additional MCU pin is exposed on a connector for firmware expansion or modification in order to add new features (EXT connector), e.g. a temperature or cooling fan control. Activating buzzer and EXT connector will require future firmware enhancement.

STEP 2: Board Layout

The PCB is a standard 2-layer layout and in the picture you can see how components have been arranged using the EagleCAD layout software.

I have tried to keep things pretty compact using only one side of the board for components and have separated on board the hot and cold side (jargon for the mains AC and 5V DC voltage circuits). The board is about 60 x 80mm (less than 2.5 x 3.5 inches) so it will fit into a compact enclosure.

TRIAC mounting. Please read carefully the consideration on this in Step 6 of Part I. Concerning wire cross section for the connections to the TRIAC, I have used 1.5 mm2 (AWG 15-16) wire for the wires connecting the A1, A2, and G wire pads to the TRIAC terminals, and 2,5 mm2 (AWG 13) for the wires connecting the TRIAC terminals to the MOT (brown wires marked A in the picture in Step 6 of Part I). Keep these connections reasonably short, there should be no need for them to exceed a length of 20-30cm (8-12”).

STEP 3: Getting the PCB

You can order the PCB from your preferred fab house, if you have one. I use JLCPCB (www.jlcpcb.com), and in my view they do an excellent job at a very reasonable price.

I am providing the needed Gerber files in an archive data, so you do not need to be able to use EagleCAD to order a PCB, just update the zip file on the fab house site and you are in business. Other suppliers will work in a similar fashion.

The components needed for this circuit are all pretty easy to obtain. I am anyway providing a BOM for your convenience with links to the sources I used to procure the less obvious ones.

Be careful when you order the Pro Mini. There are several layouts around, but the PCB is sized to fit the packaging of the Pro Mini version shown in the picture in the next step. Other geometries will not fit the PCB’s hole pattern.

The PCB requires the 3W version of the Hi-Link power supply module (HLK-PM01 3W). The 5W variant will not fit.

The JP1 jumper marked PRG must be opened to flash the firmware without removing the Pro Mini from the PCB, and obviously kept closed for normal operation.

This is PCB version 1.1 and requires the 1.1 version firmware.

This PCB supports a buzzer to enrich the interface with sounds, however the 1.1 version firmware does not make use of the buzzer hardware (apologies for not making this clear).

STEP 4: Downloads

The PCB data files can be downloaded from the SpotWelder 1-2-3 PCB repository (this is PCB version 1.1 and requires the 1.1 version firmware).

In the REAME file in the repository you will find a table of contents.

Have fun!

20 Comments

Hi Mecanicafina,

Many thanks for the really excellent Instructable.

To make sourcing the components a little easier I am putting together a list of DigiKey part numbers for the Bill Of Materials (which I can post here when it is finished) and I would just like to clarify a couple of things.

1 - Power source - can I assume that the circuit will work without modification with North American 220Vac pole to pole as opposed to the 240Vac hot to neutral in Europe and elsewhere?

2 - Triac selection - I want to use your design to control a 240V spot welder with a maximum draw of 16amps (and an output current of 12.5A @ 50% duty cycle). You state in your discussion of the Triac selection that:
"the rating we need to be concerned about is the non repetitive surge peak on-state current. This is the inrush current of the load. It will be drawn every time during the switch-on transient by the MOT, and it will be several times higher than the on-state current. The BTA40 has a non repetitive surge peak on-state current of 400A at 50 Hz and 420A at 60 Hz."
I had read that the maximum inrush current of a transformer could be 6-10 times the rated load current depending on a number of factors. Assuming the worst case scenario, the peak on-state rating seems to be large enough (i.e. 420A > 10x16A = 160A). Would heat management become a concern at this power?

3 - Resistors
You mention in a comment that "all resistors are 1/2 Watt except R4, which is 1.5 Watt (or more)."
I assume your comment predates the release of the PCB design and that the 1.5w resistor is R1 and not R4. However, there are three package sizes for the resistors in the BOM. R3 is listed as 0207/10 which seems to suggest a higher power rating?

4 - Varistors
EDIT - I found your comment about the varistors in the other Instructable. The BOM is a little confusing: it shows R2 = S20K410 and R11 = S10K410 in the values column. However, the Device/Package numbers are S20K275 and S10K175 for their respective components, which if I understand correctly refers to 275Vrms and 175Vrms rated MOVs. The Aliexpress links are both to 430V 10D and 20D series MOVs and taken with your discussion in the first Instructable the intention seems clear. I have not been able to wrap my head around sizing MOVs. For 220-240V power the 275Vrms rating makes sense. But would 175Vrms voltage values be required for a 120V supply or is a peak voltage rating above the peak voltage supply acceptable? In other words can one size fit both supplies?

Many thanks again for an excellent build.

Thomas
Did you ever put together a list of DigiKey part numbers?
Hi Thomas,

here are some clarifications, I hope they will help you.
1-> don’t understand clearly the question, so I am shooting a bit in the dark. If you mean to want to use a 3 phase system and connect the circuit between two phases, I do not think it will work (I would expect the power supply to require single phase + neutral conductor wiring, but don’t have access to the internal schematic). If you means a one phase system with single phase + neutral conductor writing, yes, it will work as is.

2-> The bottle neck is not likely to be the triac, but the transformer. The real issue is not the inrush, but the short-circuit current (the secondary is “ almost” shorted while welding). You have to keep the on state of the MOT short and allow for cooling. Heat management can otherwise definitively become a concern, as the current in the MOT secondary is so high that it may and will eventually melt the isolation on the copper wire if you either keep it on for more that a (very) few seconds or do not allow for heat dissipation between welding cycles.

3.1 - You mention in a comment that “all resistors are 1/2 Watt except R4, which is 1.5 Watt (or more).” -> Point taken. It is R1 (parts were renumbered with PCB v 1.1 ).
3.2 - there are three package sizes for the resistors in the BOM. R3 is listed as 0207/10 which seems to suggest a higher power rating? -> higher power rating not necessary, they can be all 1/4 W.
4 - -> The number after the K refers to RMS rating for some MOV’s, but to DC rating for others. Depends on producer. Very confusing and dangerous industry practice. The BOM is for RMS rating.The links are to DC-rated MOV’s.
For the voltage sizing: Rule of thumb for sizing is to use, say, 20% RMS MOV rating over the nominal RMS rating of the supply. This is to allow for fluctuations on the high side of the supply RMS voltage that should not trigger the MOV response. For 240V nominal, I suggested a 275V RMS MOV, for 120V nominal the MOV rating would be 150V. If you were to use a 275V MOV on a 120V line the MOV will not “catch” voltage spikes as high as twice the nominal supply voltage.

Hi mecanicafina,

Thanks for the reply. I have a suspicion that you are in Italy no? If so, then I hope you and yours are safe.

1 - To explain my question better: as you know, the power system in North America differs from that of Europe. Houses and small businesses are supplied with a split phase system: "The two 120 V AC lines are supplied to the premises from a transformer with a 240 V AC secondary... This results in two 120 V AC line voltages which are out of phase by 180 degrees with each other. The system neutral conductor is connected to ground at the transformer center tap. 240 V AC can be obtained by connecting the load between the two 120 V AC lines."

The majority of devices are powered by a single phase of 120V up to 15amps. Where more power is required in domestic settings, for stoves and washing machines for example, both phases are used (without a neutral) to obtain 240V with amperage limited by the circuit breaker and wiring ampacity.

Devices such as the DC power supply (should) run fine with this setup so my assumption is that the triac will behave similarly but I just wanted to double check.

2 - This is not a MOT based spot-welder. I bought an off-the-shelf welder that runs at 240V and has a "suggested" 50% duty cycle to protect the transformer windings (but there is no detail about the maximum duration of the on-time which is an oversight). I want to replace the manual switch with your controller so that I can fine-tune the timings to be able to use it effectively on a range of materials/thicknesses. The triac seems to be rated to handle the estimated 160A in-rush current and limiting the on-time to something sensible and perhaps adding a cool-down delay in the code should resolve the issue of the heat load on the transformer secondary.

3 - I had already finished the BOM with the existing power ratings. The 1/4w resistors would save perhaps a dollar or two...

4 - Thanks for this explanation of the bad state of MOV labeling and for the useful rule of thumb. This has cleared up something I've been struggling to understand for a long time.

Thanks again,

Thomas

Hi Thomas,

not exactly, in northern Europe, and safe for now thanks. We all hope it stays that way, and that the situation in Italy will improve soon.
1 - Thanks, I now understand what you meant. We have something similar over here where 3-phase is often delivered to residential homes, then each phase is used separately (with the neutral) to provide 240V 16A per phase. This allows e.g. to run 7 kW electric cooking stoves using two of the three phases.
Back to your question, I understand the 240V voltage comes from a transformer secondary which is center tapped to provide the two 120V lines and the neutral wire into your home. I would expect no problems connecting the circuit to the 240V voltage if this is the case.

2 - Understood. I would mount the triac on a dissipator which is good practice anyway and expect still the transformer to be the bottleneck. Yes, you could add a cool down delay in the code, and maybe a thermal safety using the EXT connector and support code. This is tricky however to get right, as you would need to measure the transformer temperature where it gets hot, i.e. in the secondary copper winding either to find the appropriate delay or to feed the thermal probe. It can be done but is going to be trial and error, and I would stay on the safe side given the difficulty of accurate temperature measuring where it really matters.

3,4 - happy to help!
Thanks again for the reply.

2 - Agreed that this would be difficult to get right as it is not possible to know how hot is too hot until the unit fails. Also, the form factor of the device will likely make it difficult to install a probe. There is a maximum rating for the material thickness which can be used to empirically determine what the maximum weld duration is - one could perform a series of test welds (observing the 50% duty cycle) on the maximum stock thickness until a mechanically sound weld is achieved. This time will presumably be within a safe margin of the absolute maximum assuming the unit has been correctly designed.
Hi
Thanks for sharing your work, it works very well, but
"....and a buzzer to support producing sounds (a clicking sound when the encoder is rotated and a continuous tone when welding are quite nice)."
The buzzer does not work, the D9 output does not signal. Can you help me?
Thanks
Sorry for pointing you in the wrong direction. There is no support in the firmware v1.1 for the buzzer. It is not hard to do, but somehow never got around to do it in the final version. See comment on line 379 for a hint.
Hi, most likely you have swapped some connection on the transistor or the buzzer. This assuming transistor and buzzer are the right type. Unfortunately I am away with no access to the lab for a couple of weeks, so my suggestion is to double check all connections and polarities. Good luck!
I am finally found some time to work at the welder but I need your help for some problems.
1) I downloaded the last SWController.ino available but the pins for the encoder are wrong A1 A2 A3 instead of A1 A2 A0 . I am missing something? I had to connect the encoder on the ext pin for make it work correctly.

2) I am using a momentary button with built in led. it works correctly while welding but no fading during standby.

3) the buzzer doesn't make sound at all. I soldered it with the negative pole oriented through the center of pcb, any idea?

Thank you for all your help and for this great project:-)
Hi Claustro,

some of your comments lead me to revisit the instructable and to make couple of corrections, my thanks for that. For your questions:

1 - I have updated the code on the repository to version 1.1 which is now aligned with version 1.1 of the PCB. Now the pins are consistent and they are A0 A1 A2.
2 - Don’t know about this, mine works fine, but try again please after rewiring and upgrading the firmware.
3 - There is no support in FW 1.1 for the buzzer.It is not hard to do, but somehow never got around to do it. See comment on line 379 for a hint.

Again, thanks for pointing out the inconsistency.
Hi , can I replace BC547 vith BC337?
Thank you for your project.
It should work, is an equivalent with higher rated collector current which you do not need but it will not hurt.
The PCB is arrived and I waiting for the new parts. I am having problem understanding the new connections , can you help me?
1) My HLK-PM01 seems bigger and I can't fit in the pcb holes I am missing something?
2) MAINS 220V in pin 1 - 2
3) DSP display pin 3 gnd - 4 5v - 5 a5 - 6 a4,
4) FSW foot switch pin 20 - 21
5) PNL pin 7 - 8 - 9 -10 - 11 - 12 rotary encoder manual push button and led?
6) PRG/JP1 13 -14 ?
7) EXT 15 -16 -17 -18 ?
8) TRIAC A1 A2 G and the from A1 And A2 to MOT
9) Buzzer 19 - 20

Thank you !
Andrea
1) You must have the 5W version that has a larger form factor, the PCB is made for the 3W version.
2-9) I don't understand the PIN numbers you mention here, all is as per schematic, the mains connector is marked also "mains" on the PCB. Yes, PNL is the front panel connector for encoder push button and led. You don't need to use the EXT connector, that is for future expansion. Finally, the jumper JP1 marked PRG is to temporarily open the power supply connection if you need to flash the firmware for the MCU without removing it from the PCB.
I think I will add a note about the required power supply version and the PRG jumper to the instructable.
Thank you for answering me.With the tester I managed to understand all the connections ( it seems) The problem , at least for me , is that on the pcb FSW PNL EXT and DSP have not pin numbers. Also on the schematics some pins are numbered from left to right looking at the the pc board ( PNL FSW) while others are right to left ( DSP and EXT).
In the photo below I made a simple scheme for those dumb like me , can you check it?
thx

Also is it ok using a 240 ohm resistor instead the 250 one and 350 vs a 360 ohm?
A.
Thank you for answering me, the pins number I am refferim to are the one I indicate in red in the attached photo
Hi,
1) The PCB requires the 3W variant, the 5W I suspect you have is too big.
2-9) I don't understand the pin numers you use here, all connections are as per schematic. 5), yes, it is the front panel connector for encoder, push button and led. 6) is used to flash the MCU without removing it from PCB, see remark added in the instructable. 7) You don't need to use the EXT connector, see remark in the instructable.
WOW great job! THANK YOU very much for your work!. I already ordered some pcb from jlcpcb
I 'll try to make a neat 3d printed case as soon I'll receive it.