Overview

  • A pair of Arduinos that communicate over Bluetooth to determine when one device attached to the key has been left behind
  • I did not have access to the DSLR camera, so I am unable to include high quality pictures and videos. I also unfortunately do not have video footage available.
  • The Arduino pro mini soldered onto a small board

    Both devices together to give a sense of scale.

    The device that is worn by the user that vibrates when the other Arduino is out of range

    Another image of both devices to give a sense of scale

    Process images and review

  • One major decision I made early on was to use an Arduino Pro Mini instead of the Arduino Uno we were given at the beginning of class. I made this choice since the Arduino Uno is too bulky to be used as a wearable. Using the Pro Mini came with several challenges though. I had many issues dealing with the soldering of the device. At one point I was debugging a switch for a sanity check, and I noticed that moving the wire connected to the board affected the output. This was a problem and forced me to redo all of my solder connections because they were bad.

    The Uno prototype compared to the Pro Mini in size

     

  • Another major decision I made early on was using Bluetooth to determine whether one device is out of range. I did not realize until later on that the range of Bluetooth is much larger than the classroom. I learned through lots of debugging that Bluetooth is not ideal for detecting whether something is out of range. It should be used to simply send and receive data between two paired devices. One idea I had was using the Arduino to vibrate when it is waived near the keys, but this is not possible with Bluetooth due to its large range. A proximity sensor may have been a better choice for my project. Bluetooth uses a lot of power, which prevented me from powering by wearable with two cell batteries. This forced me to use a 9V battery, which is too bulky for a wearable device.
  • My first attempt with the Arduino Pro Mini and the HC-06 Bluetooth adapter. I was unable to get Bluetooth working at the time of this picture because the solder connections were bad. I did not realize that until I wired a simple switch to the Pro Mini as a sanity check. Looking at the serial output of the switch made me realize that the connection was bad. After this, I attempted using the HC-06 with an Arduino Uno, but realized that the HC-06 only works as a slave. This means it could only connect to a computer/phone or an HC-05. Unfortunately, there were no HC-05s in stock, so I had to wait for an Amazon purchase to be delivered.
    • First prototype with the HC-06

      Discussion

    • Response
    • ‘It seems to be very useful and practical, but the design could use some work. If the bracelet looked a bit better it would be a great project.’ I believe the idea is useful since being locked out of your home is very annoying. I also agree that the design could be improved by improving the aesthetic and making the wearable even smaller. It would have been smaller with cell batteries, but the Bluetooth modules refused to pair when I tried that.
    • ‘It looks useful and the tech is working really well. However, I am wondering if you could potentially find a way to allow the device to work at different ranges.’  This could be possible by checking the Bluetooth signal strength and would be very useful since some rooms are bigger than others. My device right now only checks for a connection, but it is possible to check a connected device’s range by looking at the signal strength.
    • Self critique
    • If I ignore the issues with my initial idea, I am satisfied with how the project came out. I was able to implement the required functionality and successfully miniaturize it to fit on my wrist. The final physical look could be improved and made more pretty though. So, I could say that I satisfied my own goals, but I think my initial idea was flawed.  Using always on Bluetooth is not very viable because of the battery consumption, and I think there are better ways to solve my issue of leaving keys at home. My project also isn’t that ideal because the wearer has to always be wearing the device for it to be useful. If the wearable isn’t worn or the battery dies, I could still forget my keys at home. A better idea might be having a key holder that detects if the key is on it and communicates with my phone over Bluetooth.
    • What you learned
    • I spent a lot of time debugging poor solder connections. If the connection is bad, it can lead to quirks that can be hard to diagnose. At one point, I printed the value of the switch and noticed that the value would randomly change when the switch wasn’t changed. Another issue that plagued me early on was that I was printing with Serial while connected to the Bluetooth. This was causing interference and prevented me from sending commands to control the Bluetooth unit. Another important lesson I learned was to be more careful when powering the Arduino. I ended up killing the voltage regulator on my Arduino, so it would not power on even if power was supplied to Vraw. This forced me to solder another voltage regulator onto my board, so I could power the Arduino with a 9V battery. I could have avoided this by being more careful when powering the Arduino. I enjoyed using cardboard and Velcro as a quick mounting solution for the wearable device. Unfortunately, I planned to power my devices with 2 cell batteries, but I was not able to get Bluetooth to pair with 2 cell batteries. This forced me to use much larger 9V batteries to power both devices. In the future, I would try to figure out why pairing failed with 2 cell batteries since that should be enough power.
    • Next steps.
    • If I were to build another iteration of this project, I would completely rethink the usage of the product. I would build a device that uses a proximity sensor to vibrate when I wave my hand around a room. It would vibrate when my hand is closer to my keys. The vibration would last longer as I get closer to the keys. I think this would be a useful device to help me find me keys in a pile of clothes because the vibration would get stronger as I move my hand towards the keys. The wearable part would only be on when I need to find something, so the battery drain would not be a problem. A proximity sensor would need to be attached to my keys for this week.
    • Technical information

    • Schematic for the wearable Arduino device with the Bluetooth sensor, battery and vibration disc

      Schematic for the key Arduino device with the Bluetooth sensor, battery and voltage regulator.

       

 

Source code for the  Arduino devices

/*
 * Key Loss Prevention
 *
 * Collaboration: No collaboration.
 * 
 * Description: The code below reads the bluetooth connectivity state from a pin and will
 * vibrate every second if there is no connection detected. It expects to be connected with
 * another arduino device  over bluetooth and will not vibrate if a connection is detected.
 * 
 * Pin mapping:
 * 
 * pin   | mode   | description
 * ------|--------|------------ 
 * 5     output    vibration motor out
 * 9     input     bluetooth status from hc-05
 * 
 */
const int MOTOR_PIN = 5;
const int CONNECT_PIN = 9;

void setup(){
  pinMode(MOTOR_PIN, OUTPUT);
  pinMode(CONNECT_PIN, INPUT);
}

void loop(){
  int is_connected = digitalRead(CONNECT_PIN);
  if (is_connected == LOW) {
    digitalWrite(MOTOR_PIN, HIGH);
    delay(1000);
    digitalWrite(MOTOR_PIN, LOW);
    delay(1000);
  }
}