Arduino Timing Board for Spot Welder


HUGE range of batteries & accessories at www.batteryhookup.com 5% coupon "POWERWALLS"

Riplash

Member
Joined
May 27, 2018
Messages
71
Hello All,

I have been using hand timed spot welders recently, with different types of power sources such as lead acid motor batteries, 18650 cells in a 3sx20p, rewound microwave oven transformer. So far all of them work okay, but I personally like the Microwave Transformer the best. All methodscould be better with arepeatable precision timed weld. So I am working on using an Arduino Board to generate a timed pulse. I am going to use a big Solid State Relay to switch the High voltageAC going into the transformer, but if you are using a DC system, you could use a small SSR to to turn the big solenoid on.

I think this is what Daromer was planning on adding to his DIY spot welder video series but I haven't seen it finished yet

I am waiting for the SSR to arrive, so I haven't had a chance to finish it yet, but I wanted to post what I have so far in case it helps other people who are probably working on similiar things. I will continue to update it and probably put it on Github too.

Any way here is the sketch at the end, and a picture of the circuit on a breadboard
Ryan


image_dmriqz.jpg


Code:
/*Battery Spot Welder Timer
* This sketch will use an arduino to send a pulse through an SSR or SSC to weld tabs onto a battery
* A push button switch, LED Display, SSC or SSR, 5V source, Potentiometer, arduino type board will be needed
* Even Though this or similiar sketch is probably available online, I want to create it myself so I learn and
* get practice using it.
*
* The Potentiometer will be used to set the pulse length. The LED will be used to display the length of pulse
*
*
* Ryan C. Lash
* 25 June 2018
* riplash2008@gmail.com
* Melbourne, Florida
*
*/

/*First part of code sets up potentiometer. Pot needs to be hooked up to 5V and ground board. and middle pin
* goes to A0 as code is written.
*
* The next part of the code is for the LED readout to show how long the pulse will be. I will probably skip this part
* until I physically begin to install the arduino onto the welder, and use the serial log to test the code as best I can
*
* The last part of the code is to send a timed pulse to the SSR to send the welding current to do the weld.
*
*
*/



const int trigger = 2;
 //The button or trigger to fire the welder will be hooked up to digital pin number 2
 //The pin number 2 will have a 10k Ohm resistor that pulls pin high when trigger is pressed
 //Need to double check trigger wiring
const int SSC = 8;
 //This is the digital pin that the Solid State Relay will be conected to.
 //High is true or Fire and Low is false or off

void setup() {
 // put your setup code here, to run once:

// initialize serial communication at 9600 bits per second:
 Serial.begin(9600);
 //The serial communication is just to simulate and test the code


pinMode(trigger, INPUT);
pinMode(SSC, OUTPUT);
}

void loop() {
 // put your main code here, to run repeatedly:


int potValue = analogRead(A0);   //reads value of analog pin0, 0 is low 1023 is full
float pulseTime = float(potValue)/1023; 

 //this calculates pulse time in terms of fraction of a second
 //need to verify no problems with variable types int and float
 //This range is way shorter and way longer than it needs to be will edit code during testing

 //Read the input pin:
 int fireTrigger = digitalRead(trigger);
  if (fireTrigger==1){
  digitalWrite(SSC, HIGH);
  Serial.println("Fire__PowertoSSC");
  delay(pulseTime*1000);//Edited on forum (06/28/2018) fixed mistake: Multiply rather than divide
  digitalWrite(SSC, LOW);
  Serial.println("Fire_OFF");
  delay(3000);
  //This puts a delay to prevent a second pulse and gives time for wires to cool
  }
  else{  digitalWrite(SSC, LOW);
  }

// print out the value you read:
 Serial.println(pulseTime);
 Serial.println(potValue);
 Serial.println("fireTrigger Value=");
 Serial.println(fireTrigger);

 delay(150);    // delay in between reads for stability
}
 

Riplash

Member
Joined
May 27, 2018
Messages
71
Update:

The arduino circuit board works! I found a 240V 20A SSR from a surplus shop today, since it will be weeks before the Amazon one I ordered will be in. I wired the SSR and put it in a 4 x 4 metal junction box, and I added a recepticle to the project for a USB power jack. Then I put the code in a nano Arduino, put the breadboard with pot and push button, tried it and nothing..... Looked at the code and found out I divided when I should have multiplied. Changed code and tried it again and it works!

Here is a picture of it. It is blurry so I will get a better pic tomorrow.

image_xdcjax.jpg


I will add a bigger push button to the top of the 4x4box plate, probably a jack for a foot switch, a bigger Potentiometer, and probably add an LED display to show roughly what percentage of pulse length it will be. Then Documenting the wiring diagrams, and things will start.

Cheers,
Ryan "Rip" Lash
 

daromer

Moderator
Joined
Oct 8, 2016
Messages
5,661
Yeah you need to heavy duty ssr because the surge going back from the mot easily kills the ssr. one of the reasons i didnt get mine done since i didnt have any big enough. the cheap ass chinese ones failed one by one :D

I built mine on ESP8266 and an smaller Oled with some buttons to sed length of pulse and pulses in row. Works like a charm
 

Geek

Member
Joined
Aug 15, 2017
Messages
920
daromer said:
Yeah you need to heavy duty ssr because the surge going back from the mot easily kills the ssr. one of the reasons i didnt get mine done since i didnt have any big enough. the cheap ass chinese ones failed one by one :D

I built mine on ESP8266 and an smaller Oled with some buttons to sed length of pulse and pulses in row. Works like a charm

Would it be possible to use a diode, or diode with a resistor to suppress the surge?
 

ozz93666

