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

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

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
}