Friday, August 10, 2007

Swimming Pool Insect Terminator (SPIT)

Today I want to share with you a floating robot my children and I been designing and building over recent weeks.
Swimming Pool Insect Terminator (SPIT) is a special self powered autonamous floating robot that locates and destroys small clusters of bugs that float on the top of swimming pools.
We used LEGO MINDSTORMS to build this. LEGO TECHNIC wheels are used as floats. The only non TECHNIC part that was used in this project is a can of inspect spray.
The robot uses the light sensor to detect the presence of insect cluster while the Ultrasonic sensor is used to avoid bumping into the side of the pool by telling the steering motor to turn. When the Light sensor detects a cluster of bugs it tells a motor to push the button on a can of Insect spray. Another motor is used to power the SPIT forward. The project was a success and we learned a lot from it – though there are still a lot of room for improvements. The rest of this blog entry explains the problem and our solution in more details.




Swimming Pool floating bug clusters

One of the most irritating things about our Swimming pool is the thousands of tiny floating insects that inhabit the pool. The insects form clusters on the surface and make the pool look dirty and uninviting.
They are resistant to the chlorine in the pool-water and it is almost impossible to get rid of. Because it stays on the surface it never gets sucked into the water filter system. You can’t even scoop them with an object (such as a stick), as they simply fly back into the water as soon as you scoop them off the water. When you jump into the pool they get all over your body and it is totally gross.
So the idea was to create robot that can find the clusters on the surface, spray them with a mild insect spray that paralyzes them, and drown them with a
paddle so it can be picked up by standard pool filter.


Bug detection - Insect cluster locater

To detect the clusters of insects on the pool surface, the light sensor is used. It identifies the presence of dark patches on water under the robot. It does this by reading the optical properties of the water the robot is traveling over using the MINDSTORM light sensor.
A lot of time was spent on identifying reliable threshold that can be used to minimise false spraying caused by floating leaves and reflection on the water. A plastic case full of floating bugs was used to calibrate the threshold value of the light sensor reading to trigger the spray.The robot continually monitor the light sensor while it travels around the pool. When the reading changes to the calibrated threshold indicated by the insect cluster (the trigger point), the NXT brick drives the motor that pushes the button of the insect spray can.The ultrasonic detector is not used for the bug location - it is simply there to detect edges and thus avoiding damaging the light sensor by bumping into the side of the pools.


Insect killing subsystem

(a) Automatic Insect spraying

Once the Light sensor identifies a cluster of insects, the NXT brick tells a motor to power a push-rod forward into the spray button of the spray can nozzle. The Light sensor and the spray can nozzle are separated by 10 inches (25 cm) - which makes up for the distance traveled by the robot on the water during the delay before the spray hits the bugs on the water. It took nearly a week of trying different approaches to push the spray can button, that drives the spray nozzle. Even now it needs some improvements - the TECHNIC rods bending under load sometimes.

(b) Insect drowning
The sprayed insect clusters then have to be drowned for them to be picked up by the pool filter. This is done by the dual action of the paddle wheel. As the sprayed insect cluster floats underneath the SPIT, the paddle wheel churns the water and the half dead insects gets pushed below the waters surface so they drown.



The video below shows the spraying mechanism in action - you can see the spray can button being pressed by the MINDSTORM motor using gear wheels and worm gears:


Buoyancy and stability

(a) stability:
Considerable effort went into making the robot as stable as possible in the water. To make the floating robot stable, a double 'A' frame based structure was used to spread the weight of the MINDSTORMS NXT and the spray can and to keep the center of gravity low. It was really hard to avoid making the whole thing top heavy - as we have to protect the electronics from the splashes from the wheel and any ripples from wind / pool filter pump.

(b) Buoyancy:
As for Buoyancy, at first the SPIT was going to stay afloat with 4 rubber Lego Mindstorm wheels. However, this did not supply enough buoyancy to keep the robot above the water so another 4 TECHNIC tractor wheels were added.During pool testing we added A ribbon of Polystyrene on the two sides provide failover if the LEGO wheels fail (e.g. by letting in water whilst on water). Of course it was not necessary as the SPIT was self buoyant - thanks to the big TECHNIC tractor wheels.



Propulsion and steering

(a) Propulsion Subsystem:


After some prototyping work it was decided to use paddle wheel type propulsion – which was inspired by the old steamboat. The position of the paddle wheel is important. The traditional steamboat had the paddle wheels either on the stern or the sides. To maximise stability we positioned these wheels in the middle. This way the rotating action of the paddle wheel doubles up in aiding with the drowning of the sprayed bugs as well as powering the SPIT. We used the 4 MINDSTORMS claws as the paddle - as it gave the best trust with least splashes - and it looked cool.





(b) Steering Subsystem:
The steering is controlled by a turntable powered by a motor. The orientation of the paddle wheels is determined by the readings of the Ultrasonic sensor mounted at the front of the SPIT When the Ultrasonic sensor detects the side of the pool. It tells the motor to turn the turntable and thus make the paddle wheel pointing to a new direction until the edge is no longer in range of the sonic sensor.

You can see detailed description of the floating system / steering & propulsion system in LEGO's NXTLOG web site. Below is the animated building instructions of the steering and propulsion system.









Programing

We kept the program as simple as possible - Two parallel beams of NXT blocks looping forever - one for insect hunting /destruction; the other for navigation and propulsion.









< -- Click on the picture to see the blocks in NXT-G

Field Testing

The video below shows the maiden voyage of SPIT in our pool. It then progresses to a a film of SPIT shot at night: we found the light sensor most effective in the absence of ambient light (i.e. night time) in detecting bugs. The light sensor uses its own light (the red light you see on the front of the robot in the film). During pool testing we added more wheels and A ribbon of Polystyrene on the two sides provide failover if the LEGO wheels fail (e.g. by letting in water whilst on water). Of course it was not necessary as the SPIT was self buoyant - thanks to the big TECHNIC tractor wheels.




Whats NXT?


We had so much fun making the floating robot and and playing with the MINDSTORMS stuff in the process. What is next? The project is complete but we have already thought of many improvements including:

  • Better stability by using wider frame and more tractor tyres
  • More accurate bug cluster detection by using the colour sensor (instead of the light sensor which only works best at night)

  • More robust spray can button pressing mechanism based on beams rather than rods

  • Incorporation of a Compass sensor and GPS sensor to make the scan of the pool more efficient
Warning: If you want to attempt a project similar to this, please exercise caution to ensure that your NXT / motors and sensors are not damaged by the water.

Also it is potentially dangerous to operate an aerosol can button with a motor - be cautious.





© 2007 BlueToothKiwi.





6 comments:

Angela Miller said...

This has to be hands-down one of the most creative and interesting blog posts I've read. I just randomly hit your site by accident through a link from another site. Just wanted to tell you that your solution to the bug problem is ingenious.

Angela

BlueToothKiwi said...

Thank you Angela,

Thank you for your kind words. I will pass on your comments to the kids who put in anenormous amount of effort into the project. Please book mark this blog - We got more cool stuff in the pipeline.

madboy said...

This is wicked awesome. But how do you feel swimming in a pool with all that bug spray in it? (Or, how many times an hour does it activate the spray?)

BlueToothKiwi said...

Thank you madboy for your comment.

II dont know - soon after we made the robot, the infestation dissapeared from our pool - and we never saw those insects again after that.

Tim Nowaczyk said...

You could also spray the bugs with a little soap. This would lower the surface tension and they would no longer be able to float on top. They would fall into the water and drown. No more bug spray :)

gfh said...

Your Best Choice! wow power leveling and wow gold wow gold

Latest from The NXT STEP Blog