Testing the Speed and Accuracy of Relays

This posting relates to examining one possibility for a Raspberry Pi Zero to control signals for muscle actication via electrodes attached at muscle motorpoints. The option we cover here is somewhat quick and dirty, and it relates to simply routing signals from an external TENS/EMS unit through a relay board.

In order to investigate this option, I acquired a standard 4 channel relay HAT for Raspberry Zero (the Sb Components Relay 4 Zero HAT). It is a relatively small extension board at the size of a Raspberry Zero, and it is limited to 2A 120V (but that should be more than enough for our use case).

The small Sb Component 4 channel relay HAT for Raspberry Pi Zero. It looks small and handy.

The use of a relay is a really simple approach to controlling the muscle activations. Until a better solution has been identified, we just need to verify that the hardware can deliver accurately timed triggering.

Twinkle Little Relay

I thought that a test of the timing accuracy would be most easily made by letting the relays generate audio. For that purpose, I created a small program, which translates a musical score into a sequence of temporal configurations of the relay board.

Unsurprisingly, it did not sound too good with major 7th, so I turned off the 4th voice. But I would say the board has passed the test, and easily handles the requirements we have for timing.

One thought on “Testing the Speed and Accuracy of Relays

Leave a comment