By Hesam Moshiri, info Bao
Copyright: Attribution-NonCommercial-NoDerivs (CC-BY-NC-ND)
Are you tired of dealing with the damaging effects of inrush currents on your industrial equipment? Look no further than an AC inrush current limiter (soft starter). Inrush current, or surge current, is the large initial flow of current when starting a load. This surge can damage equipment, shorten its lifespan, and lead to costly downtime. With an AC inrush current limiter, these problems are easily mitigated. A soft starter limits the initial current flow, ensuring a smooth and efficient startup while protecting your equipment from damage.
That’s why I designed this AC soft starter with an integrated fail-safe mechanism. During startup, the inrush current passes through a power resistor, and after a delay (which can be adjusted from 1ms to 1s), a 30A power relay bypasses the resistor and applies full power to the load. In case of a relay failure, the power resistor will prevent further damage; the fail-safe relay is triggered by the logic circuit to disconnect the load, protecting the system. Three LEDs indicate the Supply, Normal, and Fault conditions. I used the low-cost ATTiny13 MCU for the controller.
For schematic and PCB design, I used Altium Designer 23. The fast component search engine (Octopart) helped me quickly gather information on components and generate the BOM. For high-quality PCBs, I sent the Gerber files to Wellcircuits. I used the Arduino IDE to write the MCU code, which is easy to follow and understand.
Let’s get started 🙂
Circuit Analysis
Figure 1 shows the schematic diagram of the device. As you can see, the core of the circuit is the ATTiny13 microcontroller [1].
Figure 1
Schematic diagram of the 30A AC Soft Starter (Inrush current limiter)
Let’s go over the schematic from the top. AC-IN is the connector for the AC mains input. R2 is a 10D5651K [2] varistor used to suppress voltage spikes at the input. U1 is the HLK-PM12 [3] AC-to-DC module that outputs 12V, suitable for driving the relays. R1 is a 5K potentiometer used to adjust the delay, which can be set anywhere from 1ms to 1s. ISP is a male pin header for the AVR ISP programmer. IC1A and IC1B are parts of the ATTiny13 microcontroller. R3 is a pull-up resistor for the RESET pin. C2 and C3 are decoupling capacitors for the VCC pin.
R4 and C4 form an RC filter at the input of REG1, which is the 78L05 SOT-89 5V regulator [4] to provide stable 5V power to the microcontroller. D1 is a 3mm yellow through-hole LED indicating proper supply voltage, and R5 limits the current to D1. C5 and C6 are output capacitors to stabilize the regulator’s output voltage and reduce noise. NTC is a 2-pin XH connector for wiring a 10K NTC thermistor to the board. R6 and NTC form a voltage divider, where changes in temperature affect the output voltage. If the temperature increases on the NTC side, the output voltage increases, and vice versa. C6 is a decoupling capacitor to reduce noise.
There are two identical relay circuits in this design. Let’s look at one of them. Q1 is a Si2302 Mosfet [5] used to drive the K1 relay. R10 is a pull-down resistor for the Gate pin of Q1 to prevent unwanted triggering of the Mosfet. D2 is a 1N4007 diode [6] that protects the Mosfet from reverse currents when the relay coil is energized. D4 is a 3mm red LED indicating a fault condition. C8 helps suppress voltage spikes during relay activation and deactivation. R9 is a 27-ohm, 20W power resistor that limits the inrush current; you can select a different value depending on your specific application.
PCB Layout
Figure 2 shows the PCB layout of the design. It’s a two-layer PCB, and I used a mix of SMD and through-hole components. In my view, component placement is the most critical aspect of good PCB design. In this PCB, the power and logic circuits are clearly separated.
Figure 2
PCB layout of the 30A AC Soft Starter (Inrush current limiter)
Code
I used the Arduino IDE to write and compile the MCU code. I installed the MicroCore [7] library to support the ATTiny13. The compiled HEX file is already available for download [8]. To program the MCU, simply connect your programmer to the ISP header on the PCB and upload the code. Make sure to set the fuse bits for the 9.6MHz internal clock and disable the clock division (DIV8).
If you plan to modify the code, here it is:
#define Relay1 1
#define Relay2 2
analog_pin_t potDelay = A3;
analog_pin_t NTC = A2;
unsigned int rawTemp = 0, rawPot = 0, delayms = 1;
unsigned char counter = 0;
void setup() {
pinMode(Relay1, OUTPUT);
pinMode(Relay2, OUTPUT);
digitalWrite(Relay1, LOW);
digitalWrite(Relay2, LOW);
}
void loop() {
rawTemp = analogRead(NTC) + rawTemp;
rawPot = analogRead(potDelay) + rawPot;
counter ++;
if (counter == 10)
{
rawTemp = rawTemp / 10;
rawPot = rawPot / 10;
delayms = map(rawPot, 0, 1023, 1, 1000);
delay(delayms);
digitalWrite(Relay2, HIGH);