Chapter 6 - Light-Sensitive Navigation with Phototransistors |
Outcomes: By the time you complete this section you will be able to:
Assignments:
|
Videos and Simulations
Activity Videos: |
Example Program Code Activity #1 : Activity #2 : Activity #3 : Activity #4 : |
Key Points or FAQs: How does a phototransistor work? A phototransistor is a light–controlled current valve. It lets more current through with brighter incident light and less current through with less bright light. What is a charge transfer circuit? The charge transfer circuit consisted of a parallel capacitor and phototransistor connected to a pin with a resistor. In the circuit, the pin is used to charge the capacitor. Then, it switched to input and the time it takes the capacitor’s voltage to decay as it lost its charge through the phototransistor is measured. This decay time measurement turns out to be smaller with bright light and larger in shade. What is voltage decay and how can it be used to measure light? Voltage decay is the time it takes for a capacitor to drain down to a known amount. RCTIME is used to measure the voltage decay. It can be used to measure light in conjunction with a phototransistor. Be measuring how long it takes for the capacitor to discharge, we can determine What does the RCTIME command do? The RCTIME command changes the Pin direction from output to input, and then waits for the I/O pin’s state to change, which happens when the voltage the circuit applies to the pin passes its 1.4 V logic threshold. The RCTIME command stores the time measurement result in Variable. What’s the difference between the PWM command and the PULSOUT command? PWM stands for Pulse Wave Modulation. The PWM command applies a rapid sequence of high/low signals to the I/O Pin for certain Duration in ms. This PULSOUT command uses the same process as PWM, but the PWM signal is a more rapid sequence of pulses that’s especially useful for setting voltage across a capacitor through a resistor. What is Ohms’s Law? Explain why it’s useful in electronics. Ohm’s Law says that voltage across a resistor is equal to the current passing through it multiplied by its resistance. For Example: V = I × R Voltage = Current x Resistance This is useful in electronics so that unknown items can be calculated if any two items are known. If you know the voltage and current, you can calculate resistance. What is a capacitor? Why would you use one in electronics? A capacitor is a device that stores electrical charge, and is used is many electric and electronic circuits. Capacitors are like very small Batteries that can be charged and discharged very quickly. What unit are Capacitors measured in? Capacitors are measured in Farads. Farads were originally developed for large electrical devices, but electronics uses very small capacitors, so many capacitors are measured in a millionth (microfarad) or a billionth (picofarad). For Example: 1 microfarad (μF) = one millionth (10-6) of a farad, or 1,000,000 pF, or 1,000 nF; 1 nanofarad (nF) = one billionth (10-9) of a farad, or 1,000 pF; 1 picofarad (pF) = one trillionth (10-12) of a farad. What’s the difference between analog, digital and Binary in terms of the values returned? Analog returns a range of values and can be several thousands of numbers which usually expresses a measurement. Digital values are numbers expressed in digits. Binary are digits that are expressed in either a zero or a one. Why can’t we see infrared light? Light is separated into a full spectrum of wavelengths (think about a rainbow). Infrared light is outside of the wavelengths that the human eye can see. The color spectrum below shows wavelengths that are within the range of the human eye. Notice that it just one small part of the whole wavelength.
|
|||