Saturday, March 12, 2011

Mindstorms liquid dispenser

Greetings

Here is a simple project that I had been working on for quite some time. It is a Mindstorms powered liquid dispenser. Essentially it is a simple liquid dispenser that works on the principal of a diaphragm pump. Here are some pics which will describe the apparatus better than I ever can hope to by writing
Side View

Front View

Rear View

Close up of the water delivery system

        So the principle behind the dispenser is simple. A small compressor is driven directly by two NXT motors, converting circular motion to linear motion needed to compress the air in the compressor( think pistons.) The compressed air gets pushed into an airtight water container via a small rubber tube. As the air gets pushed in, the pressure gets increased inside the container. Now there is a secondary rubber tube with one end inside the water and the other end connected to the nozzle through which water is dispensed. When the pressure inside the container increases, water gets pushed out of the container through the non air carrying tube into the open, via the nozzle. Therefore it is very important for the water container to be absolutely air tight to be able to maintain a constant pressure through expulsion of water.
        The design of the project too is nothing too complex, although it was made to make space use as efficient as possible. In the back, a small rectangular platform houses the water container, secured by two elastic restrainers. Right after that are the two motors in an upright position, directly driving the compressor. The NXT brick is situated right in front of these motors. Finally in the front is the push handle with touch sensor, along with a nozzle. Whenever the push handle is pressed, the touch sensor is also pressed, which causes the NXT to drive the motors, leading to flow of water through the nozzle. The handle returns back in place due to rubber bands. I designed the whole front setup to mimic and actual water dispenser.
        There is not a lot of programming involved in this project. The NXT runs the motors whenever the touch sensor is pressed. However, a lot of other sensors could be used. For example, the motors could start running whenever a cup is placed in the platform, with input provided to the NXT by an ultrasonic sensor. Or using a sound sensor, water could be dispensed by clapping of the hands and stopped again by doing the same. Like the Mindstorms motto, the possibilities are indeed endless!
        I have included links for the code for the NXT down below. There are three different files, one for using a touch sensor as input, the others for using a sound sensor and ultrasonic sensors as inputs. The code in all files is annotated. To compile and run these files, use the nxjc and nxj commands. If you are unsure on how to do this, here is a link that can help you out. As for the model itself, I might upload an LDD file of the model in the near future. In the mean time, you can look at the video below of the Mindstorms water dispenser in action and try to build your own version.




Link to the NXT program with the Touch Sensor
Link to the NXT program with the Sound Sensor
Link to the NXT program with the Ultrasonic Sensor

This is not the end.....