I use an Arduino Mega combined with a RLY08 relay from robot electronics to control a dosing pump for my aquarium.
The relay board is controlled via i2c. I can control 8 different relays in this way and without adding the dosing pump, it works…
However, at the moment I add the dosing pump (12V, 150 mA) and the power supply, after about 5 times switching the pump on and off, the Arduino freezes and so does the relay. I have to reset the Arduino to get it working again.
Without putting the power adapter into the outlet, it does not freeze and the relay is functioning as it should do.
I think there is a kind of shock or leaking current to the arduino. I also made a ‘counter’ that counts the amount of seconds the pump is turned on. If the adapter is plugged in, sometimes the value goes from 3 seconds to a strange value like 3200300. This does not occur if the adapter is not connected. Therefore, it’s not a software bug.
I have tried 1K, 1K8 and 10K pull up resistors, but all without succes. I also tried another adapter, same result.
I hope somebody can help me, I’m so frustrated! It took me a lot of time trying to find the cause.
Thanks in advance!