Building A Form Factor On/Off Body Prototype
While the Sensirion SHTW2 Xplained Pro Dual Humidity and Temperature board is a great starting point to develop on/off body detection applications, most projects will require a form factor prototype sooner rather than later. This tutorial describes how to build headphones using the on/off body detection feature, based on an ordinary set of headphones.
Bill of Material
|Replacement Earbods||The speakers have rubber ear-buds, which either come with the earphones recycled or can be ordered separately.||Earbuds|
|Sensirion SHTW2 Sensors on FPCB||You need one SHTW2 sensor on a Flex PCB from the EK-H5 1.8V evaluation kit for each ear-piece, to enable the detection of the on/off body state. If you need several SHTW2 sensors on Flex, please see attached specifications to manufacture your own SHTW2 on Flex PCB.|
|Cables with 5 leads|
The cables connecting the sensors and speakers to the electronics.
4 leads are used for the I2C communication (SDA, SCL, VDD, GND) and the 5th lead is used for the speaker. The GND can be shared for I2C and the speakers.
The length can be chosen freely. We suggest to have between 30 and 50 cm.
|Sensocord® 5 x 0.05 mm²|
You can recycle the speakers from any simple head phone set coming with most mobile audio devices, such as mobile phones, MP3 players or tablets.
You can additionally reuse the audio jack and ear-buds, if applicable.
Alternatively you can buy fitting speakers from many electronics stores.
Note: If you don't need any audio in your on/off body detection prototype, you can also leave the speakers out. They are not required for demonstrating the on/off body use case.
If you have problems sourcing any parts, please let us know and we'll do our best to help you! You can reach us via the contact form on this page.
3D Printing Data
The shells for the ear-pieces are designed to embed the SHTW2 sensor. It allows a good quality signal for the on/off body detection use case.
Here is a 3D pdf of the case for illustration. We recommend to use Adobe Acrobat Reader (tested with Reader XI).
Enable 3D content via Edit → Preferences → 3D & Multimedia → Tick the checkbox saying "Enable playing 3D content"
1. 3D Print the Ear-Piece Shell Parts
Use the files provided above to 3D print the ear-piece.
2. (Optional) If Audio Is Required and A Head Phone Is Recycled. Otherwise Go Forward To the Next Step
Remove the speaker from the head phones.
Take off the rubber earbuds and attach the pier. Gently press the pier together and rotate to loosen the glue connecting the two parts. Take out the speaker and save it for later.
Remove the silver net at the front end of the head phone (where the sound comes out).
You could use a pencil to push it out from the inside.
3. Cut the Wings of the Flex PCB
Cut off as much as possible on the outer edges of the PCB. Make sure not to cut any electric signal lines in the process.
Do this on the sensor end and on the connectors end, rendering both ends less wide.
4. Prepare the Cable
Cut cable into correct length and remove 3.5cm insulation on each side. On the sensor end of the cable, leave the blue cable as it is and cut the other four leads shorter with around 1cm remaining.
5. Put the Flex PCB Through the Ear-Piece Housing Slit
You must do this first, as you can not do this after you soldered the cables onto the flex PCB. Note that the Sensor must look down towards the whole in the front ear-piece shell.
6. Glue the Silver Net onto the Front of the Ear-Piece and Fasten the Flex PCB with the Sensor Embedded in the Designated Hole with the Ear-Bud
7. Put One End of the Cable through the Outer Ear-Piece Shell and Solder the Ends to the Flex PCB (and Speaker if Applicable)
Before soldering the cables it is best to test, if the sensor didn't get damaged during the integration phase (e.g. using a Sensirion Eval Kit).
In this example we have a cable with the following colors:
- black: Connect to ground (GND)
- brown: Connect to VDD
- blue: Connect to the serial clock line (SCL)
- white: Connect to the serial data line (SDL)
- grey: Connect to the speaker input pin (AUDIO)
The ground line is shared among I2C and the speaker in this example using a 5 lead cable. Hence, take one small inner cable to connect the FPCB's GND pin to the speakers ground pin.
Make sure to have the blue cable approximately 2-3 cm longer than the other cables before starting the soldering, to make it easier to glue the speaker to the front shell.
8. Glue the Speaker to the Front Ear-Piece Shell and Close the Ear-Piece
Make sure that you don't cover the membrane of the speaker with glue. Otherwise the speaker will not sound good anymore. Only glue the outer circle of the speaker. Note that this is not an audio project. Hence the design is not optimized for good audio quality.
Even if you don't use the speaker in your final application, you should still close the channel to have a smaller cavity where the sensor is embedded in.
Close the ear-piece and rotate the front ear-piece shell counter-clockwise until it's latched.
Make sure not to apply too much force, to prevent the ear-piece closing latches from breaking.
9. Test the Electric Connection and Develop Your Algorithms
E.g. using a Sensirion EvalKit, you can test if the sensor is still functional and responding or directly attach the setup to the Atmel Xplained Pro platform as described here: Building a level shifter board to use your form factor on/off body prototype with the Atmel Xplained Pro Platform
Copyright (c) 2016, Sensirion AG – www.sensirion.com
All rights reserved.
Definition: The design information in the documents and files made available to you is called "Documentation" and things created from it are called "Product(s)".
Acceptance: By (i) using, copying, modifying, or distributing the Documentation, or (ii) making or having Products made or distributing them, you accept this Agreement and agree to comply with its terms.
Terms and Conditions:
Redistribution, using and copying of the Documentation, in whole or in part, alone or in combination, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of the Documentation must retain the above copyright notice, the definition, the acceptance, this list of conditions and the DISCLAIMER.
* You may make, have made, and distribute Products based in whole or in part on the Documentation. You acknowledge that neither the design nor the Product is tested for your use. You are solely responsible for the application and any use of the Product. You must ascertain the Documentation’s and Product’s specific suitability for your intended purpose and that your use of the Products does not infringe third parties’ rights or other legal and regulatory requirements.
* Products based on the Documentation must reproduce the above copyright notice, the definition, the acceptance, this list of conditions and the DISCLAIMER in the documentation and/or other materials provided with the Products.
* Neither the name of Sensirion AG nor the names of its contributors may be used to endorse or promote products derived from the Documentation without specific prior written permission.
DOCUMENTATION IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE OF THE DOCUMENTATION AND THE PRODUCTS, ARE DISCLAIMED. EXCEPT FOR WILLFUL ACTS AND TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, CLAIMS OF INTELLECTUAL PROPERTY INFRINGEMENT, OR LOSS OF USE, DATA, OR PROFITS, OR BUSINESS INTERRUPTION, OR HARMFUL EFFECTS TO PEOPLE, OBJECTS, ANIMALS, OR PHYSICAL ENTITIES, HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE DOCUMENTATION AND/OR THE PRODUCTS, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. YOU AGREE TO DEFEND, INDEMNIFY, AND HOLD EACH COPYRIGHT HOLDER AND CONTRIBUTOR HARMLESS FROM ANY CLAIM BROUGHT BY A THIRD PARTY ALLEGING ANY DEFECT IN THE DESIGN, MANUFACTURE, OR OPERATION OF ANY PRODUCT WHICH YOU MAKE, HAVE MADE, OR DISTRIBUTE PURSUANT TO THIS AGREEMENT.