This 3D-Printed Desk Toy Serves as a Tutorial in Servos and Flex Sensors

A servo-powered flag mimics the motion of the flex sensor.

Gareth Halfacree
11 days ago β€’ 3D Printing / Robotics / HW101 / Sensors

Pseudonymous maker "gokux" has built a desk toy to demonstrate how flex sensors and servos work β€” by mimicking the movement of the sensor using a 3D-printed flag.

"Flex sensors, also known as bend sensors, measure the degree of bending or deflection in an object," gokux explains. "They operate by altering the sensor element's resistance when the surface is bent, with the resistance being directly proportional to the amount of bend. [This is] a simple project that imitates the movement of a flexible sensor with a servo."

The flex sensor in question is a Spectra Symbol FS-series linear sensor, which features a flexible membrane with a resistance that changes as the sensor deforms from being perfectly straight to bent β€” something that only takes a tap from the tip of a finger to achieve. This is connected to a Seeed Studio XIAO SAMD21 microcontroller board, along with an SG90 hobby servo and a pull-up resistor.

The hardware is installed in a 3D-printed case, with the flex sensor sticking up vertically at one end and a plastic flag attached to the hobby servo at the case's longer edge. When fed with power through its USB Type-C connector, the toy monitors the flex sensor's movement β€” and when it's no longer unbent, moves the flag to follow the sensor's flexion.

The project is documented in full on gokux's Hackaday.io page, including source code.

Gareth Halfacree
Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles