Making a Wearable Motion Sensor Repeatable: Mounting, Sewn Connections and Gesture Trials
A motion sensor that behaves well on a desk can become unpredictable when sewn onto clothing. Fabric stretches, the board rotates, conductive stitches move and ordinary walking resembles an intentional gesture. These are design inputs, not merely software noise.
The PMD Way LilyPad-compatible ADXL335 accelerometer board provides three analogue axes on a sewable format. Explore the wearable sensors collection for other textile-friendly sensing options. This guide focuses on building a repeatable wearable input, such as changing a costume lighting mode with a deliberate arm movement.
Define one gesture and one expected response
Choose a movement a wearer can perform comfortably and distinguish from normal activity. Write a short description: starting pose, movement direction, pause and return. Avoid beginning with a vague instruction such as “detect a wave”.
Specify the response too. One recognised gesture should create one event, not a continuous stream of mode changes while the arm remains raised. Decide how the system indicates that it is ready for another gesture.
This is an interactive control experiment. It is not a medical movement assessment, fall detector or accurate joint-angle instrument. Those applications require different evidence and validation.
Understand the sensor's electrical interface
The ADXL335 outputs analogue voltages for X, Y and Z; it is not an I2C device. The Analog Devices datasheet specifies a 1.8–3.6 V operating supply for the bare sensor and a minimum full-scale range of ±3 g. Output offset and sensitivity depend on supply voltage.
Verify the particular board's power path before connecting it. Do not assume that large sew pads or LilyPad-style construction add a regulator or make a raw lithium cell or 5 V supply acceptable. A board advertised as compatible still needs its own wiring and supply checks.
Connect the three outputs to suitable analogue inputs with a common reference ground. Confirm the controller's permitted input range, ADC reference and resolution. Do not treat the catalogue's simple “0 to 3 V” description as a guaranteed calibrated range for every supply and acceleration condition.
Prove the circuit before sewing it
Use temporary secure connections on the bench first. Display or log the three raw channels while the board is held still, turned slowly and returned to its original orientation. Check that changes are plausible and that no channel remains unexpectedly at an ADC limit.
Record a recognisable reference orientation using the board's axis markings. A photograph with an arrow showing the intended direction along the sleeve is more useful than relying on memory when the board is later covered.
Keep the initial test separate from a lighting load or motor if those outputs make the supply difficult to diagnose. Add the intended outputs after the sensor baseline is understood, then check whether their activity changes the readings.
Mount the sensor to the movement you want
A loose sleeve can move independently of the arm. If that movement is not part of the intended input, place the sensor on a stable fabric panel, removable cuff or other appropriate support. Avoid mounting where it will be repeatedly folded or crushed.
Use mechanical attachment that keeps orientation consistent without placing uncomfortable pressure on the wearer. Mark alignment points so a removable assembly returns to the same position. Check fit during the actual movement, not only while the wearer stands still.
Provide strain relief at transitions between rigid boards and flexible textile connections. Repeated bending should be taken by a suitable flexible section rather than concentrated at a pad, knot or solder joint.
Keep conductive paths separated during motion
Conductive thread behaves like uninsulated wiring. SparkFun's e-sewing guidance explains how loose strands and crossing paths create shorts. Plan each electrical path separately and inspect both sides of the fabric while sewing.
After testing, protect the traces with an appropriate insulating layer. SparkFun's e-textile insulation techniques discuss protection against contact during folding and movement. Verify that the selected covering works with the garment and does not interfere with access to removable electronics.
With power disconnected, inspect for unintended continuity while gently flexing the textile. Keep battery connections covered and supported. Do not assume the completed garment is washable because one component description mentions washing; the controller, battery, connectors, adhesives and assembled construction all matter.
Record ordinary movement before setting a threshold
Log a short session of standing, walking, sitting and adjusting the garment without performing the intentional gesture. Then collect several deliberate gestures. Repeat with the wearer removing and refitting the cuff or garment.
Compare the patterns before choosing a threshold. If normal sleeve adjustment and the gesture produce similar signals, change the gesture or mounting rather than expecting a single magic number to separate them.
Analog Devices' inclination-sensing application note explains why motion-related acceleration complicates a gravity-based tilt estimate. Filtering can smooth data but also delays the response; it does not automatically turn a moving limb into a static-angle measurement.
Use an explicit event sequence
| State | Behaviour |
|---|---|
| Ready | Wait for the defined movement pattern |
| Candidate | Require the expected continuation or brief stable pose |
| Triggered | Generate one output event |
| Waiting for return | Re-arm only after the starting condition returns |
Choose timing and thresholds from the observed data, then test slower and faster versions of the gesture. Include interrupted movements and a wearer holding the final pose. These cases reveal repeated triggers and missed resets that a single successful demonstration can hide.
Validate the assembled wearable
Repeat the trials with the final battery location, protective layers and output devices installed. Record false triggers as well as successful ones, and check for changed behaviour after ordinary bending or refitting.
Keep the mounting photograph, connection map and test notes with the project. A dependable wearable input emerges from the complete assembly: a defined action, stable sensor placement, sound textile connections and software that turns movement into a deliberate event.