Project 3: Is My Package Here?






Sometimes, I'm not sure if the my packages have arrived or not and I find myself constantly checking every hour. Other times, I find myself wondering where it is, when the package has already been delivered in my front door. So I've created a system where it would tell me when a package has been left in front of the door.





UML Diagram
















Sensors




Button

Digital Distance Sensor with Pololu Carrier












Coding Process



1. At first I planned on using strain gauge load cell to detect if there was a package in front of the door or not but soon realized that I don't necessarily have to know how much the package weighs so I changed to a button. If the button is pressed there is a package and if not pressed, there is no package.

2. At first I thought that the distance sensor would be a analog input because I thought it would give me the distance of where the mailman is. (Originally I was going to detect the mailman.) However, it gave me a digital input- whether an object was within the distance or not. So I used it as a way to double check if the package was there because there were many other factors to think about.

  • If both the button and distance sensor was on, it meant the package was there.

  • If the button was pressed but the distance sensor wasn't it could mean that the package is there but too small for the distance sensor to read.

  • If the button was not pressed but the distance sensor went off, the package may be too light or something else was walking around in front of the door.

  • And lastly, if the button and the distance sensor didn't sense anything. it meant that the package was not there.

3. At first I had the sensor that was connected to A1 and so no input was coming through.










I made the connection was made between breadboard and Arduino at first. I made sure that the button and the distance sensor was both working.













I connected the feeds to arduino.io. I was able to see when the value was being changed from 1 to 0 or from 0 to 1.












I worked on P5.js to visually show if the package was there or not. This is where I thought about the different states.











Prototype






Physical Prototype















For the prototype I made a large base so that the package can go on top of it and press the button on the bottom. I also added a spray bottle cap so that the weight of the box can push the button inside and the wires were also being used as a spring to unpress the button when the package is picked up.