Hey guys, so I have this plant watering project that turns a 5v/220mA max water pump when the soil moisture goes below a point.
The pump turns on and off as the code instructs it to do. However, the LCD freezes when the pump is working with load (water). Whenever the pump is working without water, the LCD works fine, only whenever there is water does the LCD freeze.
I am using a 5v AC to DC converter (600 mA) to power my Arduino, pump, soil moisture sensor, the 16x2 LCD display, and some other small components (transistors, relay) to drive other features (vent control, lights).
I assume it is a matter of how my power circuitry is wired up.
The load on the AC to DC converter is the Arduino Nano, a 3.3V Capacitive Soil Mositure Sensor, a 5V Pump, and a 16x2 LCD Display.
Nice Schematic! Can you post links to the "Technical" information on the pump, LCD and 5V supply. I believe you are correct. I think the system is on the cusp of working and that when you start pumping water the pump draws more current and may be injecting electrical noise into the system and or causing a voltage drop at the LCD and Nano which is not as sensitive as the LCD. The LCD has no contrast setting VO (pin 3) and this is extremely sensitive to voltage. I suggest you place maybe a 10K pot from VCC to Ground with the wiper feeding VO as a test. Let us know how it goes.
Yes, it looks like a powering problem.
Please post links to the stuff in the power chain. Their data are interesting as well as how power is distributed. Schematics could tell things....
Can you post the data sheet that says that 220mA is the stall current. The stall current is the max current the current that the power supply must be able to supply without drooping voltage. A motor with a maximum running current of 220mA can draw 10 times the running current or more, briefly, every time that it starts. The motor supply must be able to gracefully handle that current or the voltage will drop. If the voltage drops too much it can effect other parts of the circuit and/or cause the processor to reset.
Thank you! Honestly I just surfed around to get the power consumption as these are popular items for arduino projects. What I'll try to do is use a different power supply for the pump and see what happens.
The motor's stall current should be listed in the motor data sheet. In the absence of a data sheet, the stall current can be estimated. To estimate the stall current, measure the motor winding resistance. Zero your meter lead resistance (see below) before measuring the motor coil resistance. Take several measurements rotating the motor a bit between readings. Use the lowest reading in the calculation. The estimated stall current is the motor supply voltage divided by the measured resistance.
Short the meter leads together and note the reading. Subtract the noted reading from each subsequent winding resistance readings to get the corrected measured winding resistance.
So I added another power supply and it works for about 5 seconds (when the pump starts working), then the LCD freezes. However, the Arduino program keeps on working. What could be causing the LCD to freeze??
I mean yes, the pump causes the problem. What I mean is that the arduino is not resetting, it is the LCD that is having issues. Despite the fact that I added a new power supply that connects directly to AC.
Would you be so kind to let me know what problems you see with the schematic?
Check the voltage at Vss and Vdd of the LCD. And maybe check the current( if you can ) going into the motor that is pumping water ( under load ) and check the voltage going into the motor ( under load ) and also do as mention earlier by placing cap near the arduino chip and the LCD.
On a relate notes ... I did a project using a standard LCD module HD44780. and I have a small relay. When I activate the relay ( 20 mA - 5 V with a current limit resistor - 100 ohm - relay - 120 ohms )) the LCD was dimming ( a small noticeable dim ) so I check the power line of the LCD, it was going from 4.6 to 3.7. It was power by a USB power hub. I did replace with a 5 V - 7805. same issue, not 3.7 but 4.2. But still a small dip in voltage. No arduino was running. Just a test of the LCD and relay. And I simply dont understand why a voltage drop occur when I have a voltage regulator that can deliver more than 1 A and can operated 500 mA without an heatsink and can even provide a proper stable 5 V.
But in your case, a bit more larger scale. Same issue than mine, but larger scale due to the motor larger current need.
" Would you be so kind to let me know what problems you see with the schematic? "
Check Q2. The emiter and the collector is not correct. Reverse them. emiter to gnd, collector to relay. D2 is partial correct. Cathode is correct. but the anode should be connect to relay and collector of Q2.
The pump's 5V/1A power supply seems to be OK, but using one with a higher current capacity could be beneficial. I would at least add the recommended 220μF capacitor (see typical application circuit).
I think the main problem is that Q1 is undersized to "cleanly" turn on your pump or to handle the extra current when the pump is working under load. I would use a logic-level MOSFET (at least 2A rated) or transistor with higher current rating (not darlington type). Adding an opto isolator could also be beneficial.
I did what you suggested (adding another power supply). So I'd need to connect the capacitor across both leads of DC output in the power supply (V+ and V-)?