Close

Refining the audio "picture"

A project log for Sonassist

Audio feedback for the brain-injured who need help learning to balance again.

simon-merrettSimon Merrett 11/07/2017 at 02:500 Comments

The soundscape that SoleSense is painting is quite dependent on e.g. the weight of the patient and the "no pressure" readings that are generated when the insoles are in close proximity to the patient's feet but they aren't bearing any weight through the feet. The algorithms to arrive at a tone and volume value for each foot are fairly simple. In this log, I want to quickly log the changes to the volume algorithm.

The original algorithm was taking the average reading across all five pads under the foot and mapping these values to an acceptable volume range, before appending the value to the radio payload for transmission by the NRF24L01 to the SoleSense audio unit. This had a major shortcoming in that the patient could be weigh bearing through only the toes or back of the heel on a single foot but because the weak readings on the other four pads reduce the volume value down, it sounds like the patient isn't weigh bearing on that side. 

I tried to think of a few strategies to overcome these likely scenarios, including treating the stronger readings as more significant. If using a lookup table for this I think it could have led to some jarring progressions (although volume appears to be less refresh-rate-sensitive than tone). If we'd used some (slow) maths functions and power laws to produce a non-linear response, that might not have supported the frequent tone updates we require to keep on top of the bleeping. 

Instead, for now, I have opted to drive the volume based on the strongest reading out of the individual pads To try and see what is going on, I plugged the insole into the Arduino serial plotter to look at the streams of sensor readings (slowed down with judicious 100ms delay() to prevent an unmanageable stream of data). This was really helpful as, even by calibrating the "no pressure" scenario, it didn't account for the individual differences in the sensor "start readings". I implemented an averaging for each sensor plate in the calibration routine and then created an offset from the combined mean across all five sensor plates. Then, the offset is used to "level" the readings of the sensor pads, before arriving at a suitable volume.

The other part that I could determine from the serial monitor was the strongest reading that a sensor would pick up. With one 2-3mm layer of neoprene/EVA foam between the heel and the heel pad copper tape, this reading tended to dominate the high volume when loading my full body weight through it. Whereas, the toes didn't  as easily create full volume when standing on them alone. To remedy this, I have added a second layer of foam under the heel on each insole.

From watching the serial plotter, it looks like the volume matches the loading of each foot much better and it certainly sounds loud when you are on tip-toes or rocking on your heel. There may be some benefit of smoothing the volume using a running average, to avoid volume spikes which don't seem critical but may be a feature to work on in the clinician's eyes.

I look forward to the Verostat I have ordered arriving so that I can start to characterise it. I hope that it is easier to refresh and calibrate against than the capacitive approach has turned out to be! 

Discussions