Close

Proprioception Revisited: Touch

A project log for Tote

Affordable spider robot

dehipudeʃhipu 08/15/2015 at 15:380 Comments

Sensing the positions of limbs and the forces acting on them is just part of the proprioception, there is also the sense of touch and the inner ear. Today we will do touch.

I spent a really long time looking for the right touch sensor for the robot's feet. Everything I tried was either too imprecise, too hard to trigger, too unreliable or too hard to build. I needed something off-the shelf that I could put on the end of the leg and that would tell me whether it's touching the ground or not. Seems easy.

The obvious first choice is microswitch pushbuttons, similar to that reset switch on the Pro Mini. Small, light, easy to install, simple, reliable. Except the force you have to use to make one "click" is way too large for Tote's mass. It can basically stand on them and still have them off.

Second, endstop switches. The ones with a lever. Turns out that they have pretty large travel, and that it's hard to attach them such that the lever is at the right angle. And if you remove the lever to make the travel smaller, they become too hard to trigger, like the pushbuttons.

Then came a lot of more exotic solutions. Force sensors from kitchen scales are way too expensive and too large. Bend sensors are too unreliable, and would require an opamp to actually detect the difference with Arduino's ADC. I had some limited success with a whisker in a metal tube, but that was definitely too hard to make for regular people. I even tried an optical sensor, but that only worked on flat surfaces, which kinda misses the whole point.

Finally, someone pointed me to a website of an electronics parts store where you can search the switches by the force required to switch them, and turns out there are switches that only require 0.3N! They are not pushbuttons or endstops, though. They are used for detecting whether a card is inserted into a slot. Once I knew that, I easily found and ordered those babies:

They are perfect for mounting at the tips of the robot's legs. See those plastic studs? They fit perfectly into the holes on that servo horn! And they are super-sensitive!

So add some wires, glue the switches to the legs, connect them all in series and attach to a free pin on the Arduino (since at most one leg is in the air at any given time, I only need one pin), and voila, a robot with a sense of touch:

Of course we also need software to make use of those sensors. For now I went with something really simple -- just keep lowering the leg slowly until it touches the ground. You can see the code in the "switches" branch. And the effect? See for yourself:

If you look closely you will notice, that even after the robot extends the leg far down because it didn't find the floor, it moves it back to its default position anyways -- that's why the robot's body stays at the same height even several steps, despite the imprecision of the switches. To make this actually useful, one would need to modify the gait code to keep the body at constant height relative to the average of the heights of all the legs. I will leave that as an exercise for the reader, though (or a future experiment log).

Discussions