Elecrow's 2nd Electronics Design Contest is Heating Up! Win $6,000 cash + Maker products + Official sponsorship! Share your designs today! [Learn More]

user-img

Lily lee

  • 31 Projects
  • 3 Followers
  • Apr 02,2024
+ Follow

ESP8266 Wireless Toilet Usage Indicator (Smart Home)

The main function of the project is when the toilet was using, the indicator will show the state of the toilets remotely, just like the toilet indicator in the plane.

ESP8266 Wireless Toilet Usage Indicator (Smart Home)
 
  • thumbnail-img
 

Hardware Components

  • ESP8266 IOT board

    X 1
  • Reed Switch Module

    X 1
  • 3.7V 800mAh Lithium Polymer Battery

    X 1
  • 3.7V 1500mAh Lithium Polymer Battery

    X 1
  • 8 mm LED

    X 1
  • Double Side ProtoBoard 2 * 8cm

    X 1
  • 100Ω resistor

    X 1
  • Jumper wire

    X 1
  • Pin Header

    X 1
  • Magnetic Bead

    X 1

Tools, APP Software Used etc.

  • Arduino IDE

    Arduino IDE

    Arduino

Story

Step 1: Technical Solution

第1步:技术解决方案

So how do we achieve a function that can feedback the status of the toilet at real-time? Firstly, we need a ESP8266 IOT board as a main controller. ESP8266 IOT board has powerful calculative ability that often play as a indepentdent MCU. We have two toilets, so we need three stations, two for toilets and the rest one for status indicator.

The technical solution as the attached image. ESP8266 server should be set as AP mode, it can build a TCP communication with other ESP8266 clients. The clients should work for reading the status of sensors, then feedback to server. and server will control LED to display it.

With them, this application is much simpler to build, now let’s witness the birth of the practical use toilet indicator LED!

Step 2: Bill of Materials

第 2 步:物料清单

We get the following things, they are all required modules:

1: ESP8266 IOT board x 3

This new ESP8266 microcontroller contains a Tensilica chip core as well as a full WiFi stack. You can program the microcontroller using the Arduino IDE for an easy-to-run Internet of Things core. We added a connector for 3.7V Lithium polymer batteries and built in battery charging.

2: Reed Switch Module x 2

3: 3.7V 800mAh Lithium Polymer Battery x 2

4: 3.7V 1500mAh Lithium Polymer Battery x 1

5: 8 mm LED x 4

6: Double Side ProtoBoard 2 * 8cm x 1

7:100Ω resistor x 4

8:Jumper wire x 11

9:Pin Header x 1

10:Magnetic Bead x 2

Step 3: Indicator LED

Indicator LED
Indicator LED
Indicator LED
6 More Images

Are you ready? First of all we need to make the indicator LED, it has a funcation: indicate the toilet use status with LEDs, if the toilet has not been used, the green led will light up, if used, the red LEDs will light up with the green one go out.

Have you seen that double side protoboard and LEDs? That’s right, we need to weld the four leds on the protoboard. it makes the led and circuit integratively. nice and save more space. They are used to display the staus of toilet I and toilet II, each toilet need two LEDs- a green one and a red one, weld them as picture shows.

Then you need to weld four 100Ω resistors, both of them should be weld with the positive pole of LEDs. and all the negative pole of LEDs should be connected to GND.

At last, there has a widget- a 5 pin header. It will provides convenience for connecting the indicator LED to ESP8266IOT board with jumper wires, you can refer to the above pictures about the connection, those have been signed with red line for you.

Step 4: Server Node

Server Node
Server Node
Server Node
3 More Images

Now, we start to connect the LEDs Indicator with ESP8266 IOT board, only five wires to achieve it and i have marked them with corresponding ports. it's easy to finish and don't be careless.

At last we need to power it, it requires 3.3V work voltage,a battery or a usb cable? we finally choose battery so that we can make it become a independent mobile device, a 3.7V 1500mAh LiPo battery is the best choice, we can use battery with it convenient due to its special battery interface. Also the size of battery is compatiable with the board, so if you want to make your device become more smaller, you can stack the board on the battery as shown.

Step 5: Client Node

Client Node
Client Node
Client Node
Client Node

Now, the last part to deal with- two client nodes, it can obtain the toilet usage status, how to achieve this? The most direct way is to monitor the change of door, so we choose the reed switch module, this reed switch module used a small device called a reed switch. When the device is exposed to a magnetic field, the two ferrous materials inside the switch pull together and the switch closes. When the magnetic field is removed, the reeds separate and the switch opens. so if we utilize the magnetic bead to use with the reed switch, it's easy to implement the function. it can response the magnetic bead sensitively. Just three female to female jumper wires for connecting it to ESP8266 IOT board, VCC connect to VCC, GND connect to GND, D0 connect to D0. It needs a power too, we choose a 3.7V 800mAh LiPo battery for "him", For saving space, you could attach the battery with ESP8266 IOT board too.

