Conductive Rubber Cord Stretch Sensor: How to Use & Read
In this article
A conductive rubber cord stretch sensor changes resistance as it is stretched: the cord gets longer and thinner, so its resistance rises. To use one, fix both ends to the surfaces that move apart, wire it as one leg of a voltage divider, feed the divider output into an analog input, and convert the raw reading into a stretch value using a calibration you take yourself. Because the relationship is not perfectly linear and drifts with temperature and time, treat the sensor as a repeatable relative measurement rather than a precise ruler.
What You'll Need
- A conductive rubber cord stretch sensor (often sold as a length of cord with two crimped ends)
- A microcontroller with an analog-to-digital converter (ADC), such as an Arduino or similar board
- A fixed resistor for the voltage divider, roughly matching the cord's resting resistance (10 kΩ is a common starting point)
- A breadboard and jumper wires
- A multimeter for checking resistance and continuity
- Two clamps, clips, or mounting points to hold the cord ends without crushing the conductive material
- A ruler or caliper for measuring stretch during calibration
- A stable power supply (USB or a regulated 3.3 V or 5 V rail)
Step-by-Step
- Inspect and measure the cord at rest. Lay the cord flat, unstretched, and measure its resistance with a multimeter across the two ends. Write this value down. It is your baseline and will vary from cord to cord, so never assume a datasheet number applies to your piece.
- Plan your mounting. Decide which two points will move apart. The cord must be able to stretch along its length without bending sharply or rubbing on an edge. Leave a little slack at rest so the cord is not under tension before movement begins, and make sure the maximum stretch stays within the cord's rated range (commonly around 50–100% of its original length; check the specific product).
- Attach the ends securely. Clamp or tie the crimped ends, not the conductive rubber body. Squeezing the rubber itself with a screw terminal or alligator clip creates a pressure point that changes resistance and can tear the cord. If you must grip the rubber, use a smooth clamp with a wide contact area.
- Build the voltage divider. Connect one end of the cord to the supply voltage (3.3 V or 5 V). Connect the other end to both the fixed resistor and the ADC input pin. Connect the free end of the fixed resistor to ground. The ADC now reads a voltage that depends on the ratio of the cord resistance to the fixed resistor.
- Choose the fixed resistor value. Pick a resistor close to the cord's mid-range resistance. If the resistor is far too large or too small, the output voltage barely changes over the useful stretch range and your resolution collapses. If you are unsure, test two or three values and keep the one that gives the widest voltage swing.
- Take a raw reading at rest. Power the circuit and read the ADC value with the cord unstretched. Record it. Also measure the actual voltage at the ADC pin with a multimeter and compare it with the voltage the code calculates; a mismatch usually means a wiring or reference-voltage problem.
- Calibrate with known stretches. Stretch the cord by measured amounts (for example 0 mm, 10 mm, 20 mm, 30 mm, and so on, up to your maximum) and record the ADC value at each point. Take three readings at each position and average them. This table is your calibration curve.
- Fit a simple conversion. Plot or tabulate stretch against ADC value. For small ranges a straight-line fit is often good enough: stretch = (raw − raw_at_rest) × scale_factor. For wider ranges, use a lookup table or a two-point interpolation between calibration points. Keep the formula in your code with a comment showing where the numbers came from.
- Add smoothing in software. Conductive rubber readings are noisy. Average several samples, or apply a simple moving average or median filter. Avoid over-smoothing if you need fast response, because heavy filtering adds lag.
- Test the full motion range. Move the mechanism through its complete travel, slowly and quickly, and confirm the output stays within the ADC range and never saturates at 0 or the maximum count. Check that the cord returns to roughly its resting reading when released.
- Document and re-check. Record the resting resistance, resistor value, calibration points, and supply voltage. Re-check the resting reading periodically, because conductive rubber can drift with age, temperature, and repeated stretching.
Common Mistakes
- Gripping the conductive rubber instead of the crimped ends. This adds contact resistance that changes with pressure and ruins repeatability.
- Assuming the response is linear. Resistance rises faster at larger stretches, so a single scale factor taken from a small stretch will over- or under-read at the extremes.
- Using a fixed resistor that is wildly mismatched. The divider output then moves very little, and noise dominates.
- Over-stretching. Pulling past the rated range permanently changes the resistance or breaks the cord.
- Ignoring the ADC reference. If the supply sags or the reference is not stable, the same stretch gives different raw values.
- Reading once and trusting it. A single sample is noisy; always average a few.
Tips
- Mount the cord so it stretches along its axis, not across a sharp corner.
- Keep the cord away from heat sources and direct sunlight if possible; temperature affects resistance.
- Use a shielded or short cable run if the signal is noisy, and keep the divider close to the ADC.
- Store calibration values in code as named constants so you can update them easily.
- If you need absolute position, add a second reference sensor or a limit switch to re-zero at a known position.
- Label each cord with its resting resistance; swapping cords without recalibrating is a common source of confusion.
Troubleshooting
- Reading never changes. Check continuity across the cord with a multimeter. If it reads open, the cord or a crimp is broken. If it reads fixed, the cord may be shorted or the ADC pin may not be connected.
- Reading is stuck at 0 or maximum. The divider is likely wired wrong, or the fixed resistor value is far from the cord resistance. Verify the resistor is between the ADC node and ground, not between supply and the node.
- Values jump around wildly. Add averaging, shorten wires, and check for a loose breadboard connection. Also confirm the supply is stable.
- Resting value drifts over time. This is normal for conductive rubber. Re-zero at rest, or recalibrate if drift is large. Mechanical creep from constant tension makes it worse, so mount with slight slack.
- Response is compressed at one end. Change the fixed resistor value or recalibrate over the range you actually use.
- Cord fails at the clamp. The grip is too tight or too narrow. Use a wider, smoother clamp and avoid sharp edges.
Frequently Asked Questions
Can I connect a conductive rubber cord directly to an ADC pin?
No. The ADC measures voltage, not resistance, so you need a voltage divider (or another resistance-to-voltage circuit) to turn the cord's resistance change into a voltage change.
Is the resistance change linear with stretch?
Not exactly. It is roughly proportional over small stretches but curves at larger ones, so calibrate over the range you will actually use and use a table or piecewise fit if accuracy matters.
How much can I stretch the cord?
That depends on the specific product; many cords are rated to roughly double their length, but check the manufacturer's figure. Staying well below the maximum extends life and keeps readings repeatable.
Why does my reading change when I touch the cord?
Your body adds a parallel path and changes contact pressure. Insulate the cord and grip only the mounting ends.
Can I use it as a precise position sensor?
It is better suited to relative stretch, gesture, and presence detection. For precise absolute position, re-zero with a limit switch or use a different sensor type.
Do I need to recalibrate after replacing the cord?
Yes. Each cord has its own resting resistance, so replacing it without recalibrating will shift all your readings.