Sunday, April 22, 2012

The BTKeychain

The BTKeychain is just what its unimaginative name suggests: a keychain with a Bluetooth interface. It's a device I created to solve a problem my wife has: she never remembers where she put her keys. In addition to the Bluetooth interface, the keychain also has a buzzer and a small battery. The Bluetooth interface is always discoverable. This way, if I want to find the keys, I can search the Bluetooth name of the keychain, and then connect to it and make the buzzer beep. You can see the BTKeychain in action in the following video.



Any open device (i.e. anyone you can develop for) with a Bluetooth interface can be used to make the keychain beep. I have coded a script that can be used for this task with any GNU+Linux PC. I have also written a J2ME Java application that should be compatible with any Java enabled phone, and that will make the BTKeychain beep the same way. Of course similar scripts/applications can be developed for Windows, OS-X, Android and iOS devices.

Searching for the keys (sorry about the messages in spanish)

Keys found (sorry about the messages in spanish)
As designing a custom case is expensive, I have used one from one of those cheap photo frame keychains. I threw the original PCB away and took the case and the 180 mA/h LiPo battery. I had to make three holes to the back of the case: one for the status LED, one for the charge LED, and a bigger one for the buzzer output.




Here you can see the designed PCB. It's very small (3cm x 3,5cm) and has the same shape that the original PCB in the photo frame keychain had.




The board has a Bluetooth chip (U1) that includes an internal aerial, a MSP430 microcontroller (U2), a battery charger (U3) and a low drop-out 3.3V linear regulator (U4). The MSP430 microcontroller family was chosen, because this family has the lowest power consumption in the market. Also these microcontrollers are 16-bit, and more powerful than most similar microcontrollers. To make everything fit inside the PCB dimensions, SMD components were used. Passive elements use a 0603 footprint.



If you look closely the photographs, you'll be able to see there's a flaw in the design. The USB connector must be soldered in the opposite side the pads are. So to make it work, you must wire two connections to power the design. Other than this, the board works nice and no more problems have been detected.

In the software side, special care was taken to reach the lowest power consumption possible. The microcontroller is almost always in low power mode (LPM3), and is only awaken when a key is pressed or while the Bluetooth and buzzer are active. The Bluetooth chip requires an external 32 kHz crystal (X1) to be able to go to low power mode (PM0). While idle, the board drains only about 755 microamperes, but each several seconds the Bluetooth chip has fast burst that drain several milliamperes. The battery has a capacity of 180 mA/h, and lasts for two days and a half, so average power consumption must be about 3 mA.

If you want to have a look, you can download the schematics, gerber files and the source files for the BTKeyring firmware, the J2ME Java application and the GNU+Linux script here.

The BTKeychain works great, but... did it solve the problem it was created for? Unfortunately not, because my wife always forgets to charge the keychain O_o. How can I solve this new problem? Maybe using a Bluetooth 4.0 Low Energy device and some kind of energy harvesting? I think getting a new wife will be easier...

3 comments:

  1. Nice project man, sad that it did not solve the problem completely :(
    How about adding inductive charging ? I don't know much about it, but I've seen people making such chargers for their phone. You can include it in keychain & charger pad at actual place of keychain. This way, any time in 2 days if keychain is at its actual designated place, batt will be replenished.

    ReplyDelete
  2. I might try that if I decide to create a revision of the project. I was thinking about using a Low Energy Bluetooth 4.0 chip. If I use for example a CC2540 SoC (http://www.ti.com/product/cc2540), I can get rid of the MSP430 and also cut down a lot power consumption. Then I can maybe use induction charging, or a small solar panel, or some kind of kinetic energy harvesting. But right now there are very few phones supporting BT 4.0. The only one I know right now is the iPhone 4S, and neither me nor my wife like apples...

    ReplyDelete
  3. Hey,

    I came across your project via a co-worker, and thought it was great! I am a site manager at Instructables.com and wanted to give you a shout out. We'd love to see you share your project on Instructables. I think it would be a big hit with our audience.

    If you decide to post on Instructables please let me know so I can feature your project on our homepage and help get it noticed among our 13.8 million viewers.

    You should also consider submitting an entry to our Make It Real Challenge. We're giving away over $100k in 3D printers.

    link -> instructables.com/contest/makeitreal

    Let me know if you have any questions. I look forward to hearing back from you.

    Cheers!
    Audrey
    audrey@instructables.com

    ReplyDelete