ECE 002 Final presentation

16
(from left to right) ASHLEY FRIEND, SUBHASIS GHOSH, EMMANUELLE DORVIL, DHRUV GAUR

description

ECE 002 Final presentation. (from left to right) ASHLEY FRIEND, SUBHASIS GHOSH, EMMANUELLE DORVIL, DHRUV GAUR. GROUP WORK 2009. Equal contribution and enthusiasm makes our presentation a success. - PowerPoint PPT Presentation

Transcript of ECE 002 Final presentation

Page 1: ECE  002 Final presentation

(from left to right) ASHLEY FRIEND, SUBHASIS GHOSH, EMMANUELLE DORVIL, DHRUV GAUR

Page 2: ECE  002 Final presentation

GROUP WORK GROUP WORK 20092009

Equal contribution and enthusiasm makes our presentation a success.

Dhruv and Subhasis in charge of presentation, Ashley and Emmanuella in charge of report writing.

This presentation will demonstrate the work done in the ECE 002 class.

Page 3: ECE  002 Final presentation

Sensor CharacterizationSensor Characterization

Purpose:

To understand the way a variety of sensors can be used and to test values that will come from using these sensors

Top Hat SensorTop Hat Sensor

Analog sensorsAnalog sensors

Page 4: ECE  002 Final presentation

ResultsResultsTrial 100 90 80 70 60 50 40 30 20 10

1 220 216 211 162 115 80 10 9 8 7

2 194 192 185 162 118 53 11 9 8 8

3 188 193 182 152 113 43 11 9 8 8

100 90 80 70 60 50 40 30 20 10

Average

201 200 193 159 115 59 11 9 8 8

0 cm

5 cm

10 cm

15 cm

20 cm

25 cm

30 cm

35 cm

40 cm

45 cm

Average

18 56 189 200 236 242 245 247 250 250

Page 5: ECE  002 Final presentation

ROBOT IN A MAZEROBOT IN A MAZE

Purpose:

To create a robot that would successfully navigate a maze

HandyboardHandyboard

Bumper Sensor, Sonar Sensor, andTwo Analog Light Sensors

Page 6: ECE  002 Final presentation

ROBOT...(contd..)ROBOT...(contd..)Methods:

We tested the sensors for their ranges

Created the robot from legos

Made corrections to structure or code as necessary

Conclusion:

Allowed us to understand the relationship between coding and sensors

Challenges:

Analog sensor troubles

Keeping the robot in one piece

Incorrect turns

Misaligned gears

void main() { int i=1; //defines the beginning of

the count while(start_button()==0); while(i<4) //will repeat the while

loop until the count is equal to four { motor(0,20); motor(3,20); if(digital(13)==1) //if the bumper

sensor is hit { motor(0,-15); motor(3,-15); sleep(1.0); ao(); //sleep(1.5); printf("\n%d",sonar()); if(sonar()<360) //senses

whether or not there is a wall on its side, if there is a wall there

{ motor(0,50); motor(3,-20); sleep(1.3); i++; } else //if there is no wall next

to the robot { motor(0,-20); motor(3,50); sleep(1.3); i++; } } while(analog(4)<200) //senses

whether or not the robot is at the finish line

{ motor(0,20); motor(3,20); } ao(); } }

Page 7: ECE  002 Final presentation

ELEVATORELEVATOR

Purpose:

To create an elevator from legos that will go up and down

HandyboardHandyboard

Analog sensorsAnalog sensors

Page 8: ECE  002 Final presentation

ELEVATOR...(contd..)ELEVATOR...(contd..)CODE:void main()

{

while(1)

{

if(start_button()==1)

{

If(analog(2)>200)

{

ao();

}

else

{

motor(0,20);

motor(3,20);

sleep(2.0);

motor(1,5);

motor(3,5);

}

}

if(stop_button()==1)

{

if(analog(3)>200)

{

ao();

}

else

{

motor(0,-20);

motor(3,-20);

sleep(2.0);

motor(0,-5);

motor(3,-5);

}

}

}

}

Page 9: ECE  002 Final presentation

INSTRUMENTATIONINSTRUMENTATION

•OBJECTIVE 1. Understanding Oscilloscopes2. Applying it to the study of

waves3. Applying to understand AC

and DC signals

•PROCEDURE1. Set the channel and trigger mode2. Attach the BNC cable and the mini3. Adjust the time dial and then set up the

position dial so as to center the green line on the screen

4. Set the DC voltage using the VOLTS/DIV dial

5. Finally connect the mini grabber strips to the power supply

OscilloscopeOscilloscope

DC Power SupplyDC Power Supply

Page 10: ECE  002 Final presentation

RESULTSRESULTS

5 volts/division5 microseconds time/divA = [1 2 0; 2 5 -1; 4 10

-1];B = [20; 35; 45]X = inv(A) * BX =    80  -30  -25  

