I have made an irrigation system for plants. it was working fine. but from last few days a problem is coming that the output stays continuously on after the interval also. Suppose I need to spray water in every 2 hour for 50 seconds then sometimes it gets on for more then 50 seconds like 5 to 10 minutes. Then I am restarting the arduino. I am not able to find the problem.
Dear : could be link to the hardware ? How do you control your pump ? With an NPN ? A MosFet ? A Relay ? Perhamps your driver stays ON, even if you control the output to Low ?
Check your grounds and your power supplies
check the wiring for [separate] power to the relay board and the [separate] power supply for the micro. make sure the grounds from the two power supplies are tied together.
make sure the signal to the relay is not floating, maybe a 10k pull up (or down) would help.
post photos of your set-up and a schematic if you actually want help.
and post your code (follow the rules of using code-tags please - see "how to use this forum" if you are not sure)
So, you control a relay : I reccomand to not control it directly by an output, but through a basic transistor (I use ofter BC547 with a 4,7 k on the base.
As your load is a Self, you must use a free wheel diode.
Perhaps.... If you have not used a transistor (direct control), and not used a free wheel diode, the output of the arduino is dead ;( and directly short cicuited to the 5 volts.... ?
Have a look on IRL540 : a very usefull MosFet, with TTL logic. You can buy it very cheap on AliExpress.
Attached is a basic schematic if you need to control a self load (for example a relay) with a "big" transistor (several amps is not a problem for IRL540).
MBR_78:
So, you control a relay : I reccomand to not control it directly by an output, but through a basic transistor (I use ofter BC547 with a 4,7 k on the base.
As your load is a Self, you must use a free wheel
MBR_78:
So, you control a relay : I reccomand to not control it directly by an output, but through a basic transistor (I use ofter BC547 with a 4,7 k on the base.
As your load is a Self, you must use a free wheel diode.
Perhaps.... If you have not used a transistor (direct control), and not used a free wheel diode, the output of the arduino is dead ;( and directly short cicuited to the 5 volts.... ?
Have a look on IRL540 : a very usefull MosFet, with TTL logic. You can buy it very cheap on AliExpress.
Attached is a basic schematic if you need to control a self load (for example a relay) with a "big" transistor (several amps is not a problem for IRL540).
Im sorry, i must have lost a post here.
Where did you get this information relating to how the relay is driven in this posters project?
Although your information may be valid it can be confusing with ref to the fault unless the relay is actually being driven this way.
My apologies to you if i did miss the post but i was waiting for a reply to my questions.