About Me

My Photo

I previously worked on Virtual Reality and other hardware at Valve.  I currently work at Google[x].

Prior to starting at Valve, I built computer peripherals such as keyboards, mice, and joysticks that were designed to be used inside MRI machines.  My company, Mag Design and Engineering, sold these devices directly to researchers at academic institutions who used them to publish scientific papers in peer-reviewed journals.

After work, I spend time on many different types of projects that usually involve circuit design, machining, material selection, and general fabrication/hacking.  My favorite place to be is my home workshop.

ben dot krasnow at gmail




Sunday, September 5, 2010

Web-controlled watering can and vortex tube

UPDATE: Code added at the bottom of this post.

This is an interactive art project that I have been building for an upcoming exhibition. The idea for a web-controlled watering can come from the first "iphone watering can" that I helped build with a friend for Maker Faire a couple years ago. Search the internet/youtube for "iphone watering can" for details.

This new version uses a different drive mechanism and a PD control loop to make the watering can track the desired position in realtime. The interface works with any webkit browser. My collaborator and I have discussed using the iphone or android accelerometers to achieve control through phone tilting. I'm not sure if the tilt data is available to the web browser, though, and we are trying to make the interface run on as many platforms as possible. Any ideas?

The siteplayer webserver is extremely old technology and has many problems, but does work. I would explore using a hacked WRT router in the future for similar projects.

HTML file from Siteplayer webserver:

SPI file from Siteplayer webserver (simply to establish a server response):

Arduino code to get serial data from webserver and effect the PID control loop


  1. "I'm not sure if the tilt data is available to the web browser, though, and we are trying to make the interface run on as many platforms as possible. Any ideas?"
    try phonegap

  2. Oh.. it is great work..:-) im realy iterested in it..:-) how u do the web interface.. i hope it is ajax..? i tryed to do something like this but it works badly.. (sorry, my english is bad..)

  3. Great project, nicely designed too love the wood and shape. Would be fun to connect it to http://www.botanicalls.com/

  4. @Tomas, yes the client uses AJAX to send server GET requests without reloading the web page. The code checks to see if the server has finished processing a request, then waits to send the next one. The server and serial link are fast enough to achieve near real-time control of the watering can with this method.

    John and sanpedro, thanks for the suggestions. -Ben

  5. to Ben: can u pleas show me example of your script..? :-)

  6. Tomas, I have uploaded some code.

  7. the spi website is gone...

  8. Anonymous, the contents of the .spi file is an http message, 302 FOUND. You can still download the file.

  9. It's a great work! Thank you for sharing your ideas!