Lab 2a Useless box - Stanford University · Lab 2a Useless box ENGR 40M Chuan-Zheng Lee Stanford...

15
Lab 2a Useless box ENGR 40M Chuan-Zheng Lee Stanford University 21 April 2017

Transcript of Lab 2a Useless box - Stanford University · Lab 2a Useless box ENGR 40M Chuan-Zheng Lee Stanford...

Page 1: Lab 2a Useless box - Stanford University · Lab 2a Useless box ENGR 40M Chuan-Zheng Lee Stanford University 21 April 2017. Switches •A switch is a component that makes or breaks

Lab 2aUseless box

ENGR 40M

Chuan-Zheng Lee

Stanford University

21 April 2017

Page 2: Lab 2a Useless box - Stanford University · Lab 2a Useless box ENGR 40M Chuan-Zheng Lee Stanford University 21 April 2017. Switches •A switch is a component that makes or breaks

Switches

• A switch is a component that makes or breaks a circuit, depending on external input

Apr 21, 2017 ENGR 40M Spring 2017 — C.Z. Lee, J. Plummer, R. Howe 3

open switch

(connection broken)

closed switch

(connection made)

• There are lots of different types of switches

Page 3: Lab 2a Useless box - Stanford University · Lab 2a Useless box ENGR 40M Chuan-Zheng Lee Stanford University 21 April 2017. Switches •A switch is a component that makes or breaks

Poles and throws (1)

A pole chooses between one or more throws, and is mechanically joined to but electrically distinct from other poles

Apr 21, 2017 ENGR 40M Spring 2017 — C.Z. Lee, J. Plummer, R. Howe 4

throw

pole

Page 4: Lab 2a Useless box - Stanford University · Lab 2a Useless box ENGR 40M Chuan-Zheng Lee Stanford University 21 April 2017. Switches •A switch is a component that makes or breaks

Poles and throws (2)

We categorize switches by how many poles and throws they have, e.g. “single pole, double throw”

Apr 21, 2017 ENGR 40M Spring 2017 — C.Z. Lee, J. Plummer, R. Howe 5

Look at your toggle switch. How many poles and throws do you think it has?

Page 5: Lab 2a Useless box - Stanford University · Lab 2a Useless box ENGR 40M Chuan-Zheng Lee Stanford University 21 April 2017. Switches •A switch is a component that makes or breaks

Prelab question P1

Apr 21, 2017 ENGR 40M Spring 2017 — C.Z. Lee, J. Plummer, R. Howe 6

Use the resistance mode of your multimeter to figure out which pin of your toggle switch corresponds to which number in the symbol

1

Page 6: Lab 2a Useless box - Stanford University · Lab 2a Useless box ENGR 40M Chuan-Zheng Lee Stanford University 21 April 2017. Switches •A switch is a component that makes or breaks

Momentary switches

• A momentary switch reverts back to its “normal” position when it is not actively being pressed

• We label its contacts accordingly: common, normally closed and normally open

Apr 21, 2017 ENGR 40M Spring 2017 — C.Z. Lee, J. Plummer, R. Howe 7

Page 7: Lab 2a Useless box - Stanford University · Lab 2a Useless box ENGR 40M Chuan-Zheng Lee Stanford University 21 April 2017. Switches •A switch is a component that makes or breaks

Prelab question P2

• Your limit switch is a micro switch, typically used for detecting things like whether a door is closed

Apr 21, 2017 ENGR 40M Spring 2017 — C.Z. Lee, J. Plummer, R. Howe 8

Use the resistance mode of your multimeter to label the pins of your limit switch

• C (common)

• NC (normally closed)

• NO (normally open)

Page 8: Lab 2a Useless box - Stanford University · Lab 2a Useless box ENGR 40M Chuan-Zheng Lee Stanford University 21 April 2017. Switches •A switch is a component that makes or breaks

Motors

• A motor uses electromagnetism to convert electrical energy into rotational movement

• You have a DC brush motor (most common type)

• The input polarity determines the direction

Apr 21, 2017 ENGR 40M Spring 2017 — C.Z. Lee, J. Plummer, R. Howe 9

motor spins in

one direction

motor spins in

the other direction

Page 9: Lab 2a Useless box - Stanford University · Lab 2a Useless box ENGR 40M Chuan-Zheng Lee Stanford University 21 April 2017. Switches •A switch is a component that makes or breaks

Prelab questions P3–P5

Apr 21, 2017 ENGR 40M Spring 2017 — C.Z. Lee, J. Plummer, R. Howe 10

• Measure your battery pack’s voltage.

• Connect the batteries to the motor. Measure the motor’s voltage and current.

• What happens if you grab the output shaft with your fingers?

• What happens if you reverse the voltage polarity?

Page 10: Lab 2a Useless box - Stanford University · Lab 2a Useless box ENGR 40M Chuan-Zheng Lee Stanford University 21 April 2017. Switches •A switch is a component that makes or breaks

What’s in your useless box?

• Battery

• Motor

• DPDT toggle switch

• SPDT momentary limit switch

• pressed when arm is fully retracted

Apr 21, 2017 ENGR 40M Spring 2017 — C.Z. Lee, J. Plummer, R. Howe 11

Page 11: Lab 2a Useless box - Stanford University · Lab 2a Useless box ENGR 40M Chuan-Zheng Lee Stanford University 21 April 2017. Switches •A switch is a component that makes or breaks

Designing the useless box circuit

Apr 21, 2017 ENGR 40M Spring 2017 — C.Z. Lee, J. Plummer, R. Howe 12

We want a circuit that does the following:

Toggle switch Limit switch Motor

“on”

(closer to arm)

[either] “forward”

(coming out)

“off”

(away from arm)

normal

(arm not retracted)

“reverse”

(retracting)

“off”

(away from arm)

pressed

(arm retracted)

stopped

Page 12: Lab 2a Useless box - Stanford University · Lab 2a Useless box ENGR 40M Chuan-Zheng Lee Stanford University 21 April 2017. Switches •A switch is a component that makes or breaks

Prelab question P6

Start by drawing these components:

(Avoid short-circuiting the battery!)

Apr 21, 2017 ENGR 40M Spring 2017 — C.Z. Lee, J. Plummer, R. Howe 13

Page 13: Lab 2a Useless box - Stanford University · Lab 2a Useless box ENGR 40M Chuan-Zheng Lee Stanford University 21 April 2017. Switches •A switch is a component that makes or breaks

Feedback

• Feedback is when you measure the output of a system in order to inform the input.

• It comes in lots of forms, and is one of the most pervasive ideas in engineering design.

• How does the useless box use feedback?

Apr 21, 2017 ENGR 40M Spring 2017 — C.Z. Lee, J. Plummer, R. Howe 14

Page 14: Lab 2a Useless box - Stanford University · Lab 2a Useless box ENGR 40M Chuan-Zheng Lee Stanford University 21 April 2017. Switches •A switch is a component that makes or breaks

Practical matters: Parts

• Each person has enough parts for one box

• You are only required to make one per pair, but you can make two if you like

• We’ll be adding an Arduino next week, so one strategy is to make a basic box this week, and then a new box for the Arduino next week

• If you use the same box both weeks, you’ll need to rewire some things (which isn’t hard)

Apr 21, 2017 ENGR 40M Spring 2017 — C.Z. Lee, J. Plummer, R. Howe 15

Page 15: Lab 2a Useless box - Stanford University · Lab 2a Useless box ENGR 40M Chuan-Zheng Lee Stanford University 21 April 2017. Switches •A switch is a component that makes or breaks

Practical matters: Wiring

• If you want to rewire the same box next week, you can solder just one end of wires to switch contacts, and plug the other end into a breadboard.

• Breadboard connections in yellow:

Apr 21, 2017 ENGR 40M Spring 2017 — C.Z. Lee, J. Plummer, R. Howe 16