Introduction: WSU Hardware Hackathon - Encrypted Key Unlocking Drawer

Picture of WSU Hardware Hackathon - Encrypted Key Unlocking Drawer

USB containing encrypted binary file (key) gets inserted into microcontroller. Microcontroller sends file via Bluetooth to parent App on PC. Parent app decrypts file and verifies whether or not it is valid. If it is valid, parent app sends a signal to microcontroller to trigger unlocking mechanism. If file is not valid, parent app sends microcontroller a failure message and sends a text message to administrator's phone.

Step 1: Plan

Picture of Plan

Make a plan for the design of the system.

Step 2: Hardware (Part 1)

Picture of Hardware (Part 1)

Connect microcontroller to PC via PmodBT2 to enable Bluetooth connection. USB is inserted in microcontroller, microcontroller reads binary file from USB and transmits byte by byte to Brain App. Receives response over same stream after Brain is done processing.

If received string == "Success"

assert drawer mechanism

else

flash red LED

Step 3: Hardware (Part 2)

Picture of Hardware (Part 2)

Design and laser cut drawer components. Design lock mechanism. Build drawer. Connect drawer to microconroller assert pin, determined by breadboard connection. Sends voltage to pin and asserts servo motor.

Step 4: Software (Part 1)

Picture of Software (Part 1)

Code parent app. Key encryptor creates a binary file and writes to mounted USB. Brain app is paired with microcontroller already. Waiting for data transfer in an infinite loop. Once byte stream is detected, read in ALL bytes and compare to accepted byte array. If it is a COMPLETE match, send success string to microcontroller. If not, send failure string and text message to group members.

Step 5: Brain App Sim

u + Enter simulates a positive match. It is actually reading from G drive on a PC so make sure a USB with the valid key is plugged in. It will send a "Success" text message to Cammi and Greg.

i + Enter simulates a failure. It will send a "Failure" text message to Cammi and Greg.

Executable is attached but will likely fail every time with no USB connected to G drive.

Step 6: Text Message Alerts

Picture of Text Message Alerts

We used the Twilio API to programmatically send text messages to our group members. We had to buy "messages" and a phone number and the feature works flawlessly.

Step 7: Demo

Picture of Demo

Attached is a video of our Brain app demo. The iPhone screen shot contains the resulting alerts that were programmatically sent.

Step 8: Closing Remarks

Picture of Closing Remarks

What we got done:

Comments

DIY Hacks and How Tos (author)2015-11-15

Very cool project. If you want to make the video easier for people to view, you can upload it to YouTube and embed it in the instructable using the Embed Video tool in the step editor.

About This Instructable

199views

4favorites

License:

More by csmith68:WSU Hardware Hackathon - Encrypted Key unlocking Drawer
Add instructable to: