RehabTools
GUIDES · REHABTOOLS COLLECTION

Build a joint-angle sensor

Use a potentiometer and microcontroller to explore joint-angle measurement, with an interactive 3D model of the design.

Legacy referenceOriginally published: Not establishedEditorial review: 20 Sep 2026Maintainer: RehabTools · Ross Allan Clark & collaborators

Editorial review covers presentation and historical context, not full scientific validation or current hardware compatibility.

At a glance

  1. Choose a microcontroller that can read the potentiometer output.
  2. Inspect the joint-angle sensor model and assembly example.
  3. Calibrate the relationship between sensor readings and angle before use.
On this page

Original technical reference. Hardware, prices and software compatibility reflect the original guide; linked services may have changed.

Which Microcontroller?

The great thing about the potentiometer is that any microcontroller can read data from it. You can use the Teensy or Mega from other examples, or a simple Arduino Uno. An important point is that the analogue to digital (ADC) converter the microcontroller has in it will make a big difference. For this reason I recommend one with 12-bit ADC or higher, which will provide precision to <0.1 degrees. To make the system wireless I would recommend a small controller such as the Adafruit Trinket M0 series connected to a Bluetooth module.  

The Potentiometer and its Shell

The 3D printed arms used for the potentiometer are shown in the image below. You can download the STL file ready for 3D printing by clicking the following "Download File" link.
finger_goni.stl
File Size: 30 kb
File Type: stl
Download finger goni.stl

The rotary potentiometer itself was purchased from Sparkfun Electronics. Click this link to go to their website. Remove the nut from the threaded shaft, then slide the short 3D printed arm on to it. The small notch on the short arm goes onto the connector highlighted in the red circle in the image below. 
Build a joint-angle sensor — original illustration

Connecting the Potentiometer to the Microcontroller

This is as simple as it gets - just connect the 5V pin from the Arduino to one of the outside connectors on the potentiometer, and the Gnd pin to the other outer connector. The order doesn't matter. Then connect the middle connector on the potentiometer to an Analog input. The example picture below shows it connected to A2 (i.e. Analog pin 2). The picture below is from the official Arduino site
Build a joint-angle sensor — original illustration
Once the potentiometer is connected to the Arduino, you can connect the Arduino to your computer and upload the following code via the Arduino software. Make sure the COM port is correct. Once it is uploaded, you can open Serial Monitor in Arduino to read the Potentiometer value. This can be easily calibrated into degrees using the calibration techniques described on this page.  
analogpotvalue.ino
File Size: 0 kb
File Type: ino
Download analogpotvalue.ino

Keep exploring

Learning resources →Research figures →Publications & abstracts →