Differences

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

group3:group3final 2008/12/08 19:42 group3:group3final 2008/12/09 01:15 current
Line 22: Line 22:
=== Sending Structure === === Sending Structure ===
-The laser's wavelength was decided early on. First, red lasers are very common, so, for the sake of the budget, the cheaper solution would be favored. At the same time, any infrared sources would be very difficult to align over long distances. Finally, most photodiodes and phototransistors are designed to mimic the human eye, which has a spectrum across all visible light, but focused around red.+The laser's wavelength was decided early on. First, red lasers are very common, so, for the sake of the budget, the cheaper solution would be favored. At the same time, any infrared sources would be very difficult to align over long distances. Finally, most low-cost photodiodes and phototransistors, while designed to operate in the near-infrared around 800-900 nm, also have a fairly strong sensitivity to the 650 nm red light produced by low-cost diode lasers.
-The method of mounting a laser in an adjustable manner was often overlooked in the project. From the development of the project in the lab, this was generally accomplished with a clamp, which provided some rotational movement for the laser, and books for the clamp to sit on if height were needed. The first actual solution for the project was the miniature tripod that was used in the final design.+The method of mounting a laser in an adjustable manner was often overlooked in the project. During the development of the project in the lab, this was generally accomplished with a clamp, which provided some rotational movement for the laser, and books for the clamp to sit on if height were needed. The first actual solution for the project was the miniature tripod that was used in the final design.
=== PC Communication === === PC Communication ===
Line 30: Line 30:
The send and receive circuits were initially going to communicate with each computer by use of a programmable microcontroller. This would allow for faster transfers, since the microcontroller could partially interpret the incoming data before passing it to the computer. However, the microcontroller did not end up being the speed bottleneck of the design, which was slowed mostly by the phototransistor's rise time. Also, since the microcontroller would theoretically speed up the process by interpreting the laser modulated signal as characters before handing it to the receiving computer, it would not be useful for pictures, where speed was important. In the end, the simplest idea was a direct link to the RS-232 port from the send and receive circuits. The send and receive circuits were initially going to communicate with each computer by use of a programmable microcontroller. This would allow for faster transfers, since the microcontroller could partially interpret the incoming data before passing it to the computer. However, the microcontroller did not end up being the speed bottleneck of the design, which was slowed mostly by the phototransistor's rise time. Also, since the microcontroller would theoretically speed up the process by interpreting the laser modulated signal as characters before handing it to the receiving computer, it would not be useful for pictures, where speed was important. In the end, the simplest idea was a direct link to the RS-232 port from the send and receive circuits.
-There was also the question of how to send and receive pictures. Originally, Hyperterminal would be used, which would be ideal since it came preloaded on all versions of Windows since 1995. Unfortunately, when sending a picture, Hyperterminal relies on being able to receive data back from the receiving computer, handshaking to make sure no bits were lost (known as full duplex). This would be impossible with our system, where one side could only send, and one side could only receive. The options were to either create a double of the send and receive circuit, so the handshaking could occur, or find/write other software that would send a picture without requiring handshaking (known as half duplex). The free program Realterm was discovered that allowed half duplex file transfer.+There was also the question of how to send and receive pictures. Originally, Hyperterminal would be used, which would be ideal since it came preloaded on all versions of Windows since 1995. Unfortunately, when sending a file such as a picture, Hyperterminal relies on being able to receive data back from the receiving computer, handshaking to make sure no bits were lost (known as full duplex). This would be impossible with our system, where one side could only send, and one side could only receive. The options were to either create a double of the send and receive circuit, so the handshaking could occur, or find/write other software that would send a picture without requiring handshaking (known as half duplex). The free program Realterm was discovered that allowed half duplex file transfer.
===== 3.Final Design ===== ===== 3.Final Design =====
-This description refers to the design as it was actually completed and not as it was originally conceived; hence, final design.  The free-space optical system designed by Group 3 is a computer-to-computer system.  This allows for the user interface to be handled by the computers, simplifying design and allowing for better integration with existing hardware.  After all, most people own a computer.  The final design has three basic components: an optical transmission channel to send data over, transceiver electronics to convert between electrical data and optical signals, terminal software used by the computer to control the communication system, and the mechanical assembly on which the components are mounted.  Each section will be discussed in detail.+This description refers to the design as it was actually completed and not as it was originally conceived; hence, final design.  The free-space optical system designed by Group 3 is a computer-to-computer system.  This allows for the user interface to be handled by the computers, simplifying design and allowing for better integration with existing hardware.  After all, most people own a computer.  The final design has four basic components: an optical transmission channel to send data over, transceiver electronics to convert between electrical data and optical signals, terminal software used by the computer to control the communication system, and the mechanical assembly on which the components are mounted.
==== Optical Design ==== ==== Optical Design ====
The optical communication channel is very simple, since this is intended to be a short-range free-space optics system, and is almost identical in its final form to the original design.  As this is only a demonstration system, it operates in a half-duplex mode.  This means that the communication channel is one-way: one end can only send data, and the other can only receive.  As such, only one receiver and one transmitter were needed. The optical communication channel is very simple, since this is intended to be a short-range free-space optics system, and is almost identical in its final form to the original design.  As this is only a demonstration system, it operates in a half-duplex mode.  This means that the communication channel is one-way: one end can only send data, and the other can only receive.  As such, only one receiver and one transmitter were needed.
-An ordinary "dollar variety" 650 nm red diode laser pointer is used as a transistor.  This laser was chosen for its low cost, easy availability, and design simplicity.  The red wavelength is also less strongly absorbed by the atmosphere than shorter wavelengths.  The use of a laser also simplifies the optics of the transmission channel.  If the design had used an LED source instead, collimating optics would have been required to shape the output into a focused beam capable of traversing a long distance.+An ordinary "dollar variety" 650 nm red diode laser pointer is used as a transmitter.  This laser was chosen for its low cost, easy availability, and design simplicity.  The red wavelength is also less strongly absorbed by the atmosphere than shorter wavelengths.  The use of a laser also simplifies the optics of the transmission channel.  If the design had used an LED source instead, collimating optics would have been required to shape the output into a focused beam capable of traversing a long distance.
Unfortunately, this type of laser pointer suffers from reliability issues as well as highly variable beam quality.  A large number of backup and replacement lasers were purchased against the possibility of laser diode failure.  In order to simplify alignment, and account for the poor quality (high divergence) of some of the laser beams, a basic positive lens was used to focus the light onto the photosensor.  The lens selected was a "dollar variety" magnifying glass.  This lens was selected due to its low cost, fairly large area, and easy availability.  The photosensor is located at the focal point of this lens, which was experimentally determined to be approximately 34 cm from its center.  The lens then directs a laser beam entering at a normal incidence to any portion of its surface onto the photosensor. Unfortunately, this type of laser pointer suffers from reliability issues as well as highly variable beam quality.  A large number of backup and replacement lasers were purchased against the possibility of laser diode failure.  In order to simplify alignment, and account for the poor quality (high divergence) of some of the laser beams, a basic positive lens was used to focus the light onto the photosensor.  The lens selected was a "dollar variety" magnifying glass.  This lens was selected due to its low cost, fairly large area, and easy availability.  The photosensor is located at the focal point of this lens, which was experimentally determined to be approximately 34 cm from its center.  The lens then directs a laser beam entering at a normal incidence to any portion of its surface onto the photosensor.
Line 61: Line 61:
In order to interface between the computer, which sends electrical signals, and an optical communication channel, transceiver electronics are required.  In the case of a half-duplex system such as this one, one computer needs to be able to transmit data using the laser, and the other must be able to receive and recognize data based on the phototransistor signals.  The group decided to use the computer's serial port interface (RS-232 standard) due to the software and electronic simplicity of communications via the serial port.  The maximum speed of ordinary RS-232 serial communication is 115.2 kilobits per second, which is sufficient to send text or smaller pictures in a reasonable amount of time.  The transceiver was designed with this data-rate in mind. In order to interface between the computer, which sends electrical signals, and an optical communication channel, transceiver electronics are required.  In the case of a half-duplex system such as this one, one computer needs to be able to transmit data using the laser, and the other must be able to receive and recognize data based on the phototransistor signals.  The group decided to use the computer's serial port interface (RS-232 standard) due to the software and electronic simplicity of communications via the serial port.  The maximum speed of ordinary RS-232 serial communication is 115.2 kilobits per second, which is sufficient to send text or smaller pictures in a reasonable amount of time.  The transceiver was designed with this data-rate in mind.
-When a computer sends data over the serial port, it uses a protocol called UART (Universal Asynchronous Receiver Transmitter).  In this protocol, a byte of data (8 bits) is represented as 10 bits: a start bit, 8 data bits, and a stop bit.  Each bit (a binary 0 or 1) is represented as either a high or low logic level voltage on the TX (transmit) pin of the RS-232 connector.  The logic levels for RS-232 are +11.6 V high and -11.6 V low, but in practice the receive (RX) pin will recognize much lower swing voltages of +/- 9 V or less.  The signal that must be sent using the laser is an alternating train of positive and negative voltages, with variable-length gaps between 10-bit pulse trains.  Since each bit is either a high or low state, a single period of the square wave contains two bits, and the frequency of the transmission can be approximated as being half of the bit rate, or 50-60 kHz.+The serial port uses a protocol called UART (Universal Asynchronous Receiver Transmitter).  In this protocol, a byte of data (8 bits) is represented as 10 bits: a start bit, 8 data bits, and a stop bit.  Each bit (a binary 0 or 1) is represented as either a high or low logic level voltage on the TX (transmit) pin of the RS-232 connector.  The logic levels for RS-232 are +11.6 V high and -11.6 V low, but in practice the receive (RX) pin will recognize much lower swing voltages of +/- 9 V or less.  The signal that must be sent using the laser is an alternating train of positive and negative voltages, with variable-length gaps between 10-bit pulse trains.  Since each bit is either a high or low state, a single period of the square wave contains two bits, and the maximum frequency of the transmission can be approximated as being half of the bit rate, or 50-60 kHz.
-It was decided that the data being sent would be encoded using a basic on-off keying (OOK) method.  High and low voltages from the RS-232 cable are represented by the on or off state of the laser.  Since the TX pin idles at low logic level (about -12 V), it was decided that a logic low would correspond to the laser being on.  This means that the laser will be on when no data is being sent, simplifying physical alignment of the laser and detector.  A logic high turns off the laser, causing a change in the phototransistor current that can be interpreted by the receive circuit.+The design encodes data using a basic on-off keying (OOK) method.  High and low voltages from the RS-232 cable are represented by turning the laser on or off.  Since the TX pin idles at low logic level (about -12 V), it was decided that a logic low would correspond to the laser being on.  This means that the laser will be on when no data is being sent, simplifying physical alignment of the laser and detector.  A logic high turns off the laser, causing a change in the phototransistor current that can be interpreted by the receive circuit.
Ordinary laser diodes such as the one being used operate on about 30-40 mA at 4.5 V, and the voltage can be applied in only one direction.  The output of the serial cable, which switches between +/- 12 V and operates at a very low level of current, is therefore not suitable to drive the laser directly.  The transmitter circuit is built on a breadboard, and consists of an IRFD9010 P-channel power MOSFET, a 47-ohm current limiting resistor, a 39k-ohm gate resistor, 3 AA batteries in a battery holder to provide a 4.5-5 V supply, and of course, the laser itself.  Below are a circuit diagram and picture of the transmit circuit. Ordinary laser diodes such as the one being used operate on about 30-40 mA at 4.5 V, and the voltage can be applied in only one direction.  The output of the serial cable, which switches between +/- 12 V and operates at a very low level of current, is therefore not suitable to drive the laser directly.  The transmitter circuit is built on a breadboard, and consists of an IRFD9010 P-channel power MOSFET, a 47-ohm current limiting resistor, a 39k-ohm gate resistor, 3 AA batteries in a battery holder to provide a 4.5-5 V supply, and of course, the laser itself.  Below are a circuit diagram and picture of the transmit circuit.
{{:group3:transmitter2.jpg|}} {{:group3:dsc00049.jpg?500x375|}} {{:group3:transmitter2.jpg|}} {{:group3:dsc00049.jpg?500x375|}}
- 
-The 5 V battery power supply is not shown in the picture, but the red and black leads entering from the upper right corner are from the supply and are plugged into the + and - rails of the breadboard during operation.  The laser is also not shown in the picture.  The two unconnected purple leads in the center of the picture are where it would be connected in.  The laser pointer is opened and the batteries are removed.  Two gator clips are connected to the spring (- terminal) and case (+ terminal) of the diode, and the other ends of these are attached to the purple leads, with the - terminal connected directly to ground. 
The P-channel MOSFET is "on" (drain-source channel acts as a short) when its gate is pulled low relative to the source.  In this circuit, the source is connected directly to the 5 V rail, and the TX pin of the DB9 RS-232 cable (Pin 2) is connected to the gate.  A low logic voltage from the TX pin turns the transistor on, opening the circuit and allowing current to flow through the channel and then through the laser to ground.  When the gate is pulled high relative to the source (such as by a +12 V RS-232 high), the MOSFET is "off", and acts as an open circuit.  This prevents current from the batteries from flowing and turns the laser off.  Pin 5 (ground) of the DB9 cable is connected to the negative (0 V) terminal of the batteries to establish a common ground between the circuit and the cable. The P-channel MOSFET is "on" (drain-source channel acts as a short) when its gate is pulled low relative to the source.  In this circuit, the source is connected directly to the 5 V rail, and the TX pin of the DB9 RS-232 cable (Pin 2) is connected to the gate.  A low logic voltage from the TX pin turns the transistor on, opening the circuit and allowing current to flow through the channel and then through the laser to ground.  When the gate is pulled high relative to the source (such as by a +12 V RS-232 high), the MOSFET is "off", and acts as an open circuit.  This prevents current from the batteries from flowing and turns the laser off.  Pin 5 (ground) of the DB9 cable is connected to the negative (0 V) terminal of the batteries to establish a common ground between the circuit and the cable.
-A 47-ohm resistor in series with the laser dissipates some power, limits current, and reduces voltage at the laser, prolonging the life of the diode.  This is especially necessary with battery power; 3 new AA batteries can provide up to 5.5 V, which was found to quickly wear out a cheap laser diode.  The 39k-ohm gate resistor prevents static discharge damage to the gate of the MOSFET by providing a path for excess negative charge on the gate to flow to the positive terminal of the battery.  The large value of the gate resistor ensures that the voltage at the gate is not fixed at +5 V during data transmission.+A 47-ohm resistor in series with the laser dissipates some power, limits current, and reduces voltage at the laser, prolonging the life of the diode.  This is especially necessary with battery power; 3 new AA batteries can provide up to 5.5 V, which was found to quickly wear out a cheap laser diode.  The 39k-ohm gate resistor prevents static discharge damage to the gate of the MOSFET by providing a path for excess negative charge on the gate to flow to the positive terminal of the battery.  Because the gate resistor has a large value, the MOSFET gate is only weakly pulled toward +5 V.  This is so external sources such as the cable's TX pin can change the gate voltage.
The task of the receive circuit is somewhat more complicated.  The receive circuit must take the presence or absence of photocurrent through the phototransistor and convert it back into the +/- 12 V logic levels corresponding to the original transmission.  Actually, owing to the much easier availability of 9 V batteries, the circuit outputs a +/- 9 V logic signal instead.  As mentioned earlier, this is sufficient to be recognized by the serial port as valid data.  A diagram and picture of the receiving circuit are shown below. The task of the receive circuit is somewhat more complicated.  The receive circuit must take the presence or absence of photocurrent through the phototransistor and convert it back into the +/- 12 V logic levels corresponding to the original transmission.  Actually, owing to the much easier availability of 9 V batteries, the circuit outputs a +/- 9 V logic signal instead.  As mentioned earlier, this is sufficient to be recognized by the serial port as valid data.  A diagram and picture of the receiving circuit are shown below.
Line 82: Line 80:
Two 9 V batteries are used to provide power and +/- 9 V levels.  The upper positive rail of the breadboard is at +9 V.  The upper negative and lower positive rails are connected together and are at 0 V.  The lower negative rail is at -9 V.  The two batteries are effectively in series, with the point between the two being used to provide a 0 V reference. Two 9 V batteries are used to provide power and +/- 9 V levels.  The upper positive rail of the breadboard is at +9 V.  The upper negative and lower positive rails are connected together and are at 0 V.  The lower negative rail is at -9 V.  The two batteries are effectively in series, with the point between the two being used to provide a 0 V reference.
-The sensor must be provided power using a biasing circuit (at left in picture).  The emitter (orange lead with black flag in the picture) is connected directly to ground, and the collector is connected through a bias resistor (Rb) to the positive (+9 V) rail.  The value of this resistor is important; since the phototransistor acts as a current source, a larger resistance produces a greater voltage shift in response to light, but also lengthens the response time.  Due to the high optical power of the lens-focused laser beam and the sensitivity of the RPM-075PT, even a small 100-ohm resistor can produce up to 4-V peak-to-peak voltage swing between laser on and off levels at the collector, which is a very large signal.  According to the transistor datasheet, the rise or fall time with 100 ohms is about 10 microseconds.  Since the up-down period of a 60 kHz signal is about 17 microseconds, it proved necessary to use the second-highest (56 kbps, or 28 kHz) data rate to avoid inter-symbol interference and lost bits.+The sensor must be provided power using a biasing circuit (at left in picture).  The emitter is connected directly to ground, and the collector is connected through a bias resistor (Rb) to the positive (+9 V) rail.  The value of this resistor is important; since the phototransistor acts as a current source, a larger resistance produces a greater voltage shift in response to light, but also lengthens the response time.  Due to the high optical power of the lens-focused laser beam and the sensitivity of the RPM-075PT, even a small 100-ohm resistor can produce up to 4-V peak-to-peak voltage swing between laser on and off levels at the collector, which is a very large signal.  According to the transistor datasheet, the rise or fall time with 100 ohms is about 10 microseconds.  Since the up-down period of a 60 kHz signal is about 17 microseconds, it proved necessary to use the second-highest (56 kbps, or 28 kHz) data rate to avoid inter-symbol interference and lost bits.
Next, it is necessary to convert the alternating 8.5/4.5 V level at the collector output to RS-232 logic levels.  This is accomplished using a comparator.  The signal is compared against a reference level, and the comparator "decides" to switch its output high or low depending on which voltage is higher.  The LM311 comparator used in the design has an open-collector output, so when the inverting input (the signal, or pin 3) is lower than the non-inverting input (the reference, or pin 2), the comparator is an open circuit, and the collector output (pin 7) is pulled high to +9 V.  If pin 3 is higher than pin 2, the comparator becomes a short-circuit to -9 V.  Pin 1 (emitter output) is connected to -9 V rather than ground so the output will switch low to -9 V.  To avoid short-circuiting the source through the comparator output, a pull-up resistor (Rp, 1.5k-ohms) is connected between pin 7 (collector output) and the +9 V rail.  The value of the pull-up resistor was chosen to keep the current to a reasonable level; 18 V dropping across 1.5k-ohm produces 12 mA of current, which is safe for the comparator. Next, it is necessary to convert the alternating 8.5/4.5 V level at the collector output to RS-232 logic levels.  This is accomplished using a comparator.  The signal is compared against a reference level, and the comparator "decides" to switch its output high or low depending on which voltage is higher.  The LM311 comparator used in the design has an open-collector output, so when the inverting input (the signal, or pin 3) is lower than the non-inverting input (the reference, or pin 2), the comparator is an open circuit, and the collector output (pin 7) is pulled high to +9 V.  If pin 3 is higher than pin 2, the comparator becomes a short-circuit to -9 V.  Pin 1 (emitter output) is connected to -9 V rather than ground so the output will switch low to -9 V.  To avoid short-circuiting the source through the comparator output, a pull-up resistor (Rp, 1.5k-ohms) is connected between pin 7 (collector output) and the +9 V rail.  The value of the pull-up resistor was chosen to keep the current to a reasonable level; 18 V dropping across 1.5k-ohm produces 12 mA of current, which is safe for the comparator.
Line 88: Line 86:
The reference level (pin 2) is provided by AC-coupling the collector output.  Capacitor Cf (10 nF) and resistor Rf (2.7k-ohm) form a simple high-pass RC filter, with a cutoff frequency selected to be well below the 28 kHz operating frequency at about 5.9 kHz.  The capacitor blocks out the DC component of the collector voltage waveform, changing it from 8.5/4.5 V oscillation to about +2/-2 V oscillations.  The output of the filter is connected to the pin 3 inverting input of the LM311.  Since the oscillations of the voltage are now centered at 0 V, we can simply reference pin 2 (non-inverting input) to ground to provide a decision threshold, and a -2 V comparator input (laser on) produces a +9 V output. The reference level (pin 2) is provided by AC-coupling the collector output.  Capacitor Cf (10 nF) and resistor Rf (2.7k-ohm) form a simple high-pass RC filter, with a cutoff frequency selected to be well below the 28 kHz operating frequency at about 5.9 kHz.  The capacitor blocks out the DC component of the collector voltage waveform, changing it from 8.5/4.5 V oscillation to about +2/-2 V oscillations.  The output of the filter is connected to the pin 3 inverting input of the LM311.  Since the oscillations of the voltage are now centered at 0 V, we can simply reference pin 2 (non-inverting input) to ground to provide a decision threshold, and a -2 V comparator input (laser on) produces a +9 V output.
-If the circuit were operating continuously, we could simply connect pin 2 to ground directly.  But there are periods (such as during alignment, or when no data is being sent) when the collector voltage is fairly constant.  In this situation, Cf discharges through Rf to ground, and the comparator input (pin 3) becomes 0 V.  Since the reference input (pin 2) is also at 0 V, the comparator becomes "confused", switching rapidly between high and low with the small fluctuations in the inputs.  The design resolves this using two resistors, Rh1 and Rh2.+If the circuit were operating continuously, we could simply connect pin 2 to ground directly.  But there are periods (such as during alignment, or when no data is being sent) when the collector voltage is fairly constant.  In this situation, Cf discharges through Rf to ground, and the comparator input (pin 3) becomes 0 V.  Since the reference input (pin 2) is also at 0 V, the comparator becomes "confused", switching rapidly between high and low with the small fluctuations in the inputs.  The design resolves this using a simple hysteresis implemented using two resistors, Rh1 and Rh2.
-Rh1 and Rh2 cause the reference level (pin 2) to shift depending on the output state (pin 7).  Since Rh2 is connected between the output and pin 2, and Rh1 between pin 2 and ground, the voltage at the reference pin 2 will be related to the output voltage by the ratio Rh1/Rh2.  Since the input signal swing is about +/- 2 V, and the output swing is about +/- 9 V, Rh1 (2.2k) is chosen to be about 50 times smaller than Rh2 (100k), providing about 0.2 V of hysteresis.  When the laser first strikes the phototransistor, it generates a current and the collector voltage drops.  This causes pin 3 to go below the 0 V reference, and the output switches high.  This sets the reference to be +0.2 V (1/50 of the output), where it will stay.  Thus, when Cf on pin 3 drains to 0 V, the output will stay high, since 0 V is still below 0.2 V.  And when the laser turns off, the collector voltage goes high, producing a +2 V level on pin 3 and switching the output low, as desired.+Rh1 and Rh2 cause the reference level (pin 2) to shift depending on the output state (pin 7).  Since Rh2 is connected between the output and pin 2, and Rh1 between pin 2 and ground, the voltage at the reference pin 2 will be related to the output voltage by the ratio Rh1/Rh2.  The input signal swing is about +/- 2 V, and the output swing is +/- 9 VRh1 (2.2k) was chosen to be about 50 times smaller than Rh2 (100k), providing around 0.2 V (9*2.2/100) of hysteresis.  When the laser first strikes the phototransistor, it generates a current and the collector voltage drops.  This causes pin 3 to go down to about -2 V, and the output switches high.  This sets the reference to be +0.2 V (1/50 of the output).  Thus, when Cf on pin 3 drains to 0 V, the output will stay high, since 0 V is still well below 0.2 V.  When the laser turns off at the start of a transmission, the collector voltage goes up to 8.5 V and pin 3 goes to +2 V, exceeding the reference level and switching the output low.
The second integrated circuit is a dual 4-input NAND gate MCP14012 being used as an inverter.  With the laser on, the comparator output will normally idle high because of the hysteresis voltage.  This is undesirable, as since the TX pin on a DB9 cable idles low, the RX pin expects to see a low logic level when no data is being sent.  This also means that the comparator output is inverted relative to the original signal.  To resolve this, the comparator output is connected to the 4 inputs of one of the MCP14012's NAND gates.  The gate logic causes the output to switch low when all 4 inputs are high, and otherwise switch high.  So the comparator output is inverted by the NAND gate and connected to pin 3 (RX) of the RS-232 cable.  As with the transmitter circuit, pin 5 (ground) of the cable is connected to circuit ground, to establish common ground between the circuit and the computer. The second integrated circuit is a dual 4-input NAND gate MCP14012 being used as an inverter.  With the laser on, the comparator output will normally idle high because of the hysteresis voltage.  This is undesirable, as since the TX pin on a DB9 cable idles low, the RX pin expects to see a low logic level when no data is being sent.  This also means that the comparator output is inverted relative to the original signal.  To resolve this, the comparator output is connected to the 4 inputs of one of the MCP14012's NAND gates.  The gate logic causes the output to switch low when all 4 inputs are high, and otherwise switch high.  So the comparator output is inverted by the NAND gate and connected to pin 3 (RX) of the RS-232 cable.  As with the transmitter circuit, pin 5 (ground) of the cable is connected to circuit ground, to establish common ground between the circuit and the computer.
 +Note that although the RS-232 cables being used in the project have 9 pins, only 2 are actually connected to either the transmit or receive circuit.  The other 7 pins are used for hardware handshaking in serial communications.  Since it is impractical to build a system with 8 lasers and receiver just to implement hardware handshaking, the handshaking must be turned off when using the system.  Fortunately, most terminal software includes an option to "Remove Hardware Flow Control", which causes the computer to ignore the levels on the handshaking pins and simply "assume" there is a connection.
