Robotics: Playing with Bend Sensors
One of the things I like about building robots is finding new and interesting gizmos to play with. Recently I purchased three bend sensors, just to see what they do and how they work. A bend sensor looks like a thin strip of plastic 4.5 inches long and .25 inches high with two small connectors sticking out one end. Inside the sensor you can see a small grid.
Simple; when you bend it, it changes resistance. The more you bend it, the more it changes resistance.
First, I connected one sensor to my VOM and it read about 10K. I slowly bent the sensor and watch the needle change. At 90 degrees of flex the VOM read 20K, and at 180 degrees it read 40K. I then soldered a connector on the sensor and plugged it into a BOTBoard 2.
Using SBASIC, I quickly wrote a program to draw a bar graph that displays the value of the bend sensor. (See Program Listing.) The bar graph glided across the display as I bent the sensor. Then for some fun I converted the sensor value to a sound value to generate a tone. The tone would change depending on the flex of the bend sensor. It was like playing a wash tub by plucking the bow sting.
The next thing I did was plug an RC servo into the BOTBoard 2 and change my code to move the servo. I then taped the bend sensor to the back of my finger. I was able to proportionally control the position of the servo with my finger. I wiggled my finger as fast as I could, and the servo reacted immediately.
Bend sensors would be perfect for small robot antennas to feel obstacles or to feed back a gripper’s position. Use them in a location where a switch just won’t work. The bend sensors might also be good as a bumper switches. A VR glove would also be fun for a teleoperated robot.
Bend sensors are cheap enough to use in all kinds of projects. I paid only $5.00 for each sensor. The sensor’s resistance value of 10K to 40K make it well suited for microcontroller projects using the 68HC11 or BASIC Stamp.
I purchased the bend sensor though the IMAGES COMPANY at POB 140742, Staten Island NY 10314 (718) 698-8305. This company specializes in lots of cool stuff for robot experimenters, such as voice recognition boards, digital and analog compasses, tilt switches, and more. Be sure to ask for their catalog.
[Editor’s Note #2: Visit the Portland Area Robotics website for more neat stuff from Marvin.]
Program Listing (SBASIC) ;Reads bend sensor and shows bargraph on LCD on a BOTBoard include "regs11.lib" include "common.inc" declare ad3 declare bar_val declare bar_step declare bar_min declare bar_max Init_AD: pokeb option, $90 pokeb adctl, $B0 return Read_AD: AD3=peekb(adr4) return main: outch $10 ;init/reset LCD gosub Init_AD bar_min =30 bar_max =160 bar_step = (bar_max - bar_min)/16 do gosub Read_AD bar_val = (AD3 - bar_min) / bar_step outch $01 ;line one LCD print "AD3 = ",AD3 outch $02 ;line two LCD for a = 0 to 15 ;draw bar on LCD if bar_val > a outch $ff else outch $20 endif next loop end