DIY Arduino Spot Welder

The ATmega328 based Spot Welder Microcontroller

Earlier when i did mini projects it was hard to solder the 18650 batteries that i had salvaged from old laptops. Not recommended by the manufacturers either. not all the cells in a laptop battery pack were bad, so why not take them out and make use of them to power some DIY stuffs like a power bank for example. They cost a lot when purchasing new ones from online stores. So the best way electrically connect them was to spot weld them using nickel strips.

One way to get it done is to salvage an old Microwave Oven Transformer (MOT) and  modify it to get approximately 400 to 600amps (the turns ratio is something you’ll have to figure out). Here the current has to be kept low. Generally reducing the voltage will also reduce the current here. I’ve used 3 turns at secondary with 10mm width flexible cable. That would give enough amps to weld. I’ve set the weld time from the pot to 60ms.

NOTE:

  • More turns with thicker cable would give more current
  • Less turns would decrease current.

The components used here are cheapest those that are readily available at any local store.Then comes a Microcontroller built on the ATMEL ATmega328 chip. This controls how long the weld is done. The weld time are measured in milliseconds. When spot welding it is common as well as important that there be two welds, Why ? because the first weld clears the strip of all impurities that maybe stuck to it after production. The Second weld is when the strips melt and gets welded to the cell. The chip is powered by a regulated 5v supply from an on-board PCB transformer.


Features:

  1. Surge Protection
  2. Inbuilt Power Supply
  3. Dual Pulse Welding
  4. Dual Surge protection
  5. Thermal fuse at the secondary
  6. Zero Cross Peak detection
  7. Variable timed pulse (indicated by LED from 100ms to 450ms)
  8. Dual function weld
    1. Manual Weld
    2. Continuous Weld (upon holding  weld button for more than 800ms)
  9. TVS protection diode at the dc side
  10. Snubber Circuit
  11. TRIAC to control AC load
  12. Audible Weld alert

Working:

pcb-assembled
PCB with soldered components

The Spot Welder Microcontroller is powered by a PCB transformer rated 2 x 9v 177mA. The PCB is protected by a TVS diode D13. This protects all the underlying components from surge without which would burn the components during a surge such as lightning. here the TVS diode suppress the spike in voltage when the threshold voltage is reached.

fullsizerender
PCB powered on

Once switched on all the timing LEDs blinks once. The READY led indicates that it is ready for welding. The ATmega gets its clean power from the regulator IC LM7805 filtered by capacitors C9, C7 and C5. The ATmega continuously monitors the AC zero crossing signal from the Optoisolator H11AA1. The optoisolator sends out a pulse for every zero crossing of the AC signal and when the weld button is press, the ATmega sends out dual pulse to another optocoupler triggering the gate of the TRIAC BTA26.

The first Pulse duration is 500ms which prepares the tab for welding, the second pulse is when the actual weld happens. The TRIAC by nature switch’s off at every zero cross. Here a little late after zero crossing but that would not make a difference as it a few micro seconds. Since the load will be an MOT and thus highly inductive, it is very important that load is switched ON at the peak of the sine wave and not at zero. When the Weld button is pressed and held down for a period of 800ms, this helps when you have to weld several cells at a time to built a battery pack. The TRIAC conducts 6 times with a two second delay between each weld. The LEDs 50ms to 120ms reflects the value set by the potentiometer.

Working video can be viewed here.

Scope View

scopeview
scope view

The above scope shows the following, respective to the numbers

  1. AC reference voltage (YELLOW)
  2. Zero Crossing ( LIGHT BLUE)
  3. Second pulse send from the Arduino to trigger the TRIAC ( PURPLE)
  4. Secondary wave from the MOT (BLUE)

With a little modification or as a complete replacement, this pcb can used for the cheap Chinese Models like the SUNKO 788H

SPW1

spw1

Sunko 708A Replacement:

One of the readers Giordano Cantori had been very nice to send me the pictures of his finished Sunko 708A Spot Welder after the stock board had failed. He had replaced it with the PCB described here with his own idea and design.

 

 

20170705_183712
Giordano Cantori’s successful manual welds

Here is the built in action

 

To upload the firmware you would need

  • Download Xloader. The Website to Xloader is here.
  • Download the required firmware here. Choose the 10 to 80ms timing firmware or the 100 to 450ms.

To upload, its very simple and straight forward. From xloader browse to the new firmware

Xloader

 

Next make sure you have arduino installed and the correct port number is selected in Xloader. Then click Upload. That is it.

