We needed a way to use a cheap 16mm potentiometer as an angle sensor in Actobotics channel. This design sandwiches around the potentiometer and holds it in place from one side of the channel, centered in one of the 1/2" holes.
We used a 5-pin female 2.54 mm pitch connector to connect to the potentiometers terminals, and the design has a cavity for this. You could also solder directly to the terminals.
Print both halves and sandwich them together with the potentiometer between them.
The SolidWorks (educational license) source file is included for your modifications.
2023.04.10 Update: Added versions suitable for use with goBilda channel. Also added alignment pins to the models so the two parts align and hold together better.
The author marked this model as their own original creation.