Close
0%
0%

Particle Garbage Gauge

Track and Shame Your Weekly and Lifely Waste Output

Similar projects worth following
Supporting a society is being cognizant of your contribution, positive or negative.

The average American family of four creates 124 pounds of garbage each week. We are dismissive if we are better or worse. Here we have combined a Particle Photon, scale and scraps to wirelessly log our weekly and life long waste out put with coding to acclimate to blah blah blah. The following also includes a fart joke...

Written, Directed and Possessed by TVMiller

Filmed through Pea Soup and a Droid Razr

  • 1 × Particle Photon
  • 1 × Potentiometer
  • 2 × Gears
  • 1 × Scale
  • 1 × Log, It's Log, It's Big, It's Heavy, It's Wood

View all 7 components

  • Particle Photon Code? Sketch? Lingo?

    Vije Miller04/02/2016 at 05:50 0 comments

    // Garbage Gauge
    // @TVMiller
    
    #ifdef SPARK
    #include "ThingSpeak/ThingSpeak.h"
    #else
    #include "ThingSpeak.h"
    #endif
    
    #ifdef SPARK
    TCPClient client;
    #define VOLTAGE_MAX 3.3
    #define VOLTAGE_MAXCOUNTS 4095.0
    #endif
    
    // ThingSpeak
    unsigned long myChannelNumber = CHANNEL;
    const char * myWriteAPIKey = "APIKEY";
    
    // Input
    int scale = A5;
    
    // Variables
    int current = 0;
    int tare = 0;
    int preweight = 0;
    int adjust = 0;
    
    int week = 0;
    int total = 0;
    
    int wait = 10800; // 3 Hours
    
    void setup() {
    
      Serial.begin(9600);
      ThingSpeak.begin(client);
    
      // Calm Down Power-Up Fluctuation
      delay(5000);
    
      // Empty Garbage Bin Weight
      tare = analogRead(scale);
    
      delay(5000);
    
    }
    
    void loop() {
    
      // Read Pot
      current = analogRead(scale);
      // Convert to Pounds
      // Pot Turn Limitation 254 Pounds
      // Particle Photon is 0 to 4095
      preweight = map(current, 0, 4095, 0, 254);
      // Subtract Tare
      adjust = preweight - tare;
    
      if (adjust < week && preweight < tare) {
        // No Barrel? Ignore
      }
      else if (adjust < week && preweight > tare) {
        // Barrel Emptied? Reset Week
        week = adjust;
      }
      else if (adjust == week) {
        // No Change? Ignore
      }
      else if (adjust > week) {
        // Remove Previous Week Addition
        total = total - week;
        // Adjust Week
        week = adjust;
        // Add to Total
        total = total + week;
      }
    
      // Total Amount
      ThingSpeak.writeField(myChannelNumber, 1, total, myWriteAPIKey);
      // Amount Since Emptying
      ThingSpeak.writeField(myChannelNumber, 2, week, myWriteAPIKey);
    
      // Low Power During Delay
      System.sleep(wait);
      delay(wait);
      // Allow WIFI Recovery
      delay(10000);
    }

  • ThingSpeak Data

    Vije Miller03/31/2016 at 17:28 0 comments

    To get an idea of how it currently out puts.

    By visiting the ThingSpeak channel for Garbage Gauge, you can keep track of your weekly and life long disposal amounts and once you reach a state of shock, may be you begin to condition your self to make changes...or just be entertained at the minute details of life.

  • Spring

    Vije Miller03/31/2016 at 00:19 0 comments

    Decided to use a mechanical scale because a digital one has variables on conditions I wasn't interested in compensating for. Analog has a richer sound.

    That said, the tension of the lightest pot I could find still make it tough for the light spring load on the original rack and pinion so TO NOTE I increased the tension of the spring pulling the gear forward to balance the up force spring.

    The cut and shortened spring is on the left...

View all 3 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates