The goal of this project was to use Windows 10 and a raspberry pi to create a system that could identify when the trash was full. I decided to use a force sensor to detect whether or not there is significant weight in the trash. I figured that this would be a better indicator of whether or not the trash if full instead of using something like a distance sensor (which may cause the bag to break if the trash is full of wet food).
I started off using a strain gauge but the readings I got off of it were not even close to accurate. Because I wanted the system to detect whether or not the weight was over some maximum value, I decided to use a resistive force sensor (that detects up to 25lbs) as my sensor. When the force applied to the sensor is more than 25lbs the resistance across the sensor drops from ~100k Ohms (at 0 lbs) to ~200 Ohms. I placed a potentiometer in series with the force sensor and created a voltage divider circuit that had voltage proportional to the potentiometer's resistance divided by the sum of the potentiometer and force sensor's resistance. I adjusted the potentiometer's resistance to be equivalent to the force sensor's maximum resistance. This means that at 0 lbs the voltage across the circuit is approximately 0V and at 25lbs the voltage is approximately Vdd/2.
I then used the sample code that was provided for the potentiometer sample on https://ms-iot.github.io/content/en-US/win10/samples/Potentiometer.htm to verify that the system could read the sensors values.
The last step is to modify the code to alert the user when the weight is over the target and place the circuit under a trashcan.
Comments