Archive for November, 2009
The helper is an assistive technology for a person with muscular dystrophy who can not pinch. It is composed of an arm and a controller. The controller is composed of 2 round objects the control the arm sided to side and around itself. The controller has 2 buttons one to open and close the grabber and a preset button that will bring the arm to bring object to the user.

The grabber mechanism motion is very similar to a fun childhood game hungry hungry hippos.


The controller was designed to be anbidextrous.

We installed buttons to allow for preset commands such as "Bring it to me" and "Grab item"

This is before the controller was wired in to the breadboard and arduino. We used big buttons to make it easier for the user who lack dexterity to push them.

The helper is controlled by two 360 potentiometer and two lighted big buttons.

Russ started with a cardboard mock up of how the grabber will operate.

Parts are in for the Grabber and Servo for the Arm.

The original design for the grabber the gears went on the outside, then mount for gear, then the axel. This did not let the axel spin 360 degrees.

We kept the main box clear any obstructions down to the rivets in order to have smooth movement for the Grabber.

This is the interim design that the grabber had. We mounted the axel on the inside which let the axel rotate 360 degrees.

This is the side view of the interim design for the grabber.
We initially tested the arm to see how the servo would react to the weight of the servo.

The required torque power for mounting to the rear of the Grabber was to great for our servo. We cut down the lifting force by mounting the arm closer to the center of the Grabber box.

In order for us to mount the arm in the center, we had to redesign the Grabber box to include a roof.

One stumbling block that we found was the Grabber was binding if drove it from only one side. We had to run a drive shaft to the other side so that they wheels rotated equally.

Quick test to see if the servo can lift the Grabber from it's new mounting point.

Originally we mounted the arm directly to servo. This put to much stress on center screw on the servo and flexed to much.

The new servo turret takes the stress off the servo but allows the servo to rotate the grabber.

This is the final version of the grabber. We are using a motor to drive the Grabber motion.

We are using springs to lift the Grabber above the items it intends to grab.

Russ making sure everything works.
Pcomp Final – The Helper from Zeven Rodriguez on Vimeo.
CODE
#include
int analogPin0 = 0; // blue up and down
int analogPin1 = 1; // green left right pot
int analogPin2 = 2; // blue pot to control hbridge speed
// pins for buttons
int redButton = 2; // red wire to pin 2
int greenButton = 5; // green wire to pin 5
// pins for lights
int redLight = 10; // yellow wire to pin 10
int greenLight = 11; // white wire to pin 11
// pins for motors
int servo1 = 6; // no color yet left right
int servo2 = 7; // no color yet up down
int motor1 = 9; // pulse pin for the hbridge
int red = 0;
int green = 0;
int analogSensorPin = 0; // select the input pin for the potentiometer
int analogSensorPin1 = 1; // select the input pin for the potentiometer
int formerValue = 0;
int nowValue = 0;
float difference = 0;
float deg = 83;
int formerValue1 = 0;
int nowValue1 = 0;
float difference1 = 0;
float deg1 = 0;
Servo updown;
Servo leftright;
void setup() {
Serial.begin(9600);
updown.attach(8);
leftright.attach(7);
pinMode(redButton, INPUT);
pinMode(greenButton,INPUT);
}
void loop()
{
// read the value from the sensor:
// this reads pot 1
nowValue = analogRead(analogSensorPin);
//Serial.print(“this is pot”);
//Serial.println(nowValue);
difference = nowValue – formerValue;
if(abs(difference) > 500)
{
if(difference > 0)
{
difference = formerValue + (1023 – nowValue);
}
else
{
difference = (1023 – formerValue) + nowValue;
}
}
deg += difference / 30;
if(deg < 0) { deg = 0; } else if(deg > 180)
{
deg = 180;
}
// Serial.println(deg);
formerValue = nowValue;
// this reads pot 2
nowValue1 = analogRead(analogSensorPin1);
//Serial.print(“this is pot1″);
//Serial.println(nowValue1);
difference1 = nowValue1 – formerValue1;
if(abs(difference1) > 500)
{
if(difference1 > 0)
{
difference1 = formerValue1 + (1023 – nowValue1);
}
else
{
difference1 = (1023 – formerValue1) + nowValue1;
}
}
deg1 += difference1 / 30;
if(deg1 < 0) { deg1 = 0; } else if(deg1 > 180)
{
deg1 = 180;
}
// Serial.println(deg1);
formerValue = nowValue;
updown.write(deg);
Serial.println(deg);
leftright.write(deg1);
red = digitalRead(redButton);
//Serial.print(“this is the red button”);
//Serial.println(red);
green = digitalRead(greenButton);
//Serial.print(“this is the red button”);
//Serial.println(red);
}
The Helper is a assitive technology robot. The purpose of the robot is to be able to pick up and reach objects for individuals in wheel chairs. The project is composed of 2 parts one is the Helper robot that is able to reach and grab the objects. The other is the control unit. One of the main design concerns for the control unit is that a lot of people of handicap cannot pinch. For this reason the orb works with large objects that rotate like a pot to control the robot.

This week we delt with tranistors and HBridge. The transistor help to control motors, lights, or objects that have a higher voltage that the Arduino cannot power. The Transistor has a Base, Collector, and Emitter. The base goes from a pin of the arduino. This acts like a switch for the object you are controlling. The collector, which is the middle pin, goes to ground. The Emitter, the last pin left to right, takes the ground of a motor in this case. The power to the motor comes from the power source that correlates to the voltage of the motor. In this case, we are taking power from the Vin pin. There is a diode that crosses from the Collector to the Emitter. The silver edge goes to the collector. It helps especially with motors because when they spin down they still are making energy.

