# When can I get my online orders?

A shopaholic always wants to know whether his/her package has arrived home. This device using a FSR to detect packages placing at your front door. Users can receive light signal and read the force value of package in Cloud when their package arrives.

Created: January 29th, 2016

0

# Intention

My roommate Ellen is an online shopaholic receives packages almost every week. The couriers leave packages at the front porch of our house without calling her or knocking the door. She really wants to get a message of the packages’ arrival no matter she’s at home or not. Also she’s curious about which order has arrived since she might receive several orders at same time (crazy girl).

0

# Goal

The goal of this project is to provide an ambient LED signal at home to indicate packages’ arrival. More precisely, users can have a prediction of which order has arrived by the weight of the package. One LED on means a relatively light stuff, two LEDs means a heavy stuff. Also the force value could be sent to cloud so they can get this information online if they are not at home. A switch is added to control turing on/off the device.

0

# Process

Components:

1 – force sensitive resistor

2 - green LEDs

1 - switch

1 - 10 kohm resistor

2 - 1 kohm resistors

1 - Particle Photon & breadboard

Jumper cables

Step 1. Drawing the circuit to understand how it works.

0

Step 2. Wiring the circuit.

0

Step 3. Coding

0
``````int fsrPin=A0;
// Create a variable to hold the FSR reading
int switchPin=D0;
int ledPin0=D2;
int ledPin1=D4;

void setup(){
//set up switch and fsr for input, led for output
pinMode(switchPin, INPUT_PULLUP);
pinMode(fsrPin, INPUT);
pinMode(ledPin0, OUTPUT);
pinMode(ledPin1, OUTPUT);
//Connecting to Cloud

}

void loop(){

if(buttonState == LOW){
//when the pressure is relatively small, let's say under 2048
digitalWrite(ledPin0, HIGH);
digitalWrite(ledPin1, LOW);

}
//when the pressure is over 2048
digitalWrite(ledPin0, HIGH);
digitalWrite(ledPin1, HIGH);
}
//no pressure(no stuff is being placed on fsr except for interference factors)
digitalWrite(ledPin0, LOW);
digitalWrite(ledPin1, LOW);
}
}else{
//the switch is off, turn off leds
digitalWrite(ledPin0, LOW);
digitalWrite(ledPin1, LOW);

}

delay(100);
}``````
Click to Expand
0

# Outcome

Because of the area limitation of this FSR, I used an apple and a bottle of juice to mimic different packages.

After turn on the switch, first I placed an apple on FSR and one LED shine; then I placed a heavier bottle on FSR and two LEDs shined. The two values of force are displayed in Cloud. By using this device, users can detect whether their package has arrived by LED signal inside home and predict which order through force value. The process is shown in the video below.

For future improvement, I want to have push notification on mobile phone by using IFTTT. Also the prediction of package could be more useful and accurate by connecting the weight information from website like Amazon with this device.

0
When can I get my online orders?
Shannon Cui
0

# Reflection

This project is very challenging for me since I don't have experience in coding and building circuit. Through the coding process, I learned the difference between digital signal and analog signal. Analog read/write is used for getting and setting the value of the pin; digital read/write is for digital signal. I successfully accomplished the goal of sensing stuff placed on FSR and tell the different weight by LED signals. If I have a bigger FSR I could use this device to detect package.