Pages: [1]   Go Down
Author Topic: Optocouplers or Relays for Solenoid Control  (Read 1622 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello!

       This is my first forum post and I'm not sure if I should be starting a new topic or joining an old one. I'm a new user to these forums (to any forums actually), and an electronics and Arduino n00b, so I apologize in advance for any accidental stupidity on my part  smiley-grin.

       I just got my Arduino a few weeks ago and planned to build an aquarium management system as my first real project. One key thing I wanted in the system was the ability to perform a 30% water change every week. To do this, I figured I'd get the Arduino to control a solenoid valve connected to my tap water supply and a pump to remove water from the aquarium and store in a reservoir. Considering both run off a wall socket at 240 V (I live in Asia), I initially assumed that relays were my best bet (I breadboarded the example circuit(http://www.arduino.cc/playground/uploads/Learning/relays.pdf) from the Arduino website and it worked fine).

         However, I recently discovered optocouplers and after some research, I found that they were comparable in price to my relays and draw less current. Also, if I understand them right, I would not need a snubber diode or a transistor. The fact that they are solid state makes them even more compelling.

       My question is, would it be advisable to stick with a relay circuit, or to use high voltage optocouplers instead. If so, are there any that can output 240V and 3A? Also, any futher explanations into their functionality and limitations would be great! Any advice or recommendations are greatly appreciated!

Many thanks,
Milan
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 505
Posts: 31332
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
or to use high voltage optocouplers instead
No an opto coupler is not the component to use, you want to use a Solid State Relay (SSR) there are plenty around that can handle that sort of voltage and current. They will have an opto coupler built in but that is not the name of the component you need.
Logged

New Jersey
Offline Offline
Faraday Member
**
Karma: 48
Posts: 3389
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Be very careful with this project. Any defects in your code sound like they could be quite serious. You'll likely come home at some point to dead fish in an empty aquarium or a flooded home (or both). Initially, perhaps limit your water supply to another reservoir so you can limit your exposure.

Sounds fun, but coding, especially if it has to be flawless, is tricky. Good luck.
Logged

Red Sea, Saudi Arabia
Offline Offline
God Member
*****
Karma: 11
Posts: 579
..On The Red Sea
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

... Be very careful with this project. Any defects in your code sound like they could be quite serious.

Think about "Limit Switches". Many serious systems such as motor-driven devices have switches arranged so that if the motion goes beyond an expected limit they shut off the power to the device.

You could add simple floats with thin string to "Microswitches" that are connected in series with your valve and pump power so that if the water level is below some limit (like 1/2) the pump is turned off and if the water level is above some limit the valve is turned off.  In "normal" operation the switches are never activated, only if some fault happened.

An example of this type of switch is here:
http://cgi.ebay.com/Long-Straight-Hinge-Lever-Type-Miniature-Micro-Switch-/220756263287?pt=LH_DefaultDomain_0&hash=item3366194177#ht_2149wt_1139

These have both "Normally Open" and "Normally Closed" connections, so it's easy to have one react to 'low' and one react to 'high'  . You need a little weight attached to each float so it will pull down as well as float up.

Of course, your Arduino is feeding them too, right??  smiley   Turning their light on and off so they get some sleep??   Playing their favorite music??
Logged

Regards, Terry King  ..On the Red Sea at KAUST.edu.sa
terry@yourduino.com  LEARN! DO! (Arduino Boards, Sensors, Parts @ http://yourduino.com

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

I suspect it'll be cheaper to use relays with transistors and diodes than SSRs. Looking at these components for my project, I found each relays to be anywhere from 10 to 30 times cheaper than the SSR counterpart.
Logged

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

Thanks to everyone for the information and well wishes!

        @gorbs & @ grumpy_mike: Thanks for the info. After reading grumpy mike's post, I looked around for some SSR's that were in my price range. Sure enough, as gorbs said, the relays were a far cheaper option. I am therefore going to stick with them.

        @Terry King: Thanks for the suggestion. I will most certainly consider limit switches. Of course, the Arduino will be receiving feedback from level sensors placed in both the aquarium as well as the reservoir. I have yet to decide on a particular type of level sensor and was toying with the idea of building my own. Is that too ambitious? If so, the best bet so far seems to be this resistive tape:http://www.youtube.com/watch?feature=player_embedded&v=c3VJPi1TeSY. Any alternatives?

       As for the feeding and the lights, yes that is the plan. That's why I wanted to know more about the optocouplers. I now plan on making a bunch of relay circuits to control the lighting and feeding mechanisms, in addition to the pump and valve. I initially wanted to add dimming and moonlight effects, but I use flourescent bulbs in my tank. Not sure about the music though smiley-grin will have to check with the fish!


Logged

Red Sea, Saudi Arabia
Offline Offline
God Member
*****
Karma: 11
Posts: 579
..On The Red Sea
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Here's a nice opto-isolated solution: 8 isolated relay channels for $25   DISCLAIMER: My Shop!

I've been looking for good relay and SSR solutions and these are the best I've found so far:
=relay&s[title]=Y&s[short_desc]=Y&s[full_desc]=Y&s[sku]=Y&s[match]=all&s[cid]=0]http://arduino-direct.com/sunshop/index.php?l=search_list&s[search]=relay&s[title]=Y&s[short_desc]=Y&s[full_desc]=Y&s[sku]=Y&s[match]=all&s[cid]=0

If I can't find a good low-cost Solid State Relay board I will build one soon....  (What Voltage/Current would you like to see??) How many channels on one board?

And there's this shield, but I personally don't like having 120 or 240 VAC right on top of my Arduino  smiley-evil
http://cgi.ebay.com/Emartee-Relay-Shield-/280603472113?pt=LH_DefaultDomain_0&hash=item41554530f1#ht_2045wt_1139



« Last Edit: March 25, 2011, 04:21:31 am by Terry King » Logged

Regards, Terry King  ..On the Red Sea at KAUST.edu.sa
terry@yourduino.com  LEARN! DO! (Arduino Boards, Sensors, Parts @ http://yourduino.com

Pages: [1]   Go Up
Jump to: