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

Post on 30-May-2020

4 views 0 download

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

Lab 2aUseless box

ENGR 40M

Chuan-Zheng Lee

Stanford University

21 April 2017

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

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

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?

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

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

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)

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

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?

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

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

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

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

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

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