Dual pulse timer (for spot welder)

Hi !
Can anyone help me build a dual pulse timer using an Arduino UNO or NANO ?
I am at the beginning so don't throw with rocks .
I want to be able to set the length of the pulses independently and I want them to be displayed on a screen .
The pulses will command a SSR .
Thank you !

How long (range: milliseconds / microseconds ) should the pulses be and what is the interval between them ?

Edit:
Does the pulse to the SSR (solid state relay) have to be synchronised with an AC power source ?

6v6gt:
How long (range: milliseconds / microseconds ) should the pulses be and what is the interval between them ?

PULSE 1 = 1ms TO 1000ms

PAUSE = 1ms TO 1000ms

PULSE 2 = 1ms TO 1000ms

6v6gt:
Does the pulse to the SSR (solid state relay) have to be synchronised with an AC power source ?

I don't think it's a must . I don't have any experience in spot welding .
I read something with zero-crossing detection but I really don't know .

Thank you for helping me !

The timer itself is trivial. Use millis() as the timer.

I'd suggest three 10K potentiometers and a push button as input devices ( and an LCD 1602 with I2C backpack) for the display device. Get it working with a LED first then integrate it later with your SSR.

Maybe it would be nice to synchronise the on/off transitions with a zero crossing if it is a heavy AC mains application.

6v6gt:
The timer itself is trivial. Use millis() as the timer.

I'd suggest three 10K potentiometers and a push button as input devices ( and an LCD 1602 with I2C backpack) for the display device. Get it working with a LED first then integrate it later with your SSR.

Can you help me start , please ?
What Arduino should I order ?

From what you have described, and ignoring the high power electronics, your needs could be satisfied by:

1 x Arduino Nano
3 x 10K linear potentiometers
1 x push to make switch
1 x indicator led + 330 Ohm resistor
1 x 1602 LCD display 5volt with backlight
1 x I2C backpack for the 1602 (optional)
miscellaneous connecting wire, breadboard or solder board etc.

With that, and an appropriate sketch, you could get as far as lighting the led to indicate when the SSR would be switched on.

However, if you are just starting with the Arduino and you may want to experiment afterwards reusing these components for other things, then you would be better off with an Arduino starter kit. The correct one would anyway contain all those components - but check before ordering.

The other thing I would say is before you even begin to order stuff, get the design of the spot welder and all the high power components onto paper first and attach a copy to this post. There are sufficient experts on this forum to validate any such design and it is not my expertise area.

I don't have a problem with the design of the welder .
My problem is dual pulse timer :slight_smile: .
And Arduino is a big unknown thing for me .
I will begin to get the components .
Thanks again .

LE : what version of Arduino Nano ? What ATmega ?
Can you post a link ?

You'll see the official Nano it in the "Products" link at the top of this page. However, it appears there to be sold out. Anyway, any Arduino Nano (even clones) will do. It is not critical, but ideally with an ATMega328p chip. Here is an example.

So , I have the Arduino Nano and 2 OLED LCD's (128x64 and 128x32) .

OK. Start to simulate your spot welder with simple Serial.print() statements.
Welder pulse 1 start @ ? mS.
Welder pulse 1 end @ ? mS.
Pause start @ ? mS.
Pause end @ ? mS.
Welder pulse 2 start @ ? mS.
Welder pulse 2 end @ ? mS.

You can also have a look for some libraries which will enable you to write "Hello World" on your chosen OLED screen.

Because of the inductive load, the spot welder code I have seen typically switches the weld power mid cycle after zero crossing. Typically there is zero crossing detection and an interrupt setting a flag variable to start the weld process.

I doubt that you will be doing other things during the weld cycle, and blocking code with delay() should be fine for the two pulses.

pesudo code

zeroCrossingFlag = false; //set flag false and wait for next zero crossing
  while (!zeroCrossingFlag) {};
  delayMicroseconds(triggerDelay);//typically half cycle to switch at max voltage/minimum current for inductive load
  digitalWrite(TRIAC, HIGH);
  delay(firstPulse);//preWeld time
  digitalWrite(TRIAC, LOW);
  delay(pause);
  zeroCrossingFlag = false; //set flag false and wait for next zero crossing
  while (!zeroCrossingFlag) {};
  delayMicroseconds(triggerDelay);
  digitalWrite(TRIAC, HIGH);
  delay(secondPulse);//weld time
  digitalWrite(TRIAC, LOW);