This code is to program the arduino to speed up and slow done the motor.
const int potPin = 0; // Analog in 0 connected to the potentiometer const int transistorPin = 9; // connected to the base of the transistor int potValue = 0; // value returned from the potentiometer void setup() { // set the transistor pin as output: pinMode(transistorPin, OUTPUT); } void loop() { // read the potentiometer, convert it to 0 - 255: potValue = analogRead(potPin) / 4; // use that to control the transistor: analogWrite(9, potValue); }
Physcomp Lab8 – Transistor from Zeven Rodriguez on Vimeo.
Now to the HBridge Lab. The HBridge is used to control multiple actions. In this case we are reversing the direction of a DC motor. This is how the HBridge wiring looks like.
This is my wiring.

Here is the code to get the HBridge to work. This code uses a pot to control the speed and a switch to reverse the direction. If you remove the analogWrite code, it will just work with the switch.
const int switchPin = 2; // switch input
const int motor1Pin = 3; // H-bridge leg 1 (pin 2, 1A)
const int motor2Pin = 4; // H-bridge leg 2 (pin 7, 2A)
const int enablePin = 9; // H-bridge enable pin
const int ledPin = 13; // LED
int pot= 0;
int potValue = 0;
void setup() {
Serial.begin(9600);
// set the switch as an input:
pinMode(switchPin, INPUT);
// set all the other pins you’re using as outputs:
pinMode(motor1Pin, OUTPUT);
pinMode(motor2Pin, OUTPUT);
pinMode(enablePin, OUTPUT);
pinMode(ledPin, OUTPUT);
// set enablePin high so that motor can turn on:
//digitalWrite(enablePin, HIGH);
// blink the LED 3 times. This should happen only once.
// if you see the LED blink three times, it means that the module
// reset itself,. probably because the motor caused a brownout
// or a short.
blink(ledPin, 3, 100);
}
void loop() {
potValue = analogRead(pot);
Serial.println(potValue);
// if the switch is high, motor will turn on one direction:
if (digitalRead(switchPin) == HIGH) {
analogWrite(enablePin, potValue/4);
digitalWrite(motor1Pin, LOW); // set leg 1 of the H-bridge low
digitalWrite(motor2Pin, HIGH); // set leg 2 of the H-bridge high
}
// if the switch is low, motor will turn in the other direction:
else {
analogWrite(enablePin, potValue/4);
digitalWrite(motor1Pin, HIGH); // set leg 1 of the H-bridge high
digitalWrite(motor2Pin, LOW); // set leg 2 of the H-bridge low
}
}
/*
blinks an LED
*/
void blink(int whatPin, int howManyTimes, int milliSecs) {
int i = 0;
for ( i = 0; i < howManyTimes; i++) {
digitalWrite(whatPin, HIGH);
delay(milliSecs/2);
digitalWrite(whatPin, LOW);
delay(milliSecs/2);
}
}
Phsycomp Lab8 – HBridge with Pot from Zeven Rodriguez on Vimeo.

For our physical computing midterm Julio Terra, Michael Martinez-Campos, and Myself created a MIDI based light table. We used LEDs in a gradient pattern and a puck like object with photocells to achieve this. The photocells pick up the brightness from the LEDs. The Photocells are connected to the Arduino. Through Processing and using the OSC library we turn the photocell values into MIDI. The light has 2 sets of lights, green and red. Each of cell is composed of a red and green light. The cells provide 2 discrete values that affect the MIDI values that go to the music software. The MIDI information could then be used by many music software. In our case we chose Ableton. This article mostly focuses on the making of the light table.
Physcomp Midterm – MIDI Light Table from Zeven Rodriguez on Vimeo.
One day while looking around the shop, I found this cardboard grid. The cardboard grid needed stiffening. Hot glue and a simple wood frame were used. This piece we meant only as a sketch but it seemed to be of great use in the prototype.

We decided to use foil to help with the diffusion of light.

After soldering the 50 LEDs, we wired the rows of lights in parallel. This made it easy to make sure which lights were not working.

We decided to limit the puck object to get a better reading off the LEDs. Initially, we used a wood track to guide the movement of the puck.
The wooden block between the tracks contains bearings which help guide the wood easier along the tracks.

We used a resistor ladder to control the brightness of the lights.

Due to the high friction and the lack of rigidity of wood, metal was used to fix this issue.

This was the first time we started testing the brightness of the LEDs and the readings from the photocells.

We decided to use 2 photocells per cell because after trying one per cell we were getting better readings.

After the first test, we realized that we needed further diffusion of the light. After a chat with our professor, Tom Igoe he suggested some vellum for this purpose.
The biggest challenge for use was to get the maximum output from the LEDs as possible. We learned that pots could help use vary the resistance of the voltage to get a range of LEDs. This was better then the resistance ladder because it was easier to set. We originally used 10k pots but there was not enough control. We ended up using 1k pots. After using a 5v voltage regulator, we achieved around 2.3 volts on the brightest row of LEDs.

After testing, we found that our readings were difficult to map. To help achieve a better reading we decided to put in a push button to only pick up values when you pressed it. We also added a dome and a slit to put in a scroll-like wheel(which is actually a pot) to control volume.

Here are Julio and Mike doing some testing and calibration.

This is the final pot ladder for the lights.

This is was the lights looked like when they were tuned.

Our puck turned out to be a cool little mascot

In the end, the thing we learned most about this project is the amount of testing it really takes for something like this to work. Because of the photocells prefer something with a higher contrast, the table did not work out perfectly. For more information about the programming aspects of this project visit Julio Terra’s blog