Reins Pressure Sensing Progress

While my goal is to build a complete open-source horse riding simulator, this doesn't mean that I have to wait until I have everything working before I have anything.  

Based on conversations with my friendly equestrian experts, I believe that there is potential value in a simple reins pressure trainer, that helps new riders learn to provide smooth and appropriate pressure to the horse's mouth through the reins, as well as be able to practice various activities and techniques with the reins. This is an attractive mile-stone, because it doesn't require any movement of the machine, and I already have the mouth sensors more or less working.

A few other pieces fell into place for this today, while I was talking with some colleagues:

First, for making a horse head, it's quite likely I can just use those latex costume horse head masks that can be bought quite cheaply as the basis for the exterior, and build a simple structure to hold it.  They already have a hollow mouth, so it should be possible to fit the sensors fairly easily.  While not perfect, this will likely do until I can design something nicer looking.

Second, there are cheap LED display driver boards that folks have reverse engineered, and found that they contain an FPGA and a very large number of buffered IO lines, that would be pretty perfect for implementing the sensor reading at higher speed than with the Arduino, and still have enough spare IOs to drive a bunch of individual LEDs as a simple display of left/right bias of the reins, total rein pressure, and "jerkiness" of reins handling, i.e., showing the derivative of the force on the reins, sufficient to be useful in teaching horse riding.

To this end, I have ordered samples of all of these things, which will take a few weeks to get here, during which time I will keep thinking about how to actually build it etc, and doing some improvements on the mouth pressure sensors.

When I tested the first version of the mouth pressure sensors, I noticed a problem that one of the reins would cause both of the sensors to trigger. One night it dawned on me that the problem was the hinge in the middle of the mouthpiece part of the bit.  You can see here where I have it sitting on the sensor pads, that the hinge is not centred, and even if it was, it would be prone to cause some degree of activation of both sensors:

I also noticed that the main pressure of the bit on the sides of the mouth was not directly pressing on the sensors at all, further causing problems.  To try to fix both of these problems, and also to more directly measure the problem, if it still occurs, I am expanding the mouth sensor to have three sensors side-by-side instead of two.  The sensors will now be effectively the full width of the mouth-piece, and the hinge should sit on the centre sensor, even if it jiggles a little bit from side to side:

I now have it all stitched up, and ready to try out:

Initially I will use the same software as before, so that I am changing only one thing. This means that the centre sensor will be ignored, and just let me focus on whether spreading the left and right sensors in this way will still result in a functioning system.

Once I confirm that it is still generally working, I want to also try to improve another problem, where there is bias between the sensors, it doesn't get correctly calibrated and ignored, thus causing the software to incorrectly interpret balanced pressure as pulling slightly one way or the other. 

Another phenomena I want to address is that the readings are also varying more than expected.  I'm suspecting that the culprit here is that with the multiplexor, it is sampling too slowly, and as a result the 50Hz mains hum cancellation is not working as accurately as it should, allowing some ripple through, which results in a harmonic overlay on the signal, causing the ripple that I am seeing.  This can probably be tested in the first instance by adjusting the Arduino software to only scan one multiplexed analog line instead of six, thus improving the sample rate 6 fold.  The long term solution will be switching to an FPGA-based approach that will be able to sample all sensors simultaneously and at a much higher rate, instead of the Arduino needing to scan them one after the other, and at a slower speed.

But first, let's see whether we have the left and right responding independently when mounted in the horse head and with the bit and bridle fitted...






Fortunately, my riding instructor showed me how to control both reins with one hand, which makes it much easier to try to take photos while controlling it:

After having the left/right side sensors swapped, I now have everything in order, to test, and it seems to be generally ok.  In particular, there doesn't seem to be significant cross-activation like there was before.  I am now going to make the change to the Arduino code to make it sample the sensors faster, to see if that reduces the oscillation in values.

The sensor readings look a little bit more stable, but only a little bit.  I'll have to wait until I get the FPGA based PCB ready, to see if further improvements are possible.

The other complicating factor right now, is that my fake horse head has some movement in it, but it isn't equal resistance to left and right rotation, which is complicating reading the left and right mouth sensors reliably. When the whole thing is built, the movement of the head will be tracked as well, which will allow for correcting for this.  But in the meantime, we need another solution.

To solve this, and also to make a much more portable test unit, I am going to organise a very rough "mouth" on a timber beam, so that the sensors, bit and reins can be set up, without the rest of the horse or even bridle.  This will also make it possible for me to lug it up to my riding lessons more easily for poking and prodding by my instructor to provide feedback on its behaviour and feeling. So let's see what I can crock up with what I have laying around.  I warn you, though, it will be really rough.



Now to put the sensors in the back of the "mouth":

Okay, it is indeed really rough, but actually works quite well: The only problem is sometimes the snaffle ring on the side of the bit gets a bit stuck on the ratchet.  I also have to stop it toppling by holding it upright with one foot, a problem that I can fix with another rachet strap and an angle bracket, like this:

You can see the bit in front of the back-of-mouth sensors here:

I fiddled about with it a bit, and it is generally working.  This hacked up mount is not particularly ideal, because the mouth piece of the bit is horizontal, while the corner of the block is vertical, meaning that the pressure tends to end up on a single point, which these sensors aren't really designed for. Rather, they are designed to have pressure across them in at least on direction.  As a result, the performance is quite uneven between the left and right sides, partly also because of the non-centred hinge in the mouth piece of the bit I have here.  This will probably require redesigning the "mouth" to have sloped sides, so that the bit can press against more of the width of the sensor. 

But anyway, you can see the sensors being activated using the reins in this short little snippet I recorded:

Opening the reins to the side is also a bit hit and miss at the moment. I'll need to have a think about how that works kinematically for a real horse as well as for my pressure sensors, to make sure I can correctly detect it.  But that will be for another day.

Comments

Popular posts from this blog

A busy long-weekend rebuilding and improving the machine

Why do I want to build an open-source horse riding simulator?

Converting reins input to key presses for Unbridled: That Horse Game