Skip to content

GNHua/valve-control

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

valve-control

Use Arduino Uno to control solenoid valves.
Follow the steps below to set up your own valve control station.

Purchase

Solenoid Valves

Details can be found on page 215-221 in Clippard Full-line Catalog

Send PCB design Out For Manufacturing

  • Highly recommend JLCPCB. Fabrication and shipping took ~1 week for me in the U.S.
  • If you choose JLCPCB, go here, upload plots.zip, and leave everything else as default.
  • If you have access to a PCB baking oven, buying a SMT-Stencil will save you a lot of time for soldering. If not, all the components can still be soldered by hand.
Top Layer Bottom Layer

Electrical Components To Buy

Part Label on PCB Qty. (per PCB) Purchase
Shift register, SN74HC595N plug on the DIP socket (U1) 1 link
Optoisolator, HCPL 2731 plug on the DIP sockets (U2-U5) 4 link
Resistor, 2.32 kΩ, package 0805 R1-R16 16 link
Common anode diode D1-D4 4 link
PMOS Q1-Q8 8 link
1 uF capacitor, package 0805, voltage rating 10V C1 1 link
DIP socket, 2x8 U1 1 link
DIP socket, 2x4 U2-U5 4 link
Stacking headers J2-J4, H1, H2 1 link
Connector, Molex 50212-8000 N/A 18 link
Connector housing, Molex 0873690200 N/A 9 link
JST header, Molex 0894010210 J5-J13 9 link
2.5 mm barrel jack, 5A max, CUI PJ-057BH J1 1 for each setup link

Download

Download zip and extract all files.

Prepare Software

Flash Arduino Uno

  • Connect an Arduino Uno to computer via USB
  • Download and Install Arduino IDE
  • Open arduino_valve_control.ino in arduino_valve_control folder with Arduino IDE
  • Select USB port: Tools > Port
  • Click Upload (the right arrow at the top left corner)
  • Wait for uploading to complete

Python

  • Download and Install Python 3.6
    • The Python distribution, Anaconda is recommended, because it comes with pre-installed packages.
    • Note: On Windows, the directory of installed Python must be added to environment variable.
  • Install Python dependencies
    • Windows: double click platforms/windows/setup.bat
    • MacOSX: $ bash <path to>/platforms/macosx/setup.sh

Soldering

(ADD photos of top and bottom layer after soldering)

Solder all the components according to the table above. The surface mount components are soldered to the bottom layer, while the rest are mounted on the top layer.

Stacking Headers

In the table above, the stacking headers contains the following headers.

Stacking Header Label on PCB Qty.
1 x 10 cut out a 1x2 for J4 1
1 x 8 H1, H2 2
1 x 6 2
2 x 3 J2+J3 1

H3 - 5V and GND

Because the JST headers at J11 and J12 block H3 on the top layer, I would do the following:

  1. Cut a 1x2 stacking header out of an unused one
  2. Solder it on H3 from the bottom layer
  3. Cut off the female portion on the top layer
  4. Put more solder from the top layer

Barrel Jack

Each setup only needs one barrel jack to connect to a 12 V power supply. The barrel jack can be soldered on any one of the boards.

Assembly

Shift Register and Optoisolators

(The images shown below are all taken for the previous PCB design, which is marginally different from the current design.)

After soldering, plug the shift register and optoisolators into their corresponding DIP sockets. Refer to the following image for their orientation.

image

Stacking PCBs

For the inpatient

  1. Bend or remove the data pins on all boards except Board 1. See the left image below.
  2. Make a connector for serial input and serial output. See the right image below.
  3. Stack the PCBs and plug in the connector just made.
Data Pin Serial Input/Output

Details

In the images above, there are 4 boards stacked on an Arduino Uno.
Each board provides 8 solenoid valve connectors, and the current design supports up to 6 boards.
Before putting the boards together, the data pins on all boards except Board 1 must be bent or removed. This is because the data pin connects to the serial input of shift register. On Board 1, the shift register receives data from the Arduino directly. For the Board 2-n, their shift registers must have its serial input connected to the serial output of board right beneath it.

About

Use Arduino Uno to control solenoid valves

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published