Introduction: A Smart Water Sensor That Sends Text Messages

Picture of A Smart Water Sensor That Sends Text Messages

The esp8266 will log on to your local network. One gpio2 (D4) will go low when water is detected. When the esp8266 detects water it will use http://www.Twilio.com to send an SMS text message to your phone.

Parts List

1. Esp8266 stand-alone unit with water sensor $15, available at https://www.tindie.com/products/Paulware/text-sending-water-sensor/

2. Esp8266 programmer $10, available https://www.tindie.com/products/Paulware/esp8266-programmer/

3. 5V usb power supply $3, available from ebay.

Total parts cost: $28

Steps

1. Follow this instructable to program the unit: https://www.instructables.com/id/ProgramESP8266/

2. Edit sensor.lua, modify the SSID and password to match your local network

3. Disconnect programmer from laptop, remove the esp8266 from programmer and place it in the water sensor.

4. Connect the standalone esp8266 to a 5V power supply. Allow 10 seconds to boot up

5. Place a drop of water on the sensor

You should receive a text message on your cell phone in about 15 seconds

Step 1: Set Your Ssid and Password for Your Local Network

Picture of Set Your Ssid and Password for Your Local Network

When you order a sensor from tindie like this one:
https://www.tindie.com/products/Paulware/text-sending-water-sensor you will receive an esp8266 that has already been flashed as is ready to be programmed.

Before you receive the unit, the manufacturer will send an email requesting the phone number to send the text.

He will then test the unit by sending a sample text to your phone. When you receive the sensor.lua file, it will have your correct phone number. It will not have the correct SSID and password, you need to add that part.

Edit the first 2 lines of the sensor.lua file:

local SSID = "YourSSID"

local password = "YourPassword"

Change the SSID to be the name of your local home network. Change the password to be the security password for your network.

Step 2: Program the Esp8266 to Be a Water Sensor

Picture of Program the Esp8266 to Be a Water Sensor

Follow this instructable to program the device:

https://www.instructables.com/id/ProgramESP8266/

Step 3: Test the Unit

Connect the standalone esp8266 to a 5V power supply. Allow 10 seconds to boot up

Test the device by applying a drop of water to the sensor

You should receive a text message on your cell phone in about 15 seconds

Step 4:

Comments

NakshN (author)2016-12-18

Very helpful information.

www.nrdcentre.com

vleis.walker (author)2015-09-22

Hi there.

Looking good, would love to give it a try....

However... in line 7&8 in waterTwilio.lua, should I not change it to my AP details?

Kind regards

paulware (author)vleis.walker2015-09-22

SSID and password are changed in step 5, modification of init.lua.

But, what you noticed there are some unused variables. I will delete them and repost waterTwilio.lua. Thanks for your comment!

vleis.walker (author)paulware2015-09-22

Thank you! I appreciate your answer.

Will give it a try.

GREAT EFFORT!!

About This Instructable

4,137views

37favorites

License:

Bio: thanks
More by paulware:433 Nunchuk Receive Motor ControlRemote Control Vehicle Transmitter With Arduino BlocklyArduino 433 Transmit
Add instructable to: