Trash Can for the next generation

0 Flares 0 Flares ×
  • This post is about an issue that I see in my home country Brazil. If you wander in the streets of a typical  Brazilian city you’ll likely see some or lots of trash on the floor. Much more that you’d see here in the US. Some may say that is because there is not enough trash cans in the streets; others may say it’s related to people’s habits.
  • I’m not going to take sides here. However I do think that if there’s a cool factor added to trash cans that would increase its appeal to young kids.  Think of a Chewing Gum Machine.  I bet you that often times kids aren’t much interested in the gumball itself, but just want to insert that coin to see the gumball spinning though that spiral – they think that’s cool and that is why they want to do it! The gum is just a byproduct.
  • So the idea here is turn the boring object and boring act into something cool that kids look forward to.
  • In summary my hypothesis is that a ‘cool’ trash can can collect more garbage than a plain one. (Hey – this may be a good  school/college research project topic) 
  • The simple demo below is just to get you thinking about the concept. Of course a real product would have better aesthetic that what I show!


  • Lixo nas ruas é um problema comun em cidades brasileiras. Talvez devido a falta de lixeiras, talvez falta do hábito das pessoas.
  • Meu foco não é apontar causa ou culpa, mas acho que se houvesse um fator moderno nas lixeiras, isso poderia aumentar seu uso entre crianças, jovens e adultos. Ser uma ferramenta de educação beneficiando esta e futuras gerações. 
  •  Penso que ao transformar lixeiras numa espécie de video-game, qual interage com o usuário e o estimula, aumentaria seu uso e ajudaria a reforçar este hábito nas pessoas. 
  • A idea é transformar um objeto e ato monótono em algo que estimula os sensos de visao e audição.
  • Em resumo, minha hipótese é que a ‘lixeira-legal’ pode coletar mais lixo que a convencional e reforçar bons hábitos.
  • No video abaixo você verá uma simples demostração deste conceito. E é claro, para que este seja um produto real, o design visual e outros detalhes têm que ser aprimorados.

-Igor 2-26-13


Arduino source code for this example:



Sample code for ‘smart garbage’ demo

I wrote this code with snippets from Arduino Tone example and the ping example from :

-Igor Ramos 2-25-2013


#include “pitches.h”

//8-ohm speaker on digital pin 8
#define trigPin 13
#define echoPin 12

// notes in the melody:
int melody[] = {

// note durations: 4 = quarter note, 8 = eighth note, etc.:
int noteDurations[] = {
4, 8, 8, 4,4,4,4,4 };

void setup() {
Serial.begin(9600); // Open serial monitor at 115200 baud to see ping results.
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
void loop() {
static char dist=0;
long int time;
static long int prev_time=0,prev_time2=0;
long duration, distance;

time = millis();

if ( time – prev_time > 50)
prev_time = time;

digitalWrite(trigPin, LOW); // Added this line
delayMicroseconds(2); // Added this line
digitalWrite(trigPin, HIGH);

delayMicroseconds(10); // Added this line
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
distance = (duration/2) / 29.1;

if ((dist ==0 ) && (distance <30) && (distance >5))
dist = 1; //set alarm
Serial.println(“ALARM SET……….”);
if ((dist ==1 ) && (distance >20) && (distance <199))
dist = 0; //clear alarm
Serial.println(“Playing tone…….”);


if ( time – prev_time2 > 1000)
prev_time2 = time;
Serial.print(” cm, alarm:”);
Serial.println(dist, DEC);


void my_play_tone() {
// iterate over the notes of the melody:
for (int thisNote = 0; thisNote < 8; thisNote++) {

// to calculate the note duration, take one second
// divided by the note type.
//e.g. quarter note = 1000 / 4, eighth note = 1000/8, etc.
int noteDuration = 1000/noteDurations[thisNote];
tone(8, melody[thisNote],noteDuration);

// to distinguish the notes, set a minimum time between them.
// the note’s duration + 30% seems to work well:
int pauseBetweenNotes = noteDuration * 1.30;
// stop the tone playing: