Differences

This shows you the differences between the selected revision and the current version of the page.

group1:group1start 2008/12/12 09:47 group1:group1start 2008/12/12 09:53 current
Line 94: Line 94:
-==== 2.3 Comparator Circuit ====+==== 2.3 Comparator Circuit as Receiver/Demodulator ==== 
 + 
 +This sub circuit contains the IR receivers which receive the modulated light from the MFGC. The output of the IR receivers can be observed in the second half of theoretical output diagram above defined by the IR receiver, where it is observed that for the time that the envelope frequency is high, the output of the receiver is low, and for the time that it is low, the output of the receiver is high. The output of the IR receivers is essentially a square wave with a high pulse equal in magnitude to the low pulse of the envelope frequency of the MFGC. The RDC can be observed in the following figure. 
 + 
 +{{:group1:receiver_circuit.jpg|}} 
 +Receiver Circuit 
 + 
 +The square wave output from the receivers were too difficult to analyze within the microcontroller. Therefore the addition of the demodulator circuit was necessary in the later creation time of the project. The demodulator circuit, observed above as a PNP BJT, a 1μF capacitor, two 1kΩ resistors,  and a comparator, acts to change the square wave output into a constant high voltage. Initially, if the beams were to be blocked, the square wave output would merely change frequency, however, with the addition of the demodulator circuit, the final output into the microcontroller would be a constant high voltage which only dropped low if the beam were to be blocked. This allowed for much simpler analysis. 
 + 
 +To convert the square wave into a constant high voltage, the demodulator circuit takes the square wave and biases the BJT. Upon doing this, the capacitor is able to charge and discharge periodically within a given voltage window. This capacitor wave form is fed into the positive input of the comparator. In the negative input, a threshold, constant DC voltage is applied. When the circuit is not blocked, the wave form of the capacitor does not drop below the threshold voltage and therefore the output of the comparator remains high. Once the beam is crossed, the capacitor wave form drops below the threshold and causes the output of the comparator to switch to low. This is illustrated in the following figure. 
 + 
 +{{:group1:comparator_inputs.jpg|}} 
 +Inputs of the Comparator 
 + 
 +The jagged wave form in the above figure is the output of the capacitor which is the first input of the comparator. The second input of the comparator is the observed DC voltage at roughly +1.14 volts. Upon crossing the IR beam, the square wave output of the receiver changes frequency, which in turn causes the capacitor to discharge below the previously mentioned threshold voltage. At this point the output on from the comparator switches from high to low. This corresponding output can be viewed as follows. 
 + 
 +{{:group1:receiver_circuit_theoretical_output.jpg|}} 
 +Receiver Output to Microcontroller 
 + 
 +The output seen above is placed into the input of the microcontroller. It is a constant high output until the beam is blocked, where it switches to low. This event is much more easily analyzed by the microcontroller than the square wave. The demodulator circuit is replicated for the second IR receiver output. The comparators used were actually part of a quad comparator integrated circuit provided by Glen Leinweber.  
 + 
 +Again, the DC sources have filter capacitors on them to remove any transient AC ripple voltages. Four AA batteries are used to power this circuit as well. 

Personal Tools