Author Topic: Open source TIG welder logic controller  (Read 1078 times)

0 Members and 1 Guest are viewing this topic.

Offline robby60259Topic starter

  • Newbie
  • Posts: 4
  • Country: us
Open source TIG welder logic controller
« on: December 15, 2023, 04:15:01 am »
Hello, I am building a welder and I need a circuit that can provide a control signal to adjust the frequency and balance (duty cycle) of the output. I would like to use an Arduino Uno if possible to control these two functions via two potentiometers. I need help with the code. I would prefer the frequency to be adjustable from approximately 50Hz to maybe 200Hz and the duty cycle around 20% to 80%. The values only need to be an approximation, the higher frequency helps with arc control, and the variable duty cycle helps with cleaning and penetration when welding aluminum. This sketch is as far as I have got. Am I going in the right direction? Any help would be greatly appreciated.

byte oscOut = 3 ; 
int pot1 = A0;
int pot2 = A1;

void setup()
{
  pinMode(oscOut, OUTPUT);
  pinMode(pot1, INPUT);
  pinMode(pot2,INPUT);
}
void loop()
{
analogRead(pot1);
analogRead(pot2);

  OCR2A = (analogRead(pot1)-380);     // defines the frequency 51 = 38.4 KHz, 54 = 36.2
                                                                                KHz, 58 = 34 KHz, 62 = 32 KHz
  OCR2B = ((analogRead(pot2)-380)/2);     // defines the duty cycle - Half the OCR2A value
                                                                                                                    for 50%
  TCCR2A = _BV(COM2B1) | _BV(WGM21) | _BV(WGM20); 
  TCCR2B = _BV(WGM22)  | _BV(CS21);             
}
« Last Edit: December 16, 2023, 03:10:31 am by robby60259 »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->