Project in progress
DIY Spotwelder - Part 2

DIY Spotwelder - Part 2

I want to make a spot welder for battery packs or other stuff that cannot be soldered.

  • 549 views
  • 0 comments
  • 9 respects

Components and supplies

Necessary tools and machines

09507 01
Soldering iron (generic)

Apps and online services

About this project

WARNING! This project doesn't work. To know why, please go to part 3 (https://create.arduino.cc/projecthub/Westpol/diy-spot-welder-part-3-700923)

My Upgraded Design

I've thought about the first design of my spotwelder (https://create.arduino.cc/projecthub/Westpol/diy-cd-spot-welder-part-1-b60f05) and changed everything. The power supply is now a 5200mAh Li-Po battery with a discharge rate of 45c, the Mosfets are 20 130W ones and beside frome the pulse time, there is also the energy shown in joule. I also put two caps at the 5V pin of the Arduino to power the chip, because if you short the battery contacts the voltage of the battery will drop to almost nothing. In part 3, I will also clean up the sketch and with the help of a voltage divider to measure the voltage of the battery and some maths, the energy will be more accurate.

ToRebuildTheProjectByYourself

When you want to rebuild this project by yourself, you should be familiar with the basics of electronics, because if you do something wrong, it can kill your battery or the other components used in this project. Also the system isn't tested yet, so if you are not sure that it will work, wait until I upload part 3 where I'll test it.

TheSafety

The whole design isn't really save. I don't have any fuse installed and the high power traces are close to each other, so you should have an eye on it while working.

Code

CD_spot_welder_Serial.inoC/C++
int power = 1920;       // power of the battery in Watts
int MOSFETpin = 3;
int piezopin = 13;

int footswitchorbutton = 2;

int dlay = 0;
unsigned long timetilnext;
unsigned long locksec;
int oneafterlocked;
int prevdlay;
int prevlock;
int joule;

void setup() {
  pinMode(MOSFETpin,OUTPUT);
  pinMode(footswitchorbutton,INPUT_PULLUP);
  pinMode(A0,INPUT);
  Serial.begin(9600);
  timetilnext = millis();
  locksec = 0;
}

void loop() {
  
  if(millis() <= timetilnext){
    locksec = (timetilnext-millis())/1000;
    if(locksec != prevlock){
    Serial.print("locked for:");
    Serial.print(locksec);
    Serial.println("s");
    prevlock = locksec;
    }
    oneafterlocked = 1;
  }
  
  
  dlay = map(analogRead(A0),0,1023,1,15);
  dlay = dlay*10;
  
  if(millis() >= timetilnext){

  if(dlay != prevdlay || oneafterlocked == 1){
  joule = dlay/.1000*power/10000;
  Serial.print("Pulse:");
  Serial.print(dlay);
  Serial.println("ms");
  Serial.print("Energy:");
  Serial.print(joule);
  Serial.println("J");
  oneafterlocked = 0;
  prevdlay = dlay;
  }
  if(digitalRead(footswitchorbutton) == LOW){
    tone(piezopin,1000);
    delay(500);
    noTone(piezopin);
    delay(500);
    tone(piezopin,1000);
    delay(500);
    noTone(piezopin);
    delay(500);
    tone(piezopin,1000);
    delay(500);
    noTone(piezopin);
    delay(500);
    tone(piezopin,2000);
    delay(1000);
    noTone(piezopin);
    delay(500);
    digitalWrite(MOSFETpin,HIGH);
    delay(dlay);
    digitalWrite(MOSFETpin,LOW);
    timetilnext = 5000+millis();
  }
  }
  
}
LCD Spot WelderC/C++
#include <LiquidCrystal.h>

int power = 1920;       // power of the battery in Watts
int MOSFETpin = 3;
int piezopin = 13;
int lightpin = 4;
int footswitchorbutton = 2;

int dlay = 0;
unsigned long timetilnext;
unsigned long locksec;
int oneafterlocked;
int prevdlay;
int prevlock;
int joule;

const int rs = 8, en = 7, d4 = 9, d5 = 10, d6 = 11, d7 = 12;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

void setup() {
  pinMode(MOSFETpin,OUTPUT);
  pinMode(footswitchorbutton,INPUT_PULLUP);
  pinMode(A0,INPUT);
  pinMode(lightpin,OUTPUT);
  digitalWrite(lightpin,HIGH);
  timetilnext = millis();
  locksec = 0;
  lcd.begin(16,2);
  lcd.clear();
  
}

void loop() {
  
  if(millis() <= timetilnext){
    locksec = (timetilnext-millis())/1000;
    if(locksec != prevlock){
    lcd.clear();
    lcd.setCursor(2,0);
    lcd.print("locked for:");
    lcd.setCursor(7,1);
    lcd.print(locksec);
    lcd.print("s");
    prevlock = locksec;
    }
    oneafterlocked = 1;
  }
  
  
  dlay = map(analogRead(A0),0,1023,1,15);
  dlay = dlay*10;
  
  if(millis() >= timetilnext){

  if(dlay != prevdlay || oneafterlocked == 1){
  joule = dlay/.1000*power/10000;
  lcd.clear();
  lcd.setCursor(0,0);
  lcd.print("Pulse:");
  lcd.print(dlay);
  lcd.print("ms");
  lcd.setCursor(0,1);
  lcd.print("Energy:");
  lcd.print(joule);
  lcd.print("J");
  oneafterlocked = 0;
  prevdlay = dlay;
  }
  if(digitalRead(footswitchorbutton) == LOW){
    tone(piezopin,1000);
    delay(500);
    noTone(piezopin);
    delay(500);
    tone(piezopin,1000);
    delay(500);
    noTone(piezopin);
    delay(500);
    tone(piezopin,1000);
    delay(500);
    noTone(piezopin);
    delay(500);
    tone(piezopin,2000);
    delay(1000);
    noTone(piezopin);
    delay(500);
    digitalWrite(MOSFETpin,HIGH);
    delay(dlay);
    digitalWrite(MOSFETpin,LOW);
    timetilnext = 5000+millis();
  }
  }
  
}

Schematics

The scematic
spot_welder_2_bkCjCP5Ixr.fzz
The scematic as PDF

Comments

Similar projects you might like

DIY CD Spot Welder - Part 1

Project in progress by Westpol

  • 5,095 views
  • 33 comments
  • 24 respects

A DIY Smart Insole to Check Your Pressure Distribution

Project tutorial by Juliette van der Pas

  • 10,151 views
  • 11 comments
  • 38 respects

DIY Arduino Cat Feeder

Project showcase by Alexander Ulitin

  • 4,127 views
  • 3 comments
  • 12 respects

DIY SMD Rework Station

Project tutorial by Alexander and Manoj B R

  • 3,606 views
  • 29 comments
  • 31 respects

DIY Magnetic Table Hockey With RGB Lights and Sensors

Project tutorial by evive

  • 3,608 views
  • 0 comments
  • 19 respects

DIY Arduino RC Mars Rover

Project tutorial by Johnathan Hottell

  • 3,611 views
  • 1 comment
  • 12 respects
Add projectSign up / Login