Introduction: Smart Trashcan Module
The idea of the project is to allow city planners to better track trashcans around their city without replacing existing ones/install extra infrastructure using the Intel Edison board. You can also hook it up to your home trashcan too!
Using the sensors and the front end web application, you will be able to track the trash level, if the trash can is tilted, the temperature, and its geolocation.
Follow the steps to create your own smart trashcan!
Step 1: Gather the Components
Here are the the hardware components used in the system:
1 x Intel IoT Edition board with Grove Starter kit and shield
1 x HC-SR04 ultrasonic sensor
1 x SIM28 GPS sensor
1 x Grove kit temperature sensor
1 x ADXL335 Tilt Angle Module
1 x Grove kit Speaker
1 x Red LED
1 x Green LED
1 x Blue LED
A breadboard/voltmeter would help with debugging/troubleshooting
Step 2: Gather the Software
Follow the detailed setup instructions for your OS here:
Here are the major steps:
- Install Intel XDT
- Flash the newest image using the Intel flash utility
- Connect to the Edison board from serial using screen/PUTTY to configure the network
- Try out one of the example projects, such as LED blink, to make everything working
Step 3: Connect the Hardware
Hook up the sensors and actuators to the Intel Edison Board
HC-SR04 ultrasonic sensor
- Connect the ECHO pin to GPIO pin 3 and TRIG pin to GPIO pin 4
- Connect VCC to 5V and GND to GND
SIM28 GPS sensor
- Connect the GPS to UART
Grove kit temperature sensor
- Connect the temperature sensor to analog pin 0
ADXL335 Tilt Angle Module
- Connect the Y pin to analog pin 3
- Connect the X pin to analog pin 4
- Connect the Z pin to analog pin 5
- Connect VCC to 3.3V and GND to GND
Grove kit Speaker
- Connect the speaker to digital pin 8
- Connect the red LED to digital pin 5
- Connect the green LED to digital pin 6
- Connect the blue LED to digital pin 7
Step 4: Hook Up the Software
Download the code from github here:
The "webpanel" directory contains a webapp that shows the status of the trashcan,
Create a blank project and import the code. Click "Build" and "Upload", your smart trashcan should be good to go!
A little more info on the software:
With board connected to sensors, we can now go ahead and proxy data from sensor all the way up to internet with WebSocket via Socket.io (http://socket.io/). In other word, the board will be communicating with its companion app with WebSocket protocol. Please take a look of the Socket.io website to see how you can emit data out with Socket.io.
Step 5: Further Enhancements
Connect the device to the cloud
The code contains post request to the AT&T M2X API, which allows you to archive data on the cloud and do data analysis. Add a config.js in the project directory and export the device id and api key to use it in the code.
Mounting the device
You can hook it up to a physical trashcan by using Velcro and tape. Just make sure the tilt sensor and ultrasonic sensor is correctly positioned for accurate reading.