infineon4engi@twitter infineon@linkedin infineon4engineers infineon@youtube
twitter Facebook Linkedin Youtube

+ Reply to Thread
Results 1 to 1 of 1

Thread: XMC2Go Design Challenge: WhistleKey – the smart key ring

  1. #1

    WhistleKey – the smart key ring with XMC2GO

    XMC2GO Design Challenge 2014 Italy – Results Report

    The aim of the project is to develop a control system with very compact size, able to be inserted in a conventional keychain. If you whistle, or if the key ring stays away from the owner for more than 10 minutes (approximately), the keychain will start flashing (thanks to the two LEDs integrated on the XCM2GO board) and will play a sound in order to facilitate its localization.

    Whistle detection

    The are two main suitable solutions for the whistle detection are two: autocorrelation and spectrogram analysis. Both methods can be implemented on the XMC2GO. Spectrogram analysis is the most reliable method for the detection of a well-defined whistle, but is also the most hexose in terms of computing power. XMC2GO allows to perform the sampling of the analog signal up to 40 kHz without any problems, and the processor has enough RAM to run the algorithm with a resolution of 40~70 Hz. The most common algorithms for obtaining a signal Fourier transform, a mandatory task in order to analyze the frequency of the whistle to be detected, are the Cooley-Tukey algorithm and the Hartley algorithm; for our purposes, they are equivalent.
    Once the frequencies spectrum has been achieved, a pitch detection algorithm shall be run (this algorithm identifies the fundamental frequency of a given sound). The most suitable is the maximum likelihood algorithm, which makes a simple comparison between the spectrum of a sample stored in memory (the original whistle must be stored during programming into the XMC2GO) and the sound picked up by the microphone. This method offers a good compromise between power consumption (in terms of energy and thus battery life), responsiveness (the time the keychain needs to "identify" the master's whistle and play the sound) and reliability (not to play when the microphone picks up sounds different from the original whistle and react when it picks up the right whistle).

    In order to capture the audio signal is requested a suitably amplified microphone. MAX4466 is an electrolytic microphone featuring small size and offering an excellent amplification (at least for our purposes).

    “Removal” detection

    The Bluetooth module programming is quite simple since many Open Source libraries suitable for this purpose are already available on the web. Several apps suitable for interfacing with the chosen Bluetooth module are also available (we will later explain in detail what they serve for). Our board will look for nearby Bluetooth devices every 5 minutes (the frequency was chosen to optimize the battery life) and, in case it did not find our phone, it will start a 5 minutes timer after which it will activate both audible and visual alerts. If the need is to develop a minimal WhistleKey, there is no need to install an app on the smartphone: it is enough to program the XCM2GO so that it saves the names of the first N Bluetooth devices discovered during its first power on. Obviously, only our smartphone with the Bluetooth turned on must be in the keychain area. In case it is not possible to be sure of that, we could control the power level of the received signals, in this way, just the device with the strongest signal can be considered (therefore you will need to keep the key ring close to the phone during the initialization phase).
    For instance, by using he Nordic Android nRF UART application it will also be possible to remotely control the keychain making it playing a sound on command, checking the residual battery power, or checking other functionalities (the XCM2GO has 5 free pins that can be used to add functionalities to our keychain).

    In order to detect the if the owner is far from it, we have chosen the BLE nRF8001 Bluetooth module, which is compact, low power consumption, wide range (in the order of meters) and compatible with iPhone and Android smartphones.

    Playing acoustic and visual warning

    Depending on the chosen buzzer it is advisable to select the tone that features the highest power and set up the playback to be intermittent. LEDs will also be lit intermittently, choosing an interval between 500 and 200 ms (so as to achieve maximum visibility).
    Note: it is important that the microphone is muted during playback of the sound wave.

    For playing the sound wave a speaker or a simple buzzer directly attached to a pin could be used. The latter solution provides a very powerful sound signal and a minimal power absorption. As regards the visual signal, the LEDs integrated on the XMC2GO are more than enough to generate a good brightness.
    Click image for larger version

Name:	hardware.jpg
Views:	1
Size:	34.3 KB
ID:	1312

    Power supply

    The best solution to achieve a WhistleKey very small in size is to use four 1.2V button cells (Varta MBU20 NiMH) to reach a voltage of 4.8V, able both to power without problems the system and to ensure a very compact design. However, this solution is also the one with less autonomy; you can choose various types of batteries with different size and amperage, voltage reference are 1.2, 2.4 and 4.8 V. By using the most compact solution, the achieved autonomy is approximately 20 hours, but it is easily rechargeable via the built-in XMC2GO microUSB. It would also be possible to use a small lithium cell, but it will need a step-up circuit and a dedicated circuit for battery recharging, thus affecting the overall compactness (but it would ensure a high level of autonomy).
    Last edited by mui; Feb 15th, 2015 at 08:05 PM.

+ Reply to Thread

Tags for this Thread


All content and materials on this site are provided “as is“. Infineon makes no warranties or representations with regard to this content and these materials of any kind, whether express or implied, including without limitation, warranties or representations of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, whether express or implied, is granted by Infineon. Use of the information on this site may require a license from a third party, or a license from Infineon.

Infineon accepts no liability for the content and materials on this site being accurate, complete or up- to-date or for the contents of external links. Infineon distances itself expressly from the contents of the linked pages, over the structure of which Infineon has no control.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Usage Terms of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Usage Terms of this site. Infineon reserves the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.