1 The George Washington University Electrical & Computer Engineering Department ECE 1010 Intro To Electrical and Computer Engineering Dr. S. Ahmadi Class 7
2 Biomedical Experiment Agenda Building centrifuge Separating oil and water with centrifuge Adjusting time and speed to achieve the best separation Using an analog sensor to quantify separation
3 Centrifuge A centrifuge is a piece of equipment that puts a substance in circular motion in order for the centrifugal force to separate one fluid from another fluid. Gravity can separate mixtures but this process is very slow Centrifuge increases the effective gravitational force on the mixture by inducing centrifugal force Therefore, it accelerates the separation of the liquid from the solids or from other fluids
4 Applications of Centrifuge Separation of proteins and DNA’s by Ultracentrifuge Separation of isotopes used in nuclear power and nuclear weapon programs Used in the petroleum industry to separate oil components Oil-Water Separation
5 Water Oil Separation by Centrifuge Oil-water separation in a centrifuge is based on centrifugal forces and the difference in specific gravity of oil and water Water will collect at the outside of the centrifuge, oil will collect in an inner layer Commercial centrifuges for oil-water separation have speeds varying from 2400 to 4500rpm
6 Building Centrifuge Build a centrifuge using lego components, gears and motor Lego motor’s free weight rpm is 350 Use gears to increase the rpm Connect the motor to the handy board and test your centrifuge Attach the test tube to the centrifuge
7 Centrifuge Pictures I For more centrifuge pictures, visit
8 Centrifuge Pictures II For more centrifuge pictures, visit
9 Centrifuge Experiment Mix oil and water in the test tube Run the centrifuge for a sufficient amount of time Observe the separation in the tube Adjust your time accordingly Motor Power (%) t2 t t1 100
10 IR Reflectance Sensor “Top Hat” Analog sensor Connect to ports 0-7 Access with function analog(port#) Low values indicate bright light, light color, or close proximity High values indicate low light, dark color, or distance of several inches Sensor has a reflectance range of about 3 inches
11 Light Sensors Analog sensor Connect to ports 0-7 Access with function analog(port#) Low values indicate bright light High values indicate low light Sensor is somewhat directional and can be made more so using black paper or tape or an opaque straw or lego to shade extraneous light. Sensor can be attenuated by placing paper in front.
12 How to use sensors? You should create an infinite loop Inside the loop, read your measurement from the analog sensor Add a sleep time between your readings Sample code void main() { while(1) { /*Here type one line of code in order to print the value that you read from the sensor to the screen*/ sleep(0.4); }
13 Sensor Measurement Use IR Reflectance Sensor “Top Hat” or light sensor to measure values from separated oil and water Before centrifuge: – when oil and water are mixed After centrifuge –Measure value from the oil part which is at the top of the tube –Measure value from the water part at the bottom Note your results
14 Comparison Prepare a test tube with the exact same ratio of water and oil. Mix water and oil in the tube Make it wait same time as your run-time of centrifuge experiment Measure oil and water parts separately Note your results Compare your results with the ones from the centrifuge tube See if you have achieved enough distinction between two measurements
15 Pseudocode implementation of Centrifuge Program int main() { int speed = 0; // initial guesses-you tune these vars: float separation_time=1.0 ; // guess float ramp_time=.1; // guess printf (“\nPress A button to begin”); while (a_button() == 0) {} // read value of oil + water mixed up while (b_button()==0) { printf (“\n mixed up value=%d”, analog (20); sleep(.2); } // program continued in right column // ramp up motor while (speed < 100) { // turn on motor at “speed” // sleep for “ramp_time” // increment “speed” variable } // full speed ahead! sleep ( separation_time ); // ramp motor down while (speed >=100) { // do the reverse of ramp up loop } ao(); return 0; /* use another while loop to measure separation just as before */ }
16 In Class Assignment (Due at the end of lab today) Build Centrifuge, write Interactive C program to separate oil from water Make and print a 1 PAGE document including the following: 1) An Excel table, with sensor readings for 5 trials: Trial #Sensor Reading (before separation) Sensor Reading (after separation) Ramp UP Time (s) Time to Separate (s) Ramp DOWN Time (s) OILWATER 1 … 5 2) Graph of Motor % vs. Speed (see slide 9) (use best trial’s t1 and t2) 3) Type of Sensor Used 4) Average time needed to separate oil/water mix (Average of the 5 trials – include time to separate + ramp-up/down time) 5) Listing of code used to implement lab NOTE: this document to report coordinator for use in final presentation/report