===== 4.Proof of Principle ===== ===== 4.Proof of Principle =====
Line 102: Line 101:
{{:group3:fso_concept_2.png?600x300|}} {{:group3:fso_concept_2.png?600x300|}}
-The optical test involved the proof that the optical sending and receiving components could modulate respond to signals at frequencies high enough to transmit data(the tested speed was 50kHZ). The test was attempted inside over a distance of around 8m. The proof had been completed prior to the day of testing, however,  due to the unforeseen failure of three laser pointers, the test had to be completed by using a LED to show that the receiver had the capability to respond at the speed required. A different laser had to be used to prove detection because of the lack of a functioning laser which could modulate. The different laser was modulated at a slower speed and detected at a lower speed which proved the principle for the transmission end.  These together proved transmission and detection.+The optical test proved that the optical sending and receiving components could be modulated/respond to signals at frequencies high enough to transmit data(the tested speed was 50kHZ). The test was attempted inside over a distance of around 8m. The proof had been completed prior to the day of testing, however,  due to the unforeseen failure of three laser pointers, the test had to be completed by using a LED to show that the receiver had the capability to respond at the speed required. A different laser had to be used to prove detection because of the lack of a functioning laser which could modulate. The different laser was modulated at a slower speed and detected at a lower speed which proved the principle for the transmission end.  These together proved transmission and detection.  The source and resistor connected to the phototransistor represent an early version of the biasing circuit.
=== Electrical Proof of Principle === === Electrical Proof of Principle ===
Line 108: Line 107:
{{:group3:concept_3.jpg|}} {{:group3:concept_3.jpg|}}
-The electronic test was an evaluation of what eventually became the entire transceiver circuit, excepting the inverter and computer interface components.  The circuit designed for the test proved that a digital signal imitating a UART transmission could be obtained from the analog output of the phototransistor. This was completed with a comparator with hysteresis and an RC High Pass filter in front of it. The test was completed without the use of a microcontroller which greatly simplified the task. The day of testing went well and the group successfully obtained digital outputs from analog signals. +The electronic test was an evaluation of what eventually became the entire transceiver circuit, excepting the inverter and computer interface components.  Instead, a function generator was used to "transmit" and the output of the receive circuit was monitored using an oscilloscope.  The circuit designed for the test proved that a digital signal imitating a UART transmission could be obtained from the analog output of the phototransistor. This was completed with a comparator with hysteresis and an RC High Pass filter in front of it. The test was completed without the use of a microcontroller which greatly simplified the task. The day of testing went well and the group successfully obtained digital outputs from analog signals.  At this stage both the transmit and receive circuits were being powered using lab DC power supplies .
===== 5.Completed Product ===== ===== 5.Completed Product =====
-The completed product can be seen below, or, in more detail, in the photos above. The parts list for components used is contained in the budget list. The important and critical devices involved include the laser, the p channel MOSFET, the computers with serial cables, the Mounting and aligning equiptment, the Tube and filter for noise reduction, the lens for focusing the light, the AC filter for signal isolation, the Comparator for Analog to Digital conversion, and the Inverter for inverting the signal. The total cost for construction is a theoretical $63.90. +The completed product can be seen below, or, in more detail, in the photos above. The parts list for components used is contained in the budget list. The important and critical devices involved include the laser, batteries to supply power, the p channel MOSFET, the computers with serial cables, the Mounting and aligning equipment, the Tube and filter for noise reduction, the lens for focusing the light, the AC filter for signal isolation, the Comparator for Analog to Digital conversion, and the Inverter for inverting the signal. The total cost for construction is a theoretical $63.90. 
{{:group3:dsc00042.jpg?800x600|}} {{:group3:dsc00042.jpg?800x600|}}
 +
 +Close-ups of some of the components are shown below.
 +
 +==== Transmit Circuit ====
 +{{:group3:dsc00049.jpg?640x480|}}
 +
 +The computer interfaces to the transmit circuit directly, via the RS-232 cable at left in the picture.  The circuit controls the laser through two wires attached to the pair of unconnected purple leads in the photo, and is powered by three AA batteries in series.  The negative terminal (spring) of the laser connects to the purple lead going to the negative rail of the board.  For a more detailed discussion of the operation of the transmit circuit, see Section 3: Final Design.  The 5 V battery power supply is not shown in the picture, but the red and black leads entering the photo from the upper right corner are from the supply and are plugged into the + and - rails of the breadboard during operation.
 +
 +==== Laser Mount ====
 +{{:group3:dsc00048.jpg?640x480|}}
 +
 +The laser mount is a small tripod intended to be used as a mount for a webcam.  The tripods are available for $1 at most dollar stores.  Although the laser mount holds three lasers, only one is operating at a given time.  The other two are there as spares.  All three pointers have been opened and their batteries removed.  The two wires are clipped onto the spring (-) and case (+) of the pointer, simulating the contact points of the batteries. Also visible in the background is the 3-battery 5 V supply used for the transmit circuit, made by shorting one of the battery slots of a 4-AA battery holder.
 +
 +==== Receiver Housing and Mount ====
 +{{:group3:dsc00044.jpg?500x375|}}{{:group3:dsc00050.jpg?500x375|}}
 +
 +The phototransistor and lens are mounted using plastic cement in a length of 3" ABS pipe.  The pipe has a hatch in the rear that can be opened to perform visual alignment of the laser.  The pipe is attached using duct tape and a few screws to the baking sheet being used as a receiver mount.  The baking sheet has four large screws at its corners, mounted using blocks of styrofoam underneath the baking sheet, that can be used to control height and tilt the receiver during alignment.  For all the duct tape, the alignment system is fairly solid and can be used to make quite precise adjustments to the position of the laser spot.  For further discussion of the optical components of the system, see Section 3: Final Design.
 +
 +
 +==== Receive Circuit ====
 +{{:group3:dsc00047.jpg?640x480|}}
 +
 +The receive circuit interfaces to the computer directly, via the RS-232 cable at right in the picture.  The phototransistor interfaces to the circuit by attaching connecting wires with gator clips to the orange leads on the biasing circuit (at left in the picture).  One of the leads is flagged with electrical tape to identify that this is where the transistor's emitter should be connected.  The receive circuit is powered by two 9 V batteries, at bottom in the picture.  For a more detailed discussion of the operation of the receive circuit, see Section 3: Final Design.
 +
 +
