Pages: [1] 2   Go Down
Author Topic: Powering pump  (Read 1923 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 21
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've written a simple node.js app which sends serial commands to my arduino to turn LEDs on and off. Where I'd eventually like to go with this, is to have the ability to turn a pump on and off, and instead of LEDs I would use solenoid valves to dispense liquids from multiple containers. So, for example, on my app if I hit the "4" button, it should turn the pump on, and "open" solenoid valve #4. Right now I just have it turning LED #4 on.

I've been reading a lot and I'm just a little confused on how I go from powering an LED to using a relay to power a pump. How do I pick a relay? How do I pick a pump? Will any pump work?

Also which solenoid valve would I get? I must be searching for the wrong stuff, because I feel like these should be rather inexpensive? I basically just need a hose on both ends for the liquid to pass through when it is open.

If anyone can explain or point me in a direction that would be greatly appreciated. Thanks!
« Last Edit: March 10, 2013, 05:29:32 pm by sarink » Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 597
Posts: 33323
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I must be searching for the wrong stuff, because I feel like these should be rather inexpensive?
No you will find that they are expensive.

A solenoid is just like a motor to drive. You can use a relay or a transistor or FET. Have a look at this:-
http://www.thebox.myzen.co.uk/Workshop/Motors_1.html
Logged

Dubuque, Iowa, USA
Offline Offline
Edison Member
*
Karma: 44
Posts: 2463
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

http://www.amazon.com/Vdc-Normally-Closed-Solenoid-Valve/dp/B007D1U64E
http://www.allelectronics.com/make-a-store/item/SOL-132/SOLENOID-VALVE/1.html

Have not used one and comments on them vary, but sounds like what you want.  You didn't provide much detail.

If you need a larger valve with well-stated specifications then I would suggest digging through sourcingmap.com. They have a pretty large list of Chinese valves for various voltages / flows / fittings and start around $10/ea.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 21
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

^^ Those (or something very similar) will be perfect.

Now I'm looking for a reasonably priced peristaltic pump with a pretty high flow rate (500ml/min or better). This has been kind of difficult, so I thought in the mean time I should be able to find a quick and really cheap diaphragm pump (like an aquarium pump, or something) to work with while testing. What's the easiest route to take there on some pump that can be simply hooked to the arduino?
Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 597
Posts: 33323
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
What's the easiest route to take there on some pump that can be simply hooked to the arduino?
No pump can be 'simply' hooked up. All require some sort of driver circuit. Perhaps the simplest is to use a solid state relay to switch on an AC powered pump. The SSR can be connected directly to an arduino as they only take the same current as an LED because they are in fact an LED in an optical isolator safely isolating AC power from the low voltage arduino.
Logged

Pottstown, PA
Offline Offline
Sr. Member
****
Karma: 5
Posts: 317
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
http://www.amazon.com/Vdc-Normally-Closed-Solenoid-Valve/dp/B007D1U64E
http://www.allelectronics.com/make-a-store/item/SOL-132/SOLENOID-VALVE/1.html

Have not used one and comments on them vary, but sounds like what you want.  You didn't provide much detail.

If any readers happen to have a leaking Keurig coffee maker, that's the culprit! - Scotty
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 21
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So I ended up just getting one of these to power the pump http://www.powerswitchtail.com/Pages/default.aspx

Still trying to figure out how to wire up the solenoid valves...

For this project, I will have one big high performance pump and many valves. But I really want the ability to easily add valves to the existing setup without having to do a lot of work. From the software side, this is really easy as all I need is the new pin # that the new valve is on (and I've already written the database to update/store this information). But how can I make it super simple to physically add a solenoid valve to the arduino, so that basically anyone can do it?

Thanks
Logged

Offline Offline
Faraday Member
**
Karma: 58
Posts: 2778
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

A solenoid valve will require much more current than an arduino can deliver,  and usually a higher voltage too.

You have two basic options:

Make a circuit with a transistor ( or two transistors ), which can be activated by an arduino digital output,  and can apply
12 or 24 volts to the solenoid,  and enough current.

Buy a relay module for about $4 on ebay,  which can be activated by an arduino digital output,  and can close a circuit to
apply the appropriate voltage and current to the solenoid valve.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 21
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So if I got these...

relay - http://www.aliexpress.com/store/product/free-shipping-8-Channel-5V-Relay-Module-for-PIC-ARM-AVR-DSP-wholesale-price/312788_481242970.html?_componentAcceptorEnabled_=false
8 solenoid valves - http://www.amazon.com/Vdc-Normally-Closed-Solenoid-Valve/dp/B007D1U64E

Which power supply would I need, something like this? http://www.amazon.com/Wall-Adapter-Power-Supply-12VDC/dp/B006GEPUYA And what if I wanted to have like 24 or 32 solenoids? Can I just get any 12v DC power supply basically?

So I connect the relay module's VCC to the arduino's 5v out, and the relay module's GND to the arduino's GND out, right? Then, does each relay's COM pin get connected to the 12v on the power supply? So my power supply would need to be spliced 32 times!?

Thanks
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17261
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
So I connect the relay module's VCC to the arduino's 5v out, and the relay module's GND to the arduino's GND out, right? Then, does each relay's COM pin get connected to the 12v on the power supply? So my power supply would need to be spliced 32 times!?

Well one would normally run a 'daisy chain' for the +12vdc, that is run one wire from the positive of the power module to the first relays common terminal then jumper from that common terminal to the next relays common terminal and then on to the next, until all eight have +12vdc applied to their common contacts. Then the normally open contact of each relay wires to it's specific solenoid and then all the solenoid return wires get wired together and attached to the DC modules negative. That make sense? I would get a little more 'husky' 12vdc power modules, maybe rated at 2 amps or better as you really don't want to run one close to it's maximum capacity if you can help it. But then maybe you will never be turning on all 8 solenoids at the same time?

Also keep in mind that those relay channels will turn on when there is a LOW output applied from each arduino digital output pin and the relay channel will turn off when a HIGH is output, but that's just software state to keep in mind.

Good luck on your project.
« Last Edit: March 19, 2013, 01:25:20 pm by retrolefty » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 21
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yeah, that makes sense.

I will be running multiple "banks" of 8. I'll probably end up with few of those relay modules - can they be daisy chained together too then? So relay module 1's would have an "output plug" which would be VCC, it's 8th relay's COM, and GND (which leads back to arduino). This way, I could make it very easy to buy one of these relay modules and add an additional 8 valves?

I'll never run more than 8 open simultaneously, and each one is 100mA, so I should be just fine with a 1amp power supply, even if I have say 32 of them daisy-chained, right?

Is there a different sort of relay module I should get so that HIGH = on/open and LOW = off/closed (because that makes more sense)? Or is this typical behavior? Is this anything to do with each relay's Normally-Closed and Normally-Open pins (I don't really understand those, everything I look up just uses the Common?)

