I'm trying to DIY a sort of a "smart rack" for a bike that can alarm me of problems like low tire pressure. Problem is that tire pressure is measured via the valve, which isn't a practical solution for this use case. Is there is a way to arrive at a similar pressure (doesn't have to be as accurate, but more accurate than the typical +/-20psi "squeeze test") via some device that works with the tire directly instead of the valve (something that squeezes the tire and or laser/ultrasound)? This is for personal use, so I don't mind if the solution relies on hard-coded tire/bike dimensions.
If you were prepared to use Schrader valves, you could install TPS valves used in car and truck tires. Size and possibly weight might make this idea impractical, and is most likely to work with MTB tires. I suspect that road tires would be too small. You can get external sensors that screw onto the valve, or you would need to go tubeless to use the (probably better) internal sensors (presuming you can get a sensor that would fit a bicycle rim).
With such a system, you would simply read the display and have a very accurate pressure reading.
I wonder if an atmospheric pressure sensor would work inside a tire, at least on principle.
At least for science fair projects, I've seen a sealed container with a partial vacuum and one flexible wall or lid. The difference in pressure deflects the lid which is attached to a pivoting needle or similar. The needle rests over a dial and thus allows for a reading.
A more modern application of the same principle maybe using an electronic pressure sensor and a battery operated sender unit that encodes the voltage reading and sends it via radio.
If the device needs a pressure differential, then expose one side to a sealed container and the other to the air inside the tire. (A vacuum inside the smaller container won't be necessary, as the tire pressure is higher than atmosphere's)
If the device is small enough, it can be placed inside a tire but indeed it would need to be a tubeless one.
For a regular tubed tire, here is a similar idea:
A force sensor placed between the rim and the rim tape should be able to detect how hard the tube is pressing against the rim. The signal can be picked, encoded and sent with a battery operated module that may be attached to the spokes. I'm assuming the cables can be run through very small perforations in the rim between the spoke holes. (small enough not to compromise the structural integrity of the rim).
An option could be to use small strain gauges epoxied to the inner or outer side of the rim, on the plane of rotation (basically, between the spoke nibs).
Since the rim "widens" as result of tire pressure, you can detect that stretch.
Of course, it will be affected also by normal rotation, so it makes sense only with the bike at rest. And you need electronics.
You can also, more easily, prepare some 3D printed "C" gauges: with increased tire pressure the tire widens measurably, so you can check the C gauges in series from the widest and see the first one which does not fit anymore to get an idea of the pressure. Since the sidewalls are not subject to wear, this will work for a long time.
Technically, the main reason we care about pressure is because it controls tyre deformation.
We don't want pressures so low that an inner tube is prone to pinch flats, or that the tyre squirms when cornering, and we don't want a pressure so high that the tyre transmits vibration too harshly, or fails to conform to the road surface (or that it blows off or breaks the rims).
So, if you figure out what load force & deflection correspond to your preferred pressure, you can simply apply that load force (radially instead of laterally so sidewall behaviour is included) and measure deflection. You might be able to do this with a linear transducer, a servo motor, or just an appropriately selected spring.