I am working on a project i.e. automatic plant watering system using 8051 micro controller.
when the moisture in soil is high the soil moisture sensor senses it and displays the status at the LCD. BUT, when the moisture is low, the soil moisture sensor detects the status but the motor (which should now be turned on) remains off or either turns on for a second and the relay module that has been connected to the pup motor produces ticking sounds continuously which keeps on turning the motor on-off-on-off and the status of moisture at LCD is also not displayed now.
help me sort out the issue please as I have to submit the complete project very soon.
How and where is the moisture sensor placed?
When the pump turns ON, does water come out, and if so, does the water get in contact with the moisture sensor? That could turn OFF the pump and then wait for the sensor signal to be 'low moisture' again before it pumps again.
Did you implement adequate hysteresis for the pump operation?
These are all guesses though. You need to give more information.
If you have used AT89C51/52 then they don't have ADC and if you are not using ADC then you will be using DO (Digital out) pin of your Soil moisture sensor instead of AO (Analog out) pin to sense the Soil moisture using INTx pin and so there is no way to put a hysteresis to moisture sense.
If you have used an ADC chip with 8051 and used AO pin of the sensor to detect moisture then you can add hysteresis to relay control code.
The report in post #1 isn't very clear but it sounds like either a coding fault or processor rebooting due to power supply drop or electrical interferences when starting the motor.
Demands a more detailed circuit description, e.g. motor type and control method. How does the circuit behave if the motor is disconnected?
How and where is the moisture sensor placed?
When the pump turns ON, does water come out, and if so, does the water get in contact with the moisture sensor? That could turn OFF the pump and then wait for the sensor signal to be 'low moisture' again before it pumps again.
Did you implement adequate hysteresis for the pump operation?
These are all guesses though. You need to give more information.
If you have used AT89C51/52 then they don't have ADC and if you are not using ADC then you will be using DO (Digital out) pin of your Soil moisture sensor instead of AO (Analog out) pin to sense the Soil moisture using INTx pin and so there is no way to put a hysteresis to moisture sense.
If you have used an ADC chip with 8051 and used AO pin of the sensor to detect moisture then you can add hysteresis to relay control code.
The report in post #1 isn't very clear but it sounds like either a coding fault or processor rebooting due to power supply drop or electrical interferences when starting the motor.
Demands a more detailed circuit description, e.g. motor type and control method. How does the circuit behave if the motor is disconnected?
Stronger battery which could supply current for both PIC and pump. Maybe Pump is drawing more current while turning On and 5V supply is dropping during Pump turn On and PIC is resetting.
Show the power supply circuit. What capacitors do you use in it?
It is not very clear when you say that the sensor is placed separately. One thing you should do is cover up the sensor so the water that is pumped does not get in contact with it. With this we might be able to tell whether the frequent start->stop->start->stop is caused by the sensor feedback.
Another thing you could do is to show us the scope trace of the signal that runs the pump especially when it is supposed to be active.