160 thoughts on “DIY Arduino Spot Welder

  1. Thanks for sharing this design. Your welds look beautiful.

    You write the first pulse duration is 500ms, that seems long, is that correct?
    Also, how much pause you you use between first and second pulse?

    Like

    1. That’s correct is way too much. Could have been a typo.

      20 to 40 seems to be perfect and delay of 100ms would be fine before the second pulse. The idea is on the first pulse the joint should not glow or form a nugget but just hot. You could do some test pulse and get a sweet spot. Secondly quality of the weld depends on the electrode also. An oval or round tip is better than a sharp one.

      Hope this helps.

      Like

  2. Hi George,

    Where I could find the original firmware with timing from 100ms and up. I was working with times up to 80ms, but I find out that it doesn’t perform well when having multilayer weld (when joining cell groups together). So I believe 100ms and up should work better here.

    Thanks!

    Gediminas

    Like

      1. Thanks! Something is wrong with that version as it doesn’t react to a potentiometer. I have rolled back to previous version 10-80ms and it does react, but not this one which you have uploaded. Any ideas?

        Like

    1. According to the file size, the file did change, but the behaviour is still the same. Sticks to 450ms and doesn’t react to the potentiometer.

      Like

  3. Hi,

    Maybe you will have an idea what is wrong with my welder. After doing around 20 welds welder power decreases and it stops welding. After an hour I can do another 2-3 weld, but basically, it restores just the next day. That’s not something new with my welder it just got more annoying now as I use it more often.
    Any ideas are welcome. Thanks!

    Like

      1. Just checked with a thermal camera. Nothing except atmega and something around B1 gets warm. But their temperature goes just up to 31 degrees. So, I think it’s fine. I have checked my first batteries and find out, that my first batteries got much better weldings comparing with the last battery and the result which I have now. So, I believe it’s degrading over time.
        Any other ideas what to check?

        Like

      2. I assume that is the ambient temperature within the enclosure. I don’t see any reason anything on the PCB would get hot.

        Do several welds and check if the transformer is getting hot and add a fan inside the enclosure.

        Like

      3. Welding pins. The ones which touch the nickel plate to weld. At some points, I have soldered wires and if flux gets somewhere near the welding point, it sticks to the pins degrading the resistance and my welder stops performing.

        Like

      4. poner pines ó electrodos de tugsteno de 2,6 mm, aguantan mas soldaduras.

        El mié., 19 sept. 2018 a las 7:46, George Hobby () escribió:

        > georgehobby commented: “Ah ok. Glad all is well and working now. ” >

        Like

      1. Thanks for a quick reply. I think that configuration would be good:
        10, 30, 50, 60, 70, 80, 90, 100

        Like

      2. I have PCB, which is dated “NOV 2016”. I believe it’s v1.0? Does v2.0 firmware is compatible with v1.0 PCB?

        Like

      3. The firmware are not backward compatible. To address your issue, the timing is actually multiples of 10. Which goes like this 10, 20, 30, 40, 50, 60, 70, 80. That image was send to me by one of my customers and he had set it up like that. The default weld timing i send out is as above.

        Like

  4. As soon as the 220V is switched on, after the initial check, it goes immediately to continuous mode. In this condition if I use the mobile pliers I can weld a strip.

    Like

  5. Sorry… I replaced the buzzer but it does not work. To try I also put a buzzer without internal oscillator. In this case you hear a tiny “clickc”. This means the signal is there?

    Like

  6. Ho sostituito il buzzer ma non funziona. Per provare ho messo anche un buzzer senza oscillatore interno. In questo caso si sente un piccolissimo ” clickc ” . Questo vuol dire che il segnale c’è.

    Like

  7. All right, George. I’m sorry. No error. I had loaded the code while it was in use. However, the buzzer does not output any beeps.

    Like

      1. I tried with the previous code and with the initial code 100 ÷ 450 mS, but the buzzer does not work. I disconnected the buzzer and connected it with 5 volt dc working properly.

        Like

  8. Compilation error:

    Arduino:1.8.3 (Windows 8.1), Scheda:”Arduino/Genuino Uno”

    C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Gio\Documents\Arduino\libraries -fqbn=arduino:avr:uno -vid-pid=0X2A03_0X0043 -ide-version=10803 -build-path………………..

    Like

  9. I tried this latest version and works very well. I think I can use the version with 10 multiples of 10 to 80 mS. It seems to me the more balanced version. Thank you very much

    Like

  10. I haven’t added new code. Si, ora che ho ripristinato la pista sul circuito stampato funziona. Yes, now that I’ve restored the track on the circuit board works.

    Like

      1. Hi George. I tried with the new version and it is already much better. Maybe you could try it with lower times from 10 to 80 mS. Thanks in advance. Greetings

        Like

      2. The LED’s indicate time from 20 to 160 with steps of 20. like 20, 40, 60, 80,100, 120, 140, 160. You may need to mark the LEDs accordingly.

        Like

      3. You did a great job and I’m sorry to disturb you with these requests. Maybe 20 mS are still many. It seems to me that the electrodes consume too much and stick to the strip. Perhaps a range of 10, 20, 30, 40, 50, 60, 70, 80 might solve.

        Like

      4. Sorry I had not read it yet. Let’s try with 10, 20, 30, 40, 50, 60, 70, 80. Thank you very much.

        Like

  11. I am sorry to contact you again. How do I switch to continuous mode? Maybe I went by mistake because you broke the track that feeds the triac. It could happen by pressing twice the foot switch? Unfortunately the transformer of Sunkko 709A absorbs about 50A continuously.

    Like

  12. Hi George. Finally I could mount the card. I’ve added an interface for my Sunkko 709A soldering iron to your board. I replaced the triac with a BTA26-600 and IC5 with a MOC3052. I did some tests with the original transformer and already with 100 mS I think the power is too much. It would be possible to set lower times as 1/10 and 1/20 than existing ones?

    Like

      1. I do not know Arduino well and his programming. The ideal would be to maintain the current range of 100 – 450 mS along with a smaller 10 – 45 mS. Could you give me some indication? Thanks anyway for your patience and sorry for the many questions. Best regards.

        Like

  13. You mention, that you have uploaded Arduino sketch. Where I could download it? I would like to play with different timings which are not available now.

    Like

    1. I have replaced triac with the BA08-600, and now everything works as expected. So, the problem as I expected was in old Sunko transformer, and after replacing it with the one from a microwave completely solved the problem. Just a sad thing that from Sunko 788h finally, I was able to use just a frame 😦
      Thanks a lot for your help and patient helping me to solve it!

      Like

      1. You are welcome. Glad it worked.

        I realized how frustrating these cheap spot welders were before I bought one and no doubt they do last very long either and for the price paid for it, nothing is worth.

        Like

  14. Just desoldered IC5 and transformer was working just right after I switched the power on. Any other suggestions what should I check?

    Thanks a lot for your help!

    Like

  15. Hi,

    I have replaced my Sunko 788h PCB with this board. Later find out that Sunko transformer has a short or something because after switching it on the house fuse always switches off. Later I have replaced Sunko transformer from a microwave. And now I see that transformer always works doesn’t matter if the “weld” switch is pressed or not. I do assume that I have fried something on PCB. Could it be triac? Any suggestions are welcome.

    Gediminas

    Like

  16. Hi George. One last question before you buy your card. Can I use this card to replace the damaged card of my Sunkko 709A? I noticed that by connecting the transformer directly to the 220V line and without any load, it absorbs much current, breaking the 20A fuse. Can I connect your card without any problems? Thanks in advance. Best regards. Giordano.

    Like

    1. One of my customers had bought the board to replace his Sunko board. he knew what he was doing. With that said, you should not have any problems. You may need to upgrade the TRIAC to the one in description. but before the upgrade try with the existing and replace if needed.

      The transformer is not intended for use with the mains directly as it draws a enormous current but should be pulsed with an MCU.

      Like

  17. Hi George. Is the printed circuit board already assembled and tested or are parts purchased separately? Could it be possible to connect a 2×16 LCD? I’m sorry for questions. Best regards. Giordano

    Like

  18. Well, if the money is reasonable for me, of course I would have purchased your sketch. Why not thank a good man. How much is your sketch worth? I could make you a transfer in the payment system.

    Like

  19. I figured out the scheme, I needed registration. It’s bad when you do not understand: (That is, in the diagram of Atmega 328-n is shown as Atmega8? I realized that you have your sketch, but I did not find any references to it.

    Like

  20. Yes, yes, I already saw. Not perfect, but much better. Now, I see that your scheme is for mega8-p. It seemed to me that there was a mega 328p. Well, is the most important sketch for the microcontroller you wrote your own or taken from Albert?

    Like

    1. Linked schematic has to be downloaded and not “Right clicked and saved as an image”. The IC used is an ATmega328P like the one used in an Arduino Uno. The code is my own and it is quite clear that the code cannot be copied from Albert’s design as the schematic is completely different and so are the components.

      Like

  21. The scheme in the blog is very poor image quality, some denominations are not readable. I do not speak English, it’s a Google translator. I did not buy a payment – it’s very expensive. List of details, too, did not find.

    Like

  22. Good day. I live in Russia, the purchase of a motherboard is problematic, since delivery is ten times more expensive. Is it possible for the author to get schema and board files?

    Like

  23. Hi George,

    I am interested in purchasing your unit, but I have a few questions:

    The description on this blog says 110/220 is selectable via jumper, but the ebay store descriptions says a new transformer must be fitted. I have a house with only 110V available so please advise.

    Is there a schematic of the PCB available? I would feel more comfortable modifying a device that I plug into the mains if I had a schematic.

    Is the source code available?

    Thanks,

    Zach

    Like

    1. Dear Zac,

      Glad of you to visit my blog.

      The initial design was to incorporate a 110/220 transformer but i could not test it as i use the 240v. So went with the 220 PCB transformer. The schematic is very old. I have the the 110/220 version coming soon still in the design, testing phase. I have revised the blog to eliminate any confusion. You can use a 120 v transformer and connect LIVE to Pin 1 and NEUTRAL to Pin 5 on the pcb and power it using the Source PCB connector. That way the existing surge protection can also be made use of.

      Like

      1. Thanks for getting back to me so quickly! I can see you are anticipating the release of the next model.

        I will follow the link from the ebay store for the 110V transformer. Will post back here with results.

        Like

    1. Jorge un diez para ti, el PCB va estupendamente,suelda muy bién,Un Millón de grácias por tu ayuda.FELIZ AÑO 2017.y salud a todos,Un abrazo.

      2016-12-30 18:44 GMT+01:00 George Hobby :

      > georgehobby commented: “You should be connecting the pedal to the button > that says WELD.” >

      Like

  24. are you using a 3pin pedal ? if yes then i don’t know the pin configuration of that ? you will have to find it yourself. what is showed you is a simple push to on switch placed on a wood and used as a foot pedal

    Like

    1. El pedal que yó tengo es de 2 pines y quiero saber donde va conectado en el pcb,el dibujo que me has mandado pone conectar en +y – Weld indicame en que lugar, si es el botón de programación al lado del atmega y del diodo de 450 ms. Gracias te he mandado una foto del pcb que me mandaste indicamelo hay.Gracias

      2016-12-30 18:15 GMT+01:00 George Hobby :

      > georgehobby commented: “are you using a 3pin pedal ? if yes then i don’t > know the pin configuration of that ? you will have to find it yourself. > what is showed you is a simple push to on switch placed on a wood and used > as a foot pedal” >

      Like

  25. According to google I understand that you want to know where the pedal would go. The pedal is actually the “Weld” button. You could do a DIY version of the pedal with a push-to-on switch.

    Like

    1. Muchas gracias Jorge,si quisiera saber donde se coge la conexión del pedal,si de la entrada al pcb de 220 v ó de la salida al transformador MOT. Un saludo. el pcb va bién he echo lo que dices en el video y todo sale igual pero la pega es que sin pedal o pulsador no suelda. Grácias.

      2016-12-30 6:02 GMT+01:00 George Hobby :

      > georgehobby commented: “According to google I understand that you want to > know where the pedal would go. The pedal is actually the “Weld” button. You > could do a DIY version of the pedal with a push-to-on switch. ” >

      Like

      1. The weld button can be extended to make the pedal. The weld button is similar to an ‘On-Off’ switch so use that switch to make your own pedal switch.

        The pedal cannot be take from the input or the output of the board. Mention earlier is the weld button.

        Like

      2. Por favor me podias mandar un pequeño exquema ó dibujo de la conexión del pedal, en que cable. Un saludo y grácias.

        2016-12-30 12:27 GMT+01:00 George Hobby :

        > georgehobby commented: “The weld button can be extended to make the pedal. > The weld button is similar to an ‘On-Off’ switch so use that switch to make > your own pedal switch. The pedal cannot be take from the input or the > output of the board. Mention earlier is the weld butto” >

        Like

      3. Muchas gracias Jorge, y me pones también donde lo conectas.Un saludo.

        2016-12-30 15:46 GMT+01:00 George Hobby :

        > georgehobby commented: “I have send to your gmail a simple diagram showing > a foot pedal.” >

        Like

      4. conetar el cable del pedal al pcb. Gracias.

        2016-12-30 17:06 GMT+01:00 George Hobby :

        > georgehobby commented: “Connect what ?” >

        Like

    1. Hi do you have an email contact? I made a simple version of this, using another site but no welds, I dont have a scope, so not sure what is going on

      Like

      1. Without a scope it would be hard to trouble shoot. A DM would be slow to detect a pulse. When you say no Welds, the problem can be anywhere. In your design is the weld pulse depended on the zero cross ? Do you see a pulse when triggering without a zero cross ? You can see that with an resistor in series to an LED.

        Like

  26. Hola Jorge te he cogido un aparato, he echo todo como pone en el video,me podrias decir donde colocas el pedal para soldar, yo lo hago diectamente y no me suelda, soy de logroño lo he recibido esta semana,un saludo y Feliz Año.

    Like

Leave a comment