Ok, all of the hardware has been prepared!

Step 6: Programming

Programming
Programming
Programming
2 More Images

It's time to upload the program to these board, at first we need to write the program, we choose the software tool- LuaEditor to help us, we write three codes for three modules as above pictures show. next i'll teach you how to write program with this software.

First, open the software, then bulid a new code file, next write the program at the right blank part of window, at last you need to save it into a fixed file as "lua" format then have a compilation.

Step 7: Upload the Program

Upload the Program
Upload the Program
Upload the Program
3 More Images

Of course, if you want to use them ,you need to upload the "Server code" onto the ESP8266 server node station, and "Client1" code for the ESP8266 client node station which is installed on toilet I. "Client2" code for the station that be installed on toilet II.

You can download these codes in there and i'll upload the server node code for example. First you need connect the ESP8266 IOT board with computer by usb cable, then open the ESP8266 LuaLoader 0.9(Tools and firmware), set the serial port first, then connect and open the program file, do the file finally. Also the Client code uploading according to this step, when you done it, you can see the change of the onboard LED in the above pictures. It shows that normal work of the program.

Step 8: Installation

Installation
Installation
Installation

If we want to fix the client node with a door, a tape is necessary.

I have done it, look at this picture, but I always felt something missing, it looks so exposed and disgusting. So we decide to stick a poster on it, and we choose that one as the photo shows, how do you like it? It shows toilet is be used when the color of the pedestal pan turn red to purple. Have you feel better than before? Hey! superman! don't let us wait too long! Funny and friendly!

Step 9: Optimization

Optimization
Optimization
Optimization
2 More Images

But i'm so sorry for that what case we choose to hold the server node looks so poor, we can't found a delicate house for it, yeah! Because we are just boorish man, maybe serch for help to our female colleagues next time seems be a better choice. we decide to install the server node on wall, that would be more conspicuous for all staffs.

Fortunately, the white wall give me inspiration and i found a remedial measure to decorate the house- package it with a white paper, it looks better than before, don't you think so? Well done!

Step 10: Conclusion

We solve this problem perfectly , our office will become more intelligentized and humanized!

ESP8266 IOT board is a powerful platform tool! you can even expand to four toilet using, and it can apply on lots of projects too. you need to use your creativity to create more.

"idea" changes your life!

Note: All the program and software tools could be download at the last of essay.

 

Code
  • Client1.zip

    Client1.zip_02932268d7aa02eda5bf0d0f0ea0f941.zip
    Download(0)
  • Client2.zip

    Client2.zip_764355ca5ace1b01fb13fe5caa1f49b8.zip
    Download(0)
  • Server.zip

    Server.zip_3e09476d5b451845314ce025c2f61964.zip
    Download(0)
  • tools and firmware.zip

    tools_and_firmware.zip_6e5b848e385d6291d2646b97d01ed3ea.zip
    Download(1)
Topic
View All

ESP8266 Wireless Toilet Usage Indicator (Smart Home)

The main function of the project is when the toilet was using, the indicator will show the state of the toilets remotely, just like the toilet indicator in the plane.

379
 
2
0
37

Share your project on social media to expand its influence! Get more people to support it.

  • Comments( 0 )
  • Like( 2 )
/1000
Upload a photo:
You can only upload 1 files in total. Each file cannot exceed 2MB. Supports JPG, JPEG, GIF, PNG, BMP

You May Also Like

View All
Add to cart
Board Type : GerberFile :
Layer : Dimensions :
PCB Qty :
Different PCB Design
PCB Thickness : PCB Color :
Surface Finish : Castellated Hole :
Copper Weight : 1 oz Production Time :
Total: US $
As a sharing platform, our community will not bear responsibility for any issues with this design and parameters.

PCB Assembly

PCBA Qty: BomFile:
NO. OF UNIQUE PARTS: NO. of Components:
Assembly Cost: US $
As a sharing platform, our community will not bear responsibility for any issues with this design and parameters.
Add to cart
3dPrintingFile : Size :
Unit : Volumn :
3D Printing Qty : Material :
Total: US $12.99
As a sharing platform, our community will not bear responsibility for any issues with this design and parameters.
Add to cart
Acrylic Type : AcrylicFile :
Dimensions: Engrave:
Acrylic Qty :
Acrylic Thickness:
Acrylic Color:
Total: US $12.99
As a sharing platform, our community will not bear responsibility for any issues with this design and parameters.
Add to cart
CNC Milling File : Size:
Unit: Volumn:
CNC Milling Qty : Material:
Type of Aluminum: Surface Finish:
Tolerance:
Surface Roughness:
Total: US $12.99
As a sharing platform, our community will not bear responsibility for any issues with this design and parameters.
Add to cart
Item Price Qty Subtotal Delete
Total: US $0.00
Certified Product | Supported Purchase: Full After-sales Protection