Time = 5 microsecondsVoltage = .2 volts/div

Page 11: ECE  002 Final presentation

CIRCUITSCIRCUITS

•PURPOSE1. Construct variety of circuits2. Understand the application of Ohm’s

Law, breadboard, multi-meter3. Measure voltage change across the

resistors upon using different values of resistance

•METHOD1. Connect the resistors onto the

breadboard in either series or parallel

2. Attach the mini grabber plugs in order to measure the voltage across

3. Use the 1k ohm resistor in series and parallel and measure the voltage across it using the multi-meter

4. Replace the 1k ohm resistor by a 2 k ohm resistor and measure the voltage across it

BreadboardBreadboard

DC power supply

Resistors- 1k, 2k ohmResistors- 1k, 2k ohm

DiodeDiode

Mini-grabber cables

Page 12: ECE  002 Final presentation

RESULTSRESULTS

The results helped to confirm the group’s knowledge of Ohm’s Law and circuits. The lab was fairly straight forward but the equipment was confusing Connecting the multi-meter to the circuit voltage was confusing With practice we learned exactly where the multi-meter needed to achieve the desired voltage. This was an important project as major portion will be discussed further in the ECE program as well as for future jobs in electrical areas.

Page 13: ECE  002 Final presentation

PSPICEPSPICEPURPOSE

1. To use the PSPICE program on the computer and simulate circuits

2. Calculate voltage and current across the circuit at different points

• Method1. Place the resistor, voltage source,

grounding source on the page2. Complete the circuit by connecting

all the elements with a connecting wire

3. Check for a red dot on the connecting spots

4. Current and voltage probes were placed on the necessary place to measure voltage/current

5. Run the program in order to produce the graph with results of the circuit

6. Add 3 resistors 100 ohm, 300 ohm, and 200 ohm in series and a voltage source 6 V

7. Find the current through the circuit8. Replace the circuit by 2 resistors 200

ohm and300 ohm in parallel such that the current through them is 60 mA and 80 mA respectively

9. Find the voltage across each resistor and entire circuit

10. Replace the circuit by a diode whose threshold voltage by 0.7 V, a resistor of 1k ohm, and a source voltage of 1.7 V and then 0.3 V

11. Find the current across the diode and resistor, and voltage drop across the diode

12. Replace the circuit by a diode of threshold voltage 0.7 V, two resistors 1k ohm in parallel, and a resistor 1k ohm in series with the parallel resistors

13. Find the current through the circuit

Page 14: ECE  002 Final presentation

RESULTSRESULTS

This program was fairly simple to use since the group had already done circuitsProblems that arose were how to use the program and where to place the probes. PowerPoints were helpful in understanding Helped the group understand more complicated circuits

Page 15: ECE  002 Final presentation

MATLABMATLAB

•MATLAB was used to solve for functionsVarx = input('What is the first number?');Vary = input('What is the second number?');Varz = input('What is the third number?'); Vargroup5= group5(Varx, Vary, Varz) % num2str converts a number to a string.

 

function w=group5(x,y,z) w=(x+y+z)/3;

 

function I=trapz(f,a,b,n)h =(b-a)/n;s = feval(f,a); for i=1:n-1 x(i)=a+i*h; s=s+2 * feval(f,x(i));ends=s+feval(f,b);I=s*h/2;  

fon=inline('log'); a=exp(1); % Starting point.b=2*a; % Ending point.n=10000; % Number of intervals. tic % Start counter.OutValue1=trapz(fon, a, b, n) % Calling Trapezoidal function.toc   tic % Start counter.OutValue2=FastTrap(fon, a, b, n) % Calling Trapezoidal function. Toc

 

fon=inline('log'); a=exp(1); % Starting point.b=2*a; % Ending point.n=10000; % Number of intervals. tic % Start counter.OutValue1=trapz(fon, a, b, n) % Calling Trapezoidal function.toc   tic % Start counter.OutValue2=FastTrap(fon, a, b, n) % Calling Trapezoidal function. Toc

  function I=FastTrap(f, a, b, n) % Same

as the previous Trapezoidal function example, but using more% efficient MATLAB vectorized operations. h=(b-a)/n; % Increment values=feval(f, a); % Starting value in=1:n-1; xpoints=a+in*h; % Defining the x-pointsypoints=feval(vectorize(f),xpoints); % Get corresponding y-pointssig=2*sum(ypoints); % Summing up values in ypoints, and mult. by 2s=s+sig+feval(f,b); % Evaluating last termI=s*h/2;  

function I=trapz(f,a,b,n)h =(b-a)/n;s = feval(f,a); for i=1:n-1 x(i)=a+i*h; s=s+2 * feval(f,x(i));ends=s+feval(f,b);I=s*h/2;

Page 16: ECE  002 Final presentation