First test of a strain gauge trackpoint. I snapped one strain gauge while figuring out how to mount one well!
It sort of works! There's a lot of noise even though I stuck a 1uf cap on the analog pin. It's also not super sensitive - without the capacitor the signal is only barely visible through the noise.
There are proper load cell amplifiers for this - I think they'd be worth a try.
Here's a closer view of the setup. It's a 3D printed cross suspended above the table, with a strain gauge on one of the arms. The gauge is wired to a PCB with a Wheatstone bridge and an LM358 amplifier. The output from that is smoothed with a capacitor and then goes into an analog pin on the arduino.
I'm wondering how much of the noise is due to the wire length and lack of shielding, and how much is unavoidable.
Once my strain gauges arrived I built a version 2 of the strain gauge trackpoint, with both axes hooked up.
I've attached all 4 strain gauges to allow for temperature compensation later, but for now this seems to be ok. It's a lot more sensitive with the gauges superglued to the thing! Before they were secured with double sided tape, which must have absorbed some of the strain.
The prototype #trackpoint actually works surprisingly well! It has no acceleration or anything and it's a bit slow, but once I added a dead zone it's already fairly usable.
Not sure if you can see it in the video once it's compressed, but it's moving the pointer.
I *think* I've successfully reverse engineered the strain gauge amplifier circuit.
It would be great if someone familiar with opamp circuits could take a look at the opamp bit at the bottom and tell me if it looks about right. I've got no idea.
Here are some links to buy the module:
I simulated the amplification portion of the BF350-3AA strain gauge amplifier. For the range of resistances I've seen across the strain gauge (348.8-351.2 ohms), a V_TUNE of 0.5V gets me a 0-5V output.
I think once I have some components decided (e.g. I can get a hold of 348R resistors instead of 360R) then I can re-simulate to tune the resistor values and thus the gain.
I made some slight modifications to the strain gauge amplifier circuit, to use through-hole components for prototyping and add some gain adjustment.
There'll be something wrong with it but that's why it's designed for perfboard rather than a proper PCB.
The capacitor values are complete guesses though.
The parts for the strain gauge amplifier have all arrived now so I tried assembling one on perfboard. As far as I can tell I've done it ok (after forgetting to connect V_excite to half the bridge circuit) but I can't manage to strip the enamelled wire.
Apparently the best way is to heat it with a 400°C soldering iron and plenty of flux, but that didn't seem to be working.
Once I get that connected I can actually start tweaking the resistances.
Once I got the perfboard strain gauge amplifier prototype properly connected to the gauges, it still didn't work.
The method of stripping the enamel off the wires that worked for me was sanding. Some ~600 grit sandpaper worked well.
I probed a few voltages and checked the connections but couldn't see what was wrong.
So the next step was to do what I should have done in the first place - build it on breadboard!
I assumed that there'd be some dodgy connections so I had skipped it. There are, but it still mostly works!
I've found some settings for feedback resistors and V_TUNE that seem to work well - time to figure out what gain it actually gives me!
It looks like the gain values I settled on were -41.3 for stage 1 and 9.125 for stage 2. The second stage could probably be turned down a bit to allow for the signal to be offset a bit.
I'm kind of wondering why I couldn't just do that amplification in one stage - amplify by ~400x instead. I guess that makes it harder to adjust the offset.
The V_TUNE I ended up with was 1.040V, which I think means the bridge circuit is a few tens of millivolts offset when the trackpoint is centred. Not bad.
Tried out using a single inverting amplifier with a gain of 100x on the strain gauge bridge circuit. It seemed workable, with a range of ~0.75V when wiggling the stick.
I might increase that by changing resistors later, but I think that this could work to keep it simple. It means that I can use a single LM358 to amplify both axes of the pointing stick. Exact resistor values can be decided later - I think it would be good to actually get PCBs made!
I killed the strain gauges of one axis of the pointing stick prototype, so I put together a neater one. This one has the magnet wire connect straight to a rigidly mounted thicker wire, which will hopefully make it a lot less fragile!
I think if I do a proper version of this, it'll need to use something surface mount, because this took hours.
Is this a thing you can do with a digital potentiometer? It would be a way to get high resolution in a small range without needing a really high res DAC.
Otherwise, are there (cheapish) DACs where you can set two voltages for the output to be between?
I'm considering replacing the reference arm of the strain gauge bridge circuit with something like this. That way the microcontroller can set the reference point to zero it easily.
The MCP4251 seems like a solid choice for a digital potentiometer. It's a dual pot one so I can do both X and Y channels.
The plan is to have the output from that be the reference for the strain gauge amplifier. The microcontroller can increase and decrease it to find/set a centre voltage when you're not touching the trackpoint. Should provide a good way to automatically correct any minor drift.
Schematics for the pointing stick are coming along! It still needs some tidying up but I think this is enough to get it working.
With this I can make a ~40x40mm board that can be used over USB as a trackpoint, or over i2c with a keyboard, or just output raw analog voltages.
If this works, the version after this could use the PCB itself as the beam the strain gauges are mounted to!
The pointing stick PCB is now acting as a mouse over USB. Probably should have added some pins to add buttons. Ah well, future stuff.
The plan is for this to act as an i2c peripheral. I have no idea what a normal way to do that would be. Maybe have some registers that can be written for settings, and read for position/acceleration? I also have an "interrupt out" pin that could be used when the position changes by a certain threshold?
The code for this is up at https://gitlab.com/gbrnt/pc-pointing-stick/-/tree/main/firmware/pointing-stick but be warned it's not very good
Linking to the new pointing stick thread from the old one: https://mastodon.technology/@gbrnt/105967058227229635
This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either!