Little Box Phase 1 :: Open-Close animation prototype

Little Box by Marie Sester
Developed by StudioView

PHASE 1 :: Open-Close animation prototype

First prototype of the Little Box project was building a system that can open a box seamlessly. This is a main step for the box and most of the next steps will be shaped according to our solution for this problem.

We needed to make this system seamless, with low noise and small parts. We have started with ordering these parts
Large Servo Motor from Sparkfun.com (http://www.sparkfun.com/products/9064)

Servo Tilt Bracket from Sparkfun.com (http://www.sparkfun.com/products/10335)

Stepper Motors from Sparkfun.com (http://www.sparkfun.com/products/9238)

Molded Nylon 20 Degree Pressure Angle Miter Gear, 48 Pitch, 18 Teeth, .375″ Pitch Diameter, 1/8″ Bore from mcmaster.com (http://www.mcmaster.com/#catalog/118/1073/=gljhgu)

Miniature Hardened Precision 17-4 Stainless Steel Shaft, 1/8″ Diameter, 12″ Length from mcmaster.com (http://www.mcmaster.com/#catalog/118/1076/=gljikf)

Molded Nylon 20 Degree Pressure Angle Miter Gear, 24 Pitch, 24 Teeth, 1″ Pitch Diameter, 1/4″ Bore from mcmaster.com (http://www.mcmaster.com/#catalog/118/1073/=gljjsq)

Steel Plain Bore 14-1/2 Degree Spur Gear, 24 Pitch, 12 Teeth, 0.5″ Pitch Diameter, 1/4″ Bore from mcmaster.com (http://www.mcmaster.com/#catalog/118/1070/=gljjtx)

Steel 14-1/2 Degree Pressure Angle Gear Rack, 24 Pitch, 1/4″ Face Width, 1/4″ H Overall, 2′ Length from mcmaster.com (http://www.mcmaster.com/#catalog/118/1070/=gljkky)

Miniature Hardened Precision 17-4 Stainless Steel Shaft, 1/4″ Diameter, 12″ Length from mcmaster.com (http://www.mcmaster.com/#catalog/118/1076/=gljkda)

Other than these we used an Arduino Uno microcontroller (arduino.cc)

We tried all of these parts with different setups and materials. Since we are pushing the lid very close to the hinges, some of these materials were not able to handle the force that we needed or they were very noisy, such as servo motors.

We ended up using 2 steppers on both sides of the back of the box and steel plain bore 14-1/2 degree spur gear. We also made our own gears for stepper motors to drive this geared rod.

While figuring out the materials it is very important to keep in mind physical laws. We ended up using torque equation. You can find more details in this page (http://hyperphysics.phy-astr.gsu.edu/hbase/extms.html)

Firstly we calculated how much force we are applying to the lid. Our stepper motors holding torque is 2.3kg*cm and our gears radius is 0.5cm. So if we multiply these 2 variables our force is 1.15 kg. This means if we position our set up very close to the lid, lets say the distance is 2 cm, and the weight of the lid is 0.45 kg, we can push the lid and make it rotate from the hinge.
1.15 kg * 2cm  > 0.45kg * 5cm(center of gravity for the lid)
2.30kg*cm > 2.25kg*cm
Also, since we used 2 motors to push from both left and right side of the lid, we multiplied our force by 2. (These calculations are estimated, and we didn’t factor in forces like friction).

As a result, if we need to increase the weight of the lid and decrease the distance from the hinge, we need to make more specific calculations and find a motor with more torque.

Also, we accomplished some extra steps and we add more materials in to the box. We used a strip of RGB Leds (http://www.adafruit.com/products/346)

and sonar sensors (http://www.sparkfun.com/products/9491)

This first prototype serves as proof of concept. Next steps will be deciding on materials, figuring out motor torque accordingly and lowering the noise as much as possible.

As for the materials, the original choice was to use Corian.  After receiving some samples of the material we realized that it’s very heavy and might not be an appropriate material for this application, unless we choose to go with a much larger motor.  This could mean that we’d get more sound, though, so we have to balance aesthetics with mechanics and physics.

Here are some pictures and videos from our set up:

          

And here is our code based on Arduino stepper motor library:

/*
This sketch has developed by Stu|oView (Mustafa Bagdatli, Emily Webster, Genevieve Hoffman – www.thestudioview.com) for Marie Sester (sester.net) on March 2012
*/
#include <Stepper.h>
const int stepsPerRevolution = 200;  // change this to fit the number of steps per revolution
// for your motor
int sonarPin = 0; //pin connected to analog out on maxsonar sensor
int inchesAway;
boolean opened = false;
boolean preState = true;
// initialize the stepper library on pins 5,6,9,10
Stepper myStepper(stepsPerRevolution,5,6,9,10);
///define lights pins
#define REDPIN 11
#define GREENPIN 3
>#define FADESPEED 7     // make this higher to slow down

int r = 255;
int g = 255;
void setup() {
// set the speed at 20 rpm:
myStepper.setSpeed(20);
// initialize the serial port:
Serial.begin(9600);
pinMode(REDPIN, OUTPUT);
pinMode(GREENPIN, OUTPUT);
analogWrite(REDPIN, r);
analogWrite(GREENPIN, g);
}
void loop() {
inchesAway = analogRead(sonarPin) /2;
if(inchesAway < 50){ if(preState != opened){ if(!opened){ preState = opened; opened = true; for (g = 255; g >= 0; g–) {
analogWrite(GREENPIN, g);
delay(FADESPEED);
}
myStepper.step(stepsPerRevolution);
}
}
}
else if(inchesAway > 50){
if(preState != opened){
if(opened){
preState = opened;
opened = false;
for (g = 0; g analogWrite(GREENPIN, g);
delay(FADESPEED);
}
myStepper.step(-stepsPerRevolution-20);

}
}
}

Lilypad, Bluetooth and first lectures

In order to be able to have the first lectures of the sensors incorporated we started building our first wearable bracelet with the two sensors incorporated. We incorporated a Lilypad Arduino simple board and we connected the GSR and the Temperature sensor to two different analog inputs of the board.

We did several tests with the two temperature sensors and we noticed that the first one we tried was reacting faster to small changes which seemed more appropriate to our final goal, so we chose that one.

Here are some images of the process:

 In order to be able to do long term lectures, and getting a step closer to the final prototype, the bracelet had to communicate wireless with the application that would save the data collected. So the next thing we worked on was bluetooth + lilypad. After several issues with the battery and the bluetooth system itself we got them working together. We used the Bluetooth Mate Gold modem.

 With all these components mounted together we have been wearing the bracelet and collecting DATA that we can pass to the other members of the team. We are working also on the application for visualizing the text files with all the DATA.

This is an screenshot of the visualization running:

The next step would be linking the bracelet with an Android where we can store the lectures collected in any type of situation, far from the computer.

 

GSR and skin temperature

According to the last results we had, we started working on a wearable prototype that could give us more stable lectures of the different sensors. We used for that one of those “tennis bracelets”.

We first incorporated two stripes of stretch conductive fabric to measure the GSR. We could see it working by adding some water on our skin and observe the different values, but it was tough to prove a secretion of sweat in the conditions where we were doing the tests. In this direction we both agreed we needed to incorporate ASAP a bluetooth transmitor and a phone that could collect the data. This way we could measure situations closer to a real scenario.

It was helpful having incorporated a way to visualize the results in Processing, in comparison of last time.

We tried then a temperature sensor more accurate than the one we used last time, recommended by Eric Rosenthal in ITP: the LM34 . According to the datasheet this component is sensitive to changes of ±½°F  at room temperature. We tested it working properly but again it was difficult to witness a change of our skin temperature in those conditions.

Here are some pictures of both sensors incorporated to the bracelet:

Measuring GSR from the bracelet

Conductive stripes and LM34

We encountered some problems with the heart rate measurements, which point to be the hardest ones to measure from the wrist. We tried to incorporate the pulse sensor we used previously taking the measures this time form the top of the wrist and amplifying the output signal, but it did not work. Afterwards we noticed that the Opamp we were using from Sparkfun had two Capacitors that were blocking the DC lectures. The amplifier was designed to amplify AC signals, so this could cause that we couldn’t get any lecture at all going through it.

Eric suggested to try with a stretch sensor tied to the wrist but getting any conclusion or rythmical pattern out of the results seems barely impossible. Here is the image of this test:

Stretch sensor measurements visualized in Processing

Redesigning the amplifier circuit of Sparkfun and testing it again with the pulse sensor could give us some options then.

Finally we decided that it would be more efficient to start measuring Temperature and GSR in real situations while we work in parallel on a way to get the heart beat from the wrist, or maybe incorporating that one from the finger while we find a better solution.

 

Working on the first prototype – Day one

Today we started doing some tests with the components we ordered to monitor:

- Heart rate

- Skin Temperature

For the heart-rate we did some tests with the pulse sensor ordered online and created by Joel Murphy and Yury Gitman.

It was pretty straightforward to plug and play. It seemed to read our pulse through our fingertip but it was not as stable as we expected and it did not really  work for the measurements in the wrist. We did not have the velcro they recommend to do the tests so we will try again next time to figure out if we can get better results this way.

Here some images:

Pulse sensor connected to the arduino

 

Processing application that runs with the sensor

We also tried with the infrared LED and the Light Intensity to frequency IC . We got some mesurements from the wrist but they were pretty unstable too. Building a proper encapsulation weareable could improve the results considerably, so this will be our next step on this side.

The LED and the IC are taped around the wrist pointing to the veins

 

For our last test to measure skin temperature we used a Thermistor  connected to the arduino:

and again we got some coherent measurements but pretty unstable.

For the future we will have to:

- Create better containers for all the sensors

- Average the lectures to have more coherent results

- Create visualizations to get more readable results and get conclusions faster