Lego Waterbot

Photo of ashokr

Made by ashokr

About the project

Lego's 1st voice controlled robot for home garden irrigation.

Items used in this project

Hardware components

Switched JST-PH 2-Pin SMT Right Angle Breakout Board Switched JST-PH 2-Pin SMT Right Angle Breakout Board x 1
Resistor Network - 10K Ohm (6-pin bussed) Resistor Network - 10K Ohm (6-pin bussed) x 1
Through-Hole Resistors - 100K ohm 5% 1/4W - Pack of 25 Through-Hole Resistors - 100K ohm 5% 1/4W - Pack of 25 x 1
Raspberry Pi 1 Model B+ Starter Pack - Includes a Raspberry Pi 1 Raspberry Pi 1 Model B+ Starter Pack - Includes a Raspberry Pi 1 x 1
Grove - Water Sensor Grove - Water Sensor x 1
Resistor Network - 10K Ohm (6-pin bussed) Resistor Network - 10K Ohm (6-pin bussed) x 1
Jumper Wire Kit - 140pcs Jumper Wire Kit - 140pcs x 1

Software apps and online services

Soldering Station, 110 V Soldering Station, 110 V
Amazon Alexa Alexa Skills Kit Amazon Alexa Alexa Skills Kit
Microsoft VS Code Microsoft VS Code

Hand tools and fabrication machines

9v Power Adapter 9v Power Adapter x 1
Hot glue gun (generic) Hot glue gun (generic) x 1

Story

This project demonstrate the idea that, make a robot for irrigation and voice controlled via amazon echo dot. 

I brought  the Lego Mindstorms EV3 Kit, 10 days took for me to reach my home.  Started working on Missions , Assembled the robot then completed the missions one by one.

Tthen i have implemented my concepts by adding new skills set in Amazon

1 / 2

a) GOTO commends -> PLANT or POT, STATION example "GOTO PLANT TWO"

b) ACTIVATE WATERBOT, RELEASE WATER, CHECK WATER LEVEL and etc.

used the IR sensors for detecting the PLANT or POT, The Waterbot will check the IR distance before releasing the water.

For my requirement I need to control the external pump so did some basic research on Lego wiring connections and got some ideas from that. I just curious about it so I broken a touch sensor to see what is inside :) Also this Hardware Kit document helps me in understanding about Auto ID detection

Execution:

I created the simple resistor voltage divider circuits to detect the dc motor pump on lego control unit.

I tested this circuit with detection and controlling the dc pump motor. In the python code the following changes required to detect this dc pump as motor.

import OUTPUT_A, SpeedPercent,  Motor,waterpump = Motor(OUTPUT_A)  waterpump.on_for_seconds(SpeedPercent(50),1)  // To Turn ON the Motorwaterpump.on_for_seconds(SpeedPercent(-100),1) // To Turn OFF the Motor

As next step I have created small PCB with this circuit and sticked into theone of small Lego blocks. Setup the motor inside the water bottle along with 1/4 inch tube and did wiring with the help of fevistick and glue gum so that the water wont leak outside. Now the small adapter RJ12 board can go into the top of the tank (water bottle). Due to time limitation I couldn't install the water level sensing in tank.

1 / 2

Plants/Pots Mapping:

After setting up the Waterbot, its important to map the location of plants/pots to the Waterbot, I used the basic relation between speed & time to predict the distance

speed = distance/time

Assume speed =1 (for 25% as per the experiments)

distance = time,

Yes if we run the Lego bot for 1sec with 25% speed it wil cross 10cm

in my case I set the speed to 50%, so mapped all the pots/plants distance accordingly in my python scripts.

For rotating left and right, I have to maintain the speed at 45% to get complete 90 degree rotation for seconds. This also relatively same,

distance traveled ( 2sec x 45% speed) = degree of rotation. (90 Degree)

water released in percentage, 10% is equal to running the pump for 1sec, 50% is for 5sec.

Finally I setup everything and fill the water in bottle, The Waterbot is ready to serve the water.

This Waterbot enables the new product version for LEGO kit with water pump and tank system.

Working:

Opening the "Waterbot" by issuing the command "Alexa Open WaterBots"

Alexa: Welcome Ashok, voice interface activated

(background music playing)

Ashok: Alexa, GOTO PLANT ONE,

Alexa: Command "PLANT ONE"activated

(Water-bot started moving )

Ashok: Alexa, ACTIVATE "Water-bot Mode",

Alexa: "Water-bot" mode Activated

Ashok: Alexa, RELEASE water 50%,

Does Alexa, release the water??

Checkout the full working video here

Schematics, diagrams and documents

Motor Pump Circuit

Motor Pump Circuit

Code

Main Code

Credits

Photo of ashokr

ashokr

Hello! I’m Ashok. I’m currently working as software engineer. passionate about doing Hobbies Projects and Animations works.

   

Leave your feedback...