0% found this document useful (0 votes)
145 views3 pages

Chapter 6 Challenges: Phototransistor Voltage Output Circuit

This document contains questions and exercises related to using a phototransistor voltage output circuit. It asks questions about how a phototransistor works and the components in the circuit. Exercises have the reader calculate values based on the circuit like voltage, current, and capacitor measurements. It also provides projects for Arduino sketches to make a robot respond to light or darkness using a phototransistor circuit.

Uploaded by

api-357589598
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
145 views3 pages

Chapter 6 Challenges: Phototransistor Voltage Output Circuit

This document contains questions and exercises related to using a phototransistor voltage output circuit. It asks questions about how a phototransistor works and the components in the circuit. Exercises have the reader calculate values based on the circuit like voltage, current, and capacitor measurements. It also provides projects for Arduino sketches to make a robot respond to light or darkness using a phototransistor circuit.

Uploaded by

api-357589598
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Chapter 6 Challenges

Phototransistor Voltage Output Circuit

Questions
1. What does a transistor regulate?
The amount of current it allows to pass into its collector and out through its base.
2. Which phototransistor terminals have leads?
The phototransistors collector and emitter terminals are connected to leads.
3. How can you use the flat spot on the phototransistors plastic case to identify its
terminals?
The lead thats closer to the flat spot is the emitter. The lead thats further away from the flat
spot is the collector.
4. Which color would the phototransistor be more sensitive to: red or green?
The wavelength of red is closer to the wavelength of infrared, so it should be more sensitive to
red
5. How does V in the circuit above respond if the light gets brighter?
A3

VA3 increases with more light.


6. What does the phototransistor in the circuit above do that causes V to increase or
A3

decrease?
The phototransistor supplies the resistor with more or less current.
7. How can the circuit above be modified to make it more sensitive to light?
Change the 2 k resistor to a higher value.
8. What happens when the voltage applied to an I/O pin that has been set to input is above
or below the threshold voltage?
If the applied voltage is above the threshold voltage, the input register bit for that pin stores a 1.
If its below threshold voltage, the input register bit stores a 0.
9. If the amount of charge a capacitor stores decreases, what happens to the voltage at its
terminals?
The voltage decreases.
Exercises
1. Solve for V if I = 1 mA in the circuit above.
A3

V = I R = 0.001 A 2000 = 2 V.
2. Calculate the current through the resistor if V in the circuit above is 4.5 V.
A3

V = I R I = V R = 4.5 2000 = 0.00225 A = 2.25 mA.


3. Calculate the value of a capacitor that has been stamped 105.
105 10 with 5 zeros appended and multiplied by 1 pF. 1,000,000 1 pF
= (1 106) (1 1012) F = 1 106 F = 1 F.
4. Write an rcTime statement that measures decay time with pin 7 and stores the result in
a variable named tDecay.
It would be long tDecay = rcTime(7)
5. Calculate what the ndShade measurement would be if the Arduino measures decay
values of 1001 on both sides.
ndShade = tRight / (tLeft+tRight) - 0.5 = 1001 (1001 + 1001) 0.5 = 0.5 0.5 = 0.
6. Write a for loop that displays fifty equal sign characters in the Serial Monitor.
for(int i = 1; i<=50; i++) // Repeat 50 times
{
Serial.print('='); // one = char each time through
}

Projects
1. In Activity 1, the circuit, along with the HaltUnderBrightLight sketch, made the BOE
Shield-Bot stop under a light at the end of the course. What if you will only have a limited time
at a course before a competition, and you dont know the lighting conditions in advance? You
might need to calibrate your BOE Shield-Bot on site. A sketch that makes the piezospeaker beep
repeatedly when the BOE Shield-Bot detects bright light and stay quiet when it detects ambient
light could be useful for this task. Write and test a sketch to do this with the circuit in Activity
1.
/*
* Robotics with the BOE Shield - Chapter 6, Project 1
* Chirp when light is above threshold. Will require updating value of
* threshold & retesting under bright light to get to the right value.
*/

void setup() // Built-in initialization block


{
tone(4, 3000, 1000); // Play tone for 1 second
delay(1000); // Delay to finish tone
}

void loop() // Main loop auto-repeats


{
if(volts(A3) > 3.5) // If A3 voltage greater than 3.5
{
tone(4, 4000, 50); // Start chirping
delay(100);
}
}

float volts(int adPin) // Measures volts at adPin


{ // Returns floating point voltage
return float(analogRead(adPin)) * 5.0 / 1024.0;
}

2. Develop an application that makes the BOE Shield-Bot roam and search for darkness
instead of light. This application should utilize the charge transfer circuits from Building the
Photosensitive Eyes.
Make a copy of LightSeekingShieldBot, then add one command to the loop function: ndShade =
-ndShade. Add it right before the ifelse statement. Then, instead of indicating shade to turn
away from, it indicates bright light to turn away from.
3. Develop an application that makes the BOE Shield-Bot roam toward a bright
incandescent desk lamp in a room where the only other light sources are fluorescent ceiling
lights. The BOE Shield-Bot should be able to roam toward the desk lamp and play a tone when
its under it. This application should use the charge transfer circuits from Building the
Photosensitive Eyes.
// Add this if condition to stop under the bright lamp.
if((tRight + tLeft) < 2000.0) // tLeft+tRight < 1300?
{
servoLeft.detach(); // Stop servo signals
servoRight.detach();
}

You might also like