Member
Joined
Feb 22, 2017
Messages
341
Geek said:
daromer said:
Yeah you need to heavy duty ssr because the surge going back from the mot easily kills the ssr. one of the reasons i didnt get mine done since i didnt have any big enough. the cheap ass chinese ones failed one by one :D

I built mine on ESP8266 and an smaller Oled with some buttons to sed length of pulse and pulses in row. Works like a charm

Would it be possible to use a diode, or diode with a resistor to suppress the surge?

My understanding is the only thing generating surge is the motor bike starter relay sometimes used to switch the heavy currents, when switched off the collapsing magnetic field generates a big reverse voltage , to protect from this just put a diode across the relay coil terminals... I think if ssr are failing it's because the welding current is too high for the ssr, much better build your own withIRF1405 very cheap , can handle KA when in parallel( see youtube from Indian guy)....

After the timer module I bought from ebay failed I decided to build my own from what I had a round me ... A 10uF capacitor constantly charges from 12V through a 4.7K ohm resistor .... pressing a button dumps the power in the capacitor into a small 12V relay ... only enough energy in the capacitorto close the contacts for perhaps 75m sec ... this is the pulse .... always the same , once the button is released the capacitor recharges fully in 1/3rd of a second ready for next pulse . Pulse length can be adjusted by changing the capacitor , this pulse is used to activate the power relay or mosfets ...

We shouldn't be adjusting the pulse time too much... once it's set up for the thickness of Nistrip you are using , that's it.
 

hbpowerwall

Administrator
Joined
Oct 7, 2016
Messages
2,065
I really think i should go this route rather than buying a 709ad...
 

Riplash

Member
Joined
May 27, 2018
Messages
71
Geek said:
daromer said:
Yeah you need to heavy duty ssr because the surge going back from the mot easily kills the ssr. one of the reasons i didnt get mine done since i didnt have any big enough. the cheap ass chinese ones failed one by one :D

I built mine on ESP8266 and an smaller Oled with some buttons to sed length of pulse and pulses in row. Works like a charm

Would it be possible to use a diode, or diode with a resistor to suppress the surge?
Right now the system is using a Microwave Oven Transformer (M.O.T.)which uses AC, so a diode won't work in this case. If you were using DC current such as car batteries, or 3sx80p 18650 battery or similiar, you could use this setup with a small Relay to turn on and off the solenoid. You could put a diode between the Solenoid coil and the small relay, but I don't think it would be needed as the transients from the solenoids coil would not cause any problem or damage.

Cheers,
Ryan
 

daromer

Moderator
Joined
Oct 8, 2016
Messages
5,661
A transformer generates a different kind of surge compare to a coil running on DC... The cheap china ssr is like 5A max even though they state 20A. it works for a while...
 

Riplash

Member
Joined
May 27, 2018
Messages
71
Here are some better pictures: It was rainy and dark all day yesterday so I couldn't get any better pictures till today. I am using 120V, and am right about the limit of Amps and power that everything can handle. I added two loops to the low voltage side of the transformer and the wire is tightly packed in the Transformer. I am pulling about 19Amps through the high voltage coil side. And 600-1000 A through the low voltage sidedepending on what I am welding.

For the mean time I am going to just use marks on the potentiometer to set the timer pulse, and if I need to measure the potentiometer or time pulse, I will use serial communication through USB. The next things I will work on are a better welding wand, and see if two or more shorter pulses are better than one long pulse. Canany of you point me to information about the benefits of using multiple shorter pulses versus one longer pulse?Pictures Follow:

Cheers,
Ryan




image_cplalg.jpg

image_yhoqct.jpg
 

Riplash

Member
Joined
May 27, 2018
Messages
71
I haven't had a chance to post my updates on the spot welder recently. I have been working on it in whatever spare time I have, but I haven't had anytime to write about what I have done.


I added a foot switch to the system. I left the push button on top and added a foot switch to trigger the pulses. This led to the better welding wands....


image_lucuqb.jpg

The picture is too blurry to see the cool detail, but the business ends are cut at an angle....


I replaced the 3x 12awg speaker wire with 6 AWG welding wire, and then I made the welding electrodes from 8 awg solid copper wire. I connected the welding wire to the electrodes with $5.00 connectors I found at home depot. I will get the exact name and part number soon. But one of the cool things I figured out was cutting the end of the 8AWG electrodes at an angle. When I weld nickel strips, I can use the points of the electrodes and I can get a good weld. Then when I solder glass fuse legs, or other wire type of fuses or connectors, I put the flat side on top of the wire, and I put the whole other flat side of the other electrode on the battery terminal. The larger surface area helps prevent heat from building up where you don't want it, and concentrates the heat on the wire to battery weld. I am a lot less likely to blow a hole in the battery.

I will get some more pictures and maybe a video up soon.

-Ryan
 

Bubba

Member
Joined
May 9, 2018
Messages
301
Is it hard to spot weld fuse wire or axial fuses?

I am wondering about doing it myself on my first pack instead of soldering.
 

Riplash

Member
Joined
May 27, 2018
Messages
71
Bubba said:
Is it hard to spot weld fuse wire or axial fuses?

I am wondering about doing it myself on my first pack instead of soldering.

It is really easy to spot weldthe leads ofaxial fuses. If you use tinned copper wire as fuse wire, it is really difficultto spot weld the fuse wire asit just conducts electricity too well. If you use steel or tin fuse wire you can spot weld that real easy.

I have had good luck getting good welds to batteriesusing 0.030" MIG solid Welding Wire for mild Steel, and 0.041" 304SS safety wire. But I haven't fully analyzed if the welding wire or SS safety wire will make a good fuse or not
 

daromer

Moderator
Joined
Oct 8, 2016
Messages
5,661
Bubba check out my videos about spot welding and you see how easy it is.
 
Top