THIS IS A TRASHCAN.
By Eva He & Sherry Wu
Instructor: Rodolfo Cossovich
CONTEXT AND SIGNIFICANCE:
This is a smart trash can. Just reach over to the bin, and the lid will open. To prevent bacterial infection caused by contact between hands and garbage cans. After a minute, the lid will close automatically, preventing the odor from escaping. It automatically alarms when the trash is full, and the top stays open until you’ve removed all the trash. Our main audience is students because students produce garbage when they do their homework. This can be used as a desktop trash can to make it more concise, and the sensitive sensor will help students reduce the extra time to open the lid and throw garbage.
CONCEPTION AND DESIGN:
Controller: Arduino mainboard
Power supply: 6V battery box power supply, USB interface power supply;
Sensor: Ultrasonic ranging sensor X2
Actuator: steering gear, buzzer
Structure: 3D printing control box, built-in battery box (4, 6V)
Speaker: Micro SD card holder, Small speakers
.
I have listed above all the things we use. I think my interactive project can help human beings to clean up garbage more efficiently, which is mainly divided into three features. The first feature is sound. We use speakers to make them more personality. When the bin opened, it will have a sound of “Ahhh” And also a sound of “Yumyum” When it closed. The second feature is interaction, , when the hand is close to the trashcan lid, will open, 1min later, the trash can lid will close automatically. The third feature is a reminder, When the garbage is full, the lid will be open until the garbage is removed. We used two Ultrasonic sensors to help us open the lid and reminder. I don’t think other sensors can easily open the trash can. Then we first chose to 3d print the bottle body, because we had too many lines. We decided to cardboard and painted it white.
And then, here is our prototype…
FABRICATION AND PRODUCTION:
After we finished the prototype, we showed off our prototype in Recitation on Friday. Everyone is actively participating in our interactive program. We get a lot of feedback. For example, the sensor can be a little more responsive. So you don’t have to reach all the way to get the lid off. I think the most important thing is that we wanted to put some wheels on it. The trash can follow the person around the house while holding the remote. But Professor Marcela asks what happens if the remote control is lost. She came up with a new idea to make the trash can itself more personalized, making a “yumyum” sound when she’s full. We followed Professor Marcela’s advice, but after the speaker was installed, we could not start the steering gear to open the lid. We gave up on this last minor failure.
int TrigCap = 5; // 开盖子超声波引脚Trig 连接 IO 5 int EchoCap = 6; // 开盖子超声波引脚Echo 连接 IO 6 int TrigTrash = 7; // 垃圾高度超声波引脚Trig 连接 IO 7 int EchoTrash = 8; // 垃圾高度声波引脚Echo 连接 IO 8 #include "SD.h" //读取 SD card 文件 #include "TMRpcm.h" //读取 音频播放文件 #include "SPI.h" //读取 SD card的SPI 文件 #define SD_ChipSelectPin 4 //设置SS 引脚 4 TMRpcm music; //设置音频播放对象 "music" #include <Servo.h>// 导入舵机模块 Servo myservo; int servoPin = 2; // 舵机信号线接数字2 int buzzPin = 9; // 蜂鸣器接数字9 long freqency = 2000; // 鸣叫频率 void setup() { Serial.begin(9600); pinMode(TrigCap, OUTPUT); pinMode(EchoCap, INPUT); pinMode(TrigTrash, OUTPUT); pinMode(EchoTrash, INPUT); // 开机时将舵机调整到70度,保证垃圾桶盖是闭合的 myservo.attach(servoPin); myservo.write(70);// initial delay(40); pinMode(buzzPin, OUTPUT); music.speakerPin = 10; //设置音频输出针脚 2 Serial.begin(9600); //串口调试 if (!SD.begin(SD_ChipSelectPin)) { Serial.println("SD fail"); return; } music.setVolume(2); // 设置音量0 ~7 } // 测量距离 float measure (int Trig, int Echo) { digitalWrite(Trig, LOW); delayMicroseconds(2); digitalWrite(Trig,HIGH); delayMicroseconds(10); digitalWrite(Trig, LOW); float temp = float(pulseIn(Echo, HIGH)); //存储回波等待时间 float distance = (temp * 17 )/1000; return distance; } // 开盖 void openCap (int hold) { myservo.write(100); music.play("ahh.wav"); delay(2000); } // 关盖 void closeCap () { myservo.write(180); music.play("bite.wav"); delay(70); } void loop() { float distCap = measure (TrigCap, EchoCap); // 测量手离垃圾桶的距离 float distTrash = measure (TrigTrash, EchoTrash); // 测量垃圾桶内垃圾的高度 //Serial.println(distCap); //Serial.println(distTrash); // 如果手离垃圾桶距离小于4cm,开盖。 if (distCap < 20) { openCap(1000); } else { closeCap(); } // 当垃圾满的时候,立即开盖,并且报警,延迟1秒后关盖子 if (distTrash < 5) { tone (buzzPin, freqency); openCap(1000); noTone (buzzPin); closeCap (); } delay(100); }
CONCLUSIONS:
After we did tons of improvement, I had to change Buzzer’s voice to Marino’s. I think if we had more time to make it, we would have made it a little more lively and changed the look. And here is our project’s poster that describes the information. I actually made it as an advertisement that will attract people to buy the product. This is actually my first Arduino project in my whole life, I think it was very interesting and useful. I wish I could learn more and do more projects like this later.
Thank you for watching!!!
Bye!!!