TL;DR

  • Joystick made from PCB and strain gauges
  • Files below

Project Overview

Introduction

There are many ways to build a two-dimensional control device. In the early days, digital joysticks were common. They provided only left/right/up/down inputs, with diagonal movement represented as a combination of two directions. Today, most devices are analog and based on potentiometers or Hall sensors. Touchpads are also widely used and typically operate capacitively.

In some notebooks, however, you will find another class of control device. These often look like small rubber caps, famously a red rubber dot. Such devices measure bending forces. Some implementations work capacitively, but resistive measurement is more common today.

Using a very similar technique, it is possible to build a comparable device from standard FR-4 PCB material. The Strainstick is one such device. The design was inspired by the haptic knob project from scottbez1. It is intended to be used as part of one of my other projects, but I thought it was interesting enough to publish a short post about it.

Hardware

The Strainstick uses a 2-layer PCB and is equipped with four very common BF350 strain gauges. To keep things simple, the design uses an ADC with an integrated reference and PGA, the HX717 from AVIA Semiconductors. This chip is very similar to the more famous HX711, but offers higher bandwidth and requires fewer external components while still providing an integrated reference voltage.

The HX717 is a two-channel device, but only one channel is used. Switching between the A and B channels takes approximately four cycles, which would significantly reduce the available bandwidth. Therefore, two chips are used.

Each axis uses one set of strain gauges. This allows a better signal to be obtained (the bending forces compress one gauge and stretch the other) and thermally couples the resulting half-bridge.

I am aware that, instead of strain gauges, it is possible to use SMD resistors. I like the idea, but I wanted a more well-defined device. I would expect differences between manufacturers and possibly reliability issues in the long run. This might be something to test in the future.

Attaching the strain gauges

The process of strain gauge attachment isn’t very complicated. You will need:

  • Isopropyl alcohol (for cleaning)
  • Adhesive tape
  • Tweezers
  • Scissors or an X-Acto knife
  • A cyanoacrylate-based glue (super glue)

First, clean the board with IPA. Apply adhesive tape to the areas close to the strain gauges where components need to be attached on the board.

Next, cover the gluing areas with tape in a cross-shaped pattern. Make sure the center of the first tape does not overlap the gluing areas on its sides.

Now, lift the tape from the edges of the board and slide one strain gauge underneath it using tweezers. Ensure it is correctly aligned and fits within the gluing area. Also, make sure the solder pads are on the correct side. Repeat this for the other gauges and perform a final check to ensure everything is positioned correctly.

It’s now time to glue the gauges in place. Lift the tape with the attached gauge one at a time and apply a thin layer of super glue to the gluing area. Lower the tape and press the gauge onto the PCB with your thumb. Hold it in place for about 30 seconds, then proceed to the next gauge.

Depending on the glue and the amount used, you can proceed directly to removing the tape, starting with the first gauge you glued down.

When removing the tape, pull it to the side rather than lifting it straight up.

You are now left with attached strain gauges. Use some wire to connect the gauges to the PCB. Be careful with heat on the gauges, as they can be somewhat sensitive.

Finally, clean the board with IPA. Even after cleaning, you may find some residue from the adhesive tape or super glue on the uncovered areas, but the rest of the board should be clean and ready for assembly.

Assembly

The assembly is a straightforward process. There are no particularly complicated components on the board, but I would recommend using some form of magnification. An interactive BOM is included in the released files. As always, I recommend using lead-free solder.

I may create a future version of the board that allows the strain gauges to be mounted on the back of the PCB. This would enable the use of a stencil. For now, however, the board must be soldered by hand.

Software

I created a demo for the device that allows it to act as a mouse. The demo is currently only available as a binary. I plan to publish the source code alongside the mentioned project in the future. If you really want to tinker with the code, feel free to send me an email.

There is an Arduino library for the HX711 which, I believe, should also work for the HX717. This might be a better option if you want to experiment with the device.

The demo runs on the CH32V203 demo board from WCH. You have to connect the Strainstick as follows:

  • Pin 1 –> 5V
  • Pin 2 –> PA2
  • Pin 3 –> PA3
  • Pin 4 –> PA8
  • Pin 5 –> GND

You can flash the software using the integrated Bootloader and WCHISP. Set BOOT0 to high and reboot the board.

Connected to CH32V203

Thanks

  • Thank scottbez1 for the general idea of strain gauges on PCBs

Project files