DIY needle valve replacement solenoid - The Planted Tank Forum
 
LinkBack Thread Tools Display Modes
post #1 of 1 (permalink) Old 03-29-2014, 10:58 PM Thread Starter
Newbie
 
PTrader: (0/0%)
Join Date: Jan 2012
Posts: 1
DIY needle valve replacement solenoid



That's about 40 dollars in parts if you get the Sainsmart Nano v3 board for 15 which includes ribbon cables and USB cord to program it. The value of the potentiometer doesn't really matter. You can put the solenoid on a 15490-2 manifold also from Clippard and a 11752-1 barb on the output of the manifold 1/8" tubing to hook up to your CO2 reactor.

Simple code for the Nano can look like this, and with some playing around you could control 8 different solenoids with little knobs.

Code:
int inPins[] = {A0,A1,A2,A3,A4,A5};
int outPins[] = {2,4,7,8,12,13};
int val = 0;              // the value of the current reading
int openTime = 100; // 200 milliseconds on time

void setup()  {
   // initialize serial communications at 9600 bps:
   Serial.begin(9600);
   for (int c=0; c<6;c++) {
     pinMode(outPins[c],OUTPUT);
   }
}

void loop() {
    val = analogRead(inPins[0]);
    digitalWrite(outPins[0],HIGH);
    delay(openTime);
    digitalWrite(outPins[0],LOW);
    delay(val*5);  
}

Last edited by Eudmin; 03-30-2014 at 12:00 AM. Reason: grammar
Eudmin is offline  
Reply

Tags
None

Quick Reply
Message:
Options

Register Now



In order to be able to post messages on the The Planted Tank Forum forums, you must first register.
Please enter your desired user name, your email address and other required details in the form below.

User Name:
Password
Please enter a password for your user account. Note that passwords are case-sensitive.

Password:


Confirm Password:
Email Address
Please enter a valid email address for yourself.

Email Address:
OR

Log-in










Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page
Display Modes
Linear Mode Linear Mode



Posting Rules  
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

 
For the best viewing experience please update your browser to Google Chrome