

Valve testing
Use Arduino Uno to control solenoid valves
- Size
- 73.7 × 55.9 mm
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 49
- Nets
- 63
- Pads
- 183
- Tracks, vias
- 222, 12
- Pours
- 4
- Routed
- Yes
- KiCad
- KiCad 4
- Created
- 1 Aug 2018
- Updated
- 20 Mar 2020
Overview
Valve testing is an open-source printed circuit board by GNHua, from the GNHua/valve-control repository on GitHub, published under the MIT licence. It is a 2-layer board of 73.7 × 55.9 mm with 49 parts on 63 nets, routed with 222 tracks and 12 vias.
It is built around the HCPL2731 and 74HC595. Its parts include 16 resistors, 13 connectors, 8 transistors, 5 ICs and 4 diodes. It belongs with the audio and music boards and the AVR (ATmega, ATtiny) boards of this library.
Main components
2HCPL2731
PDIP-8-40℃~+85℃ 1.3V 2 2.5kV 400% 5V 60mA Darlington output structure PDIP-8 Transistor, Photovoltaic Output Optoisolators ROHSonsemiTransistor, Photovoltaic Output Optoisolators74HC595
SOP-16-40℃~+85℃ 1 100ns@5V,50pF 10MHz 2V~6V 74HC 8 Serial-to-Serial or Parallel Tri-State SOP-16 Shift Registers ROHSGRShift Registers
README
README.mdvalve-control
Use Arduino Uno to control solenoid valves.
Follow the steps below to set up your own valve control station.
Purchase
Solenoid Valves
- Clippard, E310C-2C012, 10 mm N-C 3-way Valve, In-line Connector w/LED, 0.030" Orifice, 1.3W, 12 VDC
- Valve connector cable
- Manifold
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.inoinarduino_valve_controlfolder 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
- Windows: double click
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:
- Cut a 1x2 stacking header out of an unused one
- Solder it on H3 from the bottom layer
- Cut off the female portion on the top layer
- 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.

Stacking PCBs
For the inpatient
- Bend or remove the data pins on all boards except Board 1. See the left image below.
- Make a connector for serial input and serial output. See the right image below.
- 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.
Parts
49| Qty | Value | Footprint | References |
|---|---|---|---|
| 16 | 2.32k | Resistors_SMD:R_0805_HandSoldering | R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, R16 |
| 9 | Conn_01x02 | Pin_Headers:Pin_Header_Straight_1x02_Pitch2.00mm | J5, J6, J7, J8, J9, J10, J11, J12, J13 |
| 8 | Q_PMOS_GSD | TO_SOT_Packages_SMD:SOT-23W_Handsoldering | Q1, Q2, Q3, Q4, Q5, Q6, Q7, Q8 |
| 4 | D_Schottky_x2_ACom_KKA | TO_SOT_Packages_SMD:SOT-23_Handsoldering | D1, D2, D3, D4 |
| 4 | HCPL2731 | Housings_DIP:DIP-8_W7.62mm_Socket | U2, U3, U4, U5 |
| 2 | Conn_01x04 | Pin_Headers:Pin_Header_Straight_1x03_Pitch2.54mm | J2, J3 |
| 1 | 1u | Capacitors_Tantalum_SMD:CP_Tantalum_Case-A_EIA-3216-18_Hand | C1 |
| 1 | 74HC595 | Housings_DIP:DIP-16_W7.62mm | U1 |
| 1 | Arduino_Uno_Shield | Arduino:Arduino_Uno_Shield | XA1 |
| 1 | Barrel_Jack | Connectors:BARREL_JACK | J1 |
| 1 | Conn_01x02 | Pin_Headers:Pin_Header_Straight_1x02_Pitch2.54mm | J4 |
The 48 most common of 49 parts.
Questions
How big is the Valve testing PCB?
It measures 73.7 × 55.9 mm and has 2 copper layers, 1.6 mm thick.
What parts does the Valve testing use?
49 parts, built around the HCPL2731 and 74HC595. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
Where can I download the Valve testing KiCad files?
From the GNHua/valve-control repository on GitHub, at the commit this page was made from: the board is pcb_layout/valve_testing.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.
Can I use the Valve testing design in my own project?
Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).
Similar boards
- 4 layers180.3 × 114.9 mm

- 2 layers42.5 × 62.5 mm

Evse
Tinkerforge/evse-bricklet
This Bricklet together with the ESP32 Brick the RS485 Bricklet and the NFC Bricklet form the hardware used in the WARP Charger
92 parts3 - 2 layers40 × 40 mm

Industrial dual ac in
Tinkerforge/industrial-dual-ac-in-bricklet
Industrial Dual AC In Bricklet ==============================
34 parts - 4 layers74 × 114 mm

- 2 layers45.7 × 31.8 mm

LEDx16 board
tardate/LittleArduinoProjects
a collection of "Little Electronic & Arduino Projects", most involving electronics or an Arduino in one way or another!
36 parts803MIT - 2 layers228.6 × 100 mm

Mongus48
ChrisChrisLoLo/beyblock20
The magnetic, modular, 20-key macropad that can join together to form an ortholinear board
124 parts335GPL-3.0 - 2 layers245.1 × 160 mm

8-Bit CPU 32k
slu4coder/Minimal-64x4-Home-Computer
My DIY TTL home computer with VGA and PS/2 and 4x the processing power of a Commodore C64 or Apple II.
139 parts326 - 2 layers100 × 95.1 mm

Protoboard-6x4-breakout
electroniceel/protoboard
Advanced protoboard layout with 1.27mm pitch for smd parts
4,745 parts311CC-BY-4.0



