Hesam Moshiri
Published © CC BY-NC

30A AC Soft Starter (Inrush Current Limiter)

30A AC Soft Starter (Inrush Current Limiter) With Fail-Safe

IntermediateFull instructions provided1 hour181
30A AC Soft Starter (Inrush Current Limiter)

Story

Read more

Schematics

Schematic

Code

Code

C/C++
#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);
    if (rawTemp > 800)
    {
      fault();
    }
    counter = 0;
    rawTemp = 0;
    rawPot = 0;
  }
}


void fault()
{
  while (1)
  {
    digitalWrite(Relay1, HIGH);
    digitalWrite(Relay2, LOW);
  }
}

Credits

Hesam Moshiri

Hesam Moshiri

51 projects • 32 followers
https://www.youtube.com/c/MyVanitar/videos

Comments