Presentation is loading. Please wait.

Presentation is loading. Please wait.

Last week’s project demos Servo control with potentiometer and enable/disable buttons Demo in class tonight – don’t start on the next project until I’ve.

Similar presentations


Presentation on theme: "Last week’s project demos Servo control with potentiometer and enable/disable buttons Demo in class tonight – don’t start on the next project until I’ve."— Presentation transcript:

1 Last week’s project demos Servo control with potentiometer and enable/disable buttons Demo in class tonight – don’t start on the next project until I’ve seen this one!

2 More circuit design Sensors – Light

3 The Potentiometer Also known as a “pot” –It’s a dial that can be turned Nothing more than a variable resistor

4 The Photoresistor Like the potentiometer, the photoresistor is a variable resistor Unlike the potentiometer, it is not [directly] human controlled

5 Schematic The schematic shows it as a resistor with light coming into it (note the arrows are opposite those of an LED)

6 Usage We are going to use them just as we did the potentiometer –An RC circuit –Charge the capacitor –Let the capacitor drain through the photoresistor –Value of the photoresistor (and capacitor) will determine the time constant of the circuit

7 Capacitor usage – the RC circuit Potentiometer circuit Photoresistor circuit

8 Test program ' {$STAMP BS2} ' {$PBASIC 2.5} pinno VAR Byte time VAR Word DEBUG "Circuit choice (0: photoresistor, 15: potentiometer): " DEBUGIN DEC pinno DEBUG CLS DO HIGH pinno PAUSE 100 RCTIME pinno, 1, time DEBUG HOME, "discharge time = ", DEC5 time LOOP END

9 Homework Photoresistor control of the servo motor –When there is a “bright” light Blink the LED fast Move the servo motor (back and forth) slow –When there is a “dim” light Blink the LED slow Move the servo motor (back and forth) fast Note: you should not be slamming your servo motor against its limits – use the endpoint estimates that you [should have] measured 2 projects ago

10 Deliverables A state-machine diagram depicting the operation of the system Source code A schematic diagram of the circuit A working demonstration on the Basic Stamp development board (in class)


Download ppt "Last week’s project demos Servo control with potentiometer and enable/disable buttons Demo in class tonight – don’t start on the next project until I’ve."

Similar presentations


Ads by Google