Close

Welding at zero volts

A project log for Oh No, Not Another Microwave Spot Welder

I didn't just rewind the microwave transformer — I kept its control board and rewrote the firmware to run a spot welder.

wicherswichers 2 hours ago0 Comments

Now the fun part. Switching a big inductive-ish load at a random point on the mains sine wave means a random inrush current every time — hard on the relay contacts and inconsistent weld energy. Switch at the zero crossing and it's clean and repeatable.

The board's PC817 optocoupler already senses mains L. On the safe isolated side it pulls the input high near zero volts and low while the mains is away from zero. I built a zero-cross monitor test mode to characterise it (no mains-side probing — the opto isolates me):

The relay's own mechanics are the other half. It takes 15 ms to close and 5 ms to release. Zeros come every 10 ms. So:

Both the make and the break of weld current now land at zero volts, every weld. And because I chased the microsecond timer bugs earlier, the 5 ms offsets are actually accurate.

Last touch: the settings (pre-weld, pause, weld times) persist across power cycles. The chip can rewrite its own flash via a boot-ROM API, so I reserved a 4 KB sector and append 4-byte records into it — 1024 saves before it needs erasing, comfortably over 100k saves in the flash's lifetime. Set your times once, they're there next time.

It welds. Firmware, programmer, schematics-as-far-as-I-have-them, and the full pinout are on GitHub.

Discussions