Smart-Bin System using Arduino
- Rajat Sharma
- Jan 31, 2018
- 2 min read
Updated: Mar 8, 2018

I, under supervision of my mentor Dr. Paramvir Singh, was trying to understand IoT System. As a part of our learning we created a small project with Arduino viz. Smart-Bin System.
This is a brief tutorial for creating your own Smart-Bin.
First, Lets see what are the requirements.
Hardware Requirements
Arduino Uno
HCSR-04 Sensor
Arduino Ethernet Shield
Jump wires, Lan Cable and Bread Board
Software Requirements
1. Arduino IDE
Now, moving on to the Steps.
Test your HCSR-04 Sensor
Connect your Sensor to Arduino as shown

Connect Arduino to your Computer and open Arduino IDE.
Create a sketch with following source code, verify and upload it to arduino

Now obstruct your Sensor head with an object and check your serial monitor(in Tools tab in the IDE), it will show your sensor reading.
2. Now plug-in and testing your Ethernet Shield.
Plug-in your Arduino attached with your shield to computer and connect your shield to your computer’s Lan port using Lan cable.
To figure out what IP address has been assigned to your board, open the DhcpAddressPrinter sketch. This can be found at: File --> Examples --> Ethernet --> DhcpAddressPrinter
Upload the sketch to your Arduino, and open the serial monitor. It should print out the IP address in use.
3. Create a simple web server to print distance sensor data on browser.
Open File --> Examples --> Ethernet --> WebServer
Change IP address to the one from 2nd step.
Now add the HCSR-04 sensor code from the 1st step and print that distance value to client connecting to Arduino server.
Now enter your IP address in browser.
4. Afterwards, attach the sensor to a dustbin and change the html view according to the requirement.
TA DA! This is our Smart-Bin Project.
Comments