Learning/PhotoResistor. It’s an analog sensor, so
I used a 10K resistor between the analog input pin
and ground. The other side of the sensor goes to
+ 5 volts [Figure 17].
Some simple code reads the pressure sensor and
when enough pressure is applied, the servo is
activated. I’ve found that each Velostat pressure
sensor has its own characteristics, so you just have to
experiment with the threshold necessary to sense the
pressure when the gripper flows around the object.
The Arduino waits two seconds and then pushes the
plunger back into the barrel, removing the vacuum.
Theoretically, the gripper can hold the object
indefinitely, just as long as there are no air leaks
in your system [Figures 18, and 19].
FIGURE 15.
FIGURE 16.
Getting an Arm Up
I don’t have a robot arm (yet), but this could be really
fun to put on one. The gripper’s strength is that it can
pick up very irregular or smooth objects easily. Gripping
strength is not affected whether the object is wet or dry.
It can also pick up multiple objects with no additional
power consumption. Using the syringe, there is no need
for vacuum pumps or vacuum reservoirs. The system
/*
// Universal Gripper
// Charles Ford
// 25 August 2011
//
// Sweep
// by BARRAGAN <http://barraganstudio.com>
// This example code is in the public domain.
Simple test of the functionality of the photo
resistor
Arduino Code
Connect the pressure sensor one leg to pin 0,
and pin to +5V
Connect a resistor (around 10k is a good value,
higher values gives higher readings) from pin 0
to GND. (see appendix of arduino notebook page
37 for schematics).
——————————————————————————
pressure sensor 10K
+5 o—-/\/\/—.—/\/\/—-o GND
|
Pin 0 o—————-
——————————————————————————
*/
#include <Servo.h>
Servo myservo; // create servo object to control
// a servo
// a maximum of eight servo
// objects can be created
int pos = 180;
int sensorPin = 0;
pressure
// variable to store the
// servo position
// define a pin for
// sensor
int pressureValue = 0; //variable to store
//pressure sensor
//value
void setup()
{
myservo.attach(3); //attaches the servo on
//pin 9 to the servo object
}
void loop()
{
pressureValue = analogRead(sensorPin)/2;
// reset value of pressure sensor
// if the gripper is in positive contact
// with a surface
// then activate the suction
if (pressureValue > 160)
{
// apply suction to pick up object
// servo moves plunger to suction position
for(pos = 180; pos>=1; pos-=1)
// goes from 180 degrees to 0 degrees
{
myservo.write(pos);
// tell servo to go to position in
// variable ‘pos’
delay(10);
// waits 15ms for the servo to reach
// the position
}
delay(4000);
// release object
// push plunger back into the syringe
for(pos = 0; pos < 180; pos += 1)
// goes from 0 degrees to 180 degrees
{ // in steps of 1 degree
myservo.write(pos); // tell servo to go
// to position in
// variable ‘pos’
delay(15);// // waits 15ms for
the
the
}
}
delay(500);
}
// servo to reach
// positionSERVO 01.2012 49