===== 6.Demonstration and Evaluation ===== ===== 6.Demonstration and Evaluation =====
The Demonstration and Evaluation of the project was done over two testing days. The first was an indoors test, and the second was an outdoors test. On both days, the test was a complete success. For the indoor test, the alignment was fast and the project worked right away and only malfunctioned when people walked across the beam during transmission of a file. When this occurred, the photo sent would contain Grey rows where information was lost. For the outdoors test, the alignment was more difficult due to low temperature conditions. The beam spot was also difficult to see due to the failure of 2 lasers the day before the test and the use of a high divergence laser on the day of testing. Nevertheless, the alignment was completed and the project worked again despite the higher amount of background light. This proved that the tube and the red filter were sufficient for blocking light. The Demonstration and Evaluation of the project was done over two testing days. The first was an indoors test, and the second was an outdoors test. On both days, the test was a complete success. For the indoor test, the alignment was fast and the project worked right away and only malfunctioned when people walked across the beam during transmission of a file. When this occurred, the photo sent would contain Grey rows where information was lost. For the outdoors test, the alignment was more difficult due to low temperature conditions. The beam spot was also difficult to see due to the failure of 2 lasers the day before the test and the use of a high divergence laser on the day of testing. Nevertheless, the alignment was completed and the project worked again despite the higher amount of background light. This proved that the tube and the red filter were sufficient for blocking light.
- 
===== 7.Budget ===== ===== 7.Budget =====
Parts purchased for the project: Parts purchased for the project:
Line 128: Line 152:
{{:group3:group_3_budget_2.jpg|}} {{:group3:group_3_budget_2.jpg|}}
-Total Cost: $134.64+Additionally, there was a shipping cost of $2.67 for the Digikey order, and a shipping cost of $4.00 for the Newark order. Therefore, the total cost of the project would then be: 
 + 
 +**Total Cost: $141.31** 
 + 
 +The cost to construct the system is a different matter, where only the parts used are included. Essentially the figure is an estimation of the cost to reconstruct the system on a mass scale. Also, shipping costs from Digikey and Newark would not be included, since many sets of parts could be purchased at the same shipping cost.
-Cost to Construct: $63.90+**Cost to Construct: $63.90**

Personal Tools