Introduction: The Talking Recycling Bin
This document will provide you with all the steps and tools required to build a talking recycling can that was created by our group, The Green Team, in Professor Siek's Computing for Good class.
The motivation for our project was simple, not enough people recycle. In any instance where there is a trash can and a recycling can set up next to each other, most times, people will toss their waste into the trash can without blinking an eye. Our group agreed that recycling is just not a fun activity to do, or at the very least, not any different than throwing something in the trash can next to it. 75% of trash that is thrown away is recyclable, but only 30% of that trash is actually recycled. There is a huge space for improvement in this area. We figured that if we could make something interactive and fun, then we could increase the number of people that recycle.
Step 1: Getting Started
The code for this program is written in C. Basic knowledge and research will be needed in order to write the program capable of detecting the trash and keeping a count.
Step 2: What You Will Need
To build the device for this recycling bin, you will need the following items:
- Arduino Mega Board
- Motion Sensor
- iPod Shuffle
- External Speaker
- Soldering Iron
- Connective Wires
- Computer to use as a display
- Electric Tape
- Duct Tape
- Physical Enclosure
- Recycling Bin to set device in
- Plastic Bag to put enclosure in
All of these items can be purchased on Sparkfun or Amazon
Step 3: Wiring
(iPod Disassembly pictures courtesy of https://www.instructables.com/id/MP3-Interface-for-Arduino-Cheap-and-Easy/)
The wiring for this project consists of two major components (i.e. the PIR motion sensor and the clip MP3 player) as well as a push button and two LEDs to cycle through sound modes.
The PIR motion sensor (depicted as a tmp sensor in the diagram) gets connected to the boards 5.5v, ground and a digital sensor pin. The sensor pin is an open collector meaning you will need a pull up resistor on the sensor pin. The open drain setup allows multiple motion sensors to be connected on a single input pin. If any of the motion sensors go off, the input pin will be pulled low.
To integrate the MP3 player we removed the MP3 circuit board from it's clip enclosure. We also disconnected the MP3 players dedicated battery and connected it the the Arduino's 5.5v and ground terminals. Because we only have one (4hr long) mp3 file on our player, we only needed the arduino to have access/control over the "previous" button on the mp3 player. The wire leaving pin number 5 on the arduino is therefore soldered to the center conductive circle of the center button. **Note the picture above has leads soldered to more then just the previous button. For our project, this was not necessary.**
The button and LED all use 110K resistors and are simply wired following the diagram.
Step 4: Coding
You can download the code here.
Our code achieves the following sequence; waits for motion, detects motion, adds 1 to the count, then plays (or doesn't play depending on the mode) the sound on the MP3 player. The code is broken up into two main section; mode selection (sound or no sound) and motion detection. The mode selection uses the button input to toggle between 'mode=1' and 'mode=0'. Toggling the mode is also set to reset the count. The motion detection section just watches the input pin and when it goes LOW (motion detected), it updates the count and plays the MP3. We have a delay of 10 seconds between triggers to allow the mp3 file to finish.
Step 5: Building the Enclosure
For the enclosure, we used the box that the Arduino kit came in. This was a thick plastic box that was the perfect size to hold the board and iPod in. In order to use this box, we measured the size of the board, and how big the cords that connected from the mega board to the computer. After the dimensions were taken, we used a box cutter to cut the holes on the top face of the box, and the small side of the box.
Step 6: Putting It All Together
Once the code is set up, and the enclosure is built, you can put all the items into the box and get it ready to run.
We took the functioning mega board, already wired up and ready to go, and placed it into the enclosure. On top of the board, there was a perfect amount of space to set the iPod in. Once you place the iPod in the enclosure, the last thing that needs to go in is the motion sensor. Again, this is able to just rest on top of the board and iPod.
When putting all of the components into the box, make sure that the motion sensor is facing the hole that was cutout of the enclosure. Once everything is set in and connected, then use the electrical tape to make sure everything holds in place and does not get disconnected.
Step 7: Setting Enclosure in the Recycling Bin
When going to implement the device into a recycling bin, the first step is to put the device into a Ziploc bag. It is best to use a gallon size that way there is plenty of space in the bag, and to tape the bag to that recycling bin.
Once the device is secure in the Ziploc bag, drop the device into the bin. The device is best to be placed a few inches below the lid. To secure the device stays in this position, use duct tape to tape the bag to the recycling bin itself. This method also allows you to easily adjust the placement of the device to test where the best placement for you is.
Step 8: Future Ideas and Helpful Hints
There are a few ways that the project could be improved upon.
The first is that there could be more interaction added to the recycling bin. An idea we thought about doing originally was to add a string of lights to the bin as well, and have it light up at the same time as the audio played. This is just another level of interaction that may give users a bigger incentive to recycle. Also, the screen that displays the total number of users could be more detailed. There could be more stats on the screen that would give users a better idea of how useful or popular the recycling bin is.
A suggestion we would give as well would to be use a couple different items. Instead of using the iPod Shuffle, taking it apart, and soldering it, it would be an easier route to just use the Arudino mp3 player from Sparkfun. This would take no deconstruction and would surely be easier to code. Another recommendation we would make is to build an enclosure from scratch. We used the case that came with all the wires and resistors for the Arduino in it, and cut holes through it with a box cutter. This was a painful process, and could be done much easier and in a less time consuming manner if use a laser cutter or another tool to build one yourself.
We have a be nice policy.
Please be positive and constructive.
Great project! The link to the code no longer works. Would you have access to it somewhere else?