This is solenoid valve controller hardware and firmware.
See inventhub.
Download the latest code from this link.
You can set the time during opening valve with seconds_to_open_valve, and during closing valve with seconds_to_close_valve on experiment-tools-valve.ino in your downloaded zip archive.
You need to build and install your customized code to valve controller board according to the instruction of next section.
diff --git a/experiment-tools-valve.ino b/experiment-tools-valve.ino
index eb05686..cf57e86 100644
--- a/experiment-tools-valve.ino
+++ b/experiment-tools-valve.ino
@@ -2,8 +2,8 @@
// Parameters can be changed by user
namespace {
-constexpr uint32_t seconds_to_open_valve = 10;
-constexpr uint32_t seconds_to_close_valve = 20;
+constexpr uint32_t seconds_to_open_valve = 5;
+constexpr uint32_t seconds_to_close_valve = 30;
};
// Parameters should NOT be changed-
Install Arduino IDE (recommend 1.8.12)
-
Add URL
https://kimio-kosaka.github.io/digispark-clone/package_digispark-clone_index.jsonintoBoards Manager URLson Preferences of Arduino IDE- For more detail, refer to digispark-clone github
-
Install
Disispark AVR Boards (clone)on Boards Manager on Arduino IDE -
Select
Digispark (Default - 16.5mhz)on menuTools -> Boardsof Arduino IDE -
Select
Micronucleuson menuTools -> Programmersof Arduino IDE -
Open experiment-tools-valve.ino on Arduino IDE
-
Disconnect USB cable from solenoid valve board
-
Push
Uploadbutton on Arduino IDE and see below log messageRunning Digispark Uploader... Plug in device now... (will timeout in 60 seconds) -
Connect USB cable to solenoid valve board and wait a while
-
Succeeded with below log message
running: 100% complete Micronucleus done. Thank you!