Project: Recreating ShArc

I first came across “ShArc” on a twitter post. ShArc is a novel bend/shape sensor by Fereshteh Shahmiri and Paul H. Dietz that they write about in their 2020 paper, “ShArc: A Geometric Technique for Multi-Bend/Shape Sensing“.

Figure 1 from the paper shows the bendable sensor made from a stack of flexible circuit boards and the reconstructed curve that is sensed.

The sensor is made of two flexible circuit boards (“flexes”) stacked either side of multiple layers of polyimide material, which is the same material used for the flex substrate. Both flexes are constrained together at one end, and when the flexes are bent, they slide relative to each other. The topmost flex (TX Flex) has a series of transmit electrodes along its length, while the bottom most flex (RX Flex) has a series of corresponding receive electrodes along its length. As the two flexes slide relative to each other, the capacitance between each TX and RX electrode pair changes. By measuring this capacitance the system can infer the relative slide between the two flexes and in turn infer the bend radius.

Figure showing how two points equidistant along each flex (A and B) begin close together when the flexes are straight and then separate as the flex is bent

The RX electrode is further split into a positive and a negative electrode that are each partially overlapping the drive electrode when straight. When the flex is unbent, the capacitance from TX to each of these electrodes is equal. When the flex is bent one way, the capacitance to positive electrode will increase due to greater overlap while the capacitance to the negative electrode will decrease. Bending the other way achieves an opposite effect. We can then use the difference between these two capacitances as the indicator of bending.

Simplified cartoon showing TX electrode and the two RX electrodes that make up the sensor and the capacitances between them.

The paper provides the exact electrode layout that the ShArc team used for their prototype, however for my design I deviated a little. I chose to make the RX electrodes wider in order to increase the capacitance between TX and RX and hence also increase the change in signal when the flex is bent. I also reduced the pitch of my electrodes from 20mm to 12.5mm, and only had four electrodes compared to their eight.

Layout pattern for the TX (sliding) and RX (reference) strip used by the ShArc team.

My measurement architecture was also a little different from the original work. While we both used an AD7745/AD7746 CDC chip from Analog Devices to perform the measurements, the original work used only a single capacitance channel to perform all eight measurements. This meant that they had to use Texas Instruments TMUX1511 multiplexing chips to individually drive each TX electrode, while all RX electrodes were connected together to a single input. I chose to use the AD7746 (rather than the AD7745) which has two TX channels and two RX channels. This meant that each of my four TX/RX pairs could be a unique combination of TX/RX pins on the device and no external multiplexers were needed. I would argue that this is a preferable design as it removes the relatively large parasitic capacitances that are introduced by the multiplexers which may be significantly different part-to-part or even over lifetime, although it would not have supported more than four sensors without adding a second AD7746 device.

My design with four sets of electrodes.

I also designed a main PCB to connect to the two flexes, perform the measurement and send the result over USB. The device is powered over USB and has an STM32F042F4 as a brain, which configures and controls the AD7746. Two voltage regulators are used to generate separate 3.3V rails for the STM32 and the AD7746 to minimise noise in the measurement, although I have not verified that this is necessary.

PCB to take capacitance measurements.
The PCB was manufactured using OSHPark’s “After Dark” finish which looks really cool.

The AD7746 takes a 24-bit measurement with a full-scale range of +/-4.096pF. After converting the ADC reading into capacitance, it is then necessary to convert the capacitance into the relative shift between the TX and RX electrodes.

By design the TX and RX flexes are separated by about 508μm of polyimide (three layers of 101.6μm polyimide plus the thickness of the TX and RX flexes which are also 101.6μm). We know that the dielectric constant of polyimide is approximately 3.2, as provided on OSHPark’s website (flex manufacturer). By knowing these two physical quantities and then approximating the electrodes as parallel plate capacitors we can then convert the measured capacitance to relative motion.

Equation to convert change in capacitance, ΔC, to relative motion, Δd, where t is the thickness of the stack, ε0εr represents the permittivity of polyimide, and w represents the overlapping width of the electrodes.

With knowledge of the relative position of each of the sensors along the flex, we can then use the equations as provided in the paper to calculate the radius of curvature of each of the sections of the flex. As a rough approximation we can say that a 40mm radius of curvature would correspond to a change in capacitance of only 124fF.

My device sitting on a 3D printed base.

Putting this all together, we can track the position of the flex live.

Overall, I’m pretty happy with the result so far which is a clear demonstration that the principles of ShArc work. Since filming the above video I found a slight error in my maths (I forgot to divide the capacitance by two as it is a differential capacitance), which means that the flex on the screen bends by about twice as much as reality.

Touching the flexes with your hand does create some error in the result as you disturb the electric field and influence the capacitance between the TX and RX electrodes. This could be improved with shielding, although the effect is relatively small.

Due to variation and unknowns in manufacturing (for example, flex thickness and polyimide dielectric constant) as well as the parallel plate approximation, it may be necessary to calibrate the device. My next step, then, is to evaluate the accuracy of the measurement and, if necessary, design a calibration procedure.

5 thoughts on “Project: Recreating ShArc

  1. Hey Matt,
    that’s a very cool project. I just saw the original ShArc paper and was surprised to see that your implementation works that good. I wanted to recreate it aswell, and maybe integrate it into some piece of clothing to get a motion capture of the body. But then I saw the price of getting flex pcb’s made… so I can’t prototype a lot until I run out of money. Considering I’m still a university student and broke to the bone, I wanted to ask you if it would be possible for you to share the gerber files for the flex pcbs, and maybe even the schematics of the electronics, so I have a reference to work with ?

    I would much appreciate it 🙂


    1. I got it working somewhat. The only problem now is, that I can’t figure out how to get the differential readings. I set every register according to the datasheet, but the 3 data registers combine to 0. Single capacitance readings seem to go fine though.

      Any tips on which registers I have to set would be really helpful.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s