Search code examples
arduinoarduino-unoarduino-idearduino-c++arduino-esp32

How to stop blinking relay in arduino


Concept :
There is container and it is attached 4 water monitoring sensors.They should turn on when there is water in the container and turned off when there is no water.For sucking water there is 5v mini submerged motor.The water level is controlled by an ultrasonic sensor , when there is particular level the motor should turn off.The motor and 4 sensors are connected through a 1 Channel 5V Relay Module without Optocoupler.when the motor is turn on there is no supply for sensors and when motor is turned off there will be supply for sensors.Now the problems is

The motor is flickering only when the motor is turned on and there is no issue when the motor is off.
Note : The motor is connected directly without any active/passive components.

How to resolve it??


Solution

  • Are you running your motor/pump directly from the Arduino? If so, the Arduino probably can't source enough current from the pin, causing it to act erratically. Try using a separate source for the motor, and switching the relay on/off with the Arduino.