Dear Community,
I'm trying to run a 24VAC (yes AC) pump with my Mega. I had it working with an NE555 before but for some
reason I would like to run it with the Arduino Mega.
The hardware config is very easy:
Pin 21 goes +5V via 220 ohm to an optocoupler. Pin 20 is set to LOW on the other side.
The coupler switches 5V to the Gate of an IRF3205. There is a 1 Mohm between Gate and Source.
Source, 5V and Arduino have a common minus.
The transistor switches the minus to to one side of the pump.
The other side of the pump is connected to a 24V DC source.
Between those two is a Schottky-diode (CMBR 10100).
The pump is a ULKA EX5 24V~ 50-60hz 48W
I have simulated the process with a LED and everything works fine. When I connect the pump it starts
working but cable start burning and the system gets very hot. Does someone has another idea how to
run this pump.
I need to tune the dosing via the hz.
Many thanks in advance
Martin
Here is the code I use:
int hz = 10;
int ledState = LOW;
long previousMillis = 0;
long interval = hz;
void setup()
{
pinMode(20, OUTPUT);
pinMode(21, OUTPUT);
digitalWrite(20, LOW);
}
void loop()
{
unsigned long currentMillis = millis();
if(currentMillis - previousMillis > hz) {
previousMillis = currentMillis;
if (ledState == LOW)
ledState = HIGH;
else
ledState = LOW;
digitalWrite (21, ledState);
}
}