Thanks
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17261
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is there a different sort of relay module I should get so that HIGH = on/open and LOW = off/closed (because that makes more sense)? Or is this typical behavior?

There may be but most of the Asian relay modules/boards I've seen use the LOW = relay energized.

 Is this anything to do with each relay's Normally-Closed and Normally-Open pins (I don't really understand those, everything I look up just uses the Common?)

Well for a relay to be able to switch an external circuit you must use at least two of the three contacts made avalible for a SPDT relay and common must be one of them. If you want a light to be energized by the relay contacts you have to use the common and either the normally open (NO) or normally closed (NC) contact. If you want a arduino HIGH output to light the light then you would use the common and NC contact. So you can change the logic by which contact you use NO or NC along with the common contact.

Lefty

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 21
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Here's a jpg of how everything's hooked up: http://ge.tt/4w9c51d/v/0?c

Here's the relay I'm using: http://www.sainsmart.com/16-channel-12v-relay-module-for-pic-arm-avr-dsp-arduino-msp430-ttl-logic.html

I've tried both:
digitalWrite(4, LOW); delay(3000); digitalWrite(4, HIGH);
and
digitalWrite(4, HIGH); delay(3000); digitalWrite(4, LOW);

Which should turn on solenoid valve #1 (red) for 3 seconds

However, neither of those lines of code seem to close the circuit? If I connect the wires to COM and NC instead, it works (so I know I have good connections between my wires and everything) ... what am I missing?
« Last Edit: April 03, 2013, 11:35:33 pm by sarink » Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17261
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Your jpg link doesn't seem to work.
Can you supply a wiring drawing instead on the wiring between the arduino and the relay module? The relay board has a:
Quote
Indication LED’s for Relay output status

If the led for the channel you are controlling isn't lighting on and off (and you should be able to hear the relay click on and off) with your software commands then you most likely have a wiring problem between the arduino and the relay board, or you did something dumb in the sketch like forget to do a pinMode(pin#,OUTPUT); to set the pin to be an output pin.

Lefty
« Last Edit: April 03, 2013, 11:47:34 pm by retrolefty » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 21
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I wrote a simple loop:
digitalWrite(4, HIGH);
delay(3000);
digitalWrite(4, LOW);
delay(3000);

And I can see light going on 3 seconds, off 3 seconds. Using a multimeter, I test continuity between NO and COM, nothing, regardless of if the light is on or off. If I move my multimeter to NC and COM, I can see continuity there.

In my setup I do have:
pinMode(4, OUTPUT);

By VCC on the relay I mean the 5V in

I can't hear the relay clicking. Like I said I do see the light though
« Last Edit: April 04, 2013, 10:25:19 pm by sarink » Logged

Pages: [1] 2   Go Up
Jump to: