Control a Solenoid Valve With Scratch

by siderits in Workshop > Science

9150 Views, 27 Favorites, 0 Comments

Control a Solenoid Valve With Scratch

Control_a_Solenoid_Valve_with_Scratch.jpg
Slide2.JPG
USB control of a Solenoid Valve using Lego Wedo Robotics and "Scratch" programming

R. Siderits, P. Mazari, C. Rimmer, D. Goodwin, W. Lecorchick, O. Ouatarra

Solenoid valves open and close with low voltage relays

  We illustrate the use of the solenoid valve and a small reservoir, controlled by the graphical programming language "Scratch" (scratch.mit.edu) and a solenoid valve to make the first part of an automated immunohistochemictry platform.

The first step in making an IHC platform would be to de-paraffin (wash) a glass slide with a xylene substitute.

  SEE VIDEO ON SLIDE SIX

Note:

You can download and run the Scratch control program from the scratch website.
Credit for the "Axe-uator" (linear actuator) is given in the text and is viewable on Youtube.

Step 1: Parts List

Slide3.JPG
Slide4.JPG

We've kept the cost of the parts to a minimum.  The entire project setup is less than 20$, without the cost of the
Lego WeDo robotics kit (for use with the Scratch programming language).

Step 2: Assemble the Valve and Reservoir

Slide5.JPG
Slide6.JPG
Slide9.JPG
Intro.jpg
Using a manifold you might be able to mix 2-6 different reagents in fairly precise ratios depending on flow valve diameter or external clamp compression of the drain lines.  The check valve was a nice add on and can go inline as well as serve as a one way air inlet.

Step 3: Attach the Solenoid Valve

Slide7.JPG
Slide8.JPG
Slide10.JPG
These little solenoid valves are really very rugged.  You might want to clamp it in place but a cable tie worked very well. 

Two would have been better (a little more stable).

Step 4: Make the "Bath"

Slide13.JPG
Slide14.JPG
Slide15.JPG
The outflow from the "Bath" went into a waste container but the volumes that we were using were so small that this was not really needed. 

Step 5: Scratch Programming

Slide17.JPG
Slide18.JPG
Slide19.JPG
Slide20.JPG
Slide21.JPG
Slide20.JPG
Scratch is a surprisingly flexible Rapid Applications Development language that uses both a PicoBoard for ratiometric sensor input and the Lego WeDo Robotics kit for servo motor control plus proximity and tilt sensors.

Step 5: Run a Test

Slide16.JPG
Once the entire apparatus is assembled, download the program IHC-valve in Scratch.

Video of the valve in action as well as an "on-screen" view of how to set up the Scratch program can be seen.

Disclaimer

Slide24.JPG
WARNING: This is a Do-it-yourself project. I am sharing my thoughts and experience, not telling you what this can be used to accomplish. I will tell you that its not for medical, diagnostic or research uses. The intriguing part of this process was the flexibility of Scratch program control which enabled configuration of timed delivery and of course the use of a deodorant container (which should make the bit about NO research use kind of obvious).

Project Affiliation:

Slide26.JPG
Our Experimental Pathology Team

Future Development

Slide22.JPG
Slide23.JPG
Fluid level sensor could be developed in about 10 minutes by using the WeDo tilt sensor.

End

Slide25.JPG
Thanks and Good Luck.