Giving your robot a sense of touch
Recently I posted a tip on using the anti-static foam your IC's come in for pressure sensors. This show you how to apply that tip to your robot.
Step 1: cut your antistatic foam (ASF) to the right size. It's usually pretty stiff, give it a few good squeezes to soften it up a bit. I cut mine about 4mm thick but in retrospect I'd keep it 2-3mm thick. The gearbox wasn't strong enough to squash it more than about 2mm. This will reqire experimenting on your part and depend on the size and strength of your gripper. In this photo, the black strip at the bottom is one of the original rubber grips from the robot used for a template. I'm making two seperate sensors, thus the two pieces of ASF. This will allow the robot to tell where an object is within the pincers.
If one piece of ASF changes resistance by a greater percentage than the other then where the object is being held is not central.
Step 2: lay out your common connection. I used a spot of super glue on the insulated part of the wire to hold it still. Try and spread the strands evenly for a consistant response as the Wire Glue has a relatively high resistance.
This is Wire Glue thatI bought from a local electronic store. It is basically non-toxic, water based craft glue with carbon powder mixed in. Since you don't need a lot for this job, if you can't find it or some other electrically conductive glue then you could make a small amount by grinding something like pencil leads to a fine powder and mix that into a couple of drops of craft glue. This will take some experimenting. Perhaps your local chemist can sell you some carbon powder. I have bought copper sulphate from a chemist once when I was experimenting with electroplating.
Glue your two pieces in place. The conductive glue will connect your wire to the entire surface of the foam for a good electrical connection.You will probably need to put something heavy on the foam while the glue sets. Give it at least 6 hours. This glue needs 24hr for a full cure.
Step 3: setup your other two wires with a dab of superglue holding the insulated part of the wire to the foam and spread the strands gently, they kink easily.
Step 4: Spread your glue evenly over the wires. I used a toothpic and dabbed the glue on so that it made a good electrical connection over the entire surface including under the white wire in the photo. Let this dry overnight. The photo above shows it with the glue fully cured. Below is a photo of Junior eagerly awaiting his new sense of touch. Isn't he cute?
You can see the rubber grip on the right pincer. There was no need to do both sides although I might end up putting a temperature sensor on that side later.
Step 5: Use our good friend the hot glue gun to mount our touch sensor onto the robot of your choice. Now for the test.
As you can see, with the multimeter connected to the rear sensor I'm getting 507ohms of resistance. This can change with heat, humidity etc. When you program your robot get it to monitor the change in resistance before/after gripping an object, not the absolute values. The front sensor was a simular value. So far, so good.
I've now closed the grippers on a jewellers screwdriver using a couple of AA batteries. The resistance dropped to 465ohms, about 9% change in resistance. The change in resistance wasn't as much as I hoped for but then again the clutch didn't disengage so the batteries might be a bit flat. Either way, with the right value of resistance in series with the sensor this will still be quite measureable. With a 470ohm resistor in series and a 5V supply, the voltage across the sensor would change from 2.59V to 2.48V. Connected directly to a 10bit analog input with no amplification and the reference voltages set to the 5V supply. the input would change by a value of 22-23.
With Junior, the voltage references are set to 1.5V and 3.5V so the input would change by a value of 56. When I squeezed the sensors by hand the resistance dropped down to about 230ohms so there's room for improvement just by increasing the power to the gripper motor.
Because of this result I now know that a thinner piece of foam, say 2mm would have given me a better response. This is where you will have to experiment a bit with the grippers and circuitry you are using. With stronger grippers 4mm will be fine. Below is a basic schematic. Select your resistor values to be aprox. the same as when then sensor is squeezed halfway. With my example that was 470ohms.
Good luck and enjoy :)