IOT Mailbox
Group Members
Christian Harris
Ernest Williams
Project Description
The purpose of this project was to create a system that would allow a user to monitor his mailbox remotely using a webserver created on the device. This website will inform the user when mail has been inserted into the mailbox. Once this happens, the user can have his mail dispensed by entering an unlock code either via bluetooth, or using the touchpad input.
To allow this, the following devices were used:
- 1 - Adafruit Bluefruit LE UART Friend
- 1 - MPR121 I2C Capacitive Touch Sensor
- 1 - mbed LPC1768
- 1 - Huzzah ESP8266
- 2 - DAGU Robot Mini DC Gearbox
- 1 - RC Servo
- 1 - Pololu TB6612FNG Dual Motor Driver Carrier
- 1 - Sharp IR Distance Sensor
Wiring Guides
The devices were wired according to the tables below:
Adafruit Bluefruit LE UART Friend
mbed | Adafruit Bluefruit | External 5V DC Supplly >= 500 MA | |
Gnd | Gnd | Gnd | |
p14 | TXO | ||
p13 | RXI | ||
VIN | 5V DC | ||
nc | RTS | ||
Gnd | CTS |
MPR121 I2C Capacitive Touch Sensor
mbed | MPR121 | Pullup Resistors |
Gnd | Gnd | |
p28 | SDA | 4.7K |
p27 | SCL | 4.7K |
p26 | IRQ | |
Vout(3.3V) | VCC |
Huzzah ESP8266
mbed | Huzzah | External 5V DC Power Supply >= 500 MA |
Gnd | Gnd | Gnd |
Gnd | Gnd | Gnd |
V+ | 5V DC | |
p9 | RX | |
p10 | TX |
RC Servo
mbed | Servo | External 5V DC Power Supply >= 500 MA |
Gnd | Black | Gnd |
Red | 5V DC | |
p24 | Yellow |
Pololu TB6612FNG Dual Motor Driver Carrier
mbed | TB6612FNG | External 5V DC Power Supply >= 500 MA | DAGU Motor 1 | DAGU Motor 2 | |
p22 | PWMA | ||||
p6 | AIN2 | ||||
p5 | AIN1 | ||||
STBY | 5V DC | ||||
p12 | BIN2 | ||||
p11 | BIN1 | ||||
p21 | PWMB | ||||
GND | GND | GND | |||
VCC | 5V DC | ||||
AO1 | Red | ||||
A02 | Black | ||||
BO2 | Black | ||||
BO1 | Red | ||||
GND | GND | GND | |||
GND | GND | GND |
Sharp IR Distance Sensor
mbed | Sharp IR Distance Sensor |
Gnd | Black |
Vout | Red |
p16 | White |
Code Description
The code below begins by creating a webserver on the Huzzah ESP8266 that allows the mailbox to be monitored in a web browser. The code also sends text via Bluetooth to a UART device connected to the Adafruit Bluefruit that allows the lock to be monitored and unlocked via bluetooth. An IR sensor is mounted above the mail slot to determine when mail has ben placed in the box. Once mail is slid in, the IR sensor's value changes, to show that mail is presented. The webserver is then updated if this is true. After this is completed, The touchpad can be used to initiate interrupt routines that save four key presses. These key presses represent the code being entered. Once four keys are pressed. The code is checked against the saved code values. If the code matches, the servo is turned to unlock the mail door. Following this, the door is opened using a pulley connected to a stepper motor. Finally, the mail is fed out to the user using the mail feed stepper motor. To lock the mailbox, the user pulls the door closed, then enters an incorrect code. To enter a code via Bluetooth, the user must send the letter 'a'. Once this is sent they are prompted to enter their code. They can enter '1111' at once, or one value at a time.
Import programBluetooth
The purpose of this project was to create a system that would allow users to monitor a locked device using a Bluetooth device. This Bluetooth device will show the last user that unlocked the device, and also allows the user to unlock the device using the Bluetooth device. This device can be physically unlocked using a capacitive touch keypad sensor.
Video Demonstration
Please log in to post comments.