Since you're looking at online retailers in Sri Lanka, is it feasible to buy internationally? Perhaps I'm spoiled in the UK, but here I routinely buy from foreign and multinational suppliers. I don't think you said what pressure/flow you want to achieve, but I'm envisaging a micro pump of the sort used for indoor water features and small aquariums. Is that the sort of thing you're after? It doesn't seem like a particularly unusual item - where does everyone else go for this sort of thing?
So it is possible to connect the mains voltage pump to the arduino and have the arduino control it?
Yep, as I said use a relay or solid-state relay. But I don't see why it's the "best" option, it's always safer to work with low-voltage DC. This Lankatronics is under construction should handle either.
If you have mains pressure a solenoid valve as to be the easiest method IMO, BUT they need pressure to open, you cannot use them if you just have a gravity feed say from the roof or tank that's just a couple of feet above the valve. If the pressure is low you need a motorised ball valve or to think outside the box as dave-in-nj has done.
Rob
dave-in-nj:
There are a lot of ways to make things without buying special devices.For the pump, you could use a tank that collects rain water, located above the plants.
Then release the water onto the plants.You can use a water pump from a windshield motor
A water pump from a fish tank
You can open a valve and allow water to drain
You can use a stepper to push on a hose to block off the hose, or back off and allow water to drain.You can use a tipping rain gauge of your own make to measure water and control quantity.
If you have a simple motor, you can make a water wheel to get water from a stream up to your plant.
If you have a hill with a steep drop, you can use mechanical water pump to pump water up higher or to a different location.
There is no reason in the world to avoid using a mains powered pump if that is what you have.
If you have a DC motor and some special plastic tubing, you can make a peristaltic pump.
If you have a large pump and a large tank, you can fill the tank once a week (or when low) and then drain out water to your plants.
Sometimes we loose sight of the simple things when we have easy access to special items.
All good ideas mate, but the thing is My water needs to be controlled electronically or through the arduino.. And I dont mean the rate or anything, the rate of water doesn't even matter as long as it just waters the plants, I just need it to water, or not water based on my moisture sensor readings..
I can't believe I was this stupid, But I think my aquarium pump is an air pump ![]()
PeterH:
Since you're looking at online retailers in Sri Lanka, is it feasible to buy internationally? Perhaps I'm spoiled in the UK, but here I routinely buy from foreign and multinational suppliers. I don't think you said what pressure/flow you want to achieve, but I'm envisaging a micro pump of the sort used for indoor water features and small aquariums. Is that the sort of thing you're after? It doesn't seem like a particularly unusual item - where does everyone else go for this sort of thing?
Feasible, Yes.. However the time it would take to get here surpasses my given timeframe sadly.. ![]()
Yes probably a micro pump, the pressure and flow isn't something im particularly interested, shouldn't be too high obviously, but as long as it does the job.. I don't mind.
Maybe I should check some aquarium shops.. But won't all the aquarium shops have Mains voltage powered Pumps? What should i be looking for here?
Graynomad:
So it is possible to connect the mains voltage pump to the arduino and have the arduino control it?
Yep, as I said use a relay or solid-state relay. But I don't see why it's the "best" option, it's always safer to work with low-voltage DC. This Lankatronics is under construction should handle either.
If you have mains pressure a solenoid valve as to be the easiest method IMO, BUT they need pressure to open, you cannot use them if you just have a gravity feed say from the roof or tank that's just a couple of feet above the valve. If the pressure is low you need a motorised ball valve or to think outside the box as dave-in-nj has done.
Rob
Any link to some kind of tutorial that I can use to connect the mains voltage pump to the arduino using a relay? Can I use this relay?
http://www.lankatronics.com/relay-12v.html
Why can't i use a solenoid for a gravity feed? So you're saying to get water from a mains water supply such as an outdoor garden hose supply or something? The thing about that is when I go to college to display the project, i won't have access to a mains water supply.
Any options to solve this dillema would be amazing ![]()
If I go to an aquarium shops what do I look for? Aren't all those pumps Mains voltage? Water pump or air pump? (I mean can the air pump be used to pump water)
Thanks alot guys
Why can't i use a solenoid for a gravity feed?
All solenoid valves I've seen require pressure to "crack" the valve open and unless your gravity feed is from a 50-metre tower there is not enough pressure. There may be ones that don't, look for "low pressure" valves.
There is another type that's a ball valve with an actuating motor, they don't care about pressure.
i won't have access to a mains water supply.
In this case a pump seems like a better idea as a gravity feed will essentially be "no pressure".
That relay looks ok. As for tutes, I have no idea, certainly there are a lot about driving the relay but there may not be many about controlling the mains because in general we do not advise about such things online as normally those that have to ask should not be playing with mains voltages.
I think there are mains control gadgets (actual products like a power board) that take a logic input, but I've not looked into them.
Rob
you can make a water pump from any small motor.
http://www.ironmanwindmill.com/how-windmills-work.htm
make a small hand pump ?
http://en.howtopedia.org/wiki/How_to_Make_a_Hand_Pump
some plastic tubing and some rubber to make washers.
the center flapper can be held with weights or springs or some such.
as for powering a mains power, you can make your own relay or buy one.
I still like the idea of a tipping bucket water sensor. super easy to make, and allows you to log how much water you use.
a second one to collect rain water and you can get total water to the plants over time.
So if you just want the thing to pump a small quantity of water at low pressure, and don't have access to any suppliers for micro pumps, take dave-in-n's suggestion and get a windscreen washer pump from your local car parts store, and drive it through a relay or motor driver. These pumps are usually not immersible so you'll need to get a water container with an outlet at the bottom. That wouldn't be hard to DIY, but if you don't fancy that a car windscreen washer bottle would do the job nicely.
car windscreen washer bottle would do the job nicely.
For years now the pumps have been integrated into the tank, at least on vehicles I've seen, so that would be a very easy way to do it.
Rob
Graynomad:
For years now the pumps have been integrated into the tank, at least on vehicles I've seen, so that would be a very easy way to do it.
For those of us who don't want to buy the tank too, there are usually generic aftermarket pumps which are designed to be fitted inline with a hose. There should not be any problem finding a pump on its own, if that's the preferred solution. (Personally, I'd take a quick trip to an auto dismantlers and expect to pick up the whole thing for a couple of quid.)
PeterH:
Graynomad:
For years now the pumps have been integrated into the tank, at least on vehicles I've seen, so that would be a very easy way to do it.For those of us who don't want to buy the tank too, there are usually generic aftermarket pumps which are designed to be fitted inline with a hose. There should not be any problem finding a pump on its own, if that's the preferred solution. (Personally, I'd take a quick trip to an auto dismantlers and expect to pick up the whole thing for a couple of quid.)
Alright guys, So I'll go to an auto parts store and check for a small water pump of sorts.
If I'm not able to find it though, Could someone explain the process of taking some pump that is meant to be connected to the mains voltage, and having it connected to the arduino? I'm Guessing I have to connect a relay to the arduino and then the relay to the pump. But how do I do that? Do I have to cut the wire off where the plug is? and use those wires and connect it to the relay?
Thanks again ![]()
Connecting up mains voltage circuits is something that can be very dangerous unless you know what you're doing. Even assuming you get it working, it's quite easy to produce something that has dangerous failure modes and in this case that means it could realistically set itself on fire or give somebody a fatal electric shock. Based on the level of knowledge implied by your posts in this thread, I would not recommend that you try to wire up the mains voltage pump yourself. An intermediate solution which requires you to do some wiring but takes care of the most dangerous parts for you is to use something like a power switch tail. They aren't cheap though - using a low voltage DC pump seems like a no-brainer to me.
Connecting a relay to power the pump is going to be determined by how the pump is turned on and off currently. If the pump is has a power switch that turns it on and off the chances are good that the power switch is wired in to one leg of the power:
Switch
+------ \-----+
~ power Pump
+-------------+
In this case you will connect a relay to replace the switch. A relay has two sides, one side for the control (typically low powered DC, such as the 12VDC your link pointed at) and the other side for the powered device (often with four terminals so you can choose between normally open {device is off when no power is supplied to the control side} and normally closed {device is powered up when no power is applied to the control side}). What you probably really want, if your not going to use a relay shield, is a 5VDC relay that has the power side robust enough to handle the current draw from the pump.
@Kando, I've been doing this for years (decades really) and I'm very careful, but just yesterday I zapped myself with 240V, just a tingle this time but twice before I've had serious episodes, one in which I could easily have been killed (I had the burn marks for weeks) and the other I nearly put my wife in hospital (your muscles do odd things with 240V running through them and she was standing right next to me), so if you go down the DIY mains voltage path on your own head be it ![]()
Rob
Based on the replies then, I don't want to go down that route, although I thought not much harm could be done since the pump wont actually be connected to the mains, but then, Your'll are the pro's ![]()
I came across this
http://www.lankatronics.com/f18-magnetic-vertical-horizontal-water-flow-switch.html
Could I use this for a gravity feed? A water container will be palce above the plant with a hole in it, covered by this water flow switch, and could the arduino open/close it?
I'm not too sure what that is exactly, but it looks like something that could do a gravity feed.
Opinions?
although I thought not much harm could be done since the pump wont actually be connected to the mains
I don't understand, if a mains-voltage pump is not connected to the mains then it won't work.
That device looks like a simple flow switch used to detect the flow of water. If that is the case then it's of no use to you in this project.
Rob
Graynomad:
although I thought not much harm could be done since the pump wont actually be connected to the mains
I don't understand, if a mains-voltage pump is not connected to the mains then it won't work.
That device looks like a simple flow switch used to detect the flow of water. If that is the case then it's of no use to you in this project.
Rob
I was under the impression the current would run from the arduino and not from the mains.
Anyway, I think, just think I might be able to get a car washer wiper pump... I called one place and they said they had it (they sounded a bit unsure) And it was right in my budget, so will go check that out.
Can you guys tell me what else I would need?
A relay? Would I need a diode? Would I need a breadboard? Would I need any resistors?
Please help me out guys, Not sure of how to do all this and This thing is due on wednesday ![]()
http://www.lankatronics.com
Please try to link me to parts from there
You need either a motor driver shield/board capable of supplying as much current as the pump takes, or a relay shield/board. If the pump takes more than a couple of amps the relay approach is probably going to be the easier option.
If you don't have the means to buy a suitable motor driver or relay module, it is possible to make one using a breadboard and discrete components. Google arduino relay driver circuit for details.
PeterH:
You need either a motor driver shield/board capable of supplying as much current as the pump takes, or a relay shield/board. If the pump takes more than a couple of amps the relay approach is probably going to be the easier option.If you don't have the means to buy a suitable motor driver or relay module, it is possible to make one using a breadboard and discrete components. Google arduino relay driver circuit for details.
I did look that up once a long time ago
It looked like a complicated circuit which needed diodes and whatnot (something about the circuit taking a different route when the current is too high or something like that)
So if I used a relay or motor shield, I wouldn't need any of that right? Just fix the shield to the arduino and the pump to the shield? Would these work?
http://www.lankatronics.com/2-channel-relay-module-5v-10a.html
The thing about that one is, the description says something about having the sensor shield (which I dont have) Will this work and connect directly to the arduino without an extra shield?
Or this one?
http://www.lankatronics.com/4-channel-10a-5vdc-relay-module.html
This is a bit more expensive, so would rather use the first one unless this one is required.
And is that it? what other ocmponent would I have to buy? Would I need some male to female connectors to connect the relays to the board? or female to female? or male to male?
And what Will connect the pump to the relay?
Thanks for all the help ![]()
Another question, They say we need to connect this to the 5V on the arduino, However my sensor takes up the 5V ... What Do I do about that?
The first relay board you listed looks fine for this job.
You will need to connect the I/O pins on the relay board with the corresponding header pins/sockets on your Arduino. You will need to have / make / buy the appropriate wires to do this. Male-to-male jumper wires are commonly available for solderless breadboad projects and not expensive, or you can make up your own from the appropriate size wire. To connect to those male header pins you can either use a female header connector for temporary use, or just solder the wire on for a permanent connection. (If soldering, this is best done by somebody who is experienced at soldering electronic components.) If you need to connect multiple devices to the 5V header then you can do that just by connecting one wire to the header and then splicing it to feed both devices.
PeterH:
You need either a motor driver shield/board capable of supplying as much current as the pump takes, or a relay shield/board. If the pump takes more than a couple of amps the relay approach is probably going to be the easier option.If you don't have the means to buy a suitable motor driver or relay module, it is possible to make one using a breadboard and discrete components. Google arduino relay driver circuit for details.
This raises a wider question (and although I seem a newbie, I've been around computing so long I've got my name in every Windows code block there is, and more). If you're not working to an exact recipe (and who does?) it's generally sensible to push everything across a breadboard until you've got it working. That way you can see what's going where. It's only the final stage where you move it onto hardware, possibly using a designer shield.
This is just a subset of something which is worth mentioning at the very start: fail-safe programming. At some instances here we've seen code capable of being used to open the Aswan Dam, flooding Egypt (or his house) in the process. It starts with the kit, a pump which stops if the signal to it dies, and a relay may not do that - it tends to say "open" or "close" and leaves it there. You don't want something to leave your pump pumping when you're not there, what if your detector fails? You want end-to-end continuity, so the pump only pumps while the sensor says "I'm still dry". If it goes quiet, then that must be read as "enough".
When putting unknown bits together, therefore, it's far better to do it stage by stage - as you are, getting the sensor system working first - than just plunging in. When testing, make certain every nightmare you can think of on the input side fails safe, from an innocent child clipping a paperclip across the sensors to the missus accidentally cutting the leads when running the cleaner round, and then track each output condition on paper to the desired output and test them in reality, many times, before wiring it up hard. Particularly when working with water, it may be sensible in the closing stages to enclose the board in a watertight box (something like a sandwich box, perhaps, so you can see the LEDs) and running the wires through holes in the side protected with gromets and sealed with silicone bathroom caulking, both wire-to-gromet and gromet-to-box.