Automatic Watering System: LCD problem when pump is on
Posted: Wed Feb 26, 2025 12:02 pm
We are trying to build an "Automatic Watering System" using Arduino. We have gone through the videos posted by Science Buddies and combined several different videos to build this.
Arduino is connected to moisture sensor, a buzzer (when pump turns on), LEDs (green and red to show pump off/on respectively), and an LCD display to show (mositure level, pump status). Pump is a very small white pump (3-5V), and initially when it was connected on arduino 5V power-supply, the whole circuit didn't work. Hence an external power supply (2 AA battery pack of 3V) was added together with MOSFET. It was made sure that the Arduino power supply and external supply is not short circuited, but the grounds are connected together to have a common ground. When the mositure sensor is dipped in water, the green LED is on, the LCD shows 100% moisture level and PUMP OFF. As soon as the moisture sensor is removed from water (dry), the LED switches to red, the buzzer is turned on, the LCD shows moisture level low and PUMP ON. Then, the pump is turned on (with about 500ms delay between the LCD display and pump operation). Water is added, pump works, but the LCD display is messed up showing weird characters. If the moisture sensor is dipped inside water, the LED turns green, buzzer is off, pump is off, but the LCD display remains messed up. This maybe happening because the power supply fluctuations when pump is turned on. A current limiting resistor was added between the MOSFET Gate and the arduino pin. Yet, same issue is observed.
Could you please let us know how to fix the LCD? The LCD, the moisture sensor, the the buzzer, and LEDs are all on the arduino power, the pump on a separate low voltage power based on pump capability. Searching on the net, it seems a capacitor should be added. Where should we add this and how? Is a Diode also needed? Please let us know. Thanks in advance.
We want to fix this ASAP as the project is due in couple days. So any quick suggestion would be very useful.
Arduino is connected to moisture sensor, a buzzer (when pump turns on), LEDs (green and red to show pump off/on respectively), and an LCD display to show (mositure level, pump status). Pump is a very small white pump (3-5V), and initially when it was connected on arduino 5V power-supply, the whole circuit didn't work. Hence an external power supply (2 AA battery pack of 3V) was added together with MOSFET. It was made sure that the Arduino power supply and external supply is not short circuited, but the grounds are connected together to have a common ground. When the mositure sensor is dipped in water, the green LED is on, the LCD shows 100% moisture level and PUMP OFF. As soon as the moisture sensor is removed from water (dry), the LED switches to red, the buzzer is turned on, the LCD shows moisture level low and PUMP ON. Then, the pump is turned on (with about 500ms delay between the LCD display and pump operation). Water is added, pump works, but the LCD display is messed up showing weird characters. If the moisture sensor is dipped inside water, the LED turns green, buzzer is off, pump is off, but the LCD display remains messed up. This maybe happening because the power supply fluctuations when pump is turned on. A current limiting resistor was added between the MOSFET Gate and the arduino pin. Yet, same issue is observed.
Could you please let us know how to fix the LCD? The LCD, the moisture sensor, the the buzzer, and LEDs are all on the arduino power, the pump on a separate low voltage power based on pump capability. Searching on the net, it seems a capacitor should be added. Where should we add this and how? Is a Diode also needed? Please let us know. Thanks in advance.
We want to fix this ASAP as the project is due in couple days. So any quick suggestion would be very useful.