<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://hades.mech.northwestern.edu//api.php?action=feedcontributions&amp;feedformat=atom&amp;user=BrianLesperance</id>
	<title>Mech - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://hades.mech.northwestern.edu//api.php?action=feedcontributions&amp;feedformat=atom&amp;user=BrianLesperance"/>
	<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php/Special:Contributions/BrianLesperance"/>
	<updated>2026-04-16T06:28:54Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.9</generator>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Vibratory_Clock&amp;diff=8633</id>
		<title>Vibratory Clock</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Vibratory_Clock&amp;diff=8633"/>
		<updated>2008-03-21T08:08:34Z</updated>

		<summary type="html">&lt;p&gt;BrianLesperance: /* Design Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Team Members==&lt;br /&gt;
[[Image:team22.jpg|right|Left to right: Brian Lesperance, Jennifer Breger, Daniel Pinkawa|thumb|200px]]&lt;br /&gt;
&lt;br /&gt;
*Jennifer Breger - Mechanical Engineering Class of 2009&lt;br /&gt;
*Brian Lesperance - Electrical Engineering Class of 2008&lt;br /&gt;
*Daniel Pinkawa - Mechanical Engineering Class of 2008&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
The vibratory clock is a horizontal circular platform actuated from below by three speakers placed at the corners of an equilateral triangle.  The vibration of the platform causes a small object (e.g., an IC socket or a coin) to act as an hour &amp;quot;hand&amp;quot; on top of the platform.  The object slides around the circular platform, impelled by friction forces due to the vibration which we can adjust by varying the phase and amplitude of each speaker.  Due to the nodes created by the speaker vibrations, the object will move back to the correct hour if it is moved away.  Our project was provided by Professor Colgate and based upon the research of Professor Lynch.&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
[[Image:theory.jpg|right|Diagram of theory|thumb|300px]]&lt;br /&gt;
&lt;br /&gt;
Through his [http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm research], Professor Lynch discovered that when a platform is rotated about a line beneath it, orthogonal sinks and nodes can be created.  These can be adjusted by placing speaker vibrations at different amplitudes and phases.  This concept can be applied to create a node at any point on the platform, but is most easily explained when two speakers are placed at equal amplitudes and opposite phases, creating a sink between the two speakers.  As illustrated in the diagram, a line sink is created along Line 1 by placing Speaker B and Speaker C at equal amplitude but opposite phases, while holding Speaker A is off. If several small objects were placed on the plate at this point, all the objects would converge to the central line of the plate.   A second line sink, orthogonal to the first, is created along Line 2 by once again placing Speakers B and C at equal amplitudes but this time in phase with each other.  Speaker A is placed at a small amplitude and out of phase with speakers B and C, which moves the line sink slightly away from the edge of the plate.&lt;br /&gt;
&lt;br /&gt;
Lines 1 and 2 in the example create a node at 12 o&amp;#039;clock by alternating between the radial (Line 1) and orthogonal (Line 2) phases (12 o&amp;#039;clock is located above Speaker A).  This concept was the used to create all of the even number nodes on the clock face.  In order to create the nodes at the odd numbers, we slightly changed the amplitudes of the speakers at the previous time until the correct placement was found.&lt;br /&gt;
&lt;br /&gt;
Although theoretically our design should have allowed us to program the clock using symmetry, due to slight imperfections in the design and in the electrical components, we had to use some trial and error methods to place the nodes correctly.  Nonetheless, the theory allowed us to create nodes almost exactly where we wanted them to be.&lt;br /&gt;
&lt;br /&gt;
==Mechanical Design==&lt;br /&gt;
&lt;br /&gt;
The Vibratory clock consists of a wooden base, held up by adjustable legs, three speakers, and a circular platform.  The following material were used to create the design:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Base:&amp;#039;&amp;#039;&lt;br /&gt;
*wood: 16&amp;quot; diameter, 0.75&amp;quot; thick&lt;br /&gt;
*holes: 6&amp;quot; diameter (3 total)&lt;br /&gt;
*adjustable legs: 3 rods: 3/8&amp;quot;-16; 4&amp;quot; long; 6 nuts total&lt;br /&gt;
&lt;br /&gt;
[[Image:speaker_supports.jpg|right|Pylons connecting the speakers to the platform|thumb|300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Speakers:&amp;#039;&amp;#039;&lt;br /&gt;
*3 Pyramid Power PW677X: 300W, 4 Ohms, 6.5&amp;quot; Chrome Subwoofer&lt;br /&gt;
**previously adapted speakers replaced center of speaker with attachments 3&amp;quot; in height and 1/2&amp;quot; hole on top&lt;br /&gt;
**1/2&amp;quot; diameter PVC used to attach previous attachment to platform with a screw&lt;br /&gt;
***held in place by 2 set screws each&lt;br /&gt;
**centers placed 7.125&amp;quot; apart&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Circular Platform&amp;#039;&amp;#039;&lt;br /&gt;
*PVC/Acrylic: 11.75&amp;quot; diameter, 0.25&amp;quot; thick &lt;br /&gt;
**machined on the LaserJet&lt;br /&gt;
**screw holes counter-sunk at 7.125&amp;quot; apart&lt;br /&gt;
*2.875&amp;quot; above wooden base&lt;br /&gt;
*Silver Sharpie used for numbers&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Reasoning for Geometry of Design&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Equilateral Triangle:&amp;#039;&amp;#039;&lt;br /&gt;
By having the speakers equidistant from each other, we were able to create symmetry in our design, which made programming the various nodes much easier.  For example, we were able to use the same theory to find the node at 12 o&amp;#039;clock, 4 o&amp;#039;clock, and 8 o&amp;#039;clock.  If the speakers were not placed equidistant from each other, two speakers placed at equal amplitudes and opposite phases would not have created a sink in the exact middle of the two speakers.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Adjustable Legs:&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
We needed to make the legs adjustable since it is essential that the platform be perfectly level in order for the objects placed on the platform to move in expected patterns.  For example, if one leg is slightly shorter than the other two, the objects placed on the platform would tend to move towards that leg and we could no longer rely on symmetry to program the various nodes due to the effects of gravity.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Height of Platform:&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Through our own experimentation and from [http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm Professor Lynch&amp;#039;s research], we found that we needed to have the pivot point (i.e. the speaker diaphragm) significantly below the platform in order to create sinks.  At one point in the design process, we attempted to create a different pivot point by replacing the PVC with 1/2&amp;quot; outer diameter, 1/4&amp;quot; inner diameter Tygon 2001 tubing that only was able to bend in one point since it had stand-offs and screws inside the tube.  However, this replacement in a sense created two pivot points (the speaker diaphragm and the Tygon), causing the platform to only create sources and not sinks.  In addition, the different height of the pivot point may have also led to the plate acting differently.&lt;br /&gt;
&lt;br /&gt;
==Electrical Design==&lt;br /&gt;
&lt;br /&gt;
[[Image:Circuit_Photo_Team22.jpg|right|thumb|Circuit Board|200px]]&lt;br /&gt;
&lt;br /&gt;
===Component List===&lt;br /&gt;
&amp;lt;table border=1&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Part&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Part No.&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Qty&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Vendor&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Price (Total)&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Microchip 8-bit PIC Microcontroller (U1)&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;PIC18F4520&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Maxim Quad, 2-Wire Serial 8-Bit Digital-to-Analog Converter (U2)&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;MAX520&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[http://www.digikey.com Digi-Key]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$9.28&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Emtel 150W, 12V Power Supply&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;EMV15012V&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Emtel EMV15012V Wiring Kit&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;61-EMV15012VWK&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Legacy Series II 4-channel, 300W Power Amplifier&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;LA160&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Keystone Electronics Snap-Fit 90 PC Phono Jack&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;901K-ND&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[http://www.digikey.com Digi-Key]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$3.81&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Radioshack 6-Ft. Shielded Cable, RCA Plug to RCA Plug&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;42-2367&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[http://www.radioshack.com Radioshack]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$14.97&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;20-ft Monster Cable 16-Gauge Speaker Wire&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;S16-2XLN&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[http://www.radioshack.com Radioshack]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$9.97&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Design Description===&lt;br /&gt;
&lt;br /&gt;
The PIC sends a digitized version of three sine waves to the [[PIC18F4520:_Serial_Digital-to-Analog_Conversion|DAC]] for conversion.  The signal then passes through a LPF filter before going to a power amplifier and finally the speakers themselves, which vibrate the surface plate.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Digital-to-Analog Converter&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The PIC would step through the sampled sine wave, stored in program memory, and send the values to the DAC.  Since we need 3 individual sine waves, we selected the [http://www.maxim-ic.com/quick_view2.cfm/qv_pk/1251 Maxim MAX520], a quad DAC IC.  It uses I&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;C with which our PIC easily interfaces and a simple message protocol.  With I&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;C, normally the protocol describes a start and stop bit.  In between that there are a hardware address byte and subsequent message bytes.  Since there are 3 hardware address pins on this IC up to 8 (2&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;) can be used on a single I&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;C bus.  After the address byte, the first message byte indicates which converter in the quad DAC that the following message is for (software address).  The second message byte is the 8-bit value for the previously selected converter.  Several converters (in the same DAC IC) can be spoken to within the same start and stop bits by simply repeating the software address message and the converter value message for the different converters in a single DAC IC.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Design Evolution&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Originally, our hopes were to use the PIC&amp;#039;s built-in PWM functionality to control the speakers and pass the signal through a low-pass filter to create our sine wave.  Quickly, we realized that method did not give us the control over the amplitude and phase that we needed to create a line sink.  Another idea was to use digital potentiometers in [http://www.maxim-ic.com/appnotes.cfm/appnote_number/559 a configurable all-pass filter] as a second filter, after low-pass filtering a PWM/square wave signal.  This would allow us to control the amplitude and phase response of the filter by controlling the digital potentiometer.  Despite, it&amp;#039;s usefulness, this method was very complex since it would require fine control of the filter and be very susceptible to noise or error.  Our final method, as mentioned previously, involved a Look-Up Table with a full period of a sine wave and a DAC.&lt;br /&gt;
&lt;br /&gt;
===Circuit Diagram===&lt;br /&gt;
&lt;br /&gt;
[[Image:team22_circuit.jpg|center|frame|Vibratory Clock Circuit Diagram|600px]]&lt;br /&gt;
&lt;br /&gt;
==Software Design==&lt;br /&gt;
&lt;br /&gt;
[[media:Team22_code.c|Full Code]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Description&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The PIC has a sine wave stored in program memory in the form of a look-up table (LUT).  The main code simply steps through the LUT and outputs that value to the DAC.  This will create a &amp;quot;stepping&amp;quot; sine wave, which get smoothed out by the passive LPF before the signal is sent to the power amplifier.  There is an interrupt service routine that occurs every .825 seconds to alternate between two orthogonal line sinks, to create a node to which a time piece will go.  Additionally, every 10 seconds within the interrupt, the time is changed in that the position of the node moves to the next hour.  Our code has the hour positions hard coded and simply steps through all of them.  More positions can easily be added for better resolution, which would be useful in an hour hand.&lt;br /&gt;
&lt;br /&gt;
==Results==&lt;br /&gt;
[[Image:VibratoryClock.jpg|right|Bird&amp;#039;s-eye view of the Vibratory Clock|thumb|350px]]&lt;br /&gt;
&lt;br /&gt;
We were able to get our project working so that the plate moves an object placed anywhere on the plate to the correct time and then moves the objects around the clock face, acting as the hour &amp;quot;hand&amp;quot; of a clock.  However, we increased the speed so that it takes about 2 minutes for objects placed on the clock to move around so that it is easy to demonstrate.  Check out the working Vibratory Clock [http://www.youtube.com/watch?v=KhgTNCfdwZw here].&lt;br /&gt;
&lt;br /&gt;
==Reflections==&lt;br /&gt;
&lt;br /&gt;
===Achievements===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;Independent Speaker Control&amp;lt;/b&amp;gt; &amp;amp;mdash; each speaker was able to be controlled entirely independently of the other two in terms of amplitude and phase.&lt;br /&gt;
*&amp;lt;b&amp;gt;Line Sinks&amp;lt;/b&amp;gt; &amp;amp;mdash; objects placed at any point on the platform moved to a point on a single line.&lt;br /&gt;
*&amp;lt;b&amp;gt;Nodes&amp;lt;/b&amp;gt; &amp;amp;mdash; two line sinks were created to move an object at any point on the platform to a single specified point elsewhere on the platform.&lt;br /&gt;
*&amp;lt;b&amp;gt;Clock Face Positioning&amp;lt;/b&amp;gt; &amp;amp;mdash; an object placed on the platform moved to each number of a 12-hour cycle&lt;br /&gt;
&lt;br /&gt;
===Improvements===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;Surface Dependency&amp;lt;/b&amp;gt; &amp;amp;mdash; objects tested in lab moved accurately around the clock face; however, when moved to a different location the objects behaved erratically and no longer told time. In the future the clock should be isolated from its resting surface.&lt;br /&gt;
*&amp;lt;b&amp;gt;Vibration Transmission&amp;lt;/b&amp;gt; &amp;amp;mdash; significant vibrations were transmitted from the speakers into the surface which may have contributed to the previous problem. Damping of the speakers may reduce the effects of this problem.&lt;br /&gt;
*&amp;lt;b&amp;gt;Hour hand Resolution&amp;lt;/b&amp;gt; &amp;amp;mdash; the hour hand moves through twelve positions in a twelve-hour cycle. In a twelve-hour cycle 360 positions (six positions per hour) or 720 positions (twelve positions per hour) would be ideal.&lt;br /&gt;
*&amp;lt;b&amp;gt;Noise&amp;lt;/b&amp;gt; &amp;amp;mdash; simple car audio stereos generated distracting audible noise when vibrating the plate. Ultrasonic voice coil actuators could be used to eliminate this noise.&lt;br /&gt;
&lt;br /&gt;
==Useful Resources==&lt;br /&gt;
&lt;br /&gt;
[http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm Vibration-Induced Frictional Force Fields for Part Manipulation]&lt;br /&gt;
&lt;br /&gt;
[http://www.cs.berkeley.edu/~jfc/dreznik/UPM2000/index.html Universal Planar Manipulator]&lt;/div&gt;</summary>
		<author><name>BrianLesperance</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Vibratory_Clock&amp;diff=8626</id>
		<title>Vibratory Clock</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Vibratory_Clock&amp;diff=8626"/>
		<updated>2008-03-21T08:04:28Z</updated>

		<summary type="html">&lt;p&gt;BrianLesperance: /* Design Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Team Members==&lt;br /&gt;
[[Image:team22.jpg|right|Left to right: Brian Lesperance, Jennifer Breger, Daniel Pinkawa|thumb|200px]]&lt;br /&gt;
&lt;br /&gt;
*Jennifer Breger - Mechanical Engineering Class of 2009&lt;br /&gt;
*Brian Lesperance - Electrical Engineering Class of 2008&lt;br /&gt;
*Daniel Pinkawa - Mechanical Engineering Class of 2008&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
The vibratory clock is a horizontal circular platform actuated from below by three speakers placed at the corners of an equilateral triangle.  The vibration of the platform causes a small object (e.g., an IC socket or a coin) to act as an hour &amp;quot;hand&amp;quot; on top of the platform.  The object slides around the circular platform, impelled by friction forces due to the vibration which we can adjust by varying the phase and amplitude of each speaker.  Due to the nodes created by the speaker vibrations, the object will move back to the correct hour if it is moved away.  Our project was provided by Professor Colgate and based upon the research of Professor Lynch.&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
[[Image:theory.jpg|right|Diagram of theory|thumb|300px]]&lt;br /&gt;
&lt;br /&gt;
Through his [http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm research], Professor Lynch discovered that when a platform is rotated about a line beneath it, orthogonal sinks and nodes can be created.  These can be adjusted by placing speaker vibrations at different amplitudes and phases.  This concept can be applied to create a node at any point on the platform, but is most easily explained when two speakers are placed at equal amplitudes and opposite phases, creating a sink between the two speakers.  As illustrated in the diagram, a line sink is created along Line 1 by placing Speaker B and Speaker C at equal amplitude but opposite phases, while holding Speaker A is off. If several small objects were placed on the plate at this point, all the objects would converge to the central line of the plate.   A second line sink, orthogonal to the first, is created along Line 2 by once again placing Speakers B and C at equal amplitudes but this time in phase with each other.  Speaker A is placed at a small amplitude and out of phase with speakers B and C, which moves the line sink slightly away from the edge of the plate.&lt;br /&gt;
&lt;br /&gt;
Lines 1 and 2 in the example create a node at 12 o&amp;#039;clock by alternating between the radial (Line 1) and orthogonal (Line 2) phases (12 o&amp;#039;clock is located above Speaker A).  This concept was the used to create all of the even number nodes on the clock face.  In order to create the nodes at the odd numbers, we slightly changed the amplitudes of the speakers at the previous time until the correct placement was found.&lt;br /&gt;
&lt;br /&gt;
Although theoretically our design should have allowed us to program the clock using symmetry, due to slight imperfections in the design and in the electrical components, we had to use some trial and error methods to place the nodes correctly.  Nonetheless, the theory allowed us to create nodes almost exactly where we wanted them to be.&lt;br /&gt;
&lt;br /&gt;
==Mechanical Design==&lt;br /&gt;
&lt;br /&gt;
The Vibratory clock consists of a wooden base, held up by adjustable legs, three speakers, and a circular platform.  The following material were used to create the design:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Base:&amp;#039;&amp;#039;&lt;br /&gt;
*wood: 16&amp;quot; diameter, 0.75&amp;quot; thick&lt;br /&gt;
*holes: 6&amp;quot; diameter (3 total)&lt;br /&gt;
*adjustable legs: 3 rods: 3/8&amp;quot;-16; 4&amp;quot; long; 6 nuts total&lt;br /&gt;
&lt;br /&gt;
[[Image:speaker_supports.jpg|right|Pylons connecting the speakers to the platform|thumb|300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Speakers:&amp;#039;&amp;#039;&lt;br /&gt;
*3 Pyramid Power PW677X: 300W, 4 Ohms, 6.5&amp;quot; Chrome Subwoofer&lt;br /&gt;
**previously adapted speakers replaced center of speaker with attachments 3&amp;quot; in height and 1/2&amp;quot; hole on top&lt;br /&gt;
**1/2&amp;quot; diameter PVC used to attach previous attachment to platform with a screw&lt;br /&gt;
***held in place by 2 set screws each&lt;br /&gt;
**centers placed 7.125&amp;quot; apart&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Circular Platform&amp;#039;&amp;#039;&lt;br /&gt;
*PVC/Acrylic: 11.75&amp;quot; diameter, 0.25&amp;quot; thick &lt;br /&gt;
**machined on the LaserJet&lt;br /&gt;
**screw holes counter-sunk at 7.125&amp;quot; apart&lt;br /&gt;
*2.875&amp;quot; above wooden base&lt;br /&gt;
*Silver Sharpie used for numbers&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Reasoning for Geometry of Design&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Equilateral Triangle:&amp;#039;&amp;#039;&lt;br /&gt;
By having the speakers equidistant from each other, we were able to create symmetry in our design, which made programming the various nodes much easier.  For example, we were able to use the same theory to find the node at 12 o&amp;#039;clock, 4 o&amp;#039;clock, and 8 o&amp;#039;clock.  If the speakers were not placed equidistant from each other, two speakers placed at equal amplitudes and opposite phases would not have created a sink in the exact middle of the two speakers.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Adjustable Legs:&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
We needed to make the legs adjustable since it is essential that the platform be perfectly level in order for the objects placed on the platform to move in expected patterns.  For example, if one leg is slightly shorter than the other two, the objects placed on the platform would tend to move towards that leg and we could no longer rely on symmetry to program the various nodes due to the effects of gravity.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Height of Platform:&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Through our own experimentation and from [http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm Professor Lynch&amp;#039;s research], we found that we needed to have the pivot point (i.e. the speaker diaphragm) significantly below the platform in order to create sinks.  At one point in the design process, we attempted to create a different pivot point by replacing the PVC with 1/2&amp;quot; outer diameter, 1/4&amp;quot; inner diameter Tygon 2001 tubing that only was able to bend in one point since it had stand-offs and screws inside the tube.  However, this replacement in a sense created two pivot points (the speaker diaphragm and the Tygon), causing the platform to only create sources and not sinks.  In addition, the different height of the pivot point may have also led to the plate acting differently.&lt;br /&gt;
&lt;br /&gt;
==Electrical Design==&lt;br /&gt;
&lt;br /&gt;
[[Image:Circuit_Photo_Team22.jpg|right|thumb|Circuit Board|200px]]&lt;br /&gt;
&lt;br /&gt;
===Component List===&lt;br /&gt;
&amp;lt;table border=1&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Part&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Part No.&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Qty&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Vendor&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Price (Total)&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Microchip 8-bit PIC Microcontroller (U1)&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;PIC18F4520&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Maxim Quad, 2-Wire Serial 8-Bit Digital-to-Analog Converter (U2)&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;MAX520&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[http://www.digikey.com Digi-Key]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$9.28&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Emtel 150W, 12V Power Supply&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;EMV15012V&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Emtel EMV15012V Wiring Kit&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;61-EMV15012VWK&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Legacy Series II 4-channel, 300W Power Amplifier&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;LA160&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Keystone Electronics Snap-Fit 90 PC Phono Jack&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;901K-ND&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[http://www.digikey.com Digi-Key]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$3.81&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Radioshack 6-Ft. Shielded Cable, RCA Plug to RCA Plug&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;42-2367&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[http://www.radioshack.com Radioshack]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$14.97&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;20-ft Monster Cable 16-Gauge Speaker Wire&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;S16-2XLN&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[http://www.radioshack.com Radioshack]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$9.97&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Design Description===&lt;br /&gt;
&lt;br /&gt;
The PIC sends a digitized version of three sine waves to the DAC for conversion.  The signal then passes through a LPF filter before going to a power amplifier and finally the speakers themselves, which vibrate the surface plate.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Digital-to-Analog Converter&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The PIC would step through the sampled sine wave, stored in program memory, and send the values to the DAC.  Since we need 3 individual sine waves, we selected the [http://www.maxim-ic.com/quick_view2.cfm/qv_pk/1251 Maxim MAX520], a quad DAC IC.  It uses I&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;C with which our PIC easily interfaces and a simple message protocol.  With I&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;C, normally the protocol describes a start and stop bit.  In between that there are a hardware address byte and subsequent message bytes.  Since there are 3 hardware address pins on this IC up to 8 (2&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;) can be used on a single I&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;C bus.  After the address byte, the first message byte indicates which converter in the quad DAC that the following message is for (software address).  The second message byte is the 8-bit value for the previously selected converter.  Several converters (in the same DAC IC) can be spoken to within the same start and stop bits by simply repeating the software address message and the converter value message for the different converters in a single DAC IC.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Design Evolution&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Originally, our hopes were to use the PIC&amp;#039;s built-in PWM functionality to control the speakers and pass the signal through a low-pass filter to create our sine wave.  Quickly, we realized that method did not give us the control over the amplitude and phase that we needed to create a line sink.  Another idea was to use digital potentiometers in [http://www.maxim-ic.com/appnotes.cfm/appnote_number/559 a configurable all-pass filter] as a second filter, after low-pass filtering a PWM/square wave signal.  This would allow us to control the amplitude and phase response of the filter by controlling the digital potentiometer.  Despite, it&amp;#039;s usefulness, this method was very complex since it would require fine control of the filter and be very susceptible to noise or error.  Our final method, as mentioned previously, involved a Look-Up Table with a full period of a sine wave and a DAC.&lt;br /&gt;
&lt;br /&gt;
===Circuit Diagram===&lt;br /&gt;
&lt;br /&gt;
[[Image:team22_circuit.jpg|center|frame|Vibratory Clock Circuit Diagram|600px]]&lt;br /&gt;
&lt;br /&gt;
==Software Design==&lt;br /&gt;
&lt;br /&gt;
[[media:Team22_code.c|Full Code]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Description&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The PIC has a sine wave stored in program memory in the form of a look-up table (LUT).  The main code simply steps through the LUT and outputs that value to the DAC.  This will create a &amp;quot;stepping&amp;quot; sine wave, which get smoothed out by the passive LPF before the signal is sent to the power amplifier.  There is an interrupt service routine that occurs every .825 seconds to alternate between two orthogonal line sinks, to create a node to which a time piece will go.  Additionally, every 10 seconds within the interrupt, the time is changed in that the position of the node moves to the next hour.  Our code has the hour positions hard coded and simply steps through all of them.  More positions can easily be added for better resolution, which would be useful in an hour hand.&lt;br /&gt;
&lt;br /&gt;
==Results==&lt;br /&gt;
[[Image:VibratoryClock.jpg|right|Bird&amp;#039;s-eye view of the Vibratory Clock|thumb|350px]]&lt;br /&gt;
&lt;br /&gt;
We were able to get our project working so that the plate moves an object placed anywhere on the plate to the correct time and then moves the objects around the clock face, acting as the hour &amp;quot;hand&amp;quot; of a clock.  However, we increased the speed so that it takes about 2 minutes for objects placed on the clock to move around so that it is easy to demonstrate.  Check out the working Vibratory Clock [http://www.youtube.com/watch?v=KhgTNCfdwZw here].&lt;br /&gt;
&lt;br /&gt;
==Reflections==&lt;br /&gt;
&lt;br /&gt;
===Achievements===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;Independent Speaker Control&amp;lt;/b&amp;gt; &amp;amp;mdash; each speaker was able to be controlled entirely independently of the other two in terms of amplitude and phase.&lt;br /&gt;
*&amp;lt;b&amp;gt;Line Sinks&amp;lt;/b&amp;gt; &amp;amp;mdash; objects placed at any point on the platform moved to a point on a single line.&lt;br /&gt;
*&amp;lt;b&amp;gt;Nodes&amp;lt;/b&amp;gt; &amp;amp;mdash; two line sinks were created to move an object at any point on the platform to a single specified point elsewhere on the platform.&lt;br /&gt;
*&amp;lt;b&amp;gt;Clock Face Positioning&amp;lt;/b&amp;gt; &amp;amp;mdash; an object placed on the platform moved to each number of a 12-hour cycle&lt;br /&gt;
&lt;br /&gt;
===Improvements===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;Surface Dependency&amp;lt;/b&amp;gt; &amp;amp;mdash; objects tested in lab moved accurately around the clock face; however, when moved to a different location the objects behaved erratically and no longer told time. In the future the clock should be isolated from its resting surface.&lt;br /&gt;
*&amp;lt;b&amp;gt;Vibration Transmission&amp;lt;/b&amp;gt; &amp;amp;mdash; significant vibrations were transmitted from the speakers into the surface which may have contributed to the previous problem. Damping of the speakers may reduce the effects of this problem.&lt;br /&gt;
*&amp;lt;b&amp;gt;Hour hand Resolution&amp;lt;/b&amp;gt; &amp;amp;mdash; the hour hand moves through twelve positions in a twelve-hour cycle. In a twelve-hour cycle 360 positions (six positions per hour) or 720 positions (twelve positions per hour) would be ideal.&lt;br /&gt;
*&amp;lt;b&amp;gt;Noise&amp;lt;/b&amp;gt; &amp;amp;mdash; simple car audio stereos generated distracting audible noise when vibrating the plate. Ultrasonic voice coil actuators could be used to eliminate this noise.&lt;br /&gt;
&lt;br /&gt;
==Useful Resources==&lt;br /&gt;
&lt;br /&gt;
[http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm Vibration-Induced Frictional Force Fields for Part Manipulation]&lt;br /&gt;
&lt;br /&gt;
[http://www.cs.berkeley.edu/~jfc/dreznik/UPM2000/index.html Universal Planar Manipulator]&lt;/div&gt;</summary>
		<author><name>BrianLesperance</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Vibratory_Clock&amp;diff=8601</id>
		<title>Vibratory Clock</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Vibratory_Clock&amp;diff=8601"/>
		<updated>2008-03-21T07:34:57Z</updated>

		<summary type="html">&lt;p&gt;BrianLesperance: /* Software Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Team Members==&lt;br /&gt;
[[Image:team22.jpg|right|Left to right: Brian Lesperance, Jennifer Breger, Daniel Pinkawa|thumb|200px]]&lt;br /&gt;
&lt;br /&gt;
*Jennifer Breger - Mechanical Engineering Class of 2009&lt;br /&gt;
*Brian Lesperance - Electrical Engineering Class of 2008&lt;br /&gt;
*Daniel Pinkawa - Mechanical Engineering Class of 2008&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
The vibratory clock is a horizontal circular platform actuated from below by three speakers placed at the corners of an equilateral triangle.  The vibration of the platform causes a small object (e.g., an IC socket or a coin) to act as an hour &amp;quot;hand&amp;quot; on top of the platform.  The object slides around the circular platform, impelled by friction forces due to the vibration which we can adjust by varying the phase and amplitude of each speaker.  Due to the nodes created by the speaker vibrations, the object will move back to the correct hour if it is moved away.  Our project was provided by Professor Colgate and based upon the research of Professor Lynch.&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
[[Image:theory.jpg|right|Diagram of theory|thumb|300px]]&lt;br /&gt;
&lt;br /&gt;
Through his [http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm research], Professor Lynch discovered that when a platform is rotated about a line beneath it, orthogonal sinks and nodes can be created.  These can be adjusted by placing speaker vibrations at different amplitudes and phases.  This concept can be applied to create a node at any point on the platform, but is most easily explained when two speakers are placed at equal amplitudes and opposite phases, creating a sink between the two speakers.  As illustrated in the diagram, a line sink is created along Line 1 by placing Speaker B and Speaker C at equal amplitude but opposite phases, while holding Speaker A is off. If several small objects were placed on the plate at this point, all the objects would converge to the central line of the plate.   A second line sink, orthogonal to the first, is created along Line 2 by once again placing Speakers B and C at equal amplitudes but this time in phase with each other.  Speaker A is placed at a small amplitude and out of phase with speakers B and C, which moves the line sink slightly away from the edge of the plate.&lt;br /&gt;
&lt;br /&gt;
Lines 1 and 2 in the example create a node at 12 o&amp;#039;clock by alternating between the radial (Line 1) and orthogonal (Line 2) phases (12 o&amp;#039;clock is located above Speaker A).  This concept was the used to create all of the even number nodes on the clock face.  In order to create the nodes at the odd numbers, we slightly changed the amplitudes of the speakers at the previous time until the correct placement was found.&lt;br /&gt;
&lt;br /&gt;
Although theoretically our design should have allowed us to program the clock using symmetry, due to slight imperfections in the design and in the electrical components, we had to use some trial and error methods to place the nodes correctly.  Nonetheless, the theory allowed us to create nodes almost exactly where we wanted them to be.&lt;br /&gt;
&lt;br /&gt;
==Mechanical Design==&lt;br /&gt;
&lt;br /&gt;
The Vibratory clock consists of a wooden base, held up by adjustable legs, three speakers, and a circular platform.  The following material were used to create the design:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Base:&amp;#039;&amp;#039;&lt;br /&gt;
*wood: 16&amp;quot; diameter, 0.75&amp;quot; thick&lt;br /&gt;
*holes: 6&amp;quot; diameter (3 total)&lt;br /&gt;
*adjustable legs: 3 rods: 3/8&amp;quot;-16; 4&amp;quot; long; 6 nuts total&lt;br /&gt;
&lt;br /&gt;
[[Image:speaker_supports.jpg|right|Pylons connecting the speakers to the platform|thumb|300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Speakers:&amp;#039;&amp;#039;&lt;br /&gt;
*3 Pyramid Power PW677X: 300W, 4 Ohms, 6.5&amp;quot; Chrome Subwoofer&lt;br /&gt;
**previously adapted speakers replaced center of speaker with attachments 3&amp;quot; in height and 1/2&amp;quot; hole on top&lt;br /&gt;
**1/2&amp;quot; diameter PVC used to attach previous attachment to platform with a screw&lt;br /&gt;
***held in place by 2 set screws each&lt;br /&gt;
**centers placed 7.125&amp;quot; apart&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Circular Platform&amp;#039;&amp;#039;&lt;br /&gt;
*PVC/Acrylic: 11.75&amp;quot; diameter, 0.25&amp;quot; thick &lt;br /&gt;
**machined on the LaserJet&lt;br /&gt;
**screw holes counter-sunk at 7.125&amp;quot; apart&lt;br /&gt;
*2.875&amp;quot; above wooden base&lt;br /&gt;
*Silver Sharpie used for numbers&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Reasoning for Geometry of Design&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Equilateral Triangle:&amp;#039;&amp;#039;&lt;br /&gt;
By having the speakers equidistant from each other, we were able to create symmetry in our design, which made programming the various nodes much easier.  For example, we were able to use the same theory to find the node at 12 o&amp;#039;clock, 4 o&amp;#039;clock, and 8 o&amp;#039;clock.  If the speakers were not placed equidistant from each other, two speakers placed at equal amplitudes and opposite phases would not have created a sink in the exact middle of the two speakers.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Adjustable Legs:&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
We needed to make the legs adjustable since it is essential that the platform be perfectly level in order for the objects placed on the platform to move in expected patterns.  For example, if one leg is slightly shorter than the other two, the objects placed on the platform would tend to move towards that leg and we could no longer rely on symmetry to program the various nodes due to the effects of gravity.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Height of Platform:&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Through our own experimentation and from [http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm Professor Lynch&amp;#039;s research], we found that we needed to have the pivot point (i.e. the speaker diaphragm) significantly below the platform in order to create sinks.  At one point in the design process, we attempted to create a different pivot point by replacing the PVC with 1/2&amp;quot; outer diameter, 1/4&amp;quot; inner diameter Tygon 2001 tubing that only was able to bend in one point since it had stand-offs and screws inside the tube.  However, this replacement in a sense created two pivot points (the speaker diaphragm and the Tygon), causing the platform to only create sources and not sinks.  In addition, the different height of the pivot point may have also led to the plate acting differently.&lt;br /&gt;
&lt;br /&gt;
==Electrical Design==&lt;br /&gt;
&lt;br /&gt;
[[Image:Circuit_Photo_Team22.jpg|right|thumb|Circuit Board|200px]]&lt;br /&gt;
&lt;br /&gt;
===Component List===&lt;br /&gt;
&amp;lt;table border=1&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Part&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Part No.&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Qty&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Vendor&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Price (Total)&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Microchip 8-bit PIC Microcontroller (U1)&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;PIC18F4520&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Maxim Quad, 2-Wire Serial 8-Bit Digital-to-Analog Converter (U2)&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;MAX520&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[http://www.digikey.com Digi-Key]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$9.28&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Emtel 150W, 12V Power Supply&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;EMV15012V&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Emtel EMV15012V Wiring Kit&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;61-EMV15012VWK&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Legacy Series II 4-channel, 300W Power Amplifier&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;LA160&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Keystone Electronics Snap-Fit 90 PC Phono Jack&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;901K-ND&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[http://www.digikey.com Digi-Key]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$3.81&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Radioshack 6-Ft. Shielded Cable, RCA Plug to RCA Plug&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;42-2367&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[http://www.radioshack.com Radioshack]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$14.97&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;20-ft Monster Cable 16-Gauge Speaker Wire&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;S16-2XLN&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[http://www.radioshack.com Radioshack]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$9.97&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Design Description===&lt;br /&gt;
&lt;br /&gt;
The PIC sends a digitized version of three sine waves to the DAC for conversion.  The signal then passes through a LPF filter before going to a power amplifier and finally the speakers themselves, which vibrate the surface plate.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Digital-to-Analog Converter&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The PIC would step through the sampled sine wave, stored in program memory, and send the values to the DAC.  Since we need 3 individual sine waves, we selected the [http://www.maxim-ic.com/quick_view2.cfm/qv_pk/1251 Maxim MAX520], a quad DAC IC.  It uses I&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;C with which our PIC easily interfaces and a simple message protocol.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Design Evolution&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Originally, our hopes were to use the PIC&amp;#039;s built-in PWM functionality to control the speakers and pass the signal through a low-pass filter to create our sine wave.  Quickly, we realized that method did not give us the control over the amplitude and phase that we needed to create a line sink.  Another idea was to use digital potentiometers in [http://www.maxim-ic.com/appnotes.cfm/appnote_number/559 a configurable all-pass filter] as a second filter, after low-pass filtering a PWM/square wave signal.  This would allow us to control the amplitude and phase response of the filter by controlling the digital potentiometer.  Despite, it&amp;#039;s usefulness, this method was very complex since it would require fine control of the filter and be very susceptible to noise or error.  Our final method, as mentioned previously, involved a Look-Up Table with a full period of a sine wave and a DAC.&lt;br /&gt;
&lt;br /&gt;
===Circuit Diagram===&lt;br /&gt;
&lt;br /&gt;
[[Image:team22_circuit.jpg|center|frame|Vibratory Clock Circuit Diagram|600px]]&lt;br /&gt;
&lt;br /&gt;
==Software Design==&lt;br /&gt;
&lt;br /&gt;
[[media:Team22_code.c|Full Code]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Description&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The PIC has a sine wave stored in program memory in the form of a look-up table (LUT).  The main code simply steps through the LUT and outputs that value to the DAC.  This will create a &amp;quot;stepping&amp;quot; sine wave, which get smoothed out by the passive LPF before the signal is sent to the power amplifier.  There is an interrupt service routine that occurs every .825 seconds to alternate between two orthogonal line sinks, to create a node to which a time piece will go.  Additionally, every 10 seconds within the interrupt, the time is changed in that the position of the node moves to the next hour.  Our code has the hour positions hard coded and simply steps through all of them.  More positions can easily be added for better resolution, which would be useful in an hour hand.&lt;br /&gt;
&lt;br /&gt;
==Results==&lt;br /&gt;
[[Image:VibratoryClock.jpg|right|Bird&amp;#039;s-eye view of the Vibratory Clock|thumb|350px]]&lt;br /&gt;
&lt;br /&gt;
We were able to get our project working so that the plate moves an object placed anywhere on the plate to the correct time and then moves the objects around the clock face, acting as the hour &amp;quot;hand&amp;quot; of a clock.  However, we increased the speed so that it takes about 2 minutes for objects placed on the clock to move around so that it is easy to demonstrate.  Check out the working Vibratory Clock [http://www.youtube.com/watch?v=KhgTNCfdwZw here].&lt;br /&gt;
&lt;br /&gt;
==Reflections==&lt;br /&gt;
&lt;br /&gt;
===Achievements===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;Independent Speaker Control&amp;lt;/b&amp;gt; &amp;amp;mdash; each speaker was able to be controlled entirely independently of the other two in terms of amplitude and phase.&lt;br /&gt;
*&amp;lt;b&amp;gt;Line Sinks&amp;lt;/b&amp;gt; &amp;amp;mdash; objects placed at any point on the platform moved to a point on a single line.&lt;br /&gt;
*&amp;lt;b&amp;gt;Nodes&amp;lt;/b&amp;gt; &amp;amp;mdash; two line sinks were created to move an object at any point on the platform to a single specified point elsewhere on the platform.&lt;br /&gt;
*&amp;lt;b&amp;gt;Clock Face Positioning&amp;lt;/b&amp;gt; &amp;amp;mdash; an object placed on the platform moved to each number of a 12-hour cycle&lt;br /&gt;
&lt;br /&gt;
===Improvements===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;Surface Dependency&amp;lt;/b&amp;gt; &amp;amp;mdash; objects tested in lab moved accurately around the clock face; however, when moved to a different location the objects behaved erratically and no longer told time. In the future the clock should be isolated from its resting surface.&lt;br /&gt;
*&amp;lt;b&amp;gt;Vibration Transmission&amp;lt;/b&amp;gt; &amp;amp;mdash; significant vibrations were transmitted from the speakers into the surface which may have contributed to the previous problem. Damping of the speakers may reduce the effects of this problem.&lt;br /&gt;
*&amp;lt;b&amp;gt;Hour hand Resolution&amp;lt;/b&amp;gt; &amp;amp;mdash; the hour hand moves through twelve positions in a twelve-hour cycle. In a twelve-hour cycle 360 positions (six positions per hour) or 720 positions (twelve positions per hour) would be ideal.&lt;br /&gt;
*&amp;lt;b&amp;gt;Noise&amp;lt;/b&amp;gt; &amp;amp;mdash; simple car audio stereos generated distracting audible noise when vibrating the plate. Ultrasonic voice coil actuators could be used to eliminate this noise.&lt;br /&gt;
&lt;br /&gt;
==Useful Resources==&lt;br /&gt;
&lt;br /&gt;
[http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm Vibration-Induced Frictional Force Fields for Part Manipulation]&lt;br /&gt;
&lt;br /&gt;
[http://www.cs.berkeley.edu/~jfc/dreznik/UPM2000/index.html Universal Planar Manipulator]&lt;/div&gt;</summary>
		<author><name>BrianLesperance</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Ball_Balancing_Challenge&amp;diff=8077</id>
		<title>Ball Balancing Challenge</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Ball_Balancing_Challenge&amp;diff=8077"/>
		<updated>2008-03-20T09:33:25Z</updated>

		<summary type="html">&lt;p&gt;BrianLesperance: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;NOTE: THIS PAGE CURRENTLY PERTAINS TO A DIFFERENT TEAM&amp;#039;S PROJECT, BUT IT WILL BE REPLACED VERY SOON WITH INFORMATION ABOUT THE LEGENDARY TEAM 14. STAY TUNED.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;B&amp;gt;THIEVES!!!  You first take our PIC, now our Wiki.  It&amp;#039;s on now!&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[Image:team22.jpg|right|Left to right: Brian Lesperance, Jennifer Breger, Daniel Pinkawa|thumb|200px]]&lt;br /&gt;
&lt;br /&gt;
*Jennifer Breger - Mechanical Engineering Class of 2009&lt;br /&gt;
*Brian Lesperance - Electrical Engineering Class of 2008&lt;br /&gt;
*Daniel Pinkawa - Mechanical Engineering Class of 2008&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
We built a horizontal circular platform that is actuated from underneath by three speakers placed in an equilateral triangle. The vibration of the platform causes a small object (e.g., an IC socket or a coin) to act as an hour &amp;quot;hand&amp;quot; on top of the platform.  The object slides around the circular platform, impelled by friction forces due to the vibration.  By placing the speakers at different phases and amplitudes, we got the objects to move to desired positions.  Due to the nodes created by the speaker vibrations, the object will move back to the correct hour if it is moved away.  Our project was given to us by Professor Colgate and was based upon the research of Professor Lynch.&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
Through his [http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm research], Professor Lynch found that when a pivot point is placed under a platform that is attached to speakers, sinks and nodes can be created by places speaker vibrations at different amplitudes and phases.  Applying his research to our project, it was determined that if we placed two speakers at equal amplitudes and opposite phases, a sink would be created in between the speakers.  This result can be thought of as the center being the center of a teeter-totter, in which two people of equal mass but at completely opposite phases would cause the teeter-totter to rotate perfectly around the center pivot point.  However, if the two speakers were at equal amplitudes and perfectly in phase with each other, that side of the plate would move up and down in one motion, causing the sink to be at the other side of the plate.&lt;br /&gt;
&lt;br /&gt;
We found that if we alternated between two different phases that created two orthogonal sinks, we could create a node at the intersection.  For example, if we wanted to create a node at 12 o&amp;#039;clock, we would alternate between the radial and orthogonal phases.  In the radial phase, we created a sink along the diameter of the plate between the two speakers that were not at 12 o&amp;#039;clock, namely speakers B and C.  Using the theory of creating sinks, we placed speakers B and C at equal amplitude and 180 degrees out of phase with each other.  If several small objects were placed on the plate at this point, all the objects would converge to the central line of the plate.  Next, in order to create the orthogonal sink that would create a node at 12 o&amp;#039;clock, we placed speakers B and C in phase and at equal amplitude.  However, in order to counteract the forces from speakers B and C, we put speaker A (the speaker at 12 o&amp;#039;clock) at a weak amplitude and 180 degrees out of phase with speakers B and C in the orthogonal phase.&lt;br /&gt;
&lt;br /&gt;
This same notion was the used to create all of the even number nodes on the clock face.  In order to create the nodes at the odd numbers, we slightly changed the amplitudes of the speakers at the previous time until the correct placement was found.&lt;br /&gt;
&lt;br /&gt;
Although theoretically our design should have allowed us to program the clock using symmetry, due to slight imperfections in the design and in the electrical components, we had to use some trial and error methods to place the nodes correctly.  Nonetheless, the theory allowed us to create nodes almost exactly where we wanted them to be.&lt;br /&gt;
&lt;br /&gt;
==Mechanical Design==&lt;br /&gt;
&lt;br /&gt;
The Vibratory clock consists of a wooden base, held up by adjustable legs, three speakers, and a circular platform.  The following material were used to create the design:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Base:&amp;#039;&amp;#039;&lt;br /&gt;
*wood: 16&amp;quot; diameter, 0.75&amp;quot; thick&lt;br /&gt;
*holes: 6&amp;quot; diameter (3 total)&lt;br /&gt;
*adjustable legs: 3 rods: 3/8&amp;quot;-16; 4&amp;quot; long; 6 nuts total&lt;br /&gt;
&lt;br /&gt;
[[Image:speaker_supports.jpg|right|thumb|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Speakers:&amp;#039;&amp;#039;&lt;br /&gt;
*3 Pyramid Power PW677X: 300W, 4 Ohms, 6.5&amp;quot; Chrome Subwoofer&lt;br /&gt;
**previously adapted speakers replaced center of speaker with attachments 3&amp;quot; in height and 1/2&amp;quot; hole on top&lt;br /&gt;
**1/2&amp;quot; diameter PVC used to attach previous attachment to platform with a screw&lt;br /&gt;
***held in place by 2 set screws each&lt;br /&gt;
**centers placed 7.125&amp;quot; apart&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Circular Platform&amp;#039;&amp;#039;&lt;br /&gt;
*PVC/Acrylic: 11.75&amp;quot; diameter, 0.25&amp;quot; thick &lt;br /&gt;
**machined on the LaserJet&lt;br /&gt;
**screw holes counter-sunk at 7.125&amp;quot; apart&lt;br /&gt;
*2.875&amp;quot; above wooden base&lt;br /&gt;
*Silver Sharpie used for numbers&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Reasoning for Geometry of Design&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Equilateral Triangle:&amp;#039;&amp;#039;&lt;br /&gt;
By having the speakers equidistant from each other, we were able to create symmetry in our design, which made programming the various nodes much easier.  For example, we were able to use the same theory to find the node at 12 o&amp;#039;clock, 4 o&amp;#039;clock, and 8 o&amp;#039;clock.  If the speakers were not placed equidistant from each other, two speakers placed at equal amplitudes and opposite phases would not have created a sink in the exact middle of the two speakers.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Adjustable Legs:&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
We needed to make the legs adjustable since it is essential that the platform be perfectly level in order for the objects placed on the platform to move in expected patterns.  For example, if one leg is slightly shorter than the other two, the objects placed on the platform would tend to move towards that leg and we could no longer rely on symmetry to program the various nodes due to the effects of gravity.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Height of Platform:&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Through our own experimentation and from [http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm Professor Lynch&amp;#039;s research], we found that we needed to have the pivot point (i.e. the speaker diaphragm) significantly below the platform in order to create sinks.  At one point in the design process, we attempted to create a different pivot point by replacing the PVC with 1/2&amp;quot; outer diameter, 1/4&amp;quot; inner diameter Tygon 2001 tubing that only was able to bend in one point since it had stand-offs and screws inside the tube.  However, this replacement in a sense created two pivot points (the speaker diaphragm and the Tygon), causing the platform to only create sources and not sinks.  In addition, the different height of the pivot point may have also led to the plate acting differently.&lt;br /&gt;
&lt;br /&gt;
==Electrical Design==&lt;br /&gt;
&lt;br /&gt;
[[Image:Circuit_Photo_Team22.jpg|right|thumb|Circuit Board|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Component List:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;table border=1&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Part&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Part No.&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Qty&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Vendor&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Price (Total)&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Microchip 8-bit PIC Microcontroller (U1)&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;PIC18F4520&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Maxim Quad, 2-Wire Serial 8-Bit Digital-to-Analog Converter (U2)&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;MAX520&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[http://www.digikey.com Digi-Key]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$9.28&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Emtel 150W, 12V Power Supply&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;EMV15012V&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Emtel EMV15012V Wiring Kit&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;61-EMV15012VWK&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Legacy Series II 4-channel, 300W Power Amplifier&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;LA160&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Keystone Electronics Snap-Fit 90 PC Phono Jack&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;901K-ND&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[http://www.digikey.com Digi-Key]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$3.81&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Radioshack 6-Ft. Shielded Cable, RCA Plug to RCA Plug&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;42-2367&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[http://www.radioshack.com Radioshack]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$14.97&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;20-ft Monster Cable 16-Gauge Speaker Wire&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;S16-2XLN&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[http://www.radioshack.com Radioshack]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$9.97&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Circuit Diagram:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:team22_circuit.jpg|center|frame|Vibratory Clock Circuit Diagram|600px]]&lt;br /&gt;
&lt;br /&gt;
==Software Design==&lt;br /&gt;
&lt;br /&gt;
==Results==&lt;br /&gt;
[[Image:VibratoryClock.jpg|right|thumb|300px]]&lt;br /&gt;
&lt;br /&gt;
We were able to get our project working so that the plate moves an object placed anywhere on the plate to the correct time and then moves the objects around the clock face, acting as the hour &amp;quot;hand&amp;quot; of a clock.  However, we increased the speed so that it takes about 2 minutes for objects placed on the clock to move around so that it is easy to demonstrate.  Check out the working Vibratory Clock [http://www.youtube.com/watch?v=KhgTNCfdwZw here].&lt;br /&gt;
&lt;br /&gt;
==Reflections==&lt;br /&gt;
&lt;br /&gt;
==Useful Resources==&lt;br /&gt;
&lt;br /&gt;
[http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm Vibration-Induced Frictional Force Fields for Part Manipulation]&lt;br /&gt;
&lt;br /&gt;
[http://www.cs.berkeley.edu/~jfc/dreznik/UPM2000/index.html Universal Planar Manipulator]&lt;/div&gt;</summary>
		<author><name>BrianLesperance</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Ball_Balancing_Challenge&amp;diff=8076</id>
		<title>Ball Balancing Challenge</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Ball_Balancing_Challenge&amp;diff=8076"/>
		<updated>2008-03-20T09:32:49Z</updated>

		<summary type="html">&lt;p&gt;BrianLesperance: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;NOTE: THIS PAGE CURRENTLY PERTAINS TO A DIFFERENT TEAM&amp;#039;S PROJECT, BUT IT WILL BE REPLACED VERY SOON WITH INFORMATION ABOUT THE LEGENDARY TEAM 14. STAY TUNED.&lt;br /&gt;
&lt;br /&gt;
THIEVES!!!  You first take our PIC, now our Wiki.  It&amp;#039;s on now!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[Image:team22.jpg|right|Left to right: Brian Lesperance, Jennifer Breger, Daniel Pinkawa|thumb|200px]]&lt;br /&gt;
&lt;br /&gt;
*Jennifer Breger - Mechanical Engineering Class of 2009&lt;br /&gt;
*Brian Lesperance - Electrical Engineering Class of 2008&lt;br /&gt;
*Daniel Pinkawa - Mechanical Engineering Class of 2008&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
We built a horizontal circular platform that is actuated from underneath by three speakers placed in an equilateral triangle. The vibration of the platform causes a small object (e.g., an IC socket or a coin) to act as an hour &amp;quot;hand&amp;quot; on top of the platform.  The object slides around the circular platform, impelled by friction forces due to the vibration.  By placing the speakers at different phases and amplitudes, we got the objects to move to desired positions.  Due to the nodes created by the speaker vibrations, the object will move back to the correct hour if it is moved away.  Our project was given to us by Professor Colgate and was based upon the research of Professor Lynch.&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
Through his [http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm research], Professor Lynch found that when a pivot point is placed under a platform that is attached to speakers, sinks and nodes can be created by places speaker vibrations at different amplitudes and phases.  Applying his research to our project, it was determined that if we placed two speakers at equal amplitudes and opposite phases, a sink would be created in between the speakers.  This result can be thought of as the center being the center of a teeter-totter, in which two people of equal mass but at completely opposite phases would cause the teeter-totter to rotate perfectly around the center pivot point.  However, if the two speakers were at equal amplitudes and perfectly in phase with each other, that side of the plate would move up and down in one motion, causing the sink to be at the other side of the plate.&lt;br /&gt;
&lt;br /&gt;
We found that if we alternated between two different phases that created two orthogonal sinks, we could create a node at the intersection.  For example, if we wanted to create a node at 12 o&amp;#039;clock, we would alternate between the radial and orthogonal phases.  In the radial phase, we created a sink along the diameter of the plate between the two speakers that were not at 12 o&amp;#039;clock, namely speakers B and C.  Using the theory of creating sinks, we placed speakers B and C at equal amplitude and 180 degrees out of phase with each other.  If several small objects were placed on the plate at this point, all the objects would converge to the central line of the plate.  Next, in order to create the orthogonal sink that would create a node at 12 o&amp;#039;clock, we placed speakers B and C in phase and at equal amplitude.  However, in order to counteract the forces from speakers B and C, we put speaker A (the speaker at 12 o&amp;#039;clock) at a weak amplitude and 180 degrees out of phase with speakers B and C in the orthogonal phase.&lt;br /&gt;
&lt;br /&gt;
This same notion was the used to create all of the even number nodes on the clock face.  In order to create the nodes at the odd numbers, we slightly changed the amplitudes of the speakers at the previous time until the correct placement was found.&lt;br /&gt;
&lt;br /&gt;
Although theoretically our design should have allowed us to program the clock using symmetry, due to slight imperfections in the design and in the electrical components, we had to use some trial and error methods to place the nodes correctly.  Nonetheless, the theory allowed us to create nodes almost exactly where we wanted them to be.&lt;br /&gt;
&lt;br /&gt;
==Mechanical Design==&lt;br /&gt;
&lt;br /&gt;
The Vibratory clock consists of a wooden base, held up by adjustable legs, three speakers, and a circular platform.  The following material were used to create the design:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Base:&amp;#039;&amp;#039;&lt;br /&gt;
*wood: 16&amp;quot; diameter, 0.75&amp;quot; thick&lt;br /&gt;
*holes: 6&amp;quot; diameter (3 total)&lt;br /&gt;
*adjustable legs: 3 rods: 3/8&amp;quot;-16; 4&amp;quot; long; 6 nuts total&lt;br /&gt;
&lt;br /&gt;
[[Image:speaker_supports.jpg|right|thumb|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Speakers:&amp;#039;&amp;#039;&lt;br /&gt;
*3 Pyramid Power PW677X: 300W, 4 Ohms, 6.5&amp;quot; Chrome Subwoofer&lt;br /&gt;
**previously adapted speakers replaced center of speaker with attachments 3&amp;quot; in height and 1/2&amp;quot; hole on top&lt;br /&gt;
**1/2&amp;quot; diameter PVC used to attach previous attachment to platform with a screw&lt;br /&gt;
***held in place by 2 set screws each&lt;br /&gt;
**centers placed 7.125&amp;quot; apart&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Circular Platform&amp;#039;&amp;#039;&lt;br /&gt;
*PVC/Acrylic: 11.75&amp;quot; diameter, 0.25&amp;quot; thick &lt;br /&gt;
**machined on the LaserJet&lt;br /&gt;
**screw holes counter-sunk at 7.125&amp;quot; apart&lt;br /&gt;
*2.875&amp;quot; above wooden base&lt;br /&gt;
*Silver Sharpie used for numbers&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Reasoning for Geometry of Design&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Equilateral Triangle:&amp;#039;&amp;#039;&lt;br /&gt;
By having the speakers equidistant from each other, we were able to create symmetry in our design, which made programming the various nodes much easier.  For example, we were able to use the same theory to find the node at 12 o&amp;#039;clock, 4 o&amp;#039;clock, and 8 o&amp;#039;clock.  If the speakers were not placed equidistant from each other, two speakers placed at equal amplitudes and opposite phases would not have created a sink in the exact middle of the two speakers.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Adjustable Legs:&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
We needed to make the legs adjustable since it is essential that the platform be perfectly level in order for the objects placed on the platform to move in expected patterns.  For example, if one leg is slightly shorter than the other two, the objects placed on the platform would tend to move towards that leg and we could no longer rely on symmetry to program the various nodes due to the effects of gravity.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Height of Platform:&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Through our own experimentation and from [http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm Professor Lynch&amp;#039;s research], we found that we needed to have the pivot point (i.e. the speaker diaphragm) significantly below the platform in order to create sinks.  At one point in the design process, we attempted to create a different pivot point by replacing the PVC with 1/2&amp;quot; outer diameter, 1/4&amp;quot; inner diameter Tygon 2001 tubing that only was able to bend in one point since it had stand-offs and screws inside the tube.  However, this replacement in a sense created two pivot points (the speaker diaphragm and the Tygon), causing the platform to only create sources and not sinks.  In addition, the different height of the pivot point may have also led to the plate acting differently.&lt;br /&gt;
&lt;br /&gt;
==Electrical Design==&lt;br /&gt;
&lt;br /&gt;
[[Image:Circuit_Photo_Team22.jpg|right|thumb|Circuit Board|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Component List:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;table border=1&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Part&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Part No.&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Qty&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Vendor&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Price (Total)&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Microchip 8-bit PIC Microcontroller (U1)&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;PIC18F4520&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Maxim Quad, 2-Wire Serial 8-Bit Digital-to-Analog Converter (U2)&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;MAX520&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[http://www.digikey.com Digi-Key]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$9.28&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Emtel 150W, 12V Power Supply&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;EMV15012V&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Emtel EMV15012V Wiring Kit&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;61-EMV15012VWK&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Legacy Series II 4-channel, 300W Power Amplifier&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;LA160&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Keystone Electronics Snap-Fit 90 PC Phono Jack&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;901K-ND&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[http://www.digikey.com Digi-Key]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$3.81&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Radioshack 6-Ft. Shielded Cable, RCA Plug to RCA Plug&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;42-2367&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[http://www.radioshack.com Radioshack]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$14.97&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;20-ft Monster Cable 16-Gauge Speaker Wire&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;S16-2XLN&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[http://www.radioshack.com Radioshack]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$9.97&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Circuit Diagram:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:team22_circuit.jpg|center|frame|Vibratory Clock Circuit Diagram|600px]]&lt;br /&gt;
&lt;br /&gt;
==Software Design==&lt;br /&gt;
&lt;br /&gt;
==Results==&lt;br /&gt;
[[Image:VibratoryClock.jpg|right|thumb|300px]]&lt;br /&gt;
&lt;br /&gt;
We were able to get our project working so that the plate moves an object placed anywhere on the plate to the correct time and then moves the objects around the clock face, acting as the hour &amp;quot;hand&amp;quot; of a clock.  However, we increased the speed so that it takes about 2 minutes for objects placed on the clock to move around so that it is easy to demonstrate.  Check out the working Vibratory Clock [http://www.youtube.com/watch?v=KhgTNCfdwZw here].&lt;br /&gt;
&lt;br /&gt;
==Reflections==&lt;br /&gt;
&lt;br /&gt;
==Useful Resources==&lt;br /&gt;
&lt;br /&gt;
[http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm Vibration-Induced Frictional Force Fields for Part Manipulation]&lt;br /&gt;
&lt;br /&gt;
[http://www.cs.berkeley.edu/~jfc/dreznik/UPM2000/index.html Universal Planar Manipulator]&lt;/div&gt;</summary>
		<author><name>BrianLesperance</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Ball_Balancing_Challenge&amp;diff=8075</id>
		<title>Ball Balancing Challenge</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Ball_Balancing_Challenge&amp;diff=8075"/>
		<updated>2008-03-20T09:32:06Z</updated>

		<summary type="html">&lt;p&gt;BrianLesperance: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;NOTE: THIS PAGE CURRENTLY PERTAINS TO A DIFFERENT TEAM&amp;#039;S PROJECT, BUT IT WILL BE REPLACED VERY SOON WITH INFORMATION ABOUT THE LEGENDARY TEAM 14. STAY TUNED.&lt;br /&gt;
&lt;br /&gt;
THIEVES!!!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[Image:team22.jpg|right|Left to right: Brian Lesperance, Jennifer Breger, Daniel Pinkawa|thumb|200px]]&lt;br /&gt;
&lt;br /&gt;
*Jennifer Breger - Mechanical Engineering Class of 2009&lt;br /&gt;
*Brian Lesperance - Electrical Engineering Class of 2008&lt;br /&gt;
*Daniel Pinkawa - Mechanical Engineering Class of 2008&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
We built a horizontal circular platform that is actuated from underneath by three speakers placed in an equilateral triangle. The vibration of the platform causes a small object (e.g., an IC socket or a coin) to act as an hour &amp;quot;hand&amp;quot; on top of the platform.  The object slides around the circular platform, impelled by friction forces due to the vibration.  By placing the speakers at different phases and amplitudes, we got the objects to move to desired positions.  Due to the nodes created by the speaker vibrations, the object will move back to the correct hour if it is moved away.  Our project was given to us by Professor Colgate and was based upon the research of Professor Lynch.&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
Through his [http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm research], Professor Lynch found that when a pivot point is placed under a platform that is attached to speakers, sinks and nodes can be created by places speaker vibrations at different amplitudes and phases.  Applying his research to our project, it was determined that if we placed two speakers at equal amplitudes and opposite phases, a sink would be created in between the speakers.  This result can be thought of as the center being the center of a teeter-totter, in which two people of equal mass but at completely opposite phases would cause the teeter-totter to rotate perfectly around the center pivot point.  However, if the two speakers were at equal amplitudes and perfectly in phase with each other, that side of the plate would move up and down in one motion, causing the sink to be at the other side of the plate.&lt;br /&gt;
&lt;br /&gt;
We found that if we alternated between two different phases that created two orthogonal sinks, we could create a node at the intersection.  For example, if we wanted to create a node at 12 o&amp;#039;clock, we would alternate between the radial and orthogonal phases.  In the radial phase, we created a sink along the diameter of the plate between the two speakers that were not at 12 o&amp;#039;clock, namely speakers B and C.  Using the theory of creating sinks, we placed speakers B and C at equal amplitude and 180 degrees out of phase with each other.  If several small objects were placed on the plate at this point, all the objects would converge to the central line of the plate.  Next, in order to create the orthogonal sink that would create a node at 12 o&amp;#039;clock, we placed speakers B and C in phase and at equal amplitude.  However, in order to counteract the forces from speakers B and C, we put speaker A (the speaker at 12 o&amp;#039;clock) at a weak amplitude and 180 degrees out of phase with speakers B and C in the orthogonal phase.&lt;br /&gt;
&lt;br /&gt;
This same notion was the used to create all of the even number nodes on the clock face.  In order to create the nodes at the odd numbers, we slightly changed the amplitudes of the speakers at the previous time until the correct placement was found.&lt;br /&gt;
&lt;br /&gt;
Although theoretically our design should have allowed us to program the clock using symmetry, due to slight imperfections in the design and in the electrical components, we had to use some trial and error methods to place the nodes correctly.  Nonetheless, the theory allowed us to create nodes almost exactly where we wanted them to be.&lt;br /&gt;
&lt;br /&gt;
==Mechanical Design==&lt;br /&gt;
&lt;br /&gt;
The Vibratory clock consists of a wooden base, held up by adjustable legs, three speakers, and a circular platform.  The following material were used to create the design:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Base:&amp;#039;&amp;#039;&lt;br /&gt;
*wood: 16&amp;quot; diameter, 0.75&amp;quot; thick&lt;br /&gt;
*holes: 6&amp;quot; diameter (3 total)&lt;br /&gt;
*adjustable legs: 3 rods: 3/8&amp;quot;-16; 4&amp;quot; long; 6 nuts total&lt;br /&gt;
&lt;br /&gt;
[[Image:speaker_supports.jpg|right|thumb|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Speakers:&amp;#039;&amp;#039;&lt;br /&gt;
*3 Pyramid Power PW677X: 300W, 4 Ohms, 6.5&amp;quot; Chrome Subwoofer&lt;br /&gt;
**previously adapted speakers replaced center of speaker with attachments 3&amp;quot; in height and 1/2&amp;quot; hole on top&lt;br /&gt;
**1/2&amp;quot; diameter PVC used to attach previous attachment to platform with a screw&lt;br /&gt;
***held in place by 2 set screws each&lt;br /&gt;
**centers placed 7.125&amp;quot; apart&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Circular Platform&amp;#039;&amp;#039;&lt;br /&gt;
*PVC/Acrylic: 11.75&amp;quot; diameter, 0.25&amp;quot; thick &lt;br /&gt;
**machined on the LaserJet&lt;br /&gt;
**screw holes counter-sunk at 7.125&amp;quot; apart&lt;br /&gt;
*2.875&amp;quot; above wooden base&lt;br /&gt;
*Silver Sharpie used for numbers&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Reasoning for Geometry of Design&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Equilateral Triangle:&amp;#039;&amp;#039;&lt;br /&gt;
By having the speakers equidistant from each other, we were able to create symmetry in our design, which made programming the various nodes much easier.  For example, we were able to use the same theory to find the node at 12 o&amp;#039;clock, 4 o&amp;#039;clock, and 8 o&amp;#039;clock.  If the speakers were not placed equidistant from each other, two speakers placed at equal amplitudes and opposite phases would not have created a sink in the exact middle of the two speakers.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Adjustable Legs:&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
We needed to make the legs adjustable since it is essential that the platform be perfectly level in order for the objects placed on the platform to move in expected patterns.  For example, if one leg is slightly shorter than the other two, the objects placed on the platform would tend to move towards that leg and we could no longer rely on symmetry to program the various nodes due to the effects of gravity.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Height of Platform:&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Through our own experimentation and from [http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm Professor Lynch&amp;#039;s research], we found that we needed to have the pivot point (i.e. the speaker diaphragm) significantly below the platform in order to create sinks.  At one point in the design process, we attempted to create a different pivot point by replacing the PVC with 1/2&amp;quot; outer diameter, 1/4&amp;quot; inner diameter Tygon 2001 tubing that only was able to bend in one point since it had stand-offs and screws inside the tube.  However, this replacement in a sense created two pivot points (the speaker diaphragm and the Tygon), causing the platform to only create sources and not sinks.  In addition, the different height of the pivot point may have also led to the plate acting differently.&lt;br /&gt;
&lt;br /&gt;
==Electrical Design==&lt;br /&gt;
&lt;br /&gt;
[[Image:Circuit_Photo_Team22.jpg|right|thumb|Circuit Board|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Component List:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;table border=1&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Part&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Part No.&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Qty&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Vendor&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Price (Total)&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Microchip 8-bit PIC Microcontroller (U1)&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;PIC18F4520&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Maxim Quad, 2-Wire Serial 8-Bit Digital-to-Analog Converter (U2)&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;MAX520&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[http://www.digikey.com Digi-Key]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$9.28&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Emtel 150W, 12V Power Supply&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;EMV15012V&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Emtel EMV15012V Wiring Kit&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;61-EMV15012VWK&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Legacy Series II 4-channel, 300W Power Amplifier&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;LA160&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Keystone Electronics Snap-Fit 90 PC Phono Jack&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;901K-ND&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[http://www.digikey.com Digi-Key]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$3.81&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Radioshack 6-Ft. Shielded Cable, RCA Plug to RCA Plug&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;42-2367&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[http://www.radioshack.com Radioshack]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$14.97&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;20-ft Monster Cable 16-Gauge Speaker Wire&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;S16-2XLN&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[http://www.radioshack.com Radioshack]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$9.97&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Circuit Diagram:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:team22_circuit.jpg|center|frame|Vibratory Clock Circuit Diagram|600px]]&lt;br /&gt;
&lt;br /&gt;
==Software Design==&lt;br /&gt;
&lt;br /&gt;
==Results==&lt;br /&gt;
[[Image:VibratoryClock.jpg|right|thumb|300px]]&lt;br /&gt;
&lt;br /&gt;
We were able to get our project working so that the plate moves an object placed anywhere on the plate to the correct time and then moves the objects around the clock face, acting as the hour &amp;quot;hand&amp;quot; of a clock.  However, we increased the speed so that it takes about 2 minutes for objects placed on the clock to move around so that it is easy to demonstrate.  Check out the working Vibratory Clock [http://www.youtube.com/watch?v=KhgTNCfdwZw here].&lt;br /&gt;
&lt;br /&gt;
==Reflections==&lt;br /&gt;
&lt;br /&gt;
==Useful Resources==&lt;br /&gt;
&lt;br /&gt;
[http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm Vibration-Induced Frictional Force Fields for Part Manipulation]&lt;br /&gt;
&lt;br /&gt;
[http://www.cs.berkeley.edu/~jfc/dreznik/UPM2000/index.html Universal Planar Manipulator]&lt;/div&gt;</summary>
		<author><name>BrianLesperance</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Vibratory_Clock&amp;diff=8074</id>
		<title>Vibratory Clock</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Vibratory_Clock&amp;diff=8074"/>
		<updated>2008-03-20T09:25:17Z</updated>

		<summary type="html">&lt;p&gt;BrianLesperance: /* Code Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Team Members==&lt;br /&gt;
[[Image:team22.jpg|right|Left to right: Brian Lesperance, Jennifer Breger, Daniel Pinkawa|thumb|200px]]&lt;br /&gt;
&lt;br /&gt;
*Jennifer Breger - Mechanical Engineering Class of 2009&lt;br /&gt;
*Brian Lesperance - Electrical Engineering Class of 2008&lt;br /&gt;
*Daniel Pinkawa - Mechanical Engineering Class of 2008&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
We built a horizontal circular platform that is actuated from underneath by three speakers placed in an equilateral triangle. The vibration of the platform causes a small object (e.g., an IC socket or a coin) to act as an hour &amp;quot;hand&amp;quot; on top of the platform.  The object slides around the circular platform, impelled by friction forces due to the vibration.  By placing the speakers at different phases and amplitudes, we got the objects to move to desired positions.  Due to the nodes created by the speaker vibrations, the object will move back to the correct hour if it is moved away.  Our project was given to us by Professor Colgate and was based upon the research of Professor Lynch.&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
Through his [http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm research], Professor Lynch found that when a pivot point is placed under a platform that is attached to speakers, sinks and nodes can be created by places speaker vibrations at different amplitudes and phases.  Applying his research to our project, it was determined that if we placed two speakers at equal amplitudes and opposite phases, a sink would be created in between the speakers.  This result can be thought of as the center being the center of a teeter-totter, in which two people of equal mass but at completely opposite phases would cause the teeter-totter to rotate perfectly around the center pivot point.  However, if the two speakers were at equal amplitudes and perfectly in phase with each other, that side of the plate would move up and down in one motion, causing the sink to be at the other side of the plate.&lt;br /&gt;
&lt;br /&gt;
We found that if we alternated between two different phases that created two orthogonal sinks, we could create a node at the intersection.  For example, if we wanted to create a node at 12 o&amp;#039;clock, we would alternate between the radial and orthogonal phases.  In the radial phase, we created a sink along the diameter of the plate between the two speakers that were not at 12 o&amp;#039;clock, namely speakers B and C.  Using the theory of creating sinks, we placed speakers B and C at equal amplitude and 180 degrees out of phase with each other.  If several small objects were placed on the plate at this point, all the objects would converge to the central line of the plate.  Next, in order to create the orthogonal sink that would create a node at 12 o&amp;#039;clock, we placed speakers B and C in phase and at equal amplitude.  However, in order to counteract the forces from speakers B and C, we put speaker A (the speaker at 12 o&amp;#039;clock) at a weak amplitude and 180 degrees out of phase with speakers B and C in the orthogonal phase.&lt;br /&gt;
&lt;br /&gt;
This same notion was the used to create all of the even number nodes on the clock face.  In order to create the nodes at the odd numbers, we slightly changed the amplitudes of the speakers at the previous time until the correct placement was found.&lt;br /&gt;
&lt;br /&gt;
Although theoretically our design should have allowed us to program the clock using symmetry, due to slight imperfections in the design and in the electrical components, we had to use some trial and error methods to place the nodes correctly.  Nonetheless, the theory allowed us to create nodes almost exactly where we wanted them to be.&lt;br /&gt;
&lt;br /&gt;
==Mechanical Design==&lt;br /&gt;
&lt;br /&gt;
The Vibratory clock consists of a wooden base, held up by adjustable legs, three speakers, and a circular platform.  The following material were used to create the design:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Base:&amp;#039;&amp;#039;&lt;br /&gt;
*wood: 16&amp;quot; diameter, 0.75&amp;quot; thick&lt;br /&gt;
*holes: 6&amp;quot; diameter (3 total)&lt;br /&gt;
*adjustable legs: 3 rods: 3/8&amp;quot;-16; 4&amp;quot; long; 6 nuts total&lt;br /&gt;
&lt;br /&gt;
[[Image:speaker_supports.jpg|right|thumb|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Speakers:&amp;#039;&amp;#039;&lt;br /&gt;
*3 Pyramid Power PW677X: 300W, 4 Ohms, 6.5&amp;quot; Chrome Subwoofer&lt;br /&gt;
**previously adapted speakers replaced center of speaker with attachments 3&amp;quot; in height and 1/2&amp;quot; hole on top&lt;br /&gt;
**1/2&amp;quot; diameter PVC used to attach previous attachment to platform with a screw&lt;br /&gt;
***held in place by 2 set screws each&lt;br /&gt;
**centers placed 7.125&amp;quot; apart&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Circular Platform&amp;#039;&amp;#039;&lt;br /&gt;
*PVC/Acrylic: 11.75&amp;quot; diameter, 0.25&amp;quot; thick &lt;br /&gt;
**machined on the LaserJet&lt;br /&gt;
**screw holes counter-sunk at 7.125&amp;quot; apart&lt;br /&gt;
*2.875&amp;quot; above wooden base&lt;br /&gt;
*Silver Sharpie used for numbers&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Reasoning for Geometry of Design&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Equilateral Triangle:&amp;#039;&amp;#039;&lt;br /&gt;
By having the speakers equidistant from each other, we were able to create symmetry in our design, which made programming the various nodes much easier.  For example, we were able to use the same theory to find the node at 12 o&amp;#039;clock, 4 o&amp;#039;clock, and 8 o&amp;#039;clock.  If the speakers were not placed equidistant from each other, two speakers placed at equal amplitudes and opposite phases would not have created a sink in the exact middle of the two speakers.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Adjustable Legs:&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
We needed to make the legs adjustable since it is essential that the platform be perfectly level in order for the objects placed on the platform to move in expected patterns.  For example, if one leg is slightly shorter than the other two, the objects placed on the platform would tend to move towards that leg and we could no longer rely on symmetry to program the various nodes due to the effects of gravity.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Height of Platform:&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Through our own experimentation and from [http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm Professor Lynch&amp;#039;s research], we found that we needed to have the pivot point (i.e. the speaker diaphragm) significantly below the platform in order to create sinks.  At one point in the design process, we attempted to create a different pivot point by replacing the PVC with 1/2&amp;quot; outer diameter, 1/4&amp;quot; inner diameter Tygon 2001 tubing that only was able to bend in one point since it had stand-offs and screws inside the tube.  However, this replacement in a sense created two pivot points (the speaker diaphragm and the Tygon), causing the platform to only create sources and not sinks.  In addition, the different height of the pivot point may have also led to the plate acting differently.&lt;br /&gt;
&lt;br /&gt;
==Electrical Design==&lt;br /&gt;
&lt;br /&gt;
[[Image:Circuit_Photo_Team22.jpg|right|thumb|Circuit Board|200px]]&lt;br /&gt;
&lt;br /&gt;
===Component List===&lt;br /&gt;
&amp;lt;table border=1&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Part&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Part No.&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Qty&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Vendor&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Price (Total)&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Microchip 8-bit PIC Microcontroller (U1)&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;PIC18F4520&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Maxim Quad, 2-Wire Serial 8-Bit Digital-to-Analog Converter (U2)&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;MAX520&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[http://www.digikey.com Digi-Key]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$9.28&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Emtel 150W, 12V Power Supply&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;EMV15012V&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Emtel EMV15012V Wiring Kit&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;61-EMV15012VWK&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Legacy Series II 4-channel, 300W Power Amplifier&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;LA160&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Keystone Electronics Snap-Fit 90 PC Phono Jack&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;901K-ND&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[http://www.digikey.com Digi-Key]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$3.81&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Radioshack 6-Ft. Shielded Cable, RCA Plug to RCA Plug&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;42-2367&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[http://www.radioshack.com Radioshack]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$14.97&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;20-ft Monster Cable 16-Gauge Speaker Wire&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;S16-2XLN&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[http://www.radioshack.com Radioshack]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$9.97&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Design Description===&lt;br /&gt;
&lt;br /&gt;
The PIC sends a digitized version of three sine waves to the DAC for conversion.  The signal then passes through a LPF filter before going to a power amplifier and finally the speakers themselves, which vibrate the surface plate.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Digital-to-Analog Converter&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The PIC would step through the sampled sine wave, stored in program memory, and send the values to the DAC.  Since we need 3 individual sine waves, we selected the [http://www.maxim-ic.com/quick_view2.cfm/qv_pk/1251 Maxim MAX520], a quad DAC IC.  It uses I&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;C with which our PIC easily interfaces and a simple message protocol.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Design Evolution&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Originally, our hopes were to use the PIC&amp;#039;s built-in PWM functionality to control the speakers and pass the signal through a low-pass filter to create our sine wave.  Quickly, we realized that method did not give us the control over the amplitude and phase that we needed to create a line sink.  Another idea was to use digital potentiometers in [http://www.maxim-ic.com/appnotes.cfm/appnote_number/559 a configurable all-pass filter] as a second filter, after low-pass filtering a PWM/square wave signal.  This would allow us to control the amplitude and phase response of the filter by controlling the digital potentiometer.  Despite, it&amp;#039;s usefulness, this method was very complex since it would require fine control of the filter and be very susceptible to noise or error.  Our final method, as mentioned previously, involved a Look-Up Table with a full period of a sine wave and a DAC.&lt;br /&gt;
&lt;br /&gt;
===Circuit Diagram===&lt;br /&gt;
&lt;br /&gt;
[[Image:team22_circuit.jpg|center|frame|Vibratory Clock Circuit Diagram|600px]]&lt;br /&gt;
&lt;br /&gt;
==Software Design==&lt;br /&gt;
&lt;br /&gt;
[[media:Team22_code.c|Full Code]]&lt;br /&gt;
&lt;br /&gt;
===Code Description===&lt;br /&gt;
&lt;br /&gt;
The PIC has a sine wave stored in program memory in the form of a look-up table (LUT) (really not necessary but larger projects might need this).  The main code simply steps through the LUT and outputs that value to the DAC.  This will create a &amp;quot;stepping&amp;quot; sine wave, which get smoothed out by the passive LPF before the signal is sent to the power amplifier.  There is a interrupt service routine that occurs every .825 seconds to alternate between two orthogonal line sinks, to create a node to which a time piece will go.  Additionally, every 10 seconds within the interrupt, the time is changed in that the position of the node moves to the next hour.  Our code has the hour positions hard coded and simply steps through all of them.  More positions can easily be added for better resolution, which would be useful in an hour hand.&lt;br /&gt;
&lt;br /&gt;
===Flowchart===&lt;br /&gt;
&lt;br /&gt;
==Results==&lt;br /&gt;
[[Image:VibratoryClock.jpg|right|thumb|300px]]&lt;br /&gt;
&lt;br /&gt;
We were able to get our project working so that the plate moves an object placed anywhere on the plate to the correct time and then moves the objects around the clock face, acting as the hour &amp;quot;hand&amp;quot; of a clock.  However, we increased the speed so that it takes about 2 minutes for objects placed on the clock to move around so that it is easy to demonstrate.  Check out the working Vibratory Clock [http://www.youtube.com/watch?v=KhgTNCfdwZw here].&lt;br /&gt;
&lt;br /&gt;
==Reflections==&lt;br /&gt;
&lt;br /&gt;
==Useful Resources==&lt;br /&gt;
&lt;br /&gt;
[http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm Vibration-Induced Frictional Force Fields for Part Manipulation]&lt;br /&gt;
&lt;br /&gt;
[http://www.cs.berkeley.edu/~jfc/dreznik/UPM2000/index.html Universal Planar Manipulator]&lt;/div&gt;</summary>
		<author><name>BrianLesperance</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Vibratory_Clock&amp;diff=8073</id>
		<title>Vibratory Clock</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Vibratory_Clock&amp;diff=8073"/>
		<updated>2008-03-20T09:18:08Z</updated>

		<summary type="html">&lt;p&gt;BrianLesperance: /* Software Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Team Members==&lt;br /&gt;
[[Image:team22.jpg|right|Left to right: Brian Lesperance, Jennifer Breger, Daniel Pinkawa|thumb|200px]]&lt;br /&gt;
&lt;br /&gt;
*Jennifer Breger - Mechanical Engineering Class of 2009&lt;br /&gt;
*Brian Lesperance - Electrical Engineering Class of 2008&lt;br /&gt;
*Daniel Pinkawa - Mechanical Engineering Class of 2008&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
We built a horizontal circular platform that is actuated from underneath by three speakers placed in an equilateral triangle. The vibration of the platform causes a small object (e.g., an IC socket or a coin) to act as an hour &amp;quot;hand&amp;quot; on top of the platform.  The object slides around the circular platform, impelled by friction forces due to the vibration.  By placing the speakers at different phases and amplitudes, we got the objects to move to desired positions.  Due to the nodes created by the speaker vibrations, the object will move back to the correct hour if it is moved away.  Our project was given to us by Professor Colgate and was based upon the research of Professor Lynch.&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
Through his [http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm research], Professor Lynch found that when a pivot point is placed under a platform that is attached to speakers, sinks and nodes can be created by places speaker vibrations at different amplitudes and phases.  Applying his research to our project, it was determined that if we placed two speakers at equal amplitudes and opposite phases, a sink would be created in between the speakers.  This result can be thought of as the center being the center of a teeter-totter, in which two people of equal mass but at completely opposite phases would cause the teeter-totter to rotate perfectly around the center pivot point.  However, if the two speakers were at equal amplitudes and perfectly in phase with each other, that side of the plate would move up and down in one motion, causing the sink to be at the other side of the plate.&lt;br /&gt;
&lt;br /&gt;
We found that if we alternated between two different phases that created two orthogonal sinks, we could create a node at the intersection.  For example, if we wanted to create a node at 12 o&amp;#039;clock, we would alternate between the radial and orthogonal phases.  In the radial phase, we created a sink along the diameter of the plate between the two speakers that were not at 12 o&amp;#039;clock, namely speakers B and C.  Using the theory of creating sinks, we placed speakers B and C at equal amplitude and 180 degrees out of phase with each other.  If several small objects were placed on the plate at this point, all the objects would converge to the central line of the plate.  Next, in order to create the orthogonal sink that would create a node at 12 o&amp;#039;clock, we placed speakers B and C in phase and at equal amplitude.  However, in order to counteract the forces from speakers B and C, we put speaker A (the speaker at 12 o&amp;#039;clock) at a weak amplitude and 180 degrees out of phase with speakers B and C in the orthogonal phase.&lt;br /&gt;
&lt;br /&gt;
This same notion was the used to create all of the even number nodes on the clock face.  In order to create the nodes at the odd numbers, we slightly changed the amplitudes of the speakers at the previous time until the correct placement was found.&lt;br /&gt;
&lt;br /&gt;
Although theoretically our design should have allowed us to program the clock using symmetry, due to slight imperfections in the design and in the electrical components, we had to use some trial and error methods to place the nodes correctly.  Nonetheless, the theory allowed us to create nodes almost exactly where we wanted them to be.&lt;br /&gt;
&lt;br /&gt;
==Mechanical Design==&lt;br /&gt;
&lt;br /&gt;
The Vibratory clock consists of a wooden base, held up by adjustable legs, three speakers, and a circular platform.  The following material were used to create the design:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Base:&amp;#039;&amp;#039;&lt;br /&gt;
*wood: 16&amp;quot; diameter, 0.75&amp;quot; thick&lt;br /&gt;
*holes: 6&amp;quot; diameter (3 total)&lt;br /&gt;
*adjustable legs: 3 rods: 3/8&amp;quot;-16; 4&amp;quot; long; 6 nuts total&lt;br /&gt;
&lt;br /&gt;
[[Image:speaker_supports.jpg|right|thumb|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Speakers:&amp;#039;&amp;#039;&lt;br /&gt;
*3 Pyramid Power PW677X: 300W, 4 Ohms, 6.5&amp;quot; Chrome Subwoofer&lt;br /&gt;
**previously adapted speakers replaced center of speaker with attachments 3&amp;quot; in height and 1/2&amp;quot; hole on top&lt;br /&gt;
**1/2&amp;quot; diameter PVC used to attach previous attachment to platform with a screw&lt;br /&gt;
***held in place by 2 set screws each&lt;br /&gt;
**centers placed 7.125&amp;quot; apart&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Circular Platform&amp;#039;&amp;#039;&lt;br /&gt;
*PVC/Acrylic: 11.75&amp;quot; diameter, 0.25&amp;quot; thick &lt;br /&gt;
**machined on the LaserJet&lt;br /&gt;
**screw holes counter-sunk at 7.125&amp;quot; apart&lt;br /&gt;
*2.875&amp;quot; above wooden base&lt;br /&gt;
*Silver Sharpie used for numbers&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Reasoning for Geometry of Design&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Equilateral Triangle:&amp;#039;&amp;#039;&lt;br /&gt;
By having the speakers equidistant from each other, we were able to create symmetry in our design, which made programming the various nodes much easier.  For example, we were able to use the same theory to find the node at 12 o&amp;#039;clock, 4 o&amp;#039;clock, and 8 o&amp;#039;clock.  If the speakers were not placed equidistant from each other, two speakers placed at equal amplitudes and opposite phases would not have created a sink in the exact middle of the two speakers.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Adjustable Legs:&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
We needed to make the legs adjustable since it is essential that the platform be perfectly level in order for the objects placed on the platform to move in expected patterns.  For example, if one leg is slightly shorter than the other two, the objects placed on the platform would tend to move towards that leg and we could no longer rely on symmetry to program the various nodes due to the effects of gravity.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Height of Platform:&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Through our own experimentation and from [http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm Professor Lynch&amp;#039;s research], we found that we needed to have the pivot point (i.e. the speaker diaphragm) significantly below the platform in order to create sinks.  At one point in the design process, we attempted to create a different pivot point by replacing the PVC with 1/2&amp;quot; outer diameter, 1/4&amp;quot; inner diameter Tygon 2001 tubing that only was able to bend in one point since it had stand-offs and screws inside the tube.  However, this replacement in a sense created two pivot points (the speaker diaphragm and the Tygon), causing the platform to only create sources and not sinks.  In addition, the different height of the pivot point may have also led to the plate acting differently.&lt;br /&gt;
&lt;br /&gt;
==Electrical Design==&lt;br /&gt;
&lt;br /&gt;
[[Image:Circuit_Photo_Team22.jpg|right|thumb|Circuit Board|200px]]&lt;br /&gt;
&lt;br /&gt;
===Component List===&lt;br /&gt;
&amp;lt;table border=1&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Part&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Part No.&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Qty&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Vendor&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Price (Total)&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Microchip 8-bit PIC Microcontroller (U1)&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;PIC18F4520&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Maxim Quad, 2-Wire Serial 8-Bit Digital-to-Analog Converter (U2)&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;MAX520&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[http://www.digikey.com Digi-Key]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$9.28&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Emtel 150W, 12V Power Supply&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;EMV15012V&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Emtel EMV15012V Wiring Kit&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;61-EMV15012VWK&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Legacy Series II 4-channel, 300W Power Amplifier&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;LA160&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Keystone Electronics Snap-Fit 90 PC Phono Jack&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;901K-ND&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[http://www.digikey.com Digi-Key]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$3.81&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Radioshack 6-Ft. Shielded Cable, RCA Plug to RCA Plug&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;42-2367&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[http://www.radioshack.com Radioshack]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$14.97&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;20-ft Monster Cable 16-Gauge Speaker Wire&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;S16-2XLN&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[http://www.radioshack.com Radioshack]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$9.97&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Design Description===&lt;br /&gt;
&lt;br /&gt;
The PIC sends a digitized version of three sine waves to the DAC for conversion.  The signal then passes through a LPF filter before going to a power amplifier and finally the speakers themselves, which vibrate the surface plate.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Digital-to-Analog Converter&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The PIC would step through the sampled sine wave, stored in program memory, and send the values to the DAC.  Since we need 3 individual sine waves, we selected the [http://www.maxim-ic.com/quick_view2.cfm/qv_pk/1251 Maxim MAX520], a quad DAC IC.  It uses I&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;C with which our PIC easily interfaces and a simple message protocol.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Design Evolution&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Originally, our hopes were to use the PIC&amp;#039;s built-in PWM functionality to control the speakers and pass the signal through a low-pass filter to create our sine wave.  Quickly, we realized that method did not give us the control over the amplitude and phase that we needed to create a line sink.  Another idea was to use digital potentiometers in [http://www.maxim-ic.com/appnotes.cfm/appnote_number/559 a configurable all-pass filter] as a second filter, after low-pass filtering a PWM/square wave signal.  This would allow us to control the amplitude and phase response of the filter by controlling the digital potentiometer.  Despite, it&amp;#039;s usefulness, this method was very complex since it would require fine control of the filter and be very susceptible to noise or error.  Our final method, as mentioned previously, involved a Look-Up Table with a full period of a sine wave and a DAC.&lt;br /&gt;
&lt;br /&gt;
===Circuit Diagram===&lt;br /&gt;
&lt;br /&gt;
[[Image:team22_circuit.jpg|center|frame|Vibratory Clock Circuit Diagram|600px]]&lt;br /&gt;
&lt;br /&gt;
==Software Design==&lt;br /&gt;
&lt;br /&gt;
[[media:Team22_code.c|Full Code]]&lt;br /&gt;
&lt;br /&gt;
===Code Description===&lt;br /&gt;
&lt;br /&gt;
The PIC has a sine wave stored in program memory in the form of a look-up table (LUT) (really not necessary but larger projects might need this).  The main code simply steps through the LUT and outputs that value to the DAC.  This will create a &amp;quot;stepping&amp;quot; sine wave, which get smoothed out by the passive LPF before the signal is sent to the power amplifier.  There is a interrupt service routine that occurs every .825 seconds to alternate between two orthogonal line sinks, to create a node to which a time piece will go.Additionally, every 10 seconds within the interrupt, the time is changed in that the position of the node moves to the next hour.  Our code has the hour positions hard coded and simply steps through all of them.  More positions can easily be added for better resolution, which would be useful in an hour hand.  &lt;br /&gt;
&lt;br /&gt;
===Flowchart===&lt;br /&gt;
&lt;br /&gt;
==Results==&lt;br /&gt;
[[Image:VibratoryClock.jpg|right|thumb|300px]]&lt;br /&gt;
&lt;br /&gt;
We were able to get our project working so that the plate moves an object placed anywhere on the plate to the correct time and then moves the objects around the clock face, acting as the hour &amp;quot;hand&amp;quot; of a clock.  However, we increased the speed so that it takes about 2 minutes for objects placed on the clock to move around so that it is easy to demonstrate.  Check out the working Vibratory Clock [http://www.youtube.com/watch?v=KhgTNCfdwZw here].&lt;br /&gt;
&lt;br /&gt;
==Reflections==&lt;br /&gt;
&lt;br /&gt;
==Useful Resources==&lt;br /&gt;
&lt;br /&gt;
[http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm Vibration-Induced Frictional Force Fields for Part Manipulation]&lt;br /&gt;
&lt;br /&gt;
[http://www.cs.berkeley.edu/~jfc/dreznik/UPM2000/index.html Universal Planar Manipulator]&lt;/div&gt;</summary>
		<author><name>BrianLesperance</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Vibratory_Clock&amp;diff=8072</id>
		<title>Vibratory Clock</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Vibratory_Clock&amp;diff=8072"/>
		<updated>2008-03-20T09:13:31Z</updated>

		<summary type="html">&lt;p&gt;BrianLesperance: /* Electrical Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Team Members==&lt;br /&gt;
[[Image:team22.jpg|right|Left to right: Brian Lesperance, Jennifer Breger, Daniel Pinkawa|thumb|200px]]&lt;br /&gt;
&lt;br /&gt;
*Jennifer Breger - Mechanical Engineering Class of 2009&lt;br /&gt;
*Brian Lesperance - Electrical Engineering Class of 2008&lt;br /&gt;
*Daniel Pinkawa - Mechanical Engineering Class of 2008&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
We built a horizontal circular platform that is actuated from underneath by three speakers placed in an equilateral triangle. The vibration of the platform causes a small object (e.g., an IC socket or a coin) to act as an hour &amp;quot;hand&amp;quot; on top of the platform.  The object slides around the circular platform, impelled by friction forces due to the vibration.  By placing the speakers at different phases and amplitudes, we got the objects to move to desired positions.  Due to the nodes created by the speaker vibrations, the object will move back to the correct hour if it is moved away.  Our project was given to us by Professor Colgate and was based upon the research of Professor Lynch.&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
Through his [http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm research], Professor Lynch found that when a pivot point is placed under a platform that is attached to speakers, sinks and nodes can be created by places speaker vibrations at different amplitudes and phases.  Applying his research to our project, it was determined that if we placed two speakers at equal amplitudes and opposite phases, a sink would be created in between the speakers.  This result can be thought of as the center being the center of a teeter-totter, in which two people of equal mass but at completely opposite phases would cause the teeter-totter to rotate perfectly around the center pivot point.  However, if the two speakers were at equal amplitudes and perfectly in phase with each other, that side of the plate would move up and down in one motion, causing the sink to be at the other side of the plate.&lt;br /&gt;
&lt;br /&gt;
We found that if we alternated between two different phases that created two orthogonal sinks, we could create a node at the intersection.  For example, if we wanted to create a node at 12 o&amp;#039;clock, we would alternate between the radial and orthogonal phases.  In the radial phase, we created a sink along the diameter of the plate between the two speakers that were not at 12 o&amp;#039;clock, namely speakers B and C.  Using the theory of creating sinks, we placed speakers B and C at equal amplitude and 180 degrees out of phase with each other.  If several small objects were placed on the plate at this point, all the objects would converge to the central line of the plate.  Next, in order to create the orthogonal sink that would create a node at 12 o&amp;#039;clock, we placed speakers B and C in phase and at equal amplitude.  However, in order to counteract the forces from speakers B and C, we put speaker A (the speaker at 12 o&amp;#039;clock) at a weak amplitude and 180 degrees out of phase with speakers B and C in the orthogonal phase.&lt;br /&gt;
&lt;br /&gt;
This same notion was the used to create all of the even number nodes on the clock face.  In order to create the nodes at the odd numbers, we slightly changed the amplitudes of the speakers at the previous time until the correct placement was found.&lt;br /&gt;
&lt;br /&gt;
Although theoretically our design should have allowed us to program the clock using symmetry, due to slight imperfections in the design and in the electrical components, we had to use some trial and error methods to place the nodes correctly.  Nonetheless, the theory allowed us to create nodes almost exactly where we wanted them to be.&lt;br /&gt;
&lt;br /&gt;
==Mechanical Design==&lt;br /&gt;
&lt;br /&gt;
The Vibratory clock consists of a wooden base, held up by adjustable legs, three speakers, and a circular platform.  The following material were used to create the design:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Base:&amp;#039;&amp;#039;&lt;br /&gt;
*wood: 16&amp;quot; diameter, 0.75&amp;quot; thick&lt;br /&gt;
*holes: 6&amp;quot; diameter (3 total)&lt;br /&gt;
*adjustable legs: 3 rods: 3/8&amp;quot;-16; 4&amp;quot; long; 6 nuts total&lt;br /&gt;
&lt;br /&gt;
[[Image:speaker_supports.jpg|right|thumb|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Speakers:&amp;#039;&amp;#039;&lt;br /&gt;
*3 Pyramid Power PW677X: 300W, 4 Ohms, 6.5&amp;quot; Chrome Subwoofer&lt;br /&gt;
**previously adapted speakers replaced center of speaker with attachments 3&amp;quot; in height and 1/2&amp;quot; hole on top&lt;br /&gt;
**1/2&amp;quot; diameter PVC used to attach previous attachment to platform with a screw&lt;br /&gt;
***held in place by 2 set screws each&lt;br /&gt;
**centers placed 7.125&amp;quot; apart&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Circular Platform&amp;#039;&amp;#039;&lt;br /&gt;
*PVC/Acrylic: 11.75&amp;quot; diameter, 0.25&amp;quot; thick &lt;br /&gt;
**machined on the LaserJet&lt;br /&gt;
**screw holes counter-sunk at 7.125&amp;quot; apart&lt;br /&gt;
*2.875&amp;quot; above wooden base&lt;br /&gt;
*Silver Sharpie used for numbers&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Reasoning for Geometry of Design&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Equilateral Triangle:&amp;#039;&amp;#039;&lt;br /&gt;
By having the speakers equidistant from each other, we were able to create symmetry in our design, which made programming the various nodes much easier.  For example, we were able to use the same theory to find the node at 12 o&amp;#039;clock, 4 o&amp;#039;clock, and 8 o&amp;#039;clock.  If the speakers were not placed equidistant from each other, two speakers placed at equal amplitudes and opposite phases would not have created a sink in the exact middle of the two speakers.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Adjustable Legs:&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
We needed to make the legs adjustable since it is essential that the platform be perfectly level in order for the objects placed on the platform to move in expected patterns.  For example, if one leg is slightly shorter than the other two, the objects placed on the platform would tend to move towards that leg and we could no longer rely on symmetry to program the various nodes due to the effects of gravity.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Height of Platform:&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Through our own experimentation and from [http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm Professor Lynch&amp;#039;s research], we found that we needed to have the pivot point (i.e. the speaker diaphragm) significantly below the platform in order to create sinks.  At one point in the design process, we attempted to create a different pivot point by replacing the PVC with 1/2&amp;quot; outer diameter, 1/4&amp;quot; inner diameter Tygon 2001 tubing that only was able to bend in one point since it had stand-offs and screws inside the tube.  However, this replacement in a sense created two pivot points (the speaker diaphragm and the Tygon), causing the platform to only create sources and not sinks.  In addition, the different height of the pivot point may have also led to the plate acting differently.&lt;br /&gt;
&lt;br /&gt;
==Electrical Design==&lt;br /&gt;
&lt;br /&gt;
[[Image:Circuit_Photo_Team22.jpg|right|thumb|Circuit Board|200px]]&lt;br /&gt;
&lt;br /&gt;
===Component List===&lt;br /&gt;
&amp;lt;table border=1&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Part&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Part No.&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Qty&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Vendor&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Price (Total)&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Microchip 8-bit PIC Microcontroller (U1)&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;PIC18F4520&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Maxim Quad, 2-Wire Serial 8-Bit Digital-to-Analog Converter (U2)&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;MAX520&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[http://www.digikey.com Digi-Key]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$9.28&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Emtel 150W, 12V Power Supply&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;EMV15012V&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Emtel EMV15012V Wiring Kit&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;61-EMV15012VWK&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Legacy Series II 4-channel, 300W Power Amplifier&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;LA160&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Keystone Electronics Snap-Fit 90 PC Phono Jack&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;901K-ND&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[http://www.digikey.com Digi-Key]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$3.81&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Radioshack 6-Ft. Shielded Cable, RCA Plug to RCA Plug&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;42-2367&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[http://www.radioshack.com Radioshack]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$14.97&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;20-ft Monster Cable 16-Gauge Speaker Wire&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;S16-2XLN&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[http://www.radioshack.com Radioshack]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$9.97&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Design Description===&lt;br /&gt;
&lt;br /&gt;
The PIC sends a digitized version of three sine waves to the DAC for conversion.  The signal then passes through a LPF filter before going to a power amplifier and finally the speakers themselves, which vibrate the surface plate.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Digital-to-Analog Converter&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The PIC would step through the sampled sine wave, stored in program memory, and send the values to the DAC.  Since we need 3 individual sine waves, we selected the [http://www.maxim-ic.com/quick_view2.cfm/qv_pk/1251 Maxim MAX520], a quad DAC IC.  It uses I&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;C with which our PIC easily interfaces and a simple message protocol.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Design Evolution&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Originally, our hopes were to use the PIC&amp;#039;s built-in PWM functionality to control the speakers and pass the signal through a low-pass filter to create our sine wave.  Quickly, we realized that method did not give us the control over the amplitude and phase that we needed to create a line sink.  Another idea was to use digital potentiometers in [http://www.maxim-ic.com/appnotes.cfm/appnote_number/559 a configurable all-pass filter] as a second filter, after low-pass filtering a PWM/square wave signal.  This would allow us to control the amplitude and phase response of the filter by controlling the digital potentiometer.  Despite, it&amp;#039;s usefulness, this method was very complex since it would require fine control of the filter and be very susceptible to noise or error.  Our final method, as mentioned previously, involved a Look-Up Table with a full period of a sine wave and a DAC.&lt;br /&gt;
&lt;br /&gt;
===Circuit Diagram===&lt;br /&gt;
&lt;br /&gt;
[[Image:team22_circuit.jpg|center|frame|Vibratory Clock Circuit Diagram|600px]]&lt;br /&gt;
&lt;br /&gt;
==Software Design==&lt;br /&gt;
&lt;br /&gt;
[[media:Team22_code.c|Full Code]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Software Flow&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Results==&lt;br /&gt;
[[Image:VibratoryClock.jpg|right|thumb|300px]]&lt;br /&gt;
&lt;br /&gt;
We were able to get our project working so that the plate moves an object placed anywhere on the plate to the correct time and then moves the objects around the clock face, acting as the hour &amp;quot;hand&amp;quot; of a clock.  However, we increased the speed so that it takes about 2 minutes for objects placed on the clock to move around so that it is easy to demonstrate.  Check out the working Vibratory Clock [http://www.youtube.com/watch?v=KhgTNCfdwZw here].&lt;br /&gt;
&lt;br /&gt;
==Reflections==&lt;br /&gt;
&lt;br /&gt;
==Useful Resources==&lt;br /&gt;
&lt;br /&gt;
[http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm Vibration-Induced Frictional Force Fields for Part Manipulation]&lt;br /&gt;
&lt;br /&gt;
[http://www.cs.berkeley.edu/~jfc/dreznik/UPM2000/index.html Universal Planar Manipulator]&lt;/div&gt;</summary>
		<author><name>BrianLesperance</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Vibratory_Clock&amp;diff=8068</id>
		<title>Vibratory Clock</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Vibratory_Clock&amp;diff=8068"/>
		<updated>2008-03-20T08:32:04Z</updated>

		<summary type="html">&lt;p&gt;BrianLesperance: /* Software Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Team Members==&lt;br /&gt;
[[Image:team22.jpg|right|Left to right: Brian Lesperance, Jennifer Breger, Daniel Pinkawa|thumb|200px]]&lt;br /&gt;
&lt;br /&gt;
*Jennifer Breger - Mechanical Engineering Class of 2009&lt;br /&gt;
*Brian Lesperance - Electrical Engineering Class of 2008&lt;br /&gt;
*Daniel Pinkawa - Mechanical Engineering Class of 2008&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
We built a horizontal circular platform that is actuated from underneath by three speakers placed in an equilateral triangle. The vibration of the platform causes a small object (e.g., an IC socket or a coin) to act as an hour &amp;quot;hand&amp;quot; on top of the platform.  The object slides around the circular platform, impelled by friction forces due to the vibration.  By placing the speakers at different phases and amplitudes, we got the objects to move to desired positions.  Due to the nodes created by the speaker vibrations, the object will move back to the correct hour if it is moved away.  Our project was given to us by Professor Colgate and was based upon the research of Professor Lynch.&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
Through his [http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm research], Professor Lynch found that when a pivot point is placed under a platform that is attached to speakers, sinks and nodes can be created by places speaker vibrations at different amplitudes and phases.  Applying his research to our project, it was determined that if we placed two speakers at equal amplitudes and opposite phases, a sink would be created in between the speakers.  This result can be thought of as the center being the center of a teeter-totter, in which two people of equal mass but at completely opposite phases would cause the teeter-totter to rotate perfectly around the center pivot point.  However, if the two speakers were at equal amplitudes and perfectly in phase with each other, that side of the plate would move up and down in one motion, causing the sink to be at the other side of the plate.&lt;br /&gt;
&lt;br /&gt;
We found that if we alternated between two different phases that created two orthogonal sinks, we could create a node at the intersection.  For example, if we wanted to create a node at 12 o&amp;#039;clock, we would alternate between the radial and orthogonal phases.  In the radial phase, we created a sink along the diameter of the plate between the two speakers that were not at 12 o&amp;#039;clock, namely speakers B and C.  Using the theory of creating sinks, we placed speakers B and C at equal amplitude and 180 degrees out of phase with each other.  If several small objects were placed on the plate at this point, all the objects would converge to the central line of the plate.  Next, in order to create the orthogonal sink that would create a node at 12 o&amp;#039;clock, we placed speakers B and C in phase and at equal amplitude.  However, in order to counteract the forces from speakers B and C, we put speaker A (the speaker at 12 o&amp;#039;clock) at a weak amplitude and 180 degrees out of phase with speakers B and C in the orthogonal phase.&lt;br /&gt;
&lt;br /&gt;
This same notion was the used to create all of the even number nodes on the clock face.  In order to create the nodes at the odd numbers, we slightly changed the amplitudes of the speakers at the previous time until the correct placement was found.&lt;br /&gt;
&lt;br /&gt;
Although theoretically our design should have allowed us to program the clock using symmetry, due to slight imperfections in the design and in the electrical components, we had to use some trial and error methods to place the nodes correctly.  Nonetheless, the theory allowed us to create nodes almost exactly where we wanted them to be.&lt;br /&gt;
&lt;br /&gt;
==Mechanical Design==&lt;br /&gt;
&lt;br /&gt;
The Vibratory clock consists of a wooden base, held up by adjustable legs, three speakers, and a circular platform.  The following material were used to create the design:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Base:&amp;#039;&amp;#039;&lt;br /&gt;
*wood: 16&amp;quot; diameter, 0.75&amp;quot; thick&lt;br /&gt;
*holes: 6&amp;quot; diameter (3 total)&lt;br /&gt;
*adjustable legs: 3 rods: 3/8&amp;quot;-16; 4&amp;quot; long; 6 nuts total&lt;br /&gt;
&lt;br /&gt;
[[Image:speaker_supports.jpg|right|thumb|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Speakers:&amp;#039;&amp;#039;&lt;br /&gt;
*3 Pyramid Power PW677X: 300W, 4 Ohms, 6.5&amp;quot; Chrome Subwoofer&lt;br /&gt;
**previously adapted speakers replaced center of speaker with attachments 3&amp;quot; in height and 1/2&amp;quot; hole on top&lt;br /&gt;
**1/2&amp;quot; diameter PVC used to attach previous attachment to platform with a screw&lt;br /&gt;
***held in place by 2 set screws each&lt;br /&gt;
**centers placed 7.125&amp;quot; apart&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Circular Platform&amp;#039;&amp;#039;&lt;br /&gt;
*PVC/Acrylic: 11.75&amp;quot; diameter, 0.25&amp;quot; thick &lt;br /&gt;
**machined on the LaserJet&lt;br /&gt;
**screw holes counter-sunk at 7.125&amp;quot; apart&lt;br /&gt;
*2.875&amp;quot; above wooden base&lt;br /&gt;
*Silver Sharpie used for numbers&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Reasoning for Geometry of Design&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Equilateral Triangle:&amp;#039;&amp;#039;&lt;br /&gt;
By having the speakers equidistant from each other, we were able to create symmetry in our design, which made programming the various nodes much easier.  For example, we were able to use the same theory to find the node at 12 o&amp;#039;clock, 4 o&amp;#039;clock, and 8 o&amp;#039;clock.  If the speakers were not placed equidistant from each other, two speakers placed at equal amplitudes and opposite phases would not have created a sink in the exact middle of the two speakers.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Adjustable Legs:&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
We needed to make the legs adjustable since it is essential that the platform be perfectly level in order for the objects placed on the platform to move in expected patterns.  For example, if one leg is slightly shorter than the other two, the objects placed on the platform would tend to move towards that leg and we could no longer rely on symmetry to program the various nodes due to the effects of gravity.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Height of Platform:&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Through our own experimentation and from [http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm Professor Lynch&amp;#039;s research], we found that we needed to have the pivot point (i.e. the speaker diaphragm) significantly below the platform in order to create sinks.  At one point in the design process, we attempted to create a different pivot point by replacing the PVC with 1/2&amp;quot; outer diameter, 1/4&amp;quot; inner diameter Tygon 2001 tubing that only was able to bend in one point since it had stand-offs and screws inside the tube.  However, this replacement in a sense created two pivot points (the speaker diaphragm and the Tygon), causing the platform to only create sources and not sinks.  In addition, the different height of the pivot point may have also led to the plate acting differently.&lt;br /&gt;
&lt;br /&gt;
==Electrical Design==&lt;br /&gt;
&lt;br /&gt;
[[Image:Circuit_Photo_Team22.jpg|right|thumb|Circuit Board|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Component List:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;table border=1&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Part&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Part No.&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Qty&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Vendor&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Price (Total)&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Microchip 8-bit PIC Microcontroller (U1)&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;PIC18F4520&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Maxim Quad, 2-Wire Serial 8-Bit Digital-to-Analog Converter (U2)&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;MAX520&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[http://www.digikey.com Digi-Key]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$9.28&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Emtel 150W, 12V Power Supply&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;EMV15012V&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Emtel EMV15012V Wiring Kit&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;61-EMV15012VWK&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Legacy Series II 4-channel, 300W Power Amplifier&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;LA160&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Keystone Electronics Snap-Fit 90 PC Phono Jack&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;901K-ND&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[http://www.digikey.com Digi-Key]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$3.81&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Radioshack 6-Ft. Shielded Cable, RCA Plug to RCA Plug&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;42-2367&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[http://www.radioshack.com Radioshack]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$14.97&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;20-ft Monster Cable 16-Gauge Speaker Wire&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;S16-2XLN&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[http://www.radioshack.com Radioshack]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$9.97&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Circuit Diagram:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:team22_circuit.jpg|center|frame|Vibratory Clock Circuit Diagram|600px]]&lt;br /&gt;
&lt;br /&gt;
==Software Design==&lt;br /&gt;
&lt;br /&gt;
[[media:Team22_code.c|Full Code]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Software Flow&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Results==&lt;br /&gt;
[[Image:VibratoryClock.jpg|right|thumb|300px]]&lt;br /&gt;
&lt;br /&gt;
We were able to get our project working so that the plate moves an object placed anywhere on the plate to the correct time and then moves the objects around the clock face, acting as the hour &amp;quot;hand&amp;quot; of a clock.  However, we increased the speed so that it takes about 2 minutes for objects placed on the clock to move around so that it is easy to demonstrate.  Check out the working Vibratory Clock [http://www.youtube.com/watch?v=KhgTNCfdwZw here].&lt;br /&gt;
&lt;br /&gt;
==Reflections==&lt;br /&gt;
&lt;br /&gt;
==Useful Resources==&lt;br /&gt;
&lt;br /&gt;
[http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm Vibration-Induced Frictional Force Fields for Part Manipulation]&lt;br /&gt;
&lt;br /&gt;
[http://www.cs.berkeley.edu/~jfc/dreznik/UPM2000/index.html Universal Planar Manipulator]&lt;/div&gt;</summary>
		<author><name>BrianLesperance</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=File:Team22_code.c&amp;diff=7906</id>
		<title>File:Team22 code.c</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=File:Team22_code.c&amp;diff=7906"/>
		<updated>2008-03-19T22:54:20Z</updated>

		<summary type="html">&lt;p&gt;BrianLesperance: Source code for the Vibratory Clock.  Further comments are within the code.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Source code for the Vibratory Clock.  Further comments are within the code.&lt;/div&gt;</summary>
		<author><name>BrianLesperance</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Vibratory_Clock&amp;diff=7905</id>
		<title>Vibratory Clock</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Vibratory_Clock&amp;diff=7905"/>
		<updated>2008-03-19T22:38:17Z</updated>

		<summary type="html">&lt;p&gt;BrianLesperance: /* Electrical Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Team Members==&lt;br /&gt;
[[Image:team22.jpg|right|Left to right: Brian Lesperance, Jennifer Breger, Daniel Pinkawa|thumb|200px]]&lt;br /&gt;
&lt;br /&gt;
*Jennifer Breger - Mechanical Engineering Class of 2009&lt;br /&gt;
*Brian Lesperance - Electrical Engineering Class of 2008&lt;br /&gt;
*Daniel Pinkawa - Mechanical Engineering Class of 2008&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
We built a horizontal circular platform that is actuated from underneath by three speakers placed in an equilateral triangle. The vibration of the platform causes a small object (e.g., an IC socket or a coin) to act as an hour &amp;quot;hand&amp;quot; on top of the platform.  The object slides around the circular platform, impelled by friction forces due to the vibration.  By placing the speakers at different phases and amplitudes, we got the objects to move to desired positions.  Due to the nodes created by the speaker vibrations, the object will move back to the correct hour if it is moved away.  Our project was given to us by Professor Colgate and was based upon the research of Professor Lynch.&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
Through his [http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm research], Professor Lynch found that when a pivot point is placed under a platform that is attached to speakers, sinks and nodes can be created by places speaker vibrations at different amplitudes and phases.  Applying his research to our project, it was determined that if we placed two speakers at equal amplitudes and opposite phases, a sink would be created in between the speakers.  This result can be thought of as the center being the center of a teeter-totter, in which two people of equal mass but at completely opposite phases would cause the teeter-totter to rotate perfectly around the center pivot point.  However, if the two speakers were at equal amplitudes and perfectly in phase with each other, that side of the plate would move up and down in one motion, causing the sink to be at the other side of the plate.&lt;br /&gt;
&lt;br /&gt;
We found that if we alternated between two different phases that created two orthogonal sinks, we could create a node at the intersection.  For example, if we wanted to create a node at 12 o&amp;#039;clock, we would alternate between the radial and orthogonal phases.  In the radial phase, we created a sink along the diameter of the plate between the two speakers that were not at 12 o&amp;#039;clock, namely speakers B and C.  Using the theory of creating sinks, we placed speakers B and C at equal amplitude and 180 degrees out of phase with each other.  If several small objects were placed on the plate at this point, all the objects would converge to the central line of the plate.  Next, in order to create the orthogonal sink that would create a node at 12 o&amp;#039;clock, we placed speakers B and C in phase and at equal amplitude.  However, in order to counteract the forces from speakers B and C, we put speaker A (the speaker at 12 o&amp;#039;clock) at a weak amplitude and 180 degrees out of phase with speakers B and C in the orthogonal phase.&lt;br /&gt;
&lt;br /&gt;
This same notion was the used to create all of the even number nodes on the clock face.  In order to create the nodes at the odd numbers, we slightly changed the amplitudes of the speakers at the previous time until the correct placement was found.&lt;br /&gt;
&lt;br /&gt;
Although theoretically our design should have allowed us to program the clock using symmetry, due to slight imperfections in the design and in the electrical components, we had to use some trial and error methods to place the nodes correctly.  Nonetheless, the theory allowed us to create nodes almost exactly where we wanted them to be.&lt;br /&gt;
&lt;br /&gt;
==Mechanical Design==&lt;br /&gt;
&lt;br /&gt;
The Vibratory clock consists of a wooden base, held up by adjustable legs, three speakers, and a circular platform.  The following material were used to create the design:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Base:&amp;#039;&amp;#039;&lt;br /&gt;
*wood: 16&amp;quot; diameter, 0.75&amp;quot; thick&lt;br /&gt;
*holes: 6&amp;quot; diameter (3 total)&lt;br /&gt;
*adjustable legs: 3 rods: 3/8&amp;quot;-16; 4&amp;quot; long; 6 nuts total&lt;br /&gt;
&lt;br /&gt;
[[Image:speaker_supports.jpg|right|thumb|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Speakers:&amp;#039;&amp;#039;&lt;br /&gt;
*3 Pyramid Power PW677X: 300W, 4 Ohms, 6.5&amp;quot; Chrome Subwoofer&lt;br /&gt;
**previously adapted speakers replaced center of speaker with attachments 3&amp;quot; in height and 1/2&amp;quot; hole on top&lt;br /&gt;
**1/2&amp;quot; diameter PVC used to attach previous attachment to platform with a screw&lt;br /&gt;
***held in place by 2 set screws each&lt;br /&gt;
**centers placed 7.125&amp;quot; apart&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Circular Platform&amp;#039;&amp;#039;&lt;br /&gt;
*PVC/Acrylic: 11.75&amp;quot; diameter, 0.25&amp;quot; thick &lt;br /&gt;
**machined on the LaserJet&lt;br /&gt;
**screw holes counter-sunk at 7.125&amp;quot; apart&lt;br /&gt;
*2.875&amp;quot; above wooden base&lt;br /&gt;
*Silver Sharpie used for numbers&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Reasoning for Geometry of Design&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Equilateral Triangle:&amp;#039;&amp;#039;&lt;br /&gt;
By having the speakers equidistant from each other, we were able to create symmetry in our design, which made programming the various nodes much easier.  For example, we were able to use the same theory to find the node at 12 o&amp;#039;clock, 4 o&amp;#039;clock, and 8 o&amp;#039;clock.  If the speakers were not placed equidistant from each other, two speakers placed at equal amplitudes and opposite phases would not have created a sink in the exact middle of the two speakers.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Adjustable Legs:&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
We needed to make the legs adjustable since it is essential that the platform be perfectly level in order for the objects placed on the platform to move in expected patterns.  For example, if one leg is slightly shorter than the other two, the objects placed on the platform would tend to move towards that leg and we could no longer rely on symmetry to program the various nodes due to the effects of gravity.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Height of Platform:&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Through our own experimentation and from [http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm Professor Lynch&amp;#039;s research], we found that we needed to have the pivot point (i.e. the speaker diaphragm) significantly below the platform in order to create sinks.  At one point in the design process, we attempted to create a different pivot point by replacing the PVC with 1/2&amp;quot; outer diameter, 1/4&amp;quot; inner diameter Tygon 2001 tubing that only was able to bend in one point since it had stand-offs and screws inside the tube.  However, this replacement in a sense created two pivot points (the speaker diaphragm and the Tygon), causing the platform to only create sources and not sinks.  In addition, the different height of the pivot point may have also led to the plate acting differently.&lt;br /&gt;
&lt;br /&gt;
==Electrical Design==&lt;br /&gt;
&lt;br /&gt;
[[Image:Circuit_Photo_Team22.jpg|right|thumb|Circuit Board|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Component List:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;table border=1&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Part&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Part No.&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Qty&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Vendor&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Price (Total)&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Microchip 8-bit PIC Microcontroller (U1)&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;PIC18F4520&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Maxim Quad, 2-Wire Serial 8-Bit Digital-to-Analog Converter (U2)&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;MAX520&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[http://www.digikey.com Digi-Key]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$9.28&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Emtel 150W, 12V Power Supply&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;EMV15012V&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Emtel EMV15012V Wiring Kit&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;61-EMV15012VWK&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Legacy Series II 4-channel, 300W Power Amplifier&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;LA160&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Keystone Electronics Snap-Fit 90 PC Phono Jack&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;901K-ND&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[http://www.digikey.com Digi-Key]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$3.81&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Radioshack 6-Ft. Shielded Cable, RCA Plug to RCA Plug&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;42-2367&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[http://www.radioshack.com Radioshack]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$14.97&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;20-ft Monster Cable 16-Gauge Speaker Wire&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;S16-2XLN&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[http://www.radioshack.com Radioshack]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$9.97&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Circuit Diagram:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:team22_circuit.jpg|center|frame|Vibratory Clock Circuit Diagram|600px]]&lt;br /&gt;
&lt;br /&gt;
==Software Design==&lt;br /&gt;
&lt;br /&gt;
==Results==&lt;br /&gt;
[[Image:VibratoryClock.jpg|right|thumb|300px]]&lt;br /&gt;
&lt;br /&gt;
We were able to get our project working so that the plate moves an object placed anywhere on the plate to the correct time and then moves the objects around the clock face, acting as the hour &amp;quot;hand&amp;quot; of a clock.  However, we increased the speed so that it takes about 2 minutes for objects placed on the clock to move around so that it is easy to demonstrate.  Check out the working Vibratory Clock [http://www.youtube.com/watch?v=PV9utFL5J6w HERE].&lt;br /&gt;
&lt;br /&gt;
==Reflections==&lt;br /&gt;
&lt;br /&gt;
==Useful Resources==&lt;br /&gt;
&lt;br /&gt;
[http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm Vibration-Induced Frictional Force Fields for Part Manipulation]&lt;br /&gt;
&lt;br /&gt;
[http://www.cs.berkeley.edu/~jfc/dreznik/UPM2000/index.html Universal Planar Manipulator]&lt;/div&gt;</summary>
		<author><name>BrianLesperance</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Vibratory_Clock&amp;diff=7884</id>
		<title>Vibratory Clock</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Vibratory_Clock&amp;diff=7884"/>
		<updated>2008-03-19T22:03:04Z</updated>

		<summary type="html">&lt;p&gt;BrianLesperance: /* Electrical Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Team Members==&lt;br /&gt;
[[Image:team22.jpg|right|Left to right: Brian Lesperance, Jennifer Breger, Daniel Pinkawa|thumb|200px]]&lt;br /&gt;
&lt;br /&gt;
*Jennifer Breger - Mechanical Engineering Class of 2009&lt;br /&gt;
*Brian Lesperance - Electrical Engineering Class of 2008&lt;br /&gt;
*Daniel Pinkawa - Mechanical Engineering Class of 2008&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
We built a horizontal circular platform that is actuated from underneath by three speakers placed in an equilateral triangle. The vibration of the platform causes a small object (e.g., an IC socket or a coin) to act as an hour &amp;quot;hand&amp;quot; on top of the platform.  The object slides around the circular platform, impelled by friction forces due to the vibration.  By placing the speakers at different phases and amplitudes, we got the objects to move to desired positions.  Due to the nodes created by the speaker vibrations, the object will move back to the correct hour if it is moved away.  Our project was given to us by Professor Colgate and was based upon the research of Professor Lynch.&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
Through his [http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm research], Professor Lynch found that when a pivot point is placed under a platform that is attached to speakers, sinks and nodes can be created by places speaker vibrations at different amplitudes and phases.  Applying his research to our project, it was determined that if we placed two speakers at equal amplitudes and opposite phases, a sink would be created in between the speakers.  This result can be thought of as the center being the center of a teeter-totter, in which two people of equal mass but at completely opposite phases would cause the teeter-totter to rotate perfectly around the center pivot point.  However, if the two speakers were at equal amplitudes and perfectly in phase with each other, that side of the plate would move up and down in one motion, causing the sink to be at the other side of the plate.&lt;br /&gt;
&lt;br /&gt;
We found that if we alternated between two different phases that created two orthogonal sinks, we could create a node at the intersection.  For example, if we wanted to create a node at 12 o&amp;#039;clock, we would alternate between the radial and orthogonal phases.  In the radial phase, we created a sink along the diameter of the plate between the two speakers that were not at 12 o&amp;#039;clock, namely speakers B and C.  Using the theory of creating sinks, we placed speakers B and C at equal amplitude and 180 degrees out of phase with each other.  If several small objects were placed on the plate at this point, all the objects would converge to the central line of the plate.  Next, in order to create the orthogonal sink that would create a node at 12 o&amp;#039;clock, we placed speakers B and C in phase and at equal amplitude.  However, in order to counteract the forces from speakers B and C, we put speaker A (the speaker at 12 o&amp;#039;clock) at a weak amplitude and 180 degrees out of phase with speakers B and C in the orthogonal phase.&lt;br /&gt;
&lt;br /&gt;
This same notion was the used to create all of the even number nodes on the clock face.  In order to create the nodes at the odd numbers, we slightly changed the amplitudes of the speakers at the previous time until the correct placement was found.&lt;br /&gt;
&lt;br /&gt;
Although theoretically our design should have allowed us to program the clock using symmetry, due to slight imperfections in the design and in the electrical components, we had to use some trial and error methods to place the nodes correctly.  Nonetheless, the theory allowed us to create nodes almost exactly where we wanted them to be.&lt;br /&gt;
&lt;br /&gt;
==Mechanical Design==&lt;br /&gt;
&lt;br /&gt;
The Vibratory clock consists of a wooden base, held up by adjustable legs, three speakers, and a circular platform.  The following material were used to create the design:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Base:&amp;#039;&amp;#039;&lt;br /&gt;
*wood: 16&amp;quot; diameter, 0.75&amp;quot; thick&lt;br /&gt;
*holes: 6&amp;quot; diameter (3 total)&lt;br /&gt;
*adjustable legs: 3 rods: 3/8&amp;quot;-16; 4&amp;quot; long; 6 nuts total&lt;br /&gt;
&lt;br /&gt;
[[Image:speaker_supports.jpg|right|thumb|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Speakers:&amp;#039;&amp;#039;&lt;br /&gt;
*3 Pyramid Power PW677X: 300W, 4 Ohms, 6.5&amp;quot; Chrome Subwoofer&lt;br /&gt;
**previously adapted speakers replaced center of speaker with attachments 3&amp;quot; in height and 1/2&amp;quot; hole on top&lt;br /&gt;
**1/2&amp;quot; diameter PVC used to attach previous attachment to platform with a screw&lt;br /&gt;
***held in place by 2 set screws each&lt;br /&gt;
**centers placed 7.125&amp;quot; apart&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Circular Platform&amp;#039;&amp;#039;&lt;br /&gt;
*PVC/Acrylic: 11.75&amp;quot; diameter, 0.25&amp;quot; thick &lt;br /&gt;
**machined on the LaserJet&lt;br /&gt;
**screw holes counter-sunk at 7.125&amp;quot; apart&lt;br /&gt;
*2.875&amp;quot; above wooden base&lt;br /&gt;
*Silver Sharpie used for numbers&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Reasoning for Geometry of Design&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Equilateral Triangle:&amp;#039;&amp;#039;&lt;br /&gt;
By having the speakers equidistant from each other, we were able to create symmetry in our design, which made programming the various nodes much easier.  For example, we were able to use the same theory to find the node at 12 o&amp;#039;clock, 4 o&amp;#039;clock, and 8 o&amp;#039;clock.  If the speakers were not placed equidistant from each other, two speakers placed at equal amplitudes and opposite phases would not have created a sink in the exact middle of the two speakers.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Adjustable Legs:&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
We needed to make the legs adjustable since it is essential that the platform be perfectly level in order for the objects placed on the platform to move in expected patterns.  For example, if one leg is slightly shorter than the other two, the objects placed on the platform would tend to move towards that leg and we could no longer rely on symmetry to program the various nodes due to the effects of gravity.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Height of Platform:&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Through our own experimentation and from [http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm Professor Lynch&amp;#039;s research], we found that we needed to have the pivot point (i.e. the speaker diaphragm) significantly below the platform in order to create sinks.  At one point in the design process, we attempted to create a different pivot point by replacing the PVC with 1/2&amp;quot; outer diameter, 1/4&amp;quot; inner diameter Tygon 2001 tubing that only was able to bend in one point since it had stand-offs and screws inside the tube.  However, this replacement in a sense created two pivot points (the speaker diaphragm and the Tygon), causing the platform to only create sources and not sinks.  In addition, the different height of the pivot point may have also led to the plate acting differently.&lt;br /&gt;
&lt;br /&gt;
==Electrical Design==&lt;br /&gt;
&lt;br /&gt;
[[Image:Circuit_Photo_Team22.jpg|right|thumb|Circuit Board|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Component List:&amp;lt;/b&amp;gt;&lt;br /&gt;
*1 Microchip PIC18F4520 (8-bit PIC Microcontroller)&lt;br /&gt;
*1 Maxim MAX520 (Quad, 2-Wire Serial 8-Bit Digital-to-Analog Converter)&lt;br /&gt;
*1 Emtel EMV15012V (150W, 12V Power Supply)&lt;br /&gt;
*1 Legacy Series II LA160 (4-channel, 300W Power Amplifier)&lt;br /&gt;
*3 Keystone 901K-ND (Snap-Fit 90 PC Phono Jack)&lt;br /&gt;
*3 Radioshack 42-2367 (6-Ft. Shielded Cable, RCA Plug to RCA Plug)&lt;br /&gt;
*20-ft Monster Cable S16-2XLN (16-Gauge Speaker Wire)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Circuit Diagram:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:team22_circuit.jpg|center|frame|Vibratory Clock Circuit Diagram|600px]]&lt;br /&gt;
&lt;br /&gt;
==Software Design==&lt;br /&gt;
&lt;br /&gt;
==Results==&lt;br /&gt;
[[Image:VibratoryClock.jpg|right|thumb|300px]]&lt;br /&gt;
&lt;br /&gt;
We were able to get our project working so that the plate moves an object placed anywhere on the plate to the correct time and then moves the objects around the clock face, acting as the hour &amp;quot;hand&amp;quot; of a clock.  However, we increased the speed so that it takes about 2 minutes for objects placed on the clock to move around so that it is easy to demonstrate.  Check out the working Vibratory Clock [http://www.youtube.com/watch?v=PV9utFL5J6w HERE].&lt;br /&gt;
&lt;br /&gt;
==Reflections==&lt;br /&gt;
&lt;br /&gt;
==Useful Resources==&lt;br /&gt;
&lt;br /&gt;
[http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm Vibration-Induced Frictional Force Fields for Part Manipulation]&lt;br /&gt;
&lt;br /&gt;
[http://www.cs.berkeley.edu/~jfc/dreznik/UPM2000/index.html Universal Planar Manipulator]&lt;/div&gt;</summary>
		<author><name>BrianLesperance</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Vibratory_Clock&amp;diff=7880</id>
		<title>Vibratory Clock</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Vibratory_Clock&amp;diff=7880"/>
		<updated>2008-03-19T22:00:32Z</updated>

		<summary type="html">&lt;p&gt;BrianLesperance: /* Electrical Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Team Members==&lt;br /&gt;
[[Image:team22.jpg|right|Left to right: Brian Lesperance, Jennifer Breger, Daniel Pinkawa|thumb|200px]]&lt;br /&gt;
&lt;br /&gt;
*Jennifer Breger - Mechanical Engineering Class of 2009&lt;br /&gt;
*Brian Lesperance - Electrical Engineering Class of 2008&lt;br /&gt;
*Daniel Pinkawa - Mechanical Engineering Class of 2008&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
We built a horizontal circular platform that is actuated from underneath by three speakers placed in an equilateral triangle. The vibration of the platform causes a small object (e.g., an IC socket or a coin) to act as an hour &amp;quot;hand&amp;quot; on top of the platform.  The object slides around the circular platform, impelled by friction forces due to the vibration.  By placing the speakers at different phases and amplitudes, we got the objects to move to desired positions.  Due to the nodes created by the speaker vibrations, the object will move back to the correct hour if it is moved away.  Our project was given to us by Professor Colgate and was based upon the research of Professor Lynch.&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
Through his [http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm research], Professor Lynch found that when a pivot point is placed under a platform that is attached to speakers, sinks and nodes can be created by places speaker vibrations at different amplitudes and phases.  Applying his research to our project, it was determined that if we placed two speakers at equal amplitudes and opposite phases, a sink would be created in between the speakers.  This result can be thought of as the center being the center of a teeter-totter, in which two people of equal mass but at completely opposite phases would cause the teeter-totter to rotate perfectly around the center pivot point.  However, if the two speakers were at equal amplitudes and perfectly in phase with each other, that side of the plate would move up and down in one motion, causing the sink to be at the other side of the plate.&lt;br /&gt;
&lt;br /&gt;
We found that if we alternated between two different phases that created two orthogonal sinks, we could create a node at the intersection.  For example, if we wanted to create a node at 12 o&amp;#039;clock, we would alternate between the radial and orthogonal phases.  In the radial phase, we created a sink along the diameter of the plate between the two speakers that were not at 12 o&amp;#039;clock, namely speakers B and C.  Using the theory of creating sinks, we placed speakers B and C at equal amplitude and 180 degrees out of phase with each other.  If several small objects were placed on the plate at this point, all the objects would converge to the central line of the plate.  Next, in order to create the orthogonal sink that would create a node at 12 o&amp;#039;clock, we placed speakers B and C in phase and at equal amplitude.  However, in order to counteract the forces from speakers B and C, we put speaker A (the speaker at 12 o&amp;#039;clock) at a weak amplitude and 180 degrees out of phase with speakers B and C in the orthogonal phase.&lt;br /&gt;
&lt;br /&gt;
This same notion was the used to create all of the even number nodes on the clock face.  In order to create the nodes at the odd numbers, we slightly changed the amplitudes of the speakers at the previous time until the correct placement was found.&lt;br /&gt;
&lt;br /&gt;
Although theoretically our design should have allowed us to program the clock using symmetry, due to slight imperfections in the design and in the electrical components, we had to use some trial and error methods to place the nodes correctly.  Nonetheless, the theory allowed us to create nodes almost exactly where we wanted them to be.&lt;br /&gt;
&lt;br /&gt;
==Mechanical Design==&lt;br /&gt;
&lt;br /&gt;
The Vibratory clock consists of a wooden base, held up by adjustable legs, three speakers, and a circular platform.  The following material were used to create the design:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Base:&amp;#039;&amp;#039;&lt;br /&gt;
*wood: 16&amp;quot; diameter, 0.75&amp;quot; thick&lt;br /&gt;
*holes: 6&amp;quot; diameter (3 total)&lt;br /&gt;
*adjustable legs: 3 rods: 3/8&amp;quot;-16; 4&amp;quot; long; 6 nuts total&lt;br /&gt;
&lt;br /&gt;
[[Image:speaker_supports.jpg|right|thumb|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Speakers:&amp;#039;&amp;#039;&lt;br /&gt;
*3 Pyramid Power PW677X: 300W, 4 Ohms, 6.5&amp;quot; Chrome Subwoofer&lt;br /&gt;
**previously adapted speakers replaced center of speaker with attachments 3&amp;quot; in height and 1/2&amp;quot; hole on top&lt;br /&gt;
**1/2&amp;quot; diameter PVC used to attach previous attachment to platform with a screw&lt;br /&gt;
***held in place by 2 set screws each&lt;br /&gt;
**centers placed 7.125&amp;quot; apart&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Circular Platform&amp;#039;&amp;#039;&lt;br /&gt;
*PVC/Acrylic: 11.75&amp;quot; diameter, 0.25&amp;quot; thick &lt;br /&gt;
**machined on the LaserJet&lt;br /&gt;
**screw holes counter-sunk at 7.125&amp;quot; apart&lt;br /&gt;
*2.875&amp;quot; above wooden base&lt;br /&gt;
*Silver Sharpie used for numbers&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Reasoning for Geometry of Design&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Equilateral Triangle:&amp;#039;&amp;#039;&lt;br /&gt;
By having the speakers equidistant from each other, we were able to create symmetry in our design, which made programming the various nodes much easier.  For example, we were able to use the same theory to find the node at 12 o&amp;#039;clock, 4 o&amp;#039;clock, and 8 o&amp;#039;clock.  If the speakers were not placed equidistant from each other, two speakers placed at equal amplitudes and opposite phases would not have created a sink in the exact middle of the two speakers.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Adjustable Legs:&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
We needed to make the legs adjustable since it is essential that the platform be perfectly level in order for the objects placed on the platform to move in expected patterns.  For example, if one leg is slightly shorter than the other two, the objects placed on the platform would tend to move towards that leg and we could no longer rely on symmetry to program the various nodes due to the effects of gravity.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Height of Platform:&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Through our own experimentation and from [http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm Professor Lynch&amp;#039;s research], we found that we needed to have the pivot point (i.e. the speaker diaphragm) significantly below the platform in order to create sinks.  At one point in the design process, we attempted to create a different pivot point by replacing the PVC with 1/2&amp;quot; outer diameter, 1/4&amp;quot; inner diameter Tygon 2001 tubing that only was able to bend in one point since it had stand-offs and screws inside the tube.  However, this replacement in a sense created two pivot points (the speaker diaphragm and the Tygon), causing the platform to only create sources and not sinks.  In addition, the different height of the pivot point may have also led to the plate acting differently.&lt;br /&gt;
&lt;br /&gt;
==Electrical Design==&lt;br /&gt;
&lt;br /&gt;
[[Image:Circuit_Photo_Team22.jpg|right|thumb|Circuit Board|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Component List:&amp;lt;/b&amp;gt;&lt;br /&gt;
*1 Microchip PIC18F4520 (8-bit PIC Microcontroller)&lt;br /&gt;
*1 Maxim MAX520 (Quad, 2-Wire Serial 8-Bit Digital-to-Analog Converter)&lt;br /&gt;
*1 Emtel EMV15012V (12-V Power Supply)&lt;br /&gt;
*1 Legacy Series II LA160 (300-W Amplifier)&lt;br /&gt;
*3 Keystone 901K-ND (Snap-Fit 90 PC Phono Jack)&lt;br /&gt;
*3 Radioshack 42-2367 (6-Ft. Shielded Cable, RCA Plug to RCA Plug)&lt;br /&gt;
*20-ft Monster Cable S16-2XLN (16-Gauge Speaker Wire - Discontinued)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Circuit Diagram:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:team22_circuit.jpg|center|frame|Vibratory Clock Circuit Diagram|600px]]&lt;br /&gt;
&lt;br /&gt;
==Software Design==&lt;br /&gt;
&lt;br /&gt;
==Results==&lt;br /&gt;
[[Image:VibratoryClock.jpg|right|thumb|300px]]&lt;br /&gt;
&lt;br /&gt;
We were able to get our project working so that the plate moves an object placed anywhere on the plate to the correct time and then moves the objects around the clock face, acting as the hour &amp;quot;hand&amp;quot; of a clock.  However, we increased the speed so that it takes about 2 minutes for objects placed on the clock to move around so that it is easy to demonstrate.  Check out the working Vibratory Clock [http://www.youtube.com/watch?v=PV9utFL5J6w HERE].&lt;br /&gt;
&lt;br /&gt;
==Reflections==&lt;br /&gt;
&lt;br /&gt;
==Useful Resources==&lt;br /&gt;
&lt;br /&gt;
[http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm Vibration-Induced Frictional Force Fields for Part Manipulation]&lt;br /&gt;
&lt;br /&gt;
[http://www.cs.berkeley.edu/~jfc/dreznik/UPM2000/index.html Universal Planar Manipulator]&lt;/div&gt;</summary>
		<author><name>BrianLesperance</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Vibratory_Clock&amp;diff=7879</id>
		<title>Vibratory Clock</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Vibratory_Clock&amp;diff=7879"/>
		<updated>2008-03-19T21:58:29Z</updated>

		<summary type="html">&lt;p&gt;BrianLesperance: /* Electrical Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Team Members==&lt;br /&gt;
[[Image:team22.jpg|right|Left to right: Brian Lesperance, Jennifer Breger, Daniel Pinkawa|thumb|200px]]&lt;br /&gt;
&lt;br /&gt;
*Jennifer Breger - Mechanical Engineering Class of 2009&lt;br /&gt;
*Brian Lesperance - Electrical Engineering Class of 2008&lt;br /&gt;
*Daniel Pinkawa - Mechanical Engineering Class of 2008&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
We built a horizontal circular platform that is actuated from underneath by three speakers placed in an equilateral triangle. The vibration of the platform causes a small object (e.g., an IC socket or a coin) to act as an hour &amp;quot;hand&amp;quot; on top of the platform.  The object slides around the circular platform, impelled by friction forces due to the vibration.  By placing the speakers at different phases and amplitudes, we got the objects to move to desired positions.  Due to the nodes created by the speaker vibrations, the object will move back to the correct hour if it is moved away.  Our project was given to us by Professor Colgate and was based upon the research of Professor Lynch.&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
Through his [http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm research], Professor Lynch found that when a pivot point is placed under a platform that is attached to speakers, sinks and nodes can be created by places speaker vibrations at different amplitudes and phases.  Applying his research to our project, it was determined that if we placed two speakers at equal amplitudes and opposite phases, a sink would be created in between the speakers.  This result can be thought of as the center being the center of a teeter-totter, in which two people of equal mass but at completely opposite phases would cause the teeter-totter to rotate perfectly around the center pivot point.  However, if the two speakers were at equal amplitudes and perfectly in phase with each other, that side of the plate would move up and down in one motion, causing the sink to be at the other side of the plate.&lt;br /&gt;
&lt;br /&gt;
We found that if we alternated between two different phases that created two orthogonal sinks, we could create a node at the intersection.  For example, if we wanted to create a node at 12 o&amp;#039;clock, we would alternate between the radial and orthogonal phases.  In the radial phase, we created a sink along the diameter of the plate between the two speakers that were not at 12 o&amp;#039;clock, namely speakers B and C.  Using the theory of creating sinks, we placed speakers B and C at equal amplitude and 180 degrees out of phase with each other.  If several small objects were placed on the plate at this point, all the objects would converge to the central line of the plate.  Next, in order to create the orthogonal sink that would create a node at 12 o&amp;#039;clock, we placed speakers B and C in phase and at equal amplitude.  However, in order to counteract the forces from speakers B and C, we put speaker A (the speaker at 12 o&amp;#039;clock) at a weak amplitude and 180 degrees out of phase with speakers B and C in the orthogonal phase.&lt;br /&gt;
&lt;br /&gt;
This same notion was the used to create all of the even number nodes on the clock face.  In order to create the nodes at the odd numbers, we slightly changed the amplitudes of the speakers at the previous time until the correct placement was found.&lt;br /&gt;
&lt;br /&gt;
Although theoretically our design should have allowed us to program the clock using symmetry, due to slight imperfections in the design and in the electrical components, we had to use some trial and error methods to place the nodes correctly.  Nonetheless, the theory allowed us to create nodes almost exactly where we wanted them to be.&lt;br /&gt;
&lt;br /&gt;
==Mechanical Design==&lt;br /&gt;
&lt;br /&gt;
The Vibratory clock consists of a wooden base, held up by adjustable legs, three speakers, and a circular platform.  The following material were used to create the design:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Base:&amp;#039;&amp;#039;&lt;br /&gt;
*wood: 16&amp;quot; diameter, 0.75&amp;quot; thick&lt;br /&gt;
*holes: 6&amp;quot; diameter (3 total)&lt;br /&gt;
*adjustable legs: 3 rods: 3/8&amp;quot;-16; 4&amp;quot; long; 6 nuts total&lt;br /&gt;
&lt;br /&gt;
[[Image:speaker_supports.jpg|right|thumb|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Speakers:&amp;#039;&amp;#039;&lt;br /&gt;
*3 Pyramid Power PW677X: 300W, 4 Ohms, 6.5&amp;quot; Chrome Subwoofer&lt;br /&gt;
**previously adapted speakers replaced center of speaker with attachments 3&amp;quot; in height and 1/2&amp;quot; hole on top&lt;br /&gt;
**1/2&amp;quot; diameter PVC used to attach previous attachment to platform with a screw&lt;br /&gt;
***held in place by 2 set screws each&lt;br /&gt;
**centers placed 7.125&amp;quot; apart&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Circular Platform&amp;#039;&amp;#039;&lt;br /&gt;
*PVC/Acrylic: 11.75&amp;quot; diameter, 0.25&amp;quot; thick &lt;br /&gt;
**machined on the LaserJet&lt;br /&gt;
**screw holes counter-sunk at 7.125&amp;quot; apart&lt;br /&gt;
*2.875&amp;quot; above wooden base&lt;br /&gt;
*Silver Sharpie used for numbers&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Reasoning for Geometry of Design&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Equilateral Triangle:&amp;#039;&amp;#039;&lt;br /&gt;
By having the speakers equidistant from each other, we were able to create symmetry in our design, which made programming the various nodes much easier.  For example, we were able to use the same theory to find the node at 12 o&amp;#039;clock, 4 o&amp;#039;clock, and 8 o&amp;#039;clock.  If the speakers were not placed equidistant from each other, two speakers placed at equal amplitudes and opposite phases would not have created a sink in the exact middle of the two speakers.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Adjustable Legs:&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
We needed to make the legs adjustable since it is essential that the platform be perfectly level in order for the objects placed on the platform to move in expected patterns.  For example, if one leg is slightly shorter than the other two, the objects placed on the platform would tend to move towards that leg and we could no longer rely on symmetry to program the various nodes due to the effects of gravity.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Height of Platform:&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Through our own experimentation and from [http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm Professor Lynch&amp;#039;s research], we found that we needed to have the pivot point (i.e. the speaker diaphragm) significantly below the platform in order to create sinks.  At one point in the design process, we attempted to create a different pivot point by replacing the PVC with 1/2&amp;quot; outer diameter, 1/4&amp;quot; inner diameter Tygon 2001 tubing that only was able to bend in one point since it had stand-offs and screws inside the tube.  However, this replacement in a sense created two pivot points (the speaker diaphragm and the Tygon), causing the platform to only create sources and not sinks.  In addition, the different height of the pivot point may have also led to the plate acting differently.&lt;br /&gt;
&lt;br /&gt;
==Electrical Design==&lt;br /&gt;
&lt;br /&gt;
[[Image:Circuit_Photo_Team22.jpg|right|thumb|Circuit Board|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Component List:&amp;lt;/b&amp;gt;&lt;br /&gt;
*1 Microchip PIC18F4520 (8-bit PIC Microcontroller)&lt;br /&gt;
*1 Maxim MAX520 (Quad, 2-Wire Serial 8-Bit Digital-to-Analog Converter)&lt;br /&gt;
*1 Amplifier&lt;br /&gt;
*1 12V Power Supply&lt;br /&gt;
*3 Keystone 901K-ND (Snap-Fit 90 PC Phono Jack)&lt;br /&gt;
*3 Radioshack 42-2367 (6-Ft. Shielded Cable, RCA Plug to RCA Plug)&lt;br /&gt;
*20-ft Monster Cable S16-2XLN (16-Gauge Speaker Wire - Discontinued)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Circuit Diagram:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:team22_circuit.jpg|center|frame|Vibratory Clock Circuit Diagram|600px]]&lt;br /&gt;
&lt;br /&gt;
==Software Design==&lt;br /&gt;
&lt;br /&gt;
==Results==&lt;br /&gt;
[[Image:VibratoryClock.jpg|right|thumb|300px]]&lt;br /&gt;
&lt;br /&gt;
We were able to get our project working so that the plate moves an object placed anywhere on the plate to the correct time and then moves the objects around the clock face, acting as the hour &amp;quot;hand&amp;quot; of a clock.  However, we increased the speed so that it takes about 2 minutes for objects placed on the clock to move around so that it is easy to demonstrate.  Check out the working Vibratory Clock [http://www.youtube.com/watch?v=PV9utFL5J6w HERE].&lt;br /&gt;
&lt;br /&gt;
==Reflections==&lt;br /&gt;
&lt;br /&gt;
==Useful Resources==&lt;br /&gt;
&lt;br /&gt;
[http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm Vibration-Induced Frictional Force Fields for Part Manipulation]&lt;br /&gt;
&lt;br /&gt;
[http://www.cs.berkeley.edu/~jfc/dreznik/UPM2000/index.html Universal Planar Manipulator]&lt;/div&gt;</summary>
		<author><name>BrianLesperance</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Vibratory_Clock&amp;diff=7874</id>
		<title>Vibratory Clock</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Vibratory_Clock&amp;diff=7874"/>
		<updated>2008-03-19T21:46:01Z</updated>

		<summary type="html">&lt;p&gt;BrianLesperance: /* Electrical Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Team Members==&lt;br /&gt;
[[Image:team22.jpg|right|Left to right: Brian Lesperance, Jennifer Breger, Daniel Pinkawa|thumb|200px]]&lt;br /&gt;
&lt;br /&gt;
*Jennifer Breger - Mechanical Engineering Class of 2009&lt;br /&gt;
*Brian Lesperance - Electrical Engineering Class of 2008&lt;br /&gt;
*Daniel Pinkawa - Mechanical Engineering Class of 2008&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
We built a horizontal circular platform that is actuated from underneath by three speakers placed in an equilateral triangle. The vibration of the platform causes a small object (e.g., an IC socket or a coin) to act as an hour &amp;quot;hand&amp;quot; on top of the platform.  The object slides around the circular platform, impelled by friction forces due to the vibration.  By placing the speakers at different phases and amplitudes, we got the objects to move to desired positions.  Due to the nodes created by the speaker vibrations, the object will move back to the correct hour if it is moved away.  Our project was given to us by Professor Colgate and was based upon the research of Professor Lynch.&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
Through his [http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm research], Professor Lynch found that when a pivot point is placed under a platform that is attached to speakers, sinks and nodes can be created by places speaker vibrations at different amplitudes and phases.  Applying his research to our project, it was determined that if we placed two speakers at equal amplitudes and opposite phases, a sink would be created in between the speakers.  This result can be thought of as the center being the center of a teeter-totter, in which two people of equal mass but at completely opposite phases would cause the teeter-totter to rotate perfectly around the center pivot point.  However, if the two speakers were at equal amplitudes and perfectly in phase with each other, that side of the plate would move up and down in one motion, causing the sink to be at the other side of the plate.&lt;br /&gt;
&lt;br /&gt;
We found that if we alternated between two different phases that created two orthogonal sinks, we could create a node at the intersection.  For example, if we wanted to create a node at 12 o&amp;#039;clock, we would alternate between the radial and orthogonal phases.  In the radial phase, we created a sink along the diameter of the plate between the two speakers that were not at 12 o&amp;#039;clock, namely speakers B and C.  Using the theory of creating sinks, we placed speakers B and C at equal amplitude and 180 degrees out of phase with each other.  If several small objects were placed on the plate at this point, all the objects would converge to the central line of the plate.  Next, in order to create the orthogonal sink that would create a node at 12 o&amp;#039;clock, we placed speakers B and C in phase and at equal amplitude.  However, in order to counteract the forces from speakers B and C, we put speaker A (the speaker at 12 o&amp;#039;clock) at a weak amplitude and 180 degrees out of phase with speakers B and C in the orthogonal phase.&lt;br /&gt;
&lt;br /&gt;
This same notion was the used to create all of the even number nodes on the clock face.  In order to create the nodes at the odd numbers, we slightly changed the amplitudes of the speakers at the previous time until the correct placement was found.&lt;br /&gt;
&lt;br /&gt;
Although theoretically our design should have allowed us to program the clock using symmetry, due to slight imperfections in the design and in the electrical components, we had to use some trial and error methods to place the nodes correctly.  Nonetheless, the theory allowed us to create nodes almost exactly where we wanted them to be.&lt;br /&gt;
&lt;br /&gt;
==Mechanical Design==&lt;br /&gt;
&lt;br /&gt;
The Vibratory clock consists of a wooden base, held up by adjustable legs, three speakers, and a circular platform.  The following material were used to create the design:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Base:&amp;#039;&amp;#039;&lt;br /&gt;
*wood: 16&amp;quot; diameter, 0.75&amp;quot; thick&lt;br /&gt;
*holes: 6&amp;quot; diameter (3 total)&lt;br /&gt;
*adjustable legs: 3 rods: 3/8&amp;quot;-16; 4&amp;quot; long; 6 nuts total&lt;br /&gt;
&lt;br /&gt;
[[Image:speaker_supports.jpg|right|thumb|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Speakers:&amp;#039;&amp;#039;&lt;br /&gt;
*3 Pyramid Power PW677X: 300W, 4 Ohms, 6.5&amp;quot; Chrome Subwoofer&lt;br /&gt;
**previously adapted speakers replaced center of speaker with attachments 3&amp;quot; in height and 1/2&amp;quot; hole on top&lt;br /&gt;
**1/2&amp;quot; diameter PVC used to attach previous attachment to platform with a screw&lt;br /&gt;
***held in place by 2 set screws each&lt;br /&gt;
**centers placed 7.125&amp;quot; apart&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Circular Platform&amp;#039;&amp;#039;&lt;br /&gt;
*PVC/Acrylic: 11.75&amp;quot; diameter, 0.25&amp;quot; thick &lt;br /&gt;
**machined on the LaserJet&lt;br /&gt;
**screw holes counter-sunk at 7.125&amp;quot; apart&lt;br /&gt;
*2.875&amp;quot; above wooden base&lt;br /&gt;
*Silver Sharpie used for numbers&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Reasoning for Geometry of Design&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Equilateral Triangle:&amp;#039;&amp;#039;&lt;br /&gt;
By having the speakers equidistant from each other, we were able to create symmetry in our design, which made programming the various nodes much easier.  For example, we were able to use the same theory to find the node at 12 o&amp;#039;clock, 4 o&amp;#039;clock, and 8 o&amp;#039;clock.  If the speakers were not placed equidistant from each other, two speakers placed at equal amplitudes and opposite phases would not have created a sink in the exact middle of the two speakers.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Adjustable Legs:&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
We needed to make the legs adjustable since it is essential that the platform be perfectly level in order for the objects placed on the platform to move in expected patterns.  For example, if one leg is slightly shorter than the other two, the objects placed on the platform would tend to move towards that leg and we could no longer rely on symmetry to program the various nodes due to the effects of gravity.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Height of Platform:&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Through our own experimentation and from [http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm Professor Lynch&amp;#039;s research], we found that we needed to have the pivot point (i.e. the speaker diaphragm) significantly below the platform in order to create sinks.  At one point in the design process, we attempted to create a different pivot point by replacing the PVC with 1/2&amp;quot; outer diameter, 1/4&amp;quot; inner diameter Tygon 2001 tubing that only was able to bend in one point since it had stand-offs and screws inside the tube.  However, this replacement in a sense created two pivot points (the speaker diaphragm and the Tygon), causing the platform to only create sources and not sinks.  In addition, the different height of the pivot point may have also led to the plate acting differently.&lt;br /&gt;
&lt;br /&gt;
==Electrical Design==&lt;br /&gt;
&lt;br /&gt;
[[Image:Circuit_Photo_Team22.jpg|right|thumb|Circuit Board|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Component List&amp;lt;/b&amp;gt;&lt;br /&gt;
*1 Microchip PIC18F4520 (8-bit PIC Microcontroller)&lt;br /&gt;
*1 Maxim MAX520 (Quad, 2-Wire Serial 8-Bit Digital-to-Analog Converter)&lt;br /&gt;
*1 Amplifier&lt;br /&gt;
*1 12V Power Supply&lt;br /&gt;
*3 Keystone 901K-ND (Snap-Fit 90 PC Phono Jack)&lt;br /&gt;
*3 Radioshack 42-2367 (6-Ft. Shielded Cable, RCA Plug to RCA Plug)&lt;br /&gt;
*20-ft Monster Cable S16-2XLN (16-Gauge Speaker Wire - Discontinued)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Circuit Diagram:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:team22_circuit.jpg|center|frame|Vibratory Clock Circuit Diagram|600px]]&lt;br /&gt;
&lt;br /&gt;
==Software Design==&lt;br /&gt;
&lt;br /&gt;
==Results==&lt;br /&gt;
[[Image:VibratoryClock.jpg|right|thumb|300px]]&lt;br /&gt;
&lt;br /&gt;
We were able to get our project working so that the plate moves an object placed anywhere on the plate to the correct time and then moves the objects around the clock face, acting as the hour &amp;quot;hand&amp;quot; of a clock.  However, we increased the speed so that it takes about 2 minutes for objects placed on the clock to move around so that it is easy to demonstrate.  Check out the working Vibratory Clock [http://www.youtube.com/watch?v=PV9utFL5J6w HERE].&lt;br /&gt;
&lt;br /&gt;
==Reflections==&lt;br /&gt;
&lt;br /&gt;
==Useful Resources==&lt;br /&gt;
&lt;br /&gt;
[http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm Vibration-Induced Frictional Force Fields for Part Manipulation]&lt;br /&gt;
&lt;br /&gt;
[http://www.cs.berkeley.edu/~jfc/dreznik/UPM2000/index.html Universal Planar Manipulator]&lt;/div&gt;</summary>
		<author><name>BrianLesperance</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=ME_333_final_projects&amp;diff=7872</id>
		<title>ME 333 final projects</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=ME_333_final_projects&amp;diff=7872"/>
		<updated>2008-03-19T21:44:15Z</updated>

		<summary type="html">&lt;p&gt;BrianLesperance: /* Vibratory Clock */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;[[ME 333 end of course schedule]]&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== ME 333 Final Projects 2008 ==&lt;br /&gt;
&lt;br /&gt;
=== [[IR Tracker]] ===&lt;br /&gt;
&lt;br /&gt;
[[Image:IR_Tracker_Main.jpg|right|thumb|200px]]&lt;br /&gt;
&lt;br /&gt;
The IR Tracker (aka &amp;quot;Spot&amp;quot;) is a device that follows a moving infrared light. It continuously detects the position of an infrared emitter in two axises, and then tracks the emitter with a laser.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Robot Snake]] ===&lt;br /&gt;
[[Image:HLSSnakeMain.jpg|right|thumb|200px]]&lt;br /&gt;
&lt;br /&gt;
A wirelessly controlled robotic snake which uses a traveling sine wave and servo motors to  mimic serpentine motion.  The snake is capable of going forward, left, right and in reverse.   &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Programmable Stiffness Joint]] === &lt;br /&gt;
&lt;br /&gt;
[[Image:SteelToePic.jpg|thumb|200px|The &amp;#039;Steel Toe&amp;#039; programmable stiffness joint|right]]&lt;br /&gt;
&lt;br /&gt;
The Programmable Stiffness Joint varies rotational stiffness as desired by the user.  It is the first step in modeling the mechanical impedance of the human ankle joint (both stiffness and damping) for the purpose of determining the respective breakdown of the two properties over the gait cycle.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Magnetic based sample purification]] ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== [[Continuously Variable Transmission]] ===&lt;br /&gt;
&lt;br /&gt;
[[image:CVT_setup1.jpg|thumb|200px]]&lt;br /&gt;
&lt;br /&gt;
A continuously variable tramsission is intended to provide a transition from low to high gear ratios while keeping the engine input running at the max efficient speed. It is achieved by a system of variable radius pulleys and a v-belt.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Granular Flow Rotating Sphere]] ===&lt;br /&gt;
&lt;br /&gt;
This device will be used to study the granular flow of particles within a rotating sphere. The sphere is filled with grains of varying size and then rotated about two different axes according to a series of position and angular velocity inputs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Vibratory Clock]] ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Vibratory_Clock.jpg|right|thumb|Vibratory Clock|200px]]&lt;br /&gt;
&lt;br /&gt;
The Vibratory Clock allows a small object to act as an hour &amp;quot;hand&amp;quot; on a horizontal circular platform that is actuated from underneath by three speakers.  The object slides around the circular platform, impelled by friction forces due to the vibration.  [http://www.youtube.com/watch?v=PV9utFL5J6w Check it out!]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[WiiMouse]] ===&lt;br /&gt;
&lt;br /&gt;
[[Image:HPIM1027.jpg|right|thumb|200px]]&lt;br /&gt;
&lt;br /&gt;
The WiiMouse is a handheld remote that can be used to move a cursor on a windows-based PC, via accelerometer input captured through device movement.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Intelligent Oscillation Controller]] ===&lt;br /&gt;
&lt;br /&gt;
This device &amp;quot;learns&amp;quot; a forcing function that is applied to a spring and mass system to match an arbitrary, periodic acceleration profile.&lt;br /&gt;
&lt;br /&gt;
=== [[Baseball]] ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Baseball_Playfield.jpg|right|thumb|200px]]&lt;br /&gt;
&lt;br /&gt;
An interactive baseball game inspired by pinball, featuring pitching, batting, light up bases and a scoreboard to keep track of the game.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;/div&gt;</summary>
		<author><name>BrianLesperance</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Vibratory_Clock&amp;diff=7860</id>
		<title>Vibratory Clock</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Vibratory_Clock&amp;diff=7860"/>
		<updated>2008-03-19T21:28:20Z</updated>

		<summary type="html">&lt;p&gt;BrianLesperance: /* Electrical Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Team Members==&lt;br /&gt;
[[Image:team22.jpg|right|Left to right: Brian Lesperance, Jennifer Breger, Daniel Pinkawa|thumb|200px]]&lt;br /&gt;
&lt;br /&gt;
*Jennifer Breger - Mechanical Engineering Class of 2009&lt;br /&gt;
*Brian Lesperance - Electrical Engineering Class of 2008&lt;br /&gt;
*Daniel Pinkawa - Mechanical Engineering Class of 2008&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
We built a horizontal circular platform that is actuated from underneath by three speakers placed in an equilateral triangle. The vibration of the platform causes a small object (e.g., an IC socket or a coin) to act as an hour &amp;quot;hand&amp;quot; on top of the platform.  The object slides around the circular platform, impelled by friction forces due to the vibration.  By placing the speakers at different phases and amplitudes, we got the objects to move to desired positions.  Due to the nodes created by the speaker vibrations, the object will move back to the correct hour if it is moved away.  Our project was given to us by Professor Colgate and was based upon the research of Professor Lynch.&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
Through his [http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm research], Professor Lynch found that when a pivot point is placed under a platform that is attached to speakers, sinks and nodes can be created by places speaker vibrations at different amplitudes and phases.  Applying his research to our project, it was determined that if we placed two speakers at equal amplitudes and opposite phases, a sink would be created in between the speakers.  This result can be thought of as the center being the center of a teeter-totter, in which two people of equal mass but at completely opposite phases would cause the teeter-totter to rotate perfectly around the center pivot point.  However, if the two speakers were at equal amplitudes and perfectly in phase with each other, that side of the plate would move up and down in one motion, causing the sink to be at the other side of the plate.&lt;br /&gt;
&lt;br /&gt;
We found that if we alternated between two different phases that created two orthogonal sinks, we could create a node at the intersection.  For example, if we wanted to create a node at 12 o&amp;#039;clock, we would alternate between the radial and orthogonal phases.  In the radial phase, we created a sink along the diameter of the plate between the two speakers that were not at 12 o&amp;#039;clock, namely speakers B and C.  Using the theory of creating sinks, we placed speakers B and C at equal amplitude and 180 degrees out of phase with each other.  If several small objects were placed on the plate at this point, all the objects would converge to the central line of the plate.  Next, in order to create the orthogonal sink that would create a node at 12 o&amp;#039;clock, we placed speakers B and C in phase and at equal amplitude.  However, in order to counteract the forces from speakers B and C, we put speaker A (the speaker at 12 o&amp;#039;clock) at a weak amplitude and 180 degrees out of phase with speakers B and C in the orthogonal phase.&lt;br /&gt;
&lt;br /&gt;
This same notion was the used to create all of the even number nodes on the clock face.  In order to create the nodes at the odd numbers, we slightly changed the amplitudes of the speakers at the previous time until the correct placement was found.&lt;br /&gt;
&lt;br /&gt;
Although theoretically our design should have allowed us to program the clock using symmetry, due to slight imperfections in the design and in the electrical components, we had to use some trial and error methods to place the nodes correctly.  Nonetheless, the theory allowed us to create nodes almost exactly where we wanted them to be.&lt;br /&gt;
&lt;br /&gt;
==Mechanical Design==&lt;br /&gt;
&lt;br /&gt;
The Vibratory clock consists of a wooden base, held up by adjustable legs, three speakers, and a circular platform.  The following material were used to create the design:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Base:&amp;#039;&amp;#039;&lt;br /&gt;
*wood: 16&amp;quot; diameter, 0.75&amp;quot; thick&lt;br /&gt;
*holes: 6&amp;quot; diameter (3 total)&lt;br /&gt;
*adjustable legs: 3 rods: 3/8&amp;quot;-16; 4&amp;quot; long; 6 nuts total&lt;br /&gt;
&lt;br /&gt;
[[Image:speaker_supports.jpg|right|thumb|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Speakers:&amp;#039;&amp;#039;&lt;br /&gt;
*3 Pyramid Power PW677X: 300W, 4 Ohms, 6.5&amp;quot; Chrome Subwoofer&lt;br /&gt;
**previously adapted speakers replaced center of speaker with attachments 3&amp;quot; in height and 1/2&amp;quot; hole on top&lt;br /&gt;
**1/2&amp;quot; diameter PVC used to attach previous attachment to platform with a screw&lt;br /&gt;
***held in place by 2 set screws each&lt;br /&gt;
**centers placed 7.125&amp;quot; apart&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Circular Platform&amp;#039;&amp;#039;&lt;br /&gt;
*PVC/Acrylic: 11.75&amp;quot; diameter, 0.25&amp;quot; thick &lt;br /&gt;
**machined on the LaserJet&lt;br /&gt;
**screw holes counter-sunk at 7.125&amp;quot; apart&lt;br /&gt;
*2.875&amp;quot; above wooden base&lt;br /&gt;
*Silver Sharpie used for numbers&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Reasoning for Geometry of Design&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Equilateral Triangle:&amp;#039;&amp;#039;&lt;br /&gt;
By having the speakers equidistant from each other, we were able to create symmetry in our design, which made programming the various nodes much easier.  For example, we were able to use the same theory to find the node at 12 o&amp;#039;clock, 4 o&amp;#039;clock, and 8 o&amp;#039;clock.  If the speakers were not placed equidistant from each other, two speakers placed at equal amplitudes and opposite phases would not have created a sink in the exact middle of the two speakers.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Adjustable Legs:&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
We needed to make the legs adjustable since it is essential that the platform be perfectly level in order for the objects placed on the platform to move in expected patterns.  For example, if one leg is slightly shorter than the other two, the objects placed on the platform would tend to move towards that leg and we could no longer rely on symmetry to program the various nodes due to the effects of gravity.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Height of Platform:&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Through our own experimentation and from [http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm Professor Lynch&amp;#039;s research], we found that we needed to have the pivot point (i.e. the speaker diaphragm) significantly below the platform in order to create sinks.  At one point in the design process, we attempted to create a different pivot point by replacing the PVC with 1/2&amp;quot; outer diameter, 1/4&amp;quot; inner diameter Tygon 2001 tubing that only was able to bend in one point since it had stand-offs and screws inside the tube.  However, this replacement in a sense created two pivot points (the speaker diaphragm and the Tygon), causing the platform to only create sources and not sinks.  In addition, the different height of the pivot point may have also led to the plate acting differently.&lt;br /&gt;
&lt;br /&gt;
==Electrical Design==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Component List&amp;lt;/b&amp;gt;&lt;br /&gt;
*1 Microchip PIC18F4520 (8-bit PIC Microcontroller)&lt;br /&gt;
*1 Maxim MAX520 (Quad, 2-Wire Serial 8-Bit Digital-to-Analog Converter)&lt;br /&gt;
*1 Amplifier&lt;br /&gt;
*1 12V Power Supply&lt;br /&gt;
*3 Keystone 901K-ND (Snap-Fit 90 PC Phono Jack)&lt;br /&gt;
*3 Radioshack 42-2367 (6-Ft. Shielded Cable, RCA Plug to RCA Plug)&lt;br /&gt;
*20-ft Monster Cable S16-2XLN (16-Gauge Speaker Wire - Discontinued)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Circuit Diagram:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:team22_circuit.jpg|center|frame|Vibratory Clock Circuit Diagram|600px]]&lt;br /&gt;
&lt;br /&gt;
==Software Design==&lt;br /&gt;
&lt;br /&gt;
==Results==&lt;br /&gt;
&lt;br /&gt;
We were able to get our project working so that the plate moves an object placed anywhere on the plate to the correct time and then moves the objects around the clock face, acting as the hour &amp;quot;hand&amp;quot; of a clock.  However, we increased the speed so that it takes about 2 minutes for objects placed on the clock to move around so that it is easy to demonstrate.  Check out the working Vibratory Clock [http://www.youtube.com/watch?v=PV9utFL5J6w HERE].&lt;br /&gt;
&lt;br /&gt;
==Reflections==&lt;br /&gt;
&lt;br /&gt;
==Useful Resources==&lt;br /&gt;
&lt;br /&gt;
[http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm Vibration-Induced Frictional Force Fields for Part Manipulation]&lt;br /&gt;
&lt;br /&gt;
[http://www.cs.berkeley.edu/~jfc/dreznik/UPM2000/index.html Universal Planar Manipulator]&lt;/div&gt;</summary>
		<author><name>BrianLesperance</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=File:Team22_circuit.jpg&amp;diff=7853</id>
		<title>File:Team22 circuit.jpg</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=File:Team22_circuit.jpg&amp;diff=7853"/>
		<updated>2008-03-19T21:16:55Z</updated>

		<summary type="html">&lt;p&gt;BrianLesperance: This is the circuit diagram for the Vibratory Clock.  Channels 1, 2, and 3 go into Left 1, Right 1, and Left 2 channels on the amplifier respectively.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is the circuit diagram for the Vibratory Clock.  Channels 1, 2, and 3 go into Left 1, Right 1, and Left 2 channels on the amplifier respectively.&lt;/div&gt;</summary>
		<author><name>BrianLesperance</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Vibratory_Clock&amp;diff=7822</id>
		<title>Vibratory Clock</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Vibratory_Clock&amp;diff=7822"/>
		<updated>2008-03-19T20:16:18Z</updated>

		<summary type="html">&lt;p&gt;BrianLesperance: /* Electrical Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Team Members==&lt;br /&gt;
[[Image:team22.jpg|right|Left to right: Brian Lesperance, Jennifer Breger, Daniel Pinkawa|thumb|200px]]&lt;br /&gt;
&lt;br /&gt;
*Jennifer Breger - Mechanical Engineering Class of 2009&lt;br /&gt;
*Brian Lesperance - Electrical Engineering Class of 2008&lt;br /&gt;
*Daniel Pinkawa - Mechanical Engineering Class of 2008&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
We built a horizontal circular platform that is actuated from underneath by three speakers placed in an equilateral triangle. The vibration of the platform causes a small object (e.g., an IC socket or a coin) to act as an hour &amp;quot;hand&amp;quot; on top of the platform.  The object slides around the circular platform, impelled by friction forces due to the vibration.  By placing the speakers at different phases and amplitudes, we got the objects to move to desired positions.  Due to the nodes created by the speaker vibrations, the object will move back to the correct hour if it is moved away.  Our project was given to us by Professor Colgate and was based upon the research of Professor Lynch.&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
Through his [http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm research], Professor Lynch found that when a pivot point is placed under a platform that is attached to speakers, sinks and nodes can be created by places speaker vibrations at different amplitudes and phases.  Applying his research to our project, it was determined that if we placed two speakers at equal amplitudes and opposite phases, a sink would be created in between the speakers.  This result can be thought of as the center being the center of a teeter-totter, in which two people of equal mass but at completely opposite phases would cause the teeter-totter to rotate perfectly around the center pivot point.  However, if the two speakers were at equal amplitudes and perfectly in phase with each other, that side of the plate would move up and down in one motion, causing the sink to be at the other side of the plate.&lt;br /&gt;
&lt;br /&gt;
We found that if we alternated between two different phases that created two orthogonal sinks, we could create a node at the intersection.  For example, if we wanted to create a node at 12 o&amp;#039;clock, we would alternate between the radial and orthogonal phases.  In the radial phase, we created a sink along the diameter of the plate between the two speakers that were not at 12 o&amp;#039;clock, namely speakers B and C.  Using the theory of creating sinks, we placed speakers B and C at equal amplitude and 180 degrees out of phase with each other.  If several small objects were placed on the plate at this point, all the objects would converge to the central line of the plate.  Next, in order to create the orthogonal sink that would create a node at 12 o&amp;#039;clock, we placed speakers B and C in phase and at equal amplitude.  However, in order to counteract the forces from speakers B and C, we put speaker A (the speaker at 12 o&amp;#039;clock) at a weak amplitude and 180 degrees out of phase with speakers B and C in the orthogonal phase.&lt;br /&gt;
&lt;br /&gt;
This same notion was the used to create all of the even number nodes on the clock face.  In order to create the nodes at the odd numbers, we slightly changed the amplitudes of the speakers at the previous time until the correct placement was found.&lt;br /&gt;
&lt;br /&gt;
Although theoretically our design should have allowed us to program the clock using symmetry, due to slight imperfections in the design and in the electrical components, we had to use some trial and error methods to place the nodes correctly.  Nonetheless, the theory allowed us to create nodes almost exactly where we wanted them to be.&lt;br /&gt;
&lt;br /&gt;
==Mechanical Design==&lt;br /&gt;
&lt;br /&gt;
The Vibratory clock consists of a wooden base, held up by adjustable legs, three speakers, and a circular platform.  The following material were used to create the design:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Base:&amp;#039;&amp;#039;&lt;br /&gt;
*wood: 16&amp;quot; diameter, 0.75&amp;quot; thick&lt;br /&gt;
*holes: 6&amp;quot; diameter (3 total)&lt;br /&gt;
*adjustable legs: 3 rods: 3/8&amp;quot;-16; 4&amp;quot; long; 6 nuts total&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Speakers:&amp;#039;&amp;#039;&lt;br /&gt;
*3 Pyramid Power PW677X: 300W, 4 Ohms, 6.5&amp;quot; Chrome Subwoofer&lt;br /&gt;
**previously adapted speakers replaced center of speaker with attachments 3&amp;quot; in height and 1/2&amp;quot; hole on top&lt;br /&gt;
**1/2&amp;quot; diameter PVC used to attach previous attachment to platform with a screw&lt;br /&gt;
***held in place by 2 set screws each&lt;br /&gt;
**centers placed 7.125&amp;quot; apart&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Circular Platform&amp;#039;&amp;#039;&lt;br /&gt;
*PVC/Acrylic: 11.75&amp;quot; diameter, 0.25&amp;quot; thick &lt;br /&gt;
**machined on the LaserJet&lt;br /&gt;
**screw holes counter-sunk at 7.125&amp;quot; apart&lt;br /&gt;
*2.875&amp;quot; above wooden base&lt;br /&gt;
*Silver Sharpie used for numbers&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Reasoning for Geometry of Design&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Equilateral Triangle:&amp;#039;&amp;#039;&lt;br /&gt;
By having the speakers equidistant from each other, we were able to create symmetry in our design, which made programming the various nodes much easier.  For example, we were able to use the same theory to find the node at 12 o&amp;#039;clock, 4 o&amp;#039;clock, and 8 o&amp;#039;clock.  If the speakers were not placed equidistant from each other, two speakers placed at equal amplitudes and opposite phases would not have created a sink in the exact middle of the two speakers.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Adjustable Legs:&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
We needed to make the legs adjustable since it is essential that the platform be perfectly level in order for the objects placed on the platform to move in expected patterns.  For example, if one leg is slightly shorter than the other two, the objects placed on the platform would tend to move towards that leg and we could no longer rely on symmetry to program the various nodes due to the effects of gravity.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Height of Platform:&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Through our own experimentation and from [http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm Professor Lynch&amp;#039;s research], we found that we needed to have the pivot point (i.e. the speaker diaphragm) significantly below the platform in order to create sinks.  At one point in the design process, we attempted to create a different pivot point by replacing the PVC with 1/2&amp;quot; outer diameter, 1/4&amp;quot; inner diameter Tygon 2001 tubing that only was able to bend in one point since it had stand-offs and screws inside the tube.  However, this replacement in a sense created two pivot points (the speaker diaphragm and the Tygon), causing the platform to only create sources and not sinks.  In addition, the different height of the pivot point may have also led to the plate acting differently.&lt;br /&gt;
&lt;br /&gt;
==Electrical Design==&lt;br /&gt;
&lt;br /&gt;
Major Component&lt;br /&gt;
*1 Microchip PIC18F4520 (8-bit PIC Microcontroller)&lt;br /&gt;
*1 Maxim MAX520 (Quad, 2-Wire Serial 8-Bit Digital-to-Analog Converter)&lt;br /&gt;
&lt;br /&gt;
Minor Components&lt;br /&gt;
*3 Keystone 901K-ND (Snap-Fit 90 PC Phono Jack)&lt;br /&gt;
*3 Radioshack 42-2367 (6-Ft. Shielded Cable, RCA Plug to RCA Plug)&lt;br /&gt;
*20-ft Monster Cable Speaker Cable&lt;br /&gt;
&lt;br /&gt;
Circuit Diagram&lt;br /&gt;
&lt;br /&gt;
==Software Design==&lt;br /&gt;
&lt;br /&gt;
==Results==&lt;br /&gt;
&lt;br /&gt;
We were able to get our project working so that the plate moves an object placed anywhere on the plate to the correct time and then moves the objects around the clock face, acting as the hour &amp;quot;hand&amp;quot; of a clock.  However, we increased the speed so that it takes about 2 minutes for objects placed on the clock to move around so that it is easy to demonstrate.  Check out the working Vibratory Clock HERE.&lt;br /&gt;
&lt;br /&gt;
==Reflections==&lt;br /&gt;
&lt;br /&gt;
==Useful Resources==&lt;br /&gt;
&lt;br /&gt;
[http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm Vibration-Induced Frictional Force Fields for Part Manipulation]&lt;br /&gt;
&lt;br /&gt;
[http://www.cs.berkeley.edu/~jfc/dreznik/UPM2000/index.html Universal Planar Manipulator]&lt;/div&gt;</summary>
		<author><name>BrianLesperance</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Vibratory_Clock&amp;diff=7773</id>
		<title>Vibratory Clock</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Vibratory_Clock&amp;diff=7773"/>
		<updated>2008-03-19T18:01:38Z</updated>

		<summary type="html">&lt;p&gt;BrianLesperance: /* Team Members */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Team Members==&lt;br /&gt;
&lt;br /&gt;
[[Image:team22.jpg|right|Left to right: Brian Lesperance, Daniel Pinkawa, and Jennifer Breger|thumb|200px]]&lt;br /&gt;
&lt;br /&gt;
*Jennifer Breger - Mechanical Engineering Class of 2009&lt;br /&gt;
*Brian Lesperance - Electrical Engineering Class of 2008&lt;br /&gt;
*Daniel Pinkawa - Mechanical Engineering Class of 2008&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
We built a horizontal circular platform that is actuated from underneath by three speakers. The vibration of the platform causes a small object (e.g., a IC sockets or coins) to act as an hour &amp;quot;hand&amp;quot; on top of the platform to slide around the circular platform, impelled by friction forces due to the vibration. If you bump the hand away, it slowly moves back to the correct hour.&lt;br /&gt;
&lt;br /&gt;
==Mechanical Design==&lt;br /&gt;
&lt;br /&gt;
==Electrical Design==&lt;br /&gt;
&lt;br /&gt;
==Software Design==&lt;br /&gt;
&lt;br /&gt;
==Results==&lt;br /&gt;
&lt;br /&gt;
==Reflections==&lt;/div&gt;</summary>
		<author><name>BrianLesperance</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Vibratory_Clock&amp;diff=7772</id>
		<title>Vibratory Clock</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Vibratory_Clock&amp;diff=7772"/>
		<updated>2008-03-19T18:01:23Z</updated>

		<summary type="html">&lt;p&gt;BrianLesperance: /* Team Members */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Team Members==&lt;br /&gt;
&lt;br /&gt;
[[Image:team22.jpg|right|Left to right: Brian Lesperance, Daniel Pinkawa, and Jennifer Breger|thumb|200px]]&lt;br /&gt;
&lt;br /&gt;
*Jennifer Breger - Mechanical Engineering Class of 2009&lt;br /&gt;
*Brian Lesperance - Electrical Engineering Class of 2008 (The Leader)&lt;br /&gt;
*Daniel Pinkawa - Mechanical Engineering Class of 2008&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
We built a horizontal circular platform that is actuated from underneath by three speakers. The vibration of the platform causes a small object (e.g., a IC sockets or coins) to act as an hour &amp;quot;hand&amp;quot; on top of the platform to slide around the circular platform, impelled by friction forces due to the vibration. If you bump the hand away, it slowly moves back to the correct hour.&lt;br /&gt;
&lt;br /&gt;
==Mechanical Design==&lt;br /&gt;
&lt;br /&gt;
==Electrical Design==&lt;br /&gt;
&lt;br /&gt;
==Software Design==&lt;br /&gt;
&lt;br /&gt;
==Results==&lt;br /&gt;
&lt;br /&gt;
==Reflections==&lt;/div&gt;</summary>
		<author><name>BrianLesperance</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Vibratory_Clock&amp;diff=7771</id>
		<title>Vibratory Clock</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Vibratory_Clock&amp;diff=7771"/>
		<updated>2008-03-19T18:01:01Z</updated>

		<summary type="html">&lt;p&gt;BrianLesperance: /* Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Team Members==&lt;br /&gt;
&lt;br /&gt;
[[Image:team22.jpg|right|Left to right: Brian Lesperance, Daniel Pinkawa, and Jennifer Breger|thumb|200px]]&lt;br /&gt;
&lt;br /&gt;
*Jennifer Breger - Mechanical Engineering Class of 2009&lt;br /&gt;
*Brian Lesperance - Electrical Engineering Class of 2008&lt;br /&gt;
*Daniel Pinkawa - Mechanical Engineering Class of 2008&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
We built a horizontal circular platform that is actuated from underneath by three speakers. The vibration of the platform causes a small object (e.g., a IC sockets or coins) to act as an hour &amp;quot;hand&amp;quot; on top of the platform to slide around the circular platform, impelled by friction forces due to the vibration. If you bump the hand away, it slowly moves back to the correct hour.&lt;br /&gt;
&lt;br /&gt;
==Mechanical Design==&lt;br /&gt;
&lt;br /&gt;
==Electrical Design==&lt;br /&gt;
&lt;br /&gt;
==Software Design==&lt;br /&gt;
&lt;br /&gt;
==Results==&lt;br /&gt;
&lt;br /&gt;
==Reflections==&lt;/div&gt;</summary>
		<author><name>BrianLesperance</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Vibratory_Clock&amp;diff=7769</id>
		<title>Vibratory Clock</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Vibratory_Clock&amp;diff=7769"/>
		<updated>2008-03-19T17:57:34Z</updated>

		<summary type="html">&lt;p&gt;BrianLesperance: /* Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Team Members==&lt;br /&gt;
&lt;br /&gt;
[[Image:team22.jpg|right|Left to right: Brian Lesperance, Daniel Pinkawa, and Jennifer Breger|thumb|200px]]&lt;br /&gt;
&lt;br /&gt;
*Jennifer Breger - Mechanical Engineering Class of 2009&lt;br /&gt;
*Brian Lesperance - Electrical Engineering Class of 2008&lt;br /&gt;
*Daniel Pinkawa - Mechanical Engineering Class of 2008&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
You will build a horizontal circular platform that is actuated from underneath by three compliantly-attached voice coil actuators (i.e., speakers). The vibration of the platform causes an hour &amp;quot;hand&amp;quot; on top of the platform to slide around the circular platform, impelled by friction forces due to the vibration. If you bump the hand away, it slowly moves back to the correct hour. You may find other imaginative uses for your device. Check out this website to see more information on how this works and some videos of parts moving around a vibrated plate.&lt;br /&gt;
&lt;br /&gt;
==Mechanical Design==&lt;br /&gt;
&lt;br /&gt;
==Electrical Design==&lt;br /&gt;
&lt;br /&gt;
==Software Design==&lt;br /&gt;
&lt;br /&gt;
==Results==&lt;br /&gt;
&lt;br /&gt;
==Reflections==&lt;/div&gt;</summary>
		<author><name>BrianLesperance</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Vibratory_Clock&amp;diff=7765</id>
		<title>Vibratory Clock</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Vibratory_Clock&amp;diff=7765"/>
		<updated>2008-03-19T17:54:45Z</updated>

		<summary type="html">&lt;p&gt;BrianLesperance: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Team Members==&lt;br /&gt;
*Jennifer Breger - Mechanical Engineering Class of 2009&lt;br /&gt;
*Brian Lesperance - Electrical Engineering Class of 2008&lt;br /&gt;
*Daniel Pinkawa - Mechanical Engineering Class of 2008&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
==Mechanical Design==&lt;br /&gt;
&lt;br /&gt;
==Electrical Design==&lt;br /&gt;
&lt;br /&gt;
==Software Design==&lt;br /&gt;
&lt;br /&gt;
==Results==&lt;br /&gt;
&lt;br /&gt;
==Reflections==&lt;/div&gt;</summary>
		<author><name>BrianLesperance</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Vibratory_Clock&amp;diff=7763</id>
		<title>Vibratory Clock</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Vibratory_Clock&amp;diff=7763"/>
		<updated>2008-03-19T17:53:38Z</updated>

		<summary type="html">&lt;p&gt;BrianLesperance: /* Mechanical Set-up */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Team Members==&lt;br /&gt;
*Jennifer Breger - Mechanical Engineering Class of 2009&lt;br /&gt;
*Brian Lesperance - Electrical Engineering Class of 2008&lt;br /&gt;
*Daniel Pinkawa - Mechanical Engineering Class of 2008&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
==Mechanical Set-up==&lt;br /&gt;
&lt;br /&gt;
==Circuitry==&lt;br /&gt;
&lt;br /&gt;
==PIC Code==&lt;br /&gt;
&lt;br /&gt;
==Matlab Code==&lt;br /&gt;
&lt;br /&gt;
==Results==&lt;/div&gt;</summary>
		<author><name>BrianLesperance</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Vibratory_Clock&amp;diff=7762</id>
		<title>Vibratory Clock</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Vibratory_Clock&amp;diff=7762"/>
		<updated>2008-03-19T17:53:12Z</updated>

		<summary type="html">&lt;p&gt;BrianLesperance: /* Team Members */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Team Members==&lt;br /&gt;
*Jennifer Breger - Mechanical Engineering Class of 2009&lt;br /&gt;
*Brian Lesperance - Electrical Engineering Class of 2008&lt;br /&gt;
*Daniel Pinkawa - Mechanical Engineering Class of 2008&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
==Mechanical Set-up==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Housing and Ball Support====&lt;br /&gt;
&lt;br /&gt;
====Main Drive Wheel and Motor====&lt;br /&gt;
&lt;br /&gt;
====Lazy Susan and Position Control Motor====&lt;br /&gt;
&lt;br /&gt;
==Circuitry==&lt;br /&gt;
&lt;br /&gt;
==PIC Code==&lt;br /&gt;
&lt;br /&gt;
==Matlab Code==&lt;br /&gt;
&lt;br /&gt;
==Results==&lt;/div&gt;</summary>
		<author><name>BrianLesperance</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Vibratory_Clock&amp;diff=7761</id>
		<title>Vibratory Clock</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Vibratory_Clock&amp;diff=7761"/>
		<updated>2008-03-19T17:52:18Z</updated>

		<summary type="html">&lt;p&gt;BrianLesperance: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Team Members==&lt;br /&gt;
*Brian Kephart - Electrical Engineering Class of 2009&lt;br /&gt;
*Jonathan Shih - Mechanical Engineering Class of 2009&lt;br /&gt;
*Kristi Bond - Mechanical Engineering Class of 2008&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
==Mechanical Set-up==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Housing and Ball Support====&lt;br /&gt;
&lt;br /&gt;
====Main Drive Wheel and Motor====&lt;br /&gt;
&lt;br /&gt;
====Lazy Susan and Position Control Motor====&lt;br /&gt;
&lt;br /&gt;
==Circuitry==&lt;br /&gt;
&lt;br /&gt;
==PIC Code==&lt;br /&gt;
&lt;br /&gt;
==Matlab Code==&lt;br /&gt;
&lt;br /&gt;
==Results==&lt;/div&gt;</summary>
		<author><name>BrianLesperance</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=ME_333_final_projects&amp;diff=7760</id>
		<title>ME 333 final projects</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=ME_333_final_projects&amp;diff=7760"/>
		<updated>2008-03-19T17:51:41Z</updated>

		<summary type="html">&lt;p&gt;BrianLesperance: /* ME 333 Final Projects 2008 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;[[ME 333 end of course schedule]]&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== ME 333 Final Projects 2008 ==&lt;br /&gt;
&lt;br /&gt;
=== [[IR Tracker]] ===&lt;br /&gt;
&lt;br /&gt;
[[Image:IR_Tracker_Main.jpg|right|thumb|200px]]&lt;br /&gt;
&lt;br /&gt;
The IR Tracker (aka &amp;quot;Spot&amp;quot;) is a device that follows a moving infrared light. It continuously detects the position of an infrared emitter in two axises, and then tracks the emitter with a laser.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Robot Snake]] ===&lt;br /&gt;
[[Image:HLSSnakeMain.jpg|right|thumb|200px]]&lt;br /&gt;
&lt;br /&gt;
A wirelessly controlled robotic snake which uses a traveling sine wave and servo motors to  mimic serpentine motion.  The snake is capable of going forward, left, right and in reverse.   &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Programmable Stiffness Joint]] === &lt;br /&gt;
&lt;br /&gt;
[[Image:SteelToePic.jpg|thumb|200px|[The &amp;#039;Steel Toe&amp;#039; programmable stiffness joint]|right]]&lt;br /&gt;
&lt;br /&gt;
The Programmable Stiffness Joint varies rotational stiffness as desired by the user.  It is the first step in modeling the mechanical impedance of the human ankle joint (both stiffness and damping) for the purpose of determining the respective breakdown of the two properties over the gait cycle.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Magnetic based sample purification]] ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== [[Continuously Variable Transmission]] ===&lt;br /&gt;
&lt;br /&gt;
[[image:CVT_setup1.jpg|thumb|200px]]&lt;br /&gt;
&lt;br /&gt;
A continuously variable tramsission is intended to provide a transition from low to high gear ratios while keeping the engine input running at the max efficient speed. It is achieved by a system of variable radius pulleys and a v-belt.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Granular Flow Rotating Sphere]] ===&lt;br /&gt;
&lt;br /&gt;
This device will be used to study the granular flow of particles within a rotating sphere. The sphere is filled with grains of varying size and then rotated about two different axes according to a series of position and angular velocity inputs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Vibratory Clock]] ===&lt;br /&gt;
&lt;br /&gt;
Vibratory Clock&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[WiiMouse]] ===&lt;br /&gt;
&lt;br /&gt;
[[Image:HPIM1027.jpg|right|thumb|200px]]&lt;br /&gt;
&lt;br /&gt;
The WiiMouse is a handheld remote that can be used to move a cursor on a windows-based PC, via accelerometer input captured through device movement.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Intelligent Oscillation Controller]] ===&lt;br /&gt;
&lt;br /&gt;
This device &amp;quot;learns&amp;quot; a forcing function that is applied to a spring and mass system to match an arbitrary, periodic acceleration profile.&lt;br /&gt;
&lt;br /&gt;
=== [[Baseball]] ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Baseball_Playfield.jpg|right|thumb|200px]]&lt;br /&gt;
&lt;br /&gt;
An interactive baseball game inspired by pinball, featuring pitching, batting, light up bases and a scoreboard to keep track of the game.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;/div&gt;</summary>
		<author><name>BrianLesperance</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=IR_communication_between_PICs&amp;diff=7111</id>
		<title>IR communication between PICs</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=IR_communication_between_PICs&amp;diff=7111"/>
		<updated>2008-02-20T18:40:09Z</updated>

		<summary type="html">&lt;p&gt;BrianLesperance: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Note: This wiki page does not describe a successful implementation of communication between an IR transceiver and a PIC.&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
Two PICs can easily communicate with one another using serial communication.  IR communication is a basic extension of this method which can be easily implemented with a microcontroller (PIC) through an IR Encoder/Decoder (endec) and an IR Transceiver.  The endec and transceiver used in this example support Serial IR (SIR) data rate, ranging from 9.6 kbps to 115.2 kbps.  The typical range of the transceiver is nominally from 2 inches to 2 feet and extends upwards of 12 feet.  The PIC, endec, and transceiver employed all support bidirectional use.  However, when a transceiver is transmitting it essentially blinds its receiver and therefore cannot attain true full-duplex communication; only half-duplex was used with the transceiver taking turns transmitting and receiving.&lt;br /&gt;
&lt;br /&gt;
When transmitting, the PIC sends the serial format data to the endec, which encodes (or modulates) it bit by bit.  This encoded data is then outputted as electrical pulses to the transceiver.  The transceiver converts these electrical pulses to IR light pulses.  When receiving, the transceiver receives IR light pulses (data), which are outputted as electrical pulses. The endec decodes (or demodulates) these electrical pulses, with the data then being transmitted by the endec UART back to the receiving PIC. This modulation/demodulation method is performed in accordance with the IrDA standard.&lt;br /&gt;
&lt;br /&gt;
Both the PIC and the endec used in this example were DIP packages, making them easy to prototype and inspect.  The transceiver, however, was a surface mount chip with an uncommon pin configuration (0.95 mm pitch), requiring a different mounting approach.  We initially attempted to etch a [http://www.radioshack.com/sm-2-sided-copper-clad-pc-board--pi-2102495.html copper-clad board] for our circuit (see image).  However, due to the way this board is set up, this attempt only works with exact precision.  Unfortunately, due to the limited number of IR transceivers and copper-clad boards we had this approach led to a dead end.  Another possible solution to mount the IR transceiver was to use a [http://www.schmartboard.com/index.asp?page=products_so&amp;amp;id=54 SchmartBoard].  These boards are more general and pre-fabricated for use with surface mount ICs (with a particular pitch or pin seperation).  Theoretically, both solutions will allow for connections to a solderless breadboard.  However, because none of the IR transceiver chips we could find came at the same pitch as the SchmartBoards, we could not use this approach.  Overall, since the IR transceiver chips did not come at standard pitches, we were unable to find a way to mount the IR chip.&lt;br /&gt;
&lt;br /&gt;
== Circuit ==&lt;br /&gt;
The circuit diagram below shows a complete half-duplex IR communication circuit.  This circuit can either be used together with an identical circuit to communicate, with only one PIC transmitting at a time, or with a remote control.  The software on the PIC can be configured to respond to a variety of commands sent by the remote.  The electrical characteristics of the power supply and discrete components are given below.  Some of the ranges for the IR circuitry are also given below in parentheses.  In the circuit, there are two interfaces: the serial interface and the IR interface.&lt;br /&gt;
&lt;br /&gt;
[[Image:Serial_ir_data_format.jpg|left|thumb|400px|Serial &amp;amp; IR Data Format]]&lt;br /&gt;
===Serial Interface===&lt;br /&gt;
The serial interface is located between the PIC and the endec and sends data sequentially one bit at a time. The transmit (TX) and receive (RX) pins on the endec need to be connected between both ICs with a common ground.  The data passing between the two components on these lines have the standard 8-N-1 serial data format. 8-N-1 is a serial configuration in which there are 8 data bits, no parity bits and 1 stop bit. Data bits contain the information to be transmitted. A parity bit is a binary digit used to ensure data accuracy, while a stop bit is used to indicate the end of a data string. &lt;br /&gt;
&lt;br /&gt;
There is also a 16XCLK signal going to the endec from the PIC used to control the baud rate of the endec; that signal is a square wave pulse train at a frequency of 16*(the baud rate) and is generated in software. The &amp;lt;span style=&amp;quot;text-decoration: overline&amp;quot;&amp;gt;RESET&amp;lt;/span&amp;gt; signal on the endec could be controlled with software but is simply held high since the endec need not be reset.&lt;br /&gt;
&lt;br /&gt;
===IR Interface===&lt;br /&gt;
The second interface — the IR interface — is located between the endec and the transceiver.  This interface is straightforward with the TXIR and RXIR pins of the endec connecting to the TXD and RXD pins of the transceiver, respectively, and also has a common ground.  The signals between these two components conform to the IrDA physical layer standard.  When a logic high or &amp;#039;1&amp;#039; is to be transmitted, a logic low will be sent to the transceiver.  When a logic low or &amp;#039;0&amp;#039; is to be transmitted, a logic high will be pulsed after 7-8 cycles of the 16XCLK signal for 3 cycles of the 16XCLK signal but no longer than 4 µs.&lt;br /&gt;
&lt;br /&gt;
===Optical Interface===&lt;br /&gt;
The optical interface refers to the actual IR energy being transmitted between two transceivers or a source and a receiver.  The optical signal is a modulated form of the signal between the Endec and the Transceiver at the Transceiver&amp;#039;s carrier frequency, 38 kHz.  That means that when the Endec would transmit a pulse for 3 cycles at the 16XCLK frequency, the transceiver would start pulsing IR energy at 38 kHz until the pulse went low.  When the transceiver receive IR pulsed at 38 kHz, the duration of the IR pulses is the duration of the pulse sent to the Endec.&lt;br /&gt;
&lt;br /&gt;
[[Image:IR_circuit.jpg|thumb|right|600px|Circuit Diagram]]&lt;br /&gt;
&lt;br /&gt;
===Electrical Characteristics===&lt;br /&gt;
&amp;#039;&amp;#039;Microcontroller ([http://ww1.microchip.com/downloads/en/DeviceDoc/39631a.pdf Microchip PIC18F4520])&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; = 5.0V&lt;br /&gt;
*C&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; = 1µF&lt;br /&gt;
**V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; - Pin 11 &amp;amp; 32&lt;br /&gt;
**GND - Pin 12 &amp;amp; 31&lt;br /&gt;
**TX - Pin 25 (C6)&lt;br /&gt;
**RX - Pin 26 (C7)&lt;br /&gt;
**16XCLK - Pin 17 (C2/CCP1)&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;IR Encoder/Decoder ([http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf Microchip MCP2122-E/P])&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; = 5.0V (1.8V-5.5V)&lt;br /&gt;
*C&amp;lt;sub&amp;gt;BYP&amp;lt;/sub&amp;gt; = 0.01µF&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;IR Transceiver ([http://www.vishay.com/docs/82614/tfdu4300.pdf Vishay TFDU4300])&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;cc1&amp;lt;/sub&amp;gt; = 5.0V (2.4V-5.5V)&lt;br /&gt;
*V&amp;lt;sub&amp;gt;cc2&amp;lt;/sub&amp;gt; = 5.0V (-0.3V-6.0V)&lt;br /&gt;
*V&amp;lt;sub&amp;gt;logic&amp;lt;/sub&amp;gt; = 5.0V (1.5V-5.5V)&lt;br /&gt;
*R&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; = 47Ω&lt;br /&gt;
*C&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; = 0.1µF&lt;br /&gt;
&lt;br /&gt;
[[Image:copper_clad_board.jpg|right|thumb|400px|Copper-Clad Board with IR Transceiver]]		 &lt;br /&gt;
=== Surface Mount Prototyping ===	  &lt;br /&gt;
*Transceiver lead pitch = 0.95mm	 &lt;br /&gt;
*Multiple options for installation	 &lt;br /&gt;
**SchmartBoard	 &lt;br /&gt;
**Copper-clad board etching&lt;br /&gt;
**Microchip MCP212X Developer&amp;#039;s Daughter Boards (suitable only for this specific IR application)&lt;br /&gt;
&lt;br /&gt;
=== Limitations ===	 &lt;br /&gt;
*IR Communication is only Half-Duplex (only one transceiver transmitting at a time)&lt;br /&gt;
*Transmission Distance maximum is about 12 feet (about 3ft in low power mode)&lt;br /&gt;
*Communication Speed can only go up to 115.2 kpbs&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
&lt;br /&gt;
Example code for a simple IR communication circuit w/o the use of a transceiver:&lt;br /&gt;
&lt;br /&gt;
 /*&lt;br /&gt;
   ircomm.c Jennifer Breger, Brian Lesperance, Dan Pinkawa 2008-02-05&lt;br /&gt;
   Using the PIC&amp;#039;s built-in UART, a counter continually is sent to one IR encoder/decoder.  Then&lt;br /&gt;
   the first IR encoder/decoder feeds its TXIR to the RXIR of a second IR encoder/decoder.  The &lt;br /&gt;
   second IR encoder/decoder then transmits back to the PIC what it is receiving.  When the&lt;br /&gt;
   transceiver circuit is properly mounted and inserted into the circuit, this code can be adapted&lt;br /&gt;
   for half-duplex communication w/ another IR communications circuit.&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
 #include &amp;lt;18f4520.h&amp;gt;&lt;br /&gt;
 #fuses HS,NOLVP,NOWDT,NOPROTECT&lt;br /&gt;
 #use delay (clock=20000000)&lt;br /&gt;
 #use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, stream=com_a) // Initializes the UART to 9600 bps &lt;br /&gt;
                                                              // (up to 115,200 bps)&lt;br /&gt;
 &lt;br /&gt;
 // timed_getc() checks whether data is ready to be read.  If it&amp;#039;s not the function returns a null&lt;br /&gt;
 // character.  If you simply use getc(), the PIC might get slowed up if the data isn&amp;#039;t ready right&lt;br /&gt;
 // away.&lt;br /&gt;
 char timed_getc(void){&lt;br /&gt;
    long timeout;&lt;br /&gt;
    int timeout_error = FALSE;&lt;br /&gt;
    timeout = 0;&lt;br /&gt;
    while(!kbhit() &amp;amp;&amp;amp; (++timeout&amp;lt;50000))&lt;br /&gt;
       delay_us(10);&lt;br /&gt;
    if (kbhit())&lt;br /&gt;
       return(getc());&lt;br /&gt;
    else {&lt;br /&gt;
       timeout_error = TRUE;&lt;br /&gt;
       return(0);&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 // Main program&lt;br /&gt;
 void main(void){&lt;br /&gt;
    int i;&lt;br /&gt;
    char rx;&lt;br /&gt;
 &lt;br /&gt;
    setup_timer_2(T2_DIV_BY_1, 32, 16); // Provides a 151.3 kHz clock for the Encoder/Decoder, in   &lt;br /&gt;
    setup_ccp1(CCP_PWM);                // order for it to know the baud rate of the UART. Should be &lt;br /&gt;
    set_pwm1_duty(16);                  // closer to 16 * 9600 = 153.6 kHz but the error is tolerable&lt;br /&gt;
 &lt;br /&gt;
    while(TRUE){&lt;br /&gt;
       for(i=0;i&amp;lt;16;i++){      // Counts up from 0 to 15 and transmits to the first Encoder/Decoder.&lt;br /&gt;
          putc(i);             // Listens to the second Encoder/Decoder, which is simply the original&lt;br /&gt;
          rx = timed_getc();   // message from the PIC, and displays the value on the LEDs/Port D.&lt;br /&gt;
          output_d((int8) rx);&lt;br /&gt;
          delay_ms(1000);&lt;br /&gt;
       }&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
= External Links and Further Reading =&lt;br /&gt;
*[http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf IR Transceiver Data Sheet]&lt;br /&gt;
*[http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf IR Encoder/Decoder Data Sheet]&lt;br /&gt;
*[http://www.schmartboard.com/ Schmartboard (Prototyping boards for SMT)]&lt;br /&gt;
&lt;br /&gt;
== Relevant Technical Articles ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.commsdesign.com/showArticle.jhtml?articleID=192200654 Infrared communication]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Serial_communications Serial communication]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Surface_mount Surface mount technology]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/UART UART]&lt;/div&gt;</summary>
		<author><name>BrianLesperance</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=IR_communication_between_PICs&amp;diff=7110</id>
		<title>IR communication between PICs</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=IR_communication_between_PICs&amp;diff=7110"/>
		<updated>2008-02-20T18:37:14Z</updated>

		<summary type="html">&lt;p&gt;BrianLesperance: /* Circuit */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Note: This wiki page does not describe a successful implementation of communication between an IR transceiver and a PIC.&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
Two PICs can easily communicate with one another using serial communication.  IR communication is a basic extension of this method which can be easily implemented with a microcontroller (PIC) through an IR Encoder/Decoder (endec) and an IR Transceiver.  The endec and transceiver used in this example support Serial IR (SIR) data rate, ranging from 9.6 kbps to 115.2 kbps.  The typical range of the transceiver is nominally from 2 inches to 2 feet and extends upwards of 12 feet.  The PIC, endec, and transceiver employed all support bidirectional use.  However, when a transceiver is transmitting it essentially blinds its receiver and therefore cannot attain true full-duplex communication; only half-duplex was used with the transceiver taking turns transmitting and receiving.&lt;br /&gt;
&lt;br /&gt;
When transmitting, the PIC sends the serial format data to the endec, which encodes (or modulates) it bit by bit.  This encoded data is then outputted as electrical pulses to the transceiver.  The transceiver converts these electrical pulses to IR light pulses.  When receiving, the transceiver receives IR light pulses (data), which are outputted as electrical pulses. The endec decodes (or demodulates) these electrical pulses, with the data then being transmitted by the endec UART back to the receiving PIC. This modulation/demodulation method is performed in accordance with the IrDA standard.&lt;br /&gt;
&lt;br /&gt;
Both the PIC and the endec used in this example were DIP packages, making them easy to prototype and inspect.  The transceiver, however, was a surface mount chip with an uncommon pin configuration (0.95 mm pitch), requiring a different mounting approach.  We initially attempted to etch a [http://www.radioshack.com/sm-2-sided-copper-clad-pc-board--pi-2102495.html copper-clad board] for our circuit (see image).  However, due to the way this board is set up, this attempt only works with exact precision.  Unfortunately, due to the limited number of IR transceivers and copper-clad boards we had this approach led to a dead end.  Another possible solution to mount the IR transceiver was to use a [http://www.schmartboard.com/index.asp?page=products_so&amp;amp;id=54 SchmartBoard].  These boards are more general and pre-fabricated for use with surface mount ICs (with a particular pitch or pin seperation).  Theoretically, both solutions will allow for connections to a solderless breadboard.  However, because none of the IR transceiver chips we could find came at the same pitch as the SchmartBoards, we could not use this approach.  Overall, since the IR transceiver chips did not come at standard pitches, we were unable to find a way to mount the IR chip.&lt;br /&gt;
&lt;br /&gt;
== Circuit ==&lt;br /&gt;
The circuit diagram below shows a complete half-duplex IR communication circuit.  This circuit can either be used together with an identical circuit to communicate, with only one PIC transmitting at a time, or with a remote control.  The software on the PIC can be configured to respond to a variety of commands sent by the remote.  The electrical characteristics of the power supply and discrete components are given below.  Some of the ranges for the IR circuitry are also given below in parentheses.  In the circuit, there are two interfaces: the serial interface and the IR interface.&lt;br /&gt;
&lt;br /&gt;
[[Image:Serial_ir_data_format.jpg|left|thumb|400px|Serial &amp;amp; IR Data Format]]&lt;br /&gt;
===Serial Interface===&lt;br /&gt;
The serial interface is located between the PIC and the endec and sends data sequentially one bit at a time. The transmit (TX) and receive (RX) pins on the endec need to be connected between both ICs with a common ground.  The data passing between the two components on these lines have the standard 8-N-1 serial data format. 8-N-1 is a serial configuration in which there are 8 data bits, no parity bits and 1 stop bit. Data bits contain the information to be transmitted. A parity bit is a binary digit used to ensure data accuracy, while a stop bit is used to indicate the end of a data string. &lt;br /&gt;
&lt;br /&gt;
There is also a 16XCLK signal going to the endec from the PIC used to control the baud rate of the endec; that signal is a square wave pulse train at a frequency of 16*(the baud rate) and is generated in software. The &amp;lt;span style=&amp;quot;text-decoration: overline&amp;quot;&amp;gt;RESET&amp;lt;/span&amp;gt; signal on the endec could be controlled with software but is simply held high since the endec need not be reset.&lt;br /&gt;
&lt;br /&gt;
===IR Interface===&lt;br /&gt;
The second interface — the IR interface — is located between the endec and the transceiver.  This interface is straightforward with the TXIR and RXIR pins of the endec connecting to the TXD and RXD pins of the transceiver, respectively, and also has a common ground.  The signals between these two components conform to the IrDA physical layer standard.  When a logic high or &amp;#039;1&amp;#039; is to be transmitted, a logic low will be sent to the transceiver.  When a logic low or &amp;#039;0&amp;#039; is to be transmitted, a logic high will be pulsed after 7-8 cycles of the 16XCLK signal for 3 cycles of the 16XCLK signal but no longer than 4 µs.&lt;br /&gt;
&lt;br /&gt;
===Optical Interface===&lt;br /&gt;
The optical interface refers to the actual IR energy being transmitted between two transceivers or a source and a receiver.  The optical signal is a modulated form of the signal between the Endec and the Transceiver at the Transceiver&amp;#039;s carrier frequency, 38 kHz.  That means that when the Endec would transmit a pulse for 3 cycles at the 16XCLK frequency, the transceiver would start pulsing IR energy at 38 kHz until the pulse went low.  When the transceiver receive IR pulsed at 38 kHz, the duration of the IR pulses is the duration of the pulse sent to the Endec.&lt;br /&gt;
&lt;br /&gt;
[[Image:IR_circuit.jpg|thumb|right|600px|Circuit Diagram]]&lt;br /&gt;
&lt;br /&gt;
===Electrical Characteristics===&lt;br /&gt;
&amp;#039;&amp;#039;Microcontroller ([http://ww1.microchip.com/downloads/en/DeviceDoc/39631a.pdf Microchip PIC18F4520])&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; = 5.0V&lt;br /&gt;
*C&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; = 1µF&lt;br /&gt;
**V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; - Pin 11 &amp;amp; 32&lt;br /&gt;
**GND - Pin 12 &amp;amp; 31&lt;br /&gt;
**TX - Pin 25 (C6)&lt;br /&gt;
**RX - Pin 26 (C7)&lt;br /&gt;
**16XCLK - Pin 17 (C2/CCP1)&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;IR Encoder/Decoder ([http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf Microchip MCP2122-E/P])&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; = 5.0V (1.8V-5.5V)&lt;br /&gt;
*C&amp;lt;sub&amp;gt;BYP&amp;lt;/sub&amp;gt; = 0.01µF&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;IR Transceiver ([http://www.vishay.com/docs/82614/tfdu4300.pdf Vishay TFDU4300])&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;cc1&amp;lt;/sub&amp;gt; = 5.0V (2.4V-5.5V)&lt;br /&gt;
*V&amp;lt;sub&amp;gt;cc2&amp;lt;/sub&amp;gt; = 5.0V (-0.3V-6.0V)&lt;br /&gt;
*V&amp;lt;sub&amp;gt;logic&amp;lt;/sub&amp;gt; = 5.0V (1.5V-5.5V)&lt;br /&gt;
*R&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; = 47Ω&lt;br /&gt;
*C&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; = 0.1µF&lt;br /&gt;
&lt;br /&gt;
[[Image:copper_clad_board.jpg|right|thumb|400px|Copper-Clad Board with IR Transceiver]]		 &lt;br /&gt;
=== Surface Mount Prototyping ===	  &lt;br /&gt;
*Transceiver lead pitch = 0.95mm	 &lt;br /&gt;
*Multiple options for installation	 &lt;br /&gt;
**SchmartBoard	 &lt;br /&gt;
**Copper-clad board etching&lt;br /&gt;
**Microchip MCP212X Developer&amp;#039;s Daughter Boards (suitable only for this specific IR application)&lt;br /&gt;
&lt;br /&gt;
=== Limitations ===	 &lt;br /&gt;
*IR Communication is only Half-Duplex (only one transceiver transmitting at a time)&lt;br /&gt;
*Transmission Distance maximum is about 12 feet (about 3ft in low power mode)&lt;br /&gt;
*Communication Speed can only go up to 115.2 kpbs&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
&lt;br /&gt;
Example code for a simple IR communication circuit w/o the use of a transceiver:&lt;br /&gt;
&lt;br /&gt;
 /*&lt;br /&gt;
   ircomm.c Jennifer Breger, Brian Lesperance, Dan Pinkawa 2008-02-05&lt;br /&gt;
   Using the PIC&amp;#039;s built-in UART, a counter continually is sent to one IR encoder/decoder.  Then&lt;br /&gt;
   the first IR encoder/decoder feeds its TXIR to the RXIR of a second IR encoder/decoder.  The &lt;br /&gt;
   second IR encoder/decoder then transmits back to the PIC what it is receiving.  When the&lt;br /&gt;
   transceiver circuit is properly mounted and inserted into the circuit, this code can be adapted&lt;br /&gt;
   for half-duplex communication w/ another IR communications circuit.&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
 #include &amp;lt;18f4520.h&amp;gt;&lt;br /&gt;
 #fuses HS,NOLVP,NOWDT,NOPROTECT&lt;br /&gt;
 #use delay (clock=20000000)&lt;br /&gt;
 #use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, stream=com_a) // Initializes the UART to 9600 bps &lt;br /&gt;
                                                              // (up to 115,200 bps)&lt;br /&gt;
 &lt;br /&gt;
 // timed_getc() checks whether data is ready to be read.  If it&amp;#039;s not the function returns a null&lt;br /&gt;
 // character.  If you simply use getc(), the PIC might get slowed up if the data isn&amp;#039;t ready right&lt;br /&gt;
 // away.&lt;br /&gt;
 char timed_getc(void){&lt;br /&gt;
    long timeout;&lt;br /&gt;
    int timeout_error = FALSE;&lt;br /&gt;
    timeout = 0;&lt;br /&gt;
    while(!kbhit() &amp;amp;&amp;amp; (++timeout&amp;lt;50000))&lt;br /&gt;
       delay_us(10);&lt;br /&gt;
    if (kbhit())&lt;br /&gt;
       return(getc());&lt;br /&gt;
    else {&lt;br /&gt;
       timeout_error = TRUE;&lt;br /&gt;
       return(0);&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 // Main program&lt;br /&gt;
 void main(void){&lt;br /&gt;
    int i;&lt;br /&gt;
    char rx;&lt;br /&gt;
 &lt;br /&gt;
    setup_timer_2(T2_DIV_BY_1, 32, 16); // Provides a 151.3 kHz clock for the Encoder/Decoder, in   &lt;br /&gt;
    setup_ccp1(CCP_PWM);                // order for it to know the baud rate of the UART. Should be &lt;br /&gt;
    set_pwm1_duty(16);                  // closer to 16 * 9600 = 153.6 kHz but the error is tolerable&lt;br /&gt;
 &lt;br /&gt;
    while(TRUE){&lt;br /&gt;
       for(i=0;i&amp;lt;16;i++){      // Counts up from 0 to 15 and transmits to the first Encoder/Decoder.&lt;br /&gt;
          putc(i);             // Listens to the second Encoder/Decoder, which is simply the original&lt;br /&gt;
          rx = timed_getc();   // message from the PIC, and displays the value on the LEDs/Port D.&lt;br /&gt;
          output_d((int8) rx);&lt;br /&gt;
          delay_ms(1000);&lt;br /&gt;
       }&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
= External Links and Further Reading =&lt;br /&gt;
*[http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf IR Transceiver Data Sheet]&lt;br /&gt;
*[http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf IR Encoder/Decoder Data Sheet]&lt;br /&gt;
*[http://www.schmartboard.com/ Schmartboard (Prototyping boards for SMT)]&lt;br /&gt;
&lt;br /&gt;
== Relevant Technical Articles ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.commsdesign.com/showArticle.jhtml?articleID=192200654 Infrared communication]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Serial_communications Serial communication]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Surface_mount Surface mount technology]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/UART UART]&lt;/div&gt;</summary>
		<author><name>BrianLesperance</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=IR_communication_between_PICs&amp;diff=6971</id>
		<title>IR communication between PICs</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=IR_communication_between_PICs&amp;diff=6971"/>
		<updated>2008-02-14T01:37:12Z</updated>

		<summary type="html">&lt;p&gt;BrianLesperance: /* Relevant Technical Articles */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Note: This wiki page does not describe a successful implementation of communication between an IR transceiver and a PIC.&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
Two PICs can easily communicate with one another using serial communication.  IR communication is a basic extension of this method which can be easily implemented with a microcontroller (PIC) through an IR Encoder/Decoder (endec) and an IR Transceiver.  The endec and transceiver used in this example support Serial IR (SIR) data rate, ranging from 9.6 kbps to 115.2 kbps.  The typical range of the transceiver is nominally from 2 inches to 2 feet and extends upwards of 12 feet.  The PIC, endec, and transceiver employed all support bidirectional use.  However, when a transceiver is transmitting it essentially blinds its receiver and therefore cannot attain true full-duplex communication; only half-duplex was used with the transceiver taking turns transmitting and receiving.&lt;br /&gt;
&lt;br /&gt;
When transmitting, the PIC sends the serial format data to the endec, which encodes (or modulates) it bit by bit.  This encoded data is then outputted as electrical pulses to the transceiver.  The transceiver converts these electrical pulses to IR light pulses.  When receiving, the transceiver receives IR light pulses (data), which are outputted as electrical pulses. The endec decodes (or demodulates) these electrical pulses, with the data then being transmitted by the endec UART back to the receiving PIC. This modulation/demodulation method is performed in accordance with the IrDA standard.&lt;br /&gt;
&lt;br /&gt;
Both the PIC and the endec used in this example were DIP packages, making them easy to prototype and inspect.  The transceiver, however, was a surface mount chip with an uncommon pin configuration (0.95 mm pitch), requiring a different mounting approach.  We initially attempted to etch a [http://www.radioshack.com/sm-2-sided-copper-clad-pc-board--pi-2102495.html copper-clad board] for our circuit (see image).  However, due to the way this board is set up, this attempt only works with exact precision.  Unfortunately, due to the limited number of IR transceivers and copper-clad boards we had this approach led to a dead end.  Another possible solution to mount the IR transceiver was to use a [http://www.schmartboard.com/index.asp?page=products_so&amp;amp;id=54 SchmartBoard].  These boards are more general and pre-fabricated for use with surface mount ICs (with a particular pitch or pin seperation).  Theoretically, both solutions will allow for connections to a solderless breadboard.  However, because none of the IR transceiver chips we could find came at the same pitch as the SchmartBoards, we could not use this approach.  Overall, since the IR transceiver chips did not come at standard pitches, we were unable to find a way to mount the IR chip.&lt;br /&gt;
&lt;br /&gt;
== Circuit ==&lt;br /&gt;
The circuit diagram below shows a complete half-duplex IR communication circuit.  This circuit can either be used together with an identical circuit to communicate, with only one PIC transmitting at a time, or with a remote control.  The software on the PIC can be configured to respond to a variety of commands sent by the remote.  The electrical characteristics of the power supply and discrete components are given below.  Some of the ranges for the IR circuitry are also given below in parentheses.  In the circuit, there are two interfaces: the serial interface and the IR interface.&lt;br /&gt;
&lt;br /&gt;
[[Image:Serial_ir_data_format.jpg|left|thumb|400px|Serial &amp;amp; IR Data Format]]&lt;br /&gt;
===Serial Interface===&lt;br /&gt;
The serial interface is located between the PIC and the endec.  The transmit (TX) and receive (RX) pins on the endec need to be connected between both ICs with a common ground.  The data passing between the two components on these lines have the standard 8-N-1 serial data format.  There is also a 16XCLK signal going to the endec from the PIC used to control the baud rate of the endec; that signal is a square wave pulse train at a frequency of 16*(the baud rate) and is generated in software.  The &amp;lt;span style=&amp;quot;text-decoration: overline&amp;quot;&amp;gt;RESET&amp;lt;/span&amp;gt; signal on the endec could be controlled with software but is simply held high since the endec need not be reset.&lt;br /&gt;
&lt;br /&gt;
===IR Interface===&lt;br /&gt;
The second interface — the IR interface — is located between the endec and the transceiver.  This interface is straightforward with the TXIR and RXIR pins of the endec connecting to the TXD and RXD pins of the transceiver, respectively, and also has a common ground.  The signals between these two components conform to the IrDA physical layer standard.  When a logic high or &amp;#039;1&amp;#039; is to be transmitted, a logic low will be sent to the transceiver.  When a logic low or &amp;#039;0&amp;#039; is to be transmitted, a logic high will be pulsed after 7-8 cycles of the 16XCLK signal for 3 cycles of the 16XCLK signal but no longer than 4 µs.&lt;br /&gt;
&lt;br /&gt;
[[Image:IR_circuit.jpg|thumb|600px|Circuit Diagram]]&lt;br /&gt;
&lt;br /&gt;
===Electrical Characteristics===&lt;br /&gt;
&amp;#039;&amp;#039;Microcontroller ([http://ww1.microchip.com/downloads/en/DeviceDoc/39631a.pdf Microchip PIC18F4520])&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; = 5.0V&lt;br /&gt;
*C&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; = 1µF&lt;br /&gt;
**V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; - Pin 11 &amp;amp; 32&lt;br /&gt;
**GND - Pin 12 &amp;amp; 31&lt;br /&gt;
**TX - Pin 25 (C6)&lt;br /&gt;
**RX - Pin 26 (C7)&lt;br /&gt;
**16XCLK - Pin 17 (C2/CCP1)&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;IR Encoder/Decoder ([http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf Microchip MCP2122-E/P])&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; = 5.0V (1.8V-5.5V)&lt;br /&gt;
*C&amp;lt;sub&amp;gt;BYP&amp;lt;/sub&amp;gt; = 0.01µF&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;IR Transceiver ([http://www.vishay.com/docs/82614/tfdu4300.pdf Vishay TFDU4300])&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;cc1&amp;lt;/sub&amp;gt; = 5.0V (2.4V-5.5V)&lt;br /&gt;
*V&amp;lt;sub&amp;gt;cc2&amp;lt;/sub&amp;gt; = 5.0V (-0.3V-6.0V)&lt;br /&gt;
*V&amp;lt;sub&amp;gt;logic&amp;lt;/sub&amp;gt; = 5.0V (1.5V-5.5V)&lt;br /&gt;
*R&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; = 47Ω&lt;br /&gt;
*C&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; = 0.1µF&lt;br /&gt;
&lt;br /&gt;
[[Image:copper_clad_board.jpg|right|thumb|400px|Copper-Clad Board with IR Transceiver]]		 &lt;br /&gt;
=== Surface Mount Prototyping ===	  &lt;br /&gt;
*Transceiver lead pitch = 0.95mm	 &lt;br /&gt;
*Multiple options for installation	 &lt;br /&gt;
**SchmartBoard	 &lt;br /&gt;
**Copper-clad board etching&lt;br /&gt;
&lt;br /&gt;
=== Limitations ===	 &lt;br /&gt;
*IR Communication is only Half-Duplex (only one transceiver transmitting at a time)&lt;br /&gt;
*Transmission Distance maximum is about 12 feet (about 3ft in low power mode)&lt;br /&gt;
*Communication Speed can only go up to 115.2 kpbs&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
&lt;br /&gt;
Example code for a simple IR communication circuit w/o the use of a transceiver:&lt;br /&gt;
&lt;br /&gt;
 /*&lt;br /&gt;
   ircomm.c Jennifer Breger, Brian Lesperance, Dan Pinkawa 2008-02-05&lt;br /&gt;
   Using the PIC&amp;#039;s built-in UART, a counter continually is sent to one IR encoder/decoder.  Then&lt;br /&gt;
   the first IR encoder/decoder feeds its TXIR to the RXIR of a second IR encoder/decoder.  The &lt;br /&gt;
   second IR encoder/decoder then transmits back to the PIC what it is receiving.  When the&lt;br /&gt;
   transceiver circuit is properly mounted and inserted into the circuit, this code can be adapted&lt;br /&gt;
   for half-duplex communication w/ another IR communications circuit.&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
 #include &amp;lt;18f4520.h&amp;gt;&lt;br /&gt;
 #fuses HS,NOLVP,NOWDT,NOPROTECT&lt;br /&gt;
 #use delay (clock=20000000)&lt;br /&gt;
 #use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, stream=com_a) // Initializes the UART to 9600 bps &lt;br /&gt;
                                                              // (up to 115,200 bps)&lt;br /&gt;
 &lt;br /&gt;
 // timed_getc() checks whether data is ready to be read.  If it&amp;#039;s not the function returns a null&lt;br /&gt;
 // character.  If you simply use getc(), the PIC might get slowed up if the data isn&amp;#039;t ready right&lt;br /&gt;
 // away.&lt;br /&gt;
 char timed_getc(void){&lt;br /&gt;
    long timeout;&lt;br /&gt;
    int timeout_error = FALSE;&lt;br /&gt;
    timeout = 0;&lt;br /&gt;
    while(!kbhit() &amp;amp;&amp;amp; (++timeout&amp;lt;50000))&lt;br /&gt;
       delay_us(10);&lt;br /&gt;
    if (kbhit())&lt;br /&gt;
       return(getc());&lt;br /&gt;
    else {&lt;br /&gt;
       timeout_error = TRUE;&lt;br /&gt;
       return(0);&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 // Main program&lt;br /&gt;
 void main(void){&lt;br /&gt;
    int i;&lt;br /&gt;
    char rx;&lt;br /&gt;
 &lt;br /&gt;
    setup_timer_2(T2_DIV_BY_1, 32, 16); // Provides a 151.3 kHz clock for the Encoder/Decoder, in   &lt;br /&gt;
    setup_ccp1(CCP_PWM);                // order for it to know the baud rate of the UART. Should be &lt;br /&gt;
    set_pwm1_duty(16);                  // closer to 16 * 9600 = 153.6 kHz but the error is tolerable&lt;br /&gt;
 &lt;br /&gt;
    while(TRUE){&lt;br /&gt;
       for(i=0;i&amp;lt;16;i++){      // Counts up from 0 to 15 and transmits to the first Encoder/Decoder.&lt;br /&gt;
          putc(i);             // Listens to the second Encoder/Decoder, which is simply the original&lt;br /&gt;
          rx = timed_getc();   // message from the PIC, and displays the value on the LEDs/Port D.&lt;br /&gt;
          output_d((int8) rx);&lt;br /&gt;
          delay_ms(1000);&lt;br /&gt;
       }&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
= External Links and Further Reading =&lt;br /&gt;
*[http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf IR Transceiver Data Sheet]&lt;br /&gt;
*[http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf IR Encoder/Decoder Data Sheet]&lt;br /&gt;
*[http://www.schmartboard.com/ Schmartboard (Prototyping boards for SMT)]&lt;br /&gt;
&lt;br /&gt;
== Relevant Technical Articles ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.commsdesign.com/showArticle.jhtml?articleID=192200654 Infrared communication]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Serial_communications Serial communication]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Surface_mount Surface mount technology]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/UART UART]&lt;/div&gt;</summary>
		<author><name>BrianLesperance</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=IR_communication_between_PICs&amp;diff=6970</id>
		<title>IR communication between PICs</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=IR_communication_between_PICs&amp;diff=6970"/>
		<updated>2008-02-14T01:36:32Z</updated>

		<summary type="html">&lt;p&gt;BrianLesperance: /* Relevant Technical Articles */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Note: This wiki page does not describe a successful implementation of communication between an IR transceiver and a PIC.&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
Two PICs can easily communicate with one another using serial communication.  IR communication is a basic extension of this method which can be easily implemented with a microcontroller (PIC) through an IR Encoder/Decoder (endec) and an IR Transceiver.  The endec and transceiver used in this example support Serial IR (SIR) data rate, ranging from 9.6 kbps to 115.2 kbps.  The typical range of the transceiver is nominally from 2 inches to 2 feet and extends upwards of 12 feet.  The PIC, endec, and transceiver employed all support bidirectional use.  However, when a transceiver is transmitting it essentially blinds its receiver and therefore cannot attain true full-duplex communication; only half-duplex was used with the transceiver taking turns transmitting and receiving.&lt;br /&gt;
&lt;br /&gt;
When transmitting, the PIC sends the serial format data to the endec, which encodes (or modulates) it bit by bit.  This encoded data is then outputted as electrical pulses to the transceiver.  The transceiver converts these electrical pulses to IR light pulses.  When receiving, the transceiver receives IR light pulses (data), which are outputted as electrical pulses. The endec decodes (or demodulates) these electrical pulses, with the data then being transmitted by the endec UART back to the receiving PIC. This modulation/demodulation method is performed in accordance with the IrDA standard.&lt;br /&gt;
&lt;br /&gt;
Both the PIC and the endec used in this example were DIP packages, making them easy to prototype and inspect.  The transceiver, however, was a surface mount chip with an uncommon pin configuration (0.95 mm pitch), requiring a different mounting approach.  We initially attempted to etch a [http://www.radioshack.com/sm-2-sided-copper-clad-pc-board--pi-2102495.html copper-clad board] for our circuit (see image).  However, due to the way this board is set up, this attempt only works with exact precision.  Unfortunately, due to the limited number of IR transceivers and copper-clad boards we had this approach led to a dead end.  Another possible solution to mount the IR transceiver was to use a [http://www.schmartboard.com/index.asp?page=products_so&amp;amp;id=54 SchmartBoard].  These boards are more general and pre-fabricated for use with surface mount ICs (with a particular pitch or pin seperation).  Theoretically, both solutions will allow for connections to a solderless breadboard.  However, because none of the IR transceiver chips we could find came at the same pitch as the SchmartBoards, we could not use this approach.  Overall, since the IR transceiver chips did not come at standard pitches, we were unable to find a way to mount the IR chip.&lt;br /&gt;
&lt;br /&gt;
== Circuit ==&lt;br /&gt;
The circuit diagram below shows a complete half-duplex IR communication circuit.  This circuit can either be used together with an identical circuit to communicate, with only one PIC transmitting at a time, or with a remote control.  The software on the PIC can be configured to respond to a variety of commands sent by the remote.  The electrical characteristics of the power supply and discrete components are given below.  Some of the ranges for the IR circuitry are also given below in parentheses.  In the circuit, there are two interfaces: the serial interface and the IR interface.&lt;br /&gt;
&lt;br /&gt;
[[Image:Serial_ir_data_format.jpg|left|thumb|400px|Serial &amp;amp; IR Data Format]]&lt;br /&gt;
===Serial Interface===&lt;br /&gt;
The serial interface is located between the PIC and the endec.  The transmit (TX) and receive (RX) pins on the endec need to be connected between both ICs with a common ground.  The data passing between the two components on these lines have the standard 8-N-1 serial data format.  There is also a 16XCLK signal going to the endec from the PIC used to control the baud rate of the endec; that signal is a square wave pulse train at a frequency of 16*(the baud rate) and is generated in software.  The &amp;lt;span style=&amp;quot;text-decoration: overline&amp;quot;&amp;gt;RESET&amp;lt;/span&amp;gt; signal on the endec could be controlled with software but is simply held high since the endec need not be reset.&lt;br /&gt;
&lt;br /&gt;
===IR Interface===&lt;br /&gt;
The second interface — the IR interface — is located between the endec and the transceiver.  This interface is straightforward with the TXIR and RXIR pins of the endec connecting to the TXD and RXD pins of the transceiver, respectively, and also has a common ground.  The signals between these two components conform to the IrDA physical layer standard.  When a logic high or &amp;#039;1&amp;#039; is to be transmitted, a logic low will be sent to the transceiver.  When a logic low or &amp;#039;0&amp;#039; is to be transmitted, a logic high will be pulsed after 7-8 cycles of the 16XCLK signal for 3 cycles of the 16XCLK signal but no longer than 4 µs.&lt;br /&gt;
&lt;br /&gt;
[[Image:IR_circuit.jpg|thumb|600px|Circuit Diagram]]&lt;br /&gt;
&lt;br /&gt;
===Electrical Characteristics===&lt;br /&gt;
&amp;#039;&amp;#039;Microcontroller ([http://ww1.microchip.com/downloads/en/DeviceDoc/39631a.pdf Microchip PIC18F4520])&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; = 5.0V&lt;br /&gt;
*C&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; = 1µF&lt;br /&gt;
**V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; - Pin 11 &amp;amp; 32&lt;br /&gt;
**GND - Pin 12 &amp;amp; 31&lt;br /&gt;
**TX - Pin 25 (C6)&lt;br /&gt;
**RX - Pin 26 (C7)&lt;br /&gt;
**16XCLK - Pin 17 (C2/CCP1)&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;IR Encoder/Decoder ([http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf Microchip MCP2122-E/P])&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; = 5.0V (1.8V-5.5V)&lt;br /&gt;
*C&amp;lt;sub&amp;gt;BYP&amp;lt;/sub&amp;gt; = 0.01µF&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;IR Transceiver ([http://www.vishay.com/docs/82614/tfdu4300.pdf Vishay TFDU4300])&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;cc1&amp;lt;/sub&amp;gt; = 5.0V (2.4V-5.5V)&lt;br /&gt;
*V&amp;lt;sub&amp;gt;cc2&amp;lt;/sub&amp;gt; = 5.0V (-0.3V-6.0V)&lt;br /&gt;
*V&amp;lt;sub&amp;gt;logic&amp;lt;/sub&amp;gt; = 5.0V (1.5V-5.5V)&lt;br /&gt;
*R&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; = 47Ω&lt;br /&gt;
*C&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; = 0.1µF&lt;br /&gt;
&lt;br /&gt;
[[Image:copper_clad_board.jpg|right|thumb|400px|Copper-Clad Board with IR Transceiver]]		 &lt;br /&gt;
=== Surface Mount Prototyping ===	  &lt;br /&gt;
*Transceiver lead pitch = 0.95mm	 &lt;br /&gt;
*Multiple options for installation	 &lt;br /&gt;
**SchmartBoard	 &lt;br /&gt;
**Copper-clad board etching&lt;br /&gt;
&lt;br /&gt;
=== Limitations ===	 &lt;br /&gt;
*IR Communication is only Half-Duplex (only one transceiver transmitting at a time)&lt;br /&gt;
*Transmission Distance maximum is about 12 feet (about 3ft in low power mode)&lt;br /&gt;
*Communication Speed can only go up to 115.2 kpbs&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
&lt;br /&gt;
Example code for a simple IR communication circuit w/o the use of a transceiver:&lt;br /&gt;
&lt;br /&gt;
 /*&lt;br /&gt;
   ircomm.c Jennifer Breger, Brian Lesperance, Dan Pinkawa 2008-02-05&lt;br /&gt;
   Using the PIC&amp;#039;s built-in UART, a counter continually is sent to one IR encoder/decoder.  Then&lt;br /&gt;
   the first IR encoder/decoder feeds its TXIR to the RXIR of a second IR encoder/decoder.  The &lt;br /&gt;
   second IR encoder/decoder then transmits back to the PIC what it is receiving.  When the&lt;br /&gt;
   transceiver circuit is properly mounted and inserted into the circuit, this code can be adapted&lt;br /&gt;
   for half-duplex communication w/ another IR communications circuit.&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
 #include &amp;lt;18f4520.h&amp;gt;&lt;br /&gt;
 #fuses HS,NOLVP,NOWDT,NOPROTECT&lt;br /&gt;
 #use delay (clock=20000000)&lt;br /&gt;
 #use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, stream=com_a) // Initializes the UART to 9600 bps &lt;br /&gt;
                                                              // (up to 115,200 bps)&lt;br /&gt;
 &lt;br /&gt;
 // timed_getc() checks whether data is ready to be read.  If it&amp;#039;s not the function returns a null&lt;br /&gt;
 // character.  If you simply use getc(), the PIC might get slowed up if the data isn&amp;#039;t ready right&lt;br /&gt;
 // away.&lt;br /&gt;
 char timed_getc(void){&lt;br /&gt;
    long timeout;&lt;br /&gt;
    int timeout_error = FALSE;&lt;br /&gt;
    timeout = 0;&lt;br /&gt;
    while(!kbhit() &amp;amp;&amp;amp; (++timeout&amp;lt;50000))&lt;br /&gt;
       delay_us(10);&lt;br /&gt;
    if (kbhit())&lt;br /&gt;
       return(getc());&lt;br /&gt;
    else {&lt;br /&gt;
       timeout_error = TRUE;&lt;br /&gt;
       return(0);&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 // Main program&lt;br /&gt;
 void main(void){&lt;br /&gt;
    int i;&lt;br /&gt;
    char rx;&lt;br /&gt;
 &lt;br /&gt;
    setup_timer_2(T2_DIV_BY_1, 32, 16); // Provides a 151.3 kHz clock for the Encoder/Decoder, in   &lt;br /&gt;
    setup_ccp1(CCP_PWM);                // order for it to know the baud rate of the UART. Should be &lt;br /&gt;
    set_pwm1_duty(16);                  // closer to 16 * 9600 = 153.6 kHz but the error is tolerable&lt;br /&gt;
 &lt;br /&gt;
    while(TRUE){&lt;br /&gt;
       for(i=0;i&amp;lt;16;i++){      // Counts up from 0 to 15 and transmits to the first Encoder/Decoder.&lt;br /&gt;
          putc(i);             // Listens to the second Encoder/Decoder, which is simply the original&lt;br /&gt;
          rx = timed_getc();   // message from the PIC, and displays the value on the LEDs/Port D.&lt;br /&gt;
          output_d((int8) rx);&lt;br /&gt;
          delay_ms(1000);&lt;br /&gt;
       }&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
= External Links and Further Reading =&lt;br /&gt;
*[http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf IR Transceiver Data Sheet]&lt;br /&gt;
*[http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf IR Encoder/Decoder Data Sheet]&lt;br /&gt;
*[http://www.schmartboard.com/ Schmartboard (Prototyping boards for SMT)]&lt;br /&gt;
&lt;br /&gt;
== Relevant Technical Articles ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.commsdesign.com/showArticle.jhtml?articleID=192200654| Infrared communication]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Serial_communications| Serial communication]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Surface_mount| Surface mount technology]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/UART| UART]&lt;/div&gt;</summary>
		<author><name>BrianLesperance</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=IR_communication_between_PICs&amp;diff=6913</id>
		<title>IR communication between PICs</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=IR_communication_between_PICs&amp;diff=6913"/>
		<updated>2008-02-13T00:55:08Z</updated>

		<summary type="html">&lt;p&gt;BrianLesperance: /* Circuit */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
Two PICs can easily communicate with one another using serial communication.  IR communication is a basic extension of this method which can be easily implemented with a microcontroller (PIC) through an IR Encoder/Decoder (endec) and an IR Transceiver.  The endec and transceiver used in this example support Serial IR (SIR) data rate, ranging from 9.6 kbps to 115.2 kbps.  The typical range of the transceiver is nominally from 2 inches to 2 feet and extends upwards of 12 feet.  The PIC, endec, and transceiver employed all support bidirectional use.  However, when a transceiver is transmitting it essentially blinds its receiver and therefore cannot attain true full-duplex communication; only half-duplex was used with the transceiver taking turns transmitting and receiving.&lt;br /&gt;
&lt;br /&gt;
When transmitting, the PIC sends the serial format data to the endec, which encodes (or modulates) it bit by bit.  This encoded data is then outputted as electrical pulses to the transceiver.  The transceiver converts these electrical pulses to IR light pulses.  When receiving, the transceiver receives IR light pulses (data), which are outputted as electrical pulses. The endec decodes (or demodulates) these electrical pulses, with the data then being transmitted by the endec UART back to the receiving PIC. This modulation/demodulation method is performed in accordance with the IrDA standard.&lt;br /&gt;
&lt;br /&gt;
Both the PIC and the endec used in this example were DIP packages, making them easy to prototype and inspect.  The transceiver, however, was a surface mount chip with an uncommon pin configuration (0.95 mm pitch), requiring a different mounting approach.  We initially attempted to etch a [http://www.radioshack.com/sm-2-sided-copper-clad-pc-board--pi-2102495.html copper-clad board] for our circuit (see image).  Another possible solution for our transceiver is provided by [http://www.schmartboard.com/index.asp?page=products_so&amp;amp;id=54 SchmartBoard].  These boards are more general and pre-fabricated for use with surface mount ICs (with a particular pitch or pin seperation).  Both solutions will allow for connections to a solderless breadboard.&lt;br /&gt;
&lt;br /&gt;
== Circuit ==&lt;br /&gt;
The circuit diagram below shows a complete half-duplex IR communication circuit.  This circuit can either be used together with an identical circuit to communicate, with only one PIC transmitting at a time, or with a remote control.  The software on the PIC can be configured to respond to a variety of commands sent by the remote.  The electrical characteristics of the power supply and discrete components are given below.  Some of the ranges for the IR circuitry are also given below in parentheses.  In the circuit, there are two interfaces: the serial interface and the IR interface.&lt;br /&gt;
&lt;br /&gt;
[[Image:Serial_ir_data_format.jpg|left|thumb|400px|Serial &amp;amp; IR Data Format]]&lt;br /&gt;
===Serial Interface===&lt;br /&gt;
The serial interface is located between the PIC and the endec.  The transmit (TX) and receive (RX) pins on the endec need to be connected between both ICs with a common ground.  The data passing between the two components on these lines have the standard 8-N-1 serial data format.  There is also a 16XCLK signal going to the endec from the PIC used to control the baud rate of the endec; that signal is a square wave pulse train at a frequency of 16*(the baud rate) and is generated in software.  The &amp;lt;span style=&amp;quot;text-decoration: overline&amp;quot;&amp;gt;RESET&amp;lt;/span&amp;gt; signal on the endec could be controlled with software but is simply held high since the endec need not be reset.&lt;br /&gt;
&lt;br /&gt;
===IR Interface===&lt;br /&gt;
The second interface — the IR interface — is located between the endec and the transceiver.  This interface is straightforward with the TXIR and RXIR pins of the endec connecting to the TXD and RXD pins of the transceiver, respectively, and also has a common ground.  The signals between these two components conform to the IrDA physical layer standard.  When a logic high or &amp;#039;1&amp;#039; is to be transmitted, a logic low will be sent to the transceiver.  When a logic low or &amp;#039;0&amp;#039; is to be transmitted, a logic high will be pulsed after 7-8 cycles of the 16XCLK signal for 3 cycles of the 16XCLK signal but no longer than 4 µs.&lt;br /&gt;
&lt;br /&gt;
[[Image:IR_circuit.jpg|thumb|600px|Circuit Diagram]]&lt;br /&gt;
&lt;br /&gt;
===Electrical Characteristics===&lt;br /&gt;
&amp;#039;&amp;#039;Microcontroller ([http://ww1.microchip.com/downloads/en/DeviceDoc/39631a.pdf Microchip PIC18F4520])&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; = 5.0V&lt;br /&gt;
*C&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; = 1µF&lt;br /&gt;
**V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; - Pin 11 &amp;amp; 32&lt;br /&gt;
**GND - Pin 12 &amp;amp; 31&lt;br /&gt;
**TX - Pin 25 (C6)&lt;br /&gt;
**RX - Pin 26 (C7)&lt;br /&gt;
**16XCLK - Pin 17 (C2/CCP1)&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;IR Encoder/Decoder ([http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf Microchip MCP2122-E/P])&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; = 5.0V (1.8V-5.5V)&lt;br /&gt;
*C&amp;lt;sub&amp;gt;BYP&amp;lt;/sub&amp;gt; = 0.01µF&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;IR Transceiver ([http://www.vishay.com/docs/82614/tfdu4300.pdf Vishay TFDU4300])&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;cc1&amp;lt;/sub&amp;gt; = 5.0V (2.4V-5.5V)&lt;br /&gt;
*V&amp;lt;sub&amp;gt;cc2&amp;lt;/sub&amp;gt; = 5.0V (-0.3V-6.0V)&lt;br /&gt;
*V&amp;lt;sub&amp;gt;logic&amp;lt;/sub&amp;gt; = 5.0V (1.5V-5.5V)&lt;br /&gt;
*R&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; = 47Ω&lt;br /&gt;
*C&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; = 0.1µF&lt;br /&gt;
&lt;br /&gt;
[[Image:copper_clad_board.jpg|right|thumb|400px|Copper-Clad Board with IR Transceiver]]		 &lt;br /&gt;
=== Surface Mount Prototyping ===	  &lt;br /&gt;
*Transceiver lead pitch = 0.95mm	 &lt;br /&gt;
*Multiple options for installation	 &lt;br /&gt;
**Schmart board	 &lt;br /&gt;
**Digikey board (need to find)	 &lt;br /&gt;
**Copper-clad board etching	 &lt;br /&gt;
**Funky pin adapter thing Prof. Peshkin gave us	 &lt;br /&gt;
**Funky adapter thing #2 Prof. Peshkin gave us	 &lt;br /&gt;
&lt;br /&gt;
=== Limitations ===	 &lt;br /&gt;
*IR Communication is only Half-Duplex (only one transceiver transmitting at a time)&lt;br /&gt;
*Transmission Distance maximum is about 12 feet (about 3ft in low power mode)&lt;br /&gt;
*Communication Speed can only go up to 115.2 kpbs&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
&lt;br /&gt;
Example code for a simple IR communication circuit w/o the use of a transceiver:&lt;br /&gt;
&lt;br /&gt;
 /*&lt;br /&gt;
   ircomm.c Jennifer Breger, Brian Lesperance, Dan Pinkawa 2008-02-05&lt;br /&gt;
   Using the PIC&amp;#039;s built-in UART, a counter continually is sent to one IR encoder/decoder.  Then&lt;br /&gt;
   the first IR encoder/decoder feeds its TXIR to the RXIR of a second IR encoder/decoder.  The &lt;br /&gt;
   second IR encoder/decoder then transmits back to the PIC what it is receiving.  When the&lt;br /&gt;
   transceiver circuit is properly mounted and inserted into the circuit, this code can be adapted&lt;br /&gt;
   for half-duplex communication w/ another IR communications circuit.&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
 #include &amp;lt;18f4520.h&amp;gt;&lt;br /&gt;
 #fuses HS,NOLVP,NOWDT,NOPROTECT&lt;br /&gt;
 #use delay (clock=20000000)&lt;br /&gt;
 #use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, stream=com_a) // Initializes the UART to 9600 bps &lt;br /&gt;
                                                              // (up to 115,200 bps)&lt;br /&gt;
 &lt;br /&gt;
 // timed_getc() checks whether data is ready to be read.  If it&amp;#039;s not the function returns a null&lt;br /&gt;
 // character.  If you simply use getc(), the PIC might get slowed up if the data isn&amp;#039;t ready right&lt;br /&gt;
 // away.&lt;br /&gt;
 char timed_getc(void){&lt;br /&gt;
    long timeout;&lt;br /&gt;
    int timeout_error = FALSE;&lt;br /&gt;
    timeout = 0;&lt;br /&gt;
    while(!kbhit() &amp;amp;&amp;amp; (++timeout&amp;lt;50000))&lt;br /&gt;
       delay_us(10);&lt;br /&gt;
    if (kbhit())&lt;br /&gt;
       return(getc());&lt;br /&gt;
    else {&lt;br /&gt;
       timeout_error = TRUE;&lt;br /&gt;
       return(0);&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 // Main program&lt;br /&gt;
 void main(void){&lt;br /&gt;
    int i;&lt;br /&gt;
    char rx;&lt;br /&gt;
 &lt;br /&gt;
    setup_timer_2(T2_DIV_BY_1, 32, 16); // Provides a 151.3 kHz clock for the Encoder/Decoder, in   &lt;br /&gt;
    setup_ccp1(CCP_PWM);                // order for it to know the baud rate of the UART. Should be &lt;br /&gt;
    set_pwm1_duty(16);                  // closer to 16 * 9600 = 153.6 kHz but the error is tolerable&lt;br /&gt;
 &lt;br /&gt;
    while(TRUE){&lt;br /&gt;
       for(i=0;i&amp;lt;16;i++){      // Counts up from 0 to 15 and transmits to the first Encoder/Decoder.&lt;br /&gt;
          putc(i);             // Listens to the second Encoder/Decoder, which is simply the original&lt;br /&gt;
          rx = timed_getc();   // message from the PIC, and displays the value on the LEDs/Port D.&lt;br /&gt;
          output_d((int8) rx);&lt;br /&gt;
          delay_ms(1000);&lt;br /&gt;
       }&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
= External Links and Further Reading =&lt;br /&gt;
*[http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf IR Transceiver Data Sheet]&lt;br /&gt;
*[http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf IR Encoder/Decoder Data Sheet]&lt;br /&gt;
*[http://www.schmartboard.com/ Schmartboard (Prototyping boards for SMT)]&lt;br /&gt;
&lt;br /&gt;
== Relevant Technical Articles ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.commsdesign.com/main/art9801.htm| Infrared communication]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Serial_communications| Serial communication]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Surface_mount| Surface mount technology]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/UART| UART]&lt;/div&gt;</summary>
		<author><name>BrianLesperance</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=File:Serial_ir_data_format.jpg&amp;diff=6910</id>
		<title>File:Serial ir data format.jpg</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=File:Serial_ir_data_format.jpg&amp;diff=6910"/>
		<updated>2008-02-13T00:44:28Z</updated>

		<summary type="html">&lt;p&gt;BrianLesperance: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>BrianLesperance</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=IR_communication_between_PICs&amp;diff=6908</id>
		<title>IR communication between PICs</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=IR_communication_between_PICs&amp;diff=6908"/>
		<updated>2008-02-12T01:16:59Z</updated>

		<summary type="html">&lt;p&gt;BrianLesperance: /* Relevant Technical Articles */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
Two PICs can easily communicate with one another using serial communication.  IR communication is a basic extension of this method which can be easily implemented with a microcontroller (PIC) through an IR Encoder/Decoder (endec) and an IR Transceiver.  The endec and transceiver used in this example support Serial IR (SIR) data rate, ranging from 9.6 kbps to 115.2 kbps.  The typical range of the transceiver is nominally from 2 inches to 2 feet and extends upwards of 12 feet.  The PIC, endec, and transceiver employed all support bidirectional use.  However, when a transceiver is transmitting it essentially blinds its receiver and therefore cannot attain true full-duplex communication; only half-duplex was used with the transceiver taking turns transmitting and receiving.&lt;br /&gt;
&lt;br /&gt;
When transmitting, the PIC sends the serial format data to the endec, which encodes (or modulates) it bit by bit.  This encoded data is then outputted as electrical pulses to the transceiver.  The transceiver converts these electrical pulses to IR light pulses.  When receiving, the transceiver receives IR light pulses (data), which are outputted as electrical pulses. The endec decodes (or demodulates) these electrical pulses, with the data then being transmitted by the endec UART back to the receiving PIC. This modulation/demodulation method is performed in accordance with the IrDA standard.&lt;br /&gt;
&lt;br /&gt;
Both the PIC and the endec used in this example were DIP packages, making them easy to prototype and inspect.  The transceiver, however, was a surface mount chip with an uncommon pin configuration (0.95 mm pitch), requiring a different mounting approach.  We initially attempted to etch a [http://www.radioshack.com/sm-2-sided-copper-clad-pc-board--pi-2102495.html copper-clad board] for our circuit (see image).  Another possible solution for our transceiver is provided by [http://www.schmartboard.com/index.asp?page=products_so&amp;amp;id=54 SchmartBoard].  These boards are more general and pre-fabricated for use with surface mount ICs (with a particular pitch or pin seperation).  Both solutions will allow for connections to a solderless breadboard.&lt;br /&gt;
&lt;br /&gt;
== Circuit ==&lt;br /&gt;
The circuit diagram below shows a complete half-duplex IR communication circuit.  This circuit can either be used together with an identical circuit to communicate, with only one PIC transmitting at a time, or with a remote control.  The software on the PIC can be configured to respond to a variety of commands sent by the remote.  The electrical characteristics of the power supply and discrete components are given below.  Some of the ranges for the IR circuitry are also given below in parentheses.  In the circuit, there are two interfaces: the serial interface and the IR interface.&lt;br /&gt;
&lt;br /&gt;
===Serial Interface===&lt;br /&gt;
The serial interface is located between the PIC and the endec.  The transmit (TX) and receive (RX) pins on the endec need to be connected between both ICs with a common ground.  The data passing between the two components on these lines have the standard 8-N-1 serial data format.  There is also a 16XCLK signal going to the endec from the PIC used to control the baud rate of the endec; that signal is a square wave pulse train at a frequency of 16*(the baud rate) and is generated in software.  The RESET signal on the endec could be controlled with software but is simply held high since the endec need not be reset.&lt;br /&gt;
&lt;br /&gt;
===IR Interface===&lt;br /&gt;
The second interface — the IR interface — is located between the endec and the transceiver.  This interface is similarly straightforward with the TXIR and RXIR pins of the endec connecting to the TXD and RXD pins of the transceiver, respectively, and also has a common ground.  The signals between these two components conform to the IrDA physical layer standard.  When a logic high or &amp;#039;1&amp;#039; is to be transmitted, a logic low will be sent to the transceiver.  When a logic low or &amp;#039;0&amp;#039; is to be transmitted, a logic high will be pulsed after 7-8 cycles of the 16XCLK signal for 3 cycles of the 16XCLK signal but no longer than 4 µs.&lt;br /&gt;
&lt;br /&gt;
[[Image:IR_circuit.jpg|thumb|600px|Circuit Diagram]]&lt;br /&gt;
&lt;br /&gt;
===Electrical Characteristics===&lt;br /&gt;
&amp;#039;&amp;#039;Microcontroller ([http://ww1.microchip.com/downloads/en/DeviceDoc/39631a.pdf Microchip PIC18F4520])&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; = 5.0V&lt;br /&gt;
*C&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; = 1µF&lt;br /&gt;
**V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; - Pin 11 &amp;amp; 32&lt;br /&gt;
**GND - Pin 12 &amp;amp; 31&lt;br /&gt;
**TX - Pin 25 (C6)&lt;br /&gt;
**RX - Pin 26 (C7)&lt;br /&gt;
**16XCLK - Pin 17 (C2/CCP1)&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;IR Encoder/Decoder ([http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf Microchip MCP2122-E/P])&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; = 5.0V (1.8V-5.5V)&lt;br /&gt;
*C&amp;lt;sub&amp;gt;BYP&amp;lt;/sub&amp;gt; = 0.01µF&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;IR Transceiver ([http://www.vishay.com/docs/82614/tfdu4300.pdf Vishay TFDU4300])&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;cc1&amp;lt;/sub&amp;gt; = 5.0V (2.4V-5.5V)&lt;br /&gt;
*V&amp;lt;sub&amp;gt;cc2&amp;lt;/sub&amp;gt; = 5.0V (-0.3V-6.0V)&lt;br /&gt;
*V&amp;lt;sub&amp;gt;logic&amp;lt;/sub&amp;gt; = 5.0V (1.5V-5.5V)&lt;br /&gt;
*R&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; = 47Ω&lt;br /&gt;
*C&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; = 0.1µF&lt;br /&gt;
&lt;br /&gt;
[[Image:copper_clad_board.jpg|right|thumb|400px|Copper-Clad Board with IR Transceiver]]		 &lt;br /&gt;
=== Surface Mount Prototyping ===	  &lt;br /&gt;
*Transceiver lead pitch = 0.95mm	 &lt;br /&gt;
*Multiple options for installation	 &lt;br /&gt;
**Schmart board	 &lt;br /&gt;
**Digikey board (need to find)	 &lt;br /&gt;
**Copper-clad board etching	 &lt;br /&gt;
**Funky pin adapter thing Prof. Peshkin gave us	 &lt;br /&gt;
**Funky adapter thing #2 Prof. Peshkin gave us	 &lt;br /&gt;
&lt;br /&gt;
=== Limitations ===	 &lt;br /&gt;
*IR Communication is only Half-Duplex (only one transceiver transmitting at a time)&lt;br /&gt;
*Transmission Distance maximum is about 12 feet (about 3ft in low power mode)&lt;br /&gt;
*Communication Speed can only go up to 115.2 kpbs&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
&lt;br /&gt;
Example code for a simple IR communication circuit w/o the use of a transceiver:&lt;br /&gt;
&lt;br /&gt;
 /*&lt;br /&gt;
   ircomm.c Jennifer Breger, Brian Lesperance, Dan Pinkawa 2008-02-05&lt;br /&gt;
   Using the PIC&amp;#039;s built-in UART, a counter continually is sent to one IR encoder/decoder.  Then&lt;br /&gt;
   the first IR encoder/decoder feeds its TXIR to the RXIR of a second IR encoder/decoder.  The &lt;br /&gt;
   second IR encoder/decoder then transmits back to the PIC what it is receiving.  When the&lt;br /&gt;
   transceiver circuit is properly mounted and inserted into the circuit, this code can be adapted&lt;br /&gt;
   for half-duplex communication w/ another IR communications circuit.&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
 #include &amp;lt;18f4520.h&amp;gt;&lt;br /&gt;
 #fuses HS,NOLVP,NOWDT,NOPROTECT&lt;br /&gt;
 #use delay (clock=20000000)&lt;br /&gt;
 #use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, stream=com_a) // Initializes the UART to 9600 bps &lt;br /&gt;
                                                              // (up to 115,200 bps)&lt;br /&gt;
 &lt;br /&gt;
 // timed_getc() checks whether data is ready to be read.  If it&amp;#039;s not the function returns a null&lt;br /&gt;
 // character.  If you simply use getc(), the PIC might get slowed up if the data isn&amp;#039;t ready right&lt;br /&gt;
 // away.&lt;br /&gt;
 char timed_getc(void){&lt;br /&gt;
    long timeout;&lt;br /&gt;
    int timeout_error = FALSE;&lt;br /&gt;
    timeout = 0;&lt;br /&gt;
    while(!kbhit() &amp;amp;&amp;amp; (++timeout&amp;lt;50000))&lt;br /&gt;
       delay_us(10);&lt;br /&gt;
    if (kbhit())&lt;br /&gt;
       return(getc());&lt;br /&gt;
    else {&lt;br /&gt;
       timeout_error = TRUE;&lt;br /&gt;
       return(0);&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 // Main program&lt;br /&gt;
 void main(void){&lt;br /&gt;
    int i;&lt;br /&gt;
    char rx;&lt;br /&gt;
 &lt;br /&gt;
    setup_timer_2(T2_DIV_BY_1, 32, 16); // Provides a 151.3 kHz clock for the Encoder/Decoder, in   &lt;br /&gt;
    setup_ccp1(CCP_PWM);                // order for it to know the baud rate of the UART. Should be &lt;br /&gt;
    set_pwm1_duty(16);                  // closer to 16 * 9600 = 153.6 kHz but the error is tolerable&lt;br /&gt;
 &lt;br /&gt;
    while(TRUE){&lt;br /&gt;
       for(i=0;i&amp;lt;16;i++){      // Counts up from 0 to 15 and transmits to the first Encoder/Decoder.&lt;br /&gt;
          putc(i);             // Listens to the second Encoder/Decoder, which is simply the original&lt;br /&gt;
          rx = timed_getc();   // message from the PIC, and displays the value on the LEDs/Port D.&lt;br /&gt;
          output_d((int8) rx);&lt;br /&gt;
          delay_ms(1000);&lt;br /&gt;
       }&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
= External Links and Further Reading =&lt;br /&gt;
*[http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf IR Transceiver Data Sheet]&lt;br /&gt;
*[http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf IR Encoder/Decoder Data Sheet]&lt;br /&gt;
*[http://www.schmartboard.com/ Schmartboard (Prototyping boards for SMT)]&lt;br /&gt;
&lt;br /&gt;
== Relevant Technical Articles ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.commsdesign.com/main/art9801.htm| Infrared communication]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Serial_communications| Serial communication]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Surface_mount| Surface mount technology]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/UART| UART]&lt;/div&gt;</summary>
		<author><name>BrianLesperance</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=IR_communication_between_PICs&amp;diff=6907</id>
		<title>IR communication between PICs</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=IR_communication_between_PICs&amp;diff=6907"/>
		<updated>2008-02-11T23:51:27Z</updated>

		<summary type="html">&lt;p&gt;BrianLesperance: /* Circuit */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
Two PICs can easily communicate with one another using serial communication.  IR communication is a basic extension of this method which can be easily implemented with a microcontroller (PIC) through an IR Encoder/Decoder (endec) and an IR Transceiver.  The endec and transceiver used in this example support Serial IR (SIR) data rate, ranging from 9.6 kbps to 115.2 kbps.  The typical range of the transceiver is nominally from 2 inches to 2 feet and extends upwards of 12 feet.  The PIC, endec, and transceiver employed all support bidirectional use.  However, when a transceiver is transmitting it essentially blinds its receiver and therefore cannot attain true full-duplex communication; only half-duplex was used with the transceiver taking turns transmitting and receiving.&lt;br /&gt;
&lt;br /&gt;
When transmitting, the PIC sends the serial format data to the endec, which encodes (or modulates) it bit by bit.  This encoded data is then outputted as electrical pulses to the transceiver.  The transceiver converts these electrical pulses to IR light pulses.  When receiving, the transceiver receives IR light pulses (data), which are outputted as electrical pulses. The endec decodes (or demodulates) these electrical pulses, with the data then being transmitted by the endec UART back to the receiving PIC. This modulation/demodulation method is performed in accordance with the IrDA standard.&lt;br /&gt;
&lt;br /&gt;
Both the PIC and the endec used in this example were DIP packages, making them easy to prototype and inspect.  The transceiver, however, was a surface mount chip with an uncommon pin configuration (0.95 mm pitch), requiring a different mounting approach.  We initially attempted to etch a [http://www.radioshack.com/sm-2-sided-copper-clad-pc-board--pi-2102495.html copper-clad board] for our circuit (see image).  Another possible solution for our transceiver is provided by [http://www.schmartboard.com/index.asp?page=products_so&amp;amp;id=54 SchmartBoard].  These boards are more general and pre-fabricated for use with surface mount ICs (with a particular pitch or pin seperation).  Both solutions will allow for connections to a solderless breadboard.&lt;br /&gt;
&lt;br /&gt;
== Circuit ==&lt;br /&gt;
The circuit diagram below shows a complete half-duplex IR communication circuit.  This circuit can either be used together with an identical circuit to communicate, with only one PIC transmitting at a time, or with a remote control.  The software on the PIC can be configured to respond to a variety of commands sent by the remote.  The electrical characteristics of the power supply and discrete components are given below.  Some of the ranges for the IR circuitry are also given below in parentheses.  In the circuit, there are two interfaces: the serial interface and the IR interface.&lt;br /&gt;
&lt;br /&gt;
===Serial Interface===&lt;br /&gt;
The serial interface is located between the PIC and the endec.  The transmit (TX) and receive (RX) pins on the endec need to be connected between both ICs with a common ground.  The data passing between the two components on these lines have the standard 8-N-1 serial data format.  There is also a 16XCLK signal going to the endec from the PIC used to control the baud rate of the endec; that signal is a square wave pulse train at a frequency of 16*(the baud rate) and is generated in software.  The RESET signal on the endec could be controlled with software but is simply held high since the endec need not be reset.&lt;br /&gt;
&lt;br /&gt;
===IR Interface===&lt;br /&gt;
The second interface — the IR interface — is located between the endec and the transceiver.  This interface is similarly straightforward with the TXIR and RXIR pins of the endec connecting to the TXD and RXD pins of the transceiver, respectively, and also has a common ground.  The signals between these two components conform to the IrDA physical layer standard.  When a logic high or &amp;#039;1&amp;#039; is to be transmitted, a logic low will be sent to the transceiver.  When a logic low or &amp;#039;0&amp;#039; is to be transmitted, a logic high will be pulsed after 7-8 cycles of the 16XCLK signal for 3 cycles of the 16XCLK signal but no longer than 4 µs.&lt;br /&gt;
&lt;br /&gt;
[[Image:IR_circuit.jpg|thumb|600px|Circuit Diagram]]&lt;br /&gt;
&lt;br /&gt;
===Electrical Characteristics===&lt;br /&gt;
&amp;#039;&amp;#039;Microcontroller ([http://ww1.microchip.com/downloads/en/DeviceDoc/39631a.pdf Microchip PIC18F4520])&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; = 5.0V&lt;br /&gt;
*C&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; = 1µF&lt;br /&gt;
**V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; - Pin 11 &amp;amp; 32&lt;br /&gt;
**GND - Pin 12 &amp;amp; 31&lt;br /&gt;
**TX - Pin 25 (C6)&lt;br /&gt;
**RX - Pin 26 (C7)&lt;br /&gt;
**16XCLK - Pin 17 (C2/CCP1)&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;IR Encoder/Decoder ([http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf Microchip MCP2122-E/P])&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; = 5.0V (1.8V-5.5V)&lt;br /&gt;
*C&amp;lt;sub&amp;gt;BYP&amp;lt;/sub&amp;gt; = 0.01µF&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;IR Transceiver ([http://www.vishay.com/docs/82614/tfdu4300.pdf Vishay TFDU4300])&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;cc1&amp;lt;/sub&amp;gt; = 5.0V (2.4V-5.5V)&lt;br /&gt;
*V&amp;lt;sub&amp;gt;cc2&amp;lt;/sub&amp;gt; = 5.0V (-0.3V-6.0V)&lt;br /&gt;
*V&amp;lt;sub&amp;gt;logic&amp;lt;/sub&amp;gt; = 5.0V (1.5V-5.5V)&lt;br /&gt;
*R&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; = 47Ω&lt;br /&gt;
*C&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; = 0.1µF&lt;br /&gt;
&lt;br /&gt;
[[Image:copper_clad_board.jpg|right|thumb|400px|Copper-Clad Board with IR Transceiver]]		 &lt;br /&gt;
=== Surface Mount Prototyping ===	  &lt;br /&gt;
*Transceiver lead pitch = 0.95mm	 &lt;br /&gt;
*Multiple options for installation	 &lt;br /&gt;
**Schmart board	 &lt;br /&gt;
**Digikey board (need to find)	 &lt;br /&gt;
**Copper-clad board etching	 &lt;br /&gt;
**Funky pin adapter thing Prof. Peshkin gave us	 &lt;br /&gt;
**Funky adapter thing #2 Prof. Peshkin gave us	 &lt;br /&gt;
&lt;br /&gt;
=== Limitations ===	 &lt;br /&gt;
*IR Communication is only Half-Duplex (only one transceiver transmitting at a time)&lt;br /&gt;
*Transmission Distance maximum is about 12 feet (about 3ft in low power mode)&lt;br /&gt;
*Communication Speed can only go up to 115.2 kpbs&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
&lt;br /&gt;
Example code for a simple IR communication circuit w/o the use of a transceiver:&lt;br /&gt;
&lt;br /&gt;
 /*&lt;br /&gt;
   ircomm.c Jennifer Breger, Brian Lesperance, Dan Pinkawa 2008-02-05&lt;br /&gt;
   Using the PIC&amp;#039;s built-in UART, a counter continually is sent to one IR encoder/decoder.  Then&lt;br /&gt;
   the first IR encoder/decoder feeds its TXIR to the RXIR of a second IR encoder/decoder.  The &lt;br /&gt;
   second IR encoder/decoder then transmits back to the PIC what it is receiving.  When the&lt;br /&gt;
   transceiver circuit is properly mounted and inserted into the circuit, this code can be adapted&lt;br /&gt;
   for half-duplex communication w/ another IR communications circuit.&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
 #include &amp;lt;18f4520.h&amp;gt;&lt;br /&gt;
 #fuses HS,NOLVP,NOWDT,NOPROTECT&lt;br /&gt;
 #use delay (clock=20000000)&lt;br /&gt;
 #use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, stream=com_a) // Initializes the UART to 9600 bps &lt;br /&gt;
                                                              // (up to 115,200 bps)&lt;br /&gt;
 &lt;br /&gt;
 // timed_getc() checks whether data is ready to be read.  If it&amp;#039;s not the function returns a null&lt;br /&gt;
 // character.  If you simply use getc(), the PIC might get slowed up if the data isn&amp;#039;t ready right&lt;br /&gt;
 // away.&lt;br /&gt;
 char timed_getc(void){&lt;br /&gt;
    long timeout;&lt;br /&gt;
    int timeout_error = FALSE;&lt;br /&gt;
    timeout = 0;&lt;br /&gt;
    while(!kbhit() &amp;amp;&amp;amp; (++timeout&amp;lt;50000))&lt;br /&gt;
       delay_us(10);&lt;br /&gt;
    if (kbhit())&lt;br /&gt;
       return(getc());&lt;br /&gt;
    else {&lt;br /&gt;
       timeout_error = TRUE;&lt;br /&gt;
       return(0);&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 // Main program&lt;br /&gt;
 void main(void){&lt;br /&gt;
    int i;&lt;br /&gt;
    char rx;&lt;br /&gt;
 &lt;br /&gt;
    setup_timer_2(T2_DIV_BY_1, 32, 16); // Provides a 151.3 kHz clock for the Encoder/Decoder, in   &lt;br /&gt;
    setup_ccp1(CCP_PWM);                // order for it to know the baud rate of the UART. Should be &lt;br /&gt;
    set_pwm1_duty(16);                  // closer to 16 * 9600 = 153.6 kHz but the error is tolerable&lt;br /&gt;
 &lt;br /&gt;
    while(TRUE){&lt;br /&gt;
       for(i=0;i&amp;lt;16;i++){      // Counts up from 0 to 15 and transmits to the first Encoder/Decoder.&lt;br /&gt;
          putc(i);             // Listens to the second Encoder/Decoder, which is simply the original&lt;br /&gt;
          rx = timed_getc();   // message from the PIC, and displays the value on the LEDs/Port D.&lt;br /&gt;
          output_d((int8) rx);&lt;br /&gt;
          delay_ms(1000);&lt;br /&gt;
       }&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
= External Links and Further Reading =&lt;br /&gt;
*[http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf IR Transceiver Data Sheet]&lt;br /&gt;
*[http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf IR Encoder/Decoder Data Sheet]&lt;br /&gt;
*[http://www.schmartboard.com/ Schmartboard (Prototyping boards for SMT)]&lt;br /&gt;
&lt;br /&gt;
== Relevant Technical Articles ==&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Infrared_communication#Communications| Infrared communication]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Serial_communications| Serial communication]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Surface_mount| Surface mount technology]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/UART| UART]&lt;/div&gt;</summary>
		<author><name>BrianLesperance</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=IR_communication_between_PICs&amp;diff=6906</id>
		<title>IR communication between PICs</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=IR_communication_between_PICs&amp;diff=6906"/>
		<updated>2008-02-11T21:39:39Z</updated>

		<summary type="html">&lt;p&gt;BrianLesperance: /* IrDA Interface */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
Two PICs can easily communicate with one another using serial communication.  IR communication is a basic extension of this method which can be easily implemented with a microcontroller (PIC) through an IR Encoder/Decoder (endec) and an IR Transceiver.  The endec and transceiver used in this example support Serial IR (SIR) data rate, ranging from 9.6 kbps to 115.2 kbps.  The typical range of the transceiver is nominally from 2 inches to 2 feet and extends upwards of 12 feet.  The PIC, endec, and transceiver employed all support bidirectional use.  However, when a transceiver is transmitting it essentially blinds its receiver and therefore cannot attain true full-duplex communication; only half-duplex was used with the transceiver taking turns transmitting and receiving.&lt;br /&gt;
&lt;br /&gt;
When transmitting, the PIC sends the serial format data to the endec, which encodes (or modulates) it bit by bit.  This encoded data is then outputted as electrical pulses to the transceiver.  The transceiver converts these electrical pulses to IR light pulses.  When receiving, the transceiver receives IR light pulses (data), which are outputted as electrical pulses. The endec decodes (or demodulates) these electrical pulses, with the data then being transmitted by the endec UART back to the receiving PIC. This modulation/demodulation method is performed in accordance with the IrDA standard.&lt;br /&gt;
&lt;br /&gt;
Both the PIC and the endec used in this example were DIP packages, making them easy to prototype and inspect.  The transceiver, however, was a surface mount chip with an uncommon pin configuration (0.95 mm pitch), requiring a different mounting approach.  We initially attempted to etch a [http://www.radioshack.com/sm-2-sided-copper-clad-pc-board--pi-2102495.html copper-clad board] for our circuit (see image).  Another possible solution for our transceiver is provided by [http://www.schmartboard.com/index.asp?page=products_so&amp;amp;id=54 SchmartBoard].  These boards are more general and pre-fabricated for use with surface mount ICs (with a particular pitch or pin seperation).  Both solutions will allow for connections to a solderless breadboard.&lt;br /&gt;
&lt;br /&gt;
== Circuit ==&lt;br /&gt;
The circuit diagram below shows a complete half-duplex IR communication circuit.  This circuit can either be used together with an identical circuit to communicate, with only one PIC transmitting at a time, or with a remote control.  The software on the PIC can be configured to respond to a variety of commands sent by the remote.  The electrical characteristics of the power supply and discrete components are given below.  Some of the ranges for the IR circuitry are also given below in parentheses.&lt;br /&gt;
&lt;br /&gt;
===Serial Interface===&lt;br /&gt;
In the circuit, there are two interfaces: the serial interface and the IR interface.  The serial interface is located between the PIC and the endec.  The transmit (TX) and receive (RX) pins on the endec need to be connected between both ICs with a common ground.  The data passing between the two components on these lines have the standard 8-N-1 serial data format.  There is also a 16XCLK signal going to the endec from the PIC used to control the baud rate of the endec; that signal is a square wave pulse train at a frequency of 16*(the baud rate) and is generated in software.  The RESET signal on the endec could be controlled with software but is simply held high since the endec need not be reset.&lt;br /&gt;
&lt;br /&gt;
===IR Interface===&lt;br /&gt;
The second interface — the IR interface — is located between the endec and the transceiver.  This interface is similarly straightforward with the TXIR and RXIR pins of the endec connecting to the TXD and RXD pins of the transceiver, respectively, and also has a common ground.  The signals between these two components conform to the IrDA physical layer standard.  When a logic high or &amp;#039;1&amp;#039; is to be transmitted, a logic low will be sent to the transceiver.  When a logic low or &amp;#039;0&amp;#039; is to be transmitted, a logic high will be pulsed after 7-8 cycles of the 16XCLK signal for 3 cycles of the 16XCLK signal but no longer than 4 µs.&lt;br /&gt;
&lt;br /&gt;
[[Image:IR_circuit.jpg|thumb|600px|Circuit Diagram]]&lt;br /&gt;
&lt;br /&gt;
===Electrical Characteristics===&lt;br /&gt;
&amp;#039;&amp;#039;Microcontroller ([http://ww1.microchip.com/downloads/en/DeviceDoc/39631a.pdf Microchip PIC18F4520])&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; = 5.0V&lt;br /&gt;
*C&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; = 1µF&lt;br /&gt;
**V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; - Pin 11 &amp;amp; 32&lt;br /&gt;
**GND - Pin 12 &amp;amp; 31&lt;br /&gt;
**TX - Pin 25 (C6)&lt;br /&gt;
**RX - Pin 26 (C7)&lt;br /&gt;
**16XCLK - Pin 17 (C2/CCP1)&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;IR Encoder/Decoder ([http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf Microchip MCP2122-E/P])&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; = 5.0V (1.8V-5.5V)&lt;br /&gt;
*C&amp;lt;sub&amp;gt;BYP&amp;lt;/sub&amp;gt; = 0.01µF&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;IR Transceiver ([http://www.vishay.com/docs/82614/tfdu4300.pdf Vishay TFDU4300])&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;cc1&amp;lt;/sub&amp;gt; = 5.0V (2.4V-5.5V)&lt;br /&gt;
*V&amp;lt;sub&amp;gt;cc2&amp;lt;/sub&amp;gt; = 5.0V (-0.3V-6.0V)&lt;br /&gt;
*V&amp;lt;sub&amp;gt;logic&amp;lt;/sub&amp;gt; = 5.0V (1.5V-5.5V)&lt;br /&gt;
*R&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; = 47Ω&lt;br /&gt;
*C&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; = 0.1µF&lt;br /&gt;
&lt;br /&gt;
[[Image:copper_clad_board.jpg|right|thumb|400px|Copper-Clad Board with IR Transceiver]]		 &lt;br /&gt;
=== Surface Mount Prototyping ===	  &lt;br /&gt;
*Transceiver lead pitch = 0.95mm	 &lt;br /&gt;
*Multiple options for installation	 &lt;br /&gt;
**Schmart board	 &lt;br /&gt;
**Digikey board (need to find)	 &lt;br /&gt;
**Copper-clad board etching	 &lt;br /&gt;
**Funky pin adapter thing Prof. Peshkin gave us	 &lt;br /&gt;
**Funky adapter thing #2 Prof. Peshkin gave us	 &lt;br /&gt;
&lt;br /&gt;
=== Limitations ===	 &lt;br /&gt;
*IR Communication is only Half-Duplex (only one transceiver transmitting at a time)&lt;br /&gt;
*Transmission Distance maximum is about 12 feet (about 3ft in low power mode)&lt;br /&gt;
*Communication Speed can only go up to 115.2 kpbs&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
&lt;br /&gt;
Example code for a simple IR communication circuit w/o the use of a transceiver:&lt;br /&gt;
&lt;br /&gt;
 /*&lt;br /&gt;
   ircomm.c Jennifer Breger, Brian Lesperance, Dan Pinkawa 2008-02-05&lt;br /&gt;
   Using the PIC&amp;#039;s built-in UART, a counter continually is sent to one IR encoder/decoder.  Then&lt;br /&gt;
   the first IR encoder/decoder feeds its TXIR to the RXIR of a second IR encoder/decoder.  The &lt;br /&gt;
   second IR encoder/decoder then transmits back to the PIC what it is receiving.  When the&lt;br /&gt;
   transceiver circuit is properly mounted and inserted into the circuit, this code can be adapted&lt;br /&gt;
   for half-duplex communication w/ another IR communications circuit.&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
 #include &amp;lt;18f4520.h&amp;gt;&lt;br /&gt;
 #fuses HS,NOLVP,NOWDT,NOPROTECT&lt;br /&gt;
 #use delay (clock=20000000)&lt;br /&gt;
 #use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, stream=com_a) // Initializes the UART to 9600 bps &lt;br /&gt;
                                                              // (up to 115,200 bps)&lt;br /&gt;
 &lt;br /&gt;
 // timed_getc() checks whether data is ready to be read.  If it&amp;#039;s not the function returns a null&lt;br /&gt;
 // character.  If you simply use getc(), the PIC might get slowed up if the data isn&amp;#039;t ready right&lt;br /&gt;
 // away.&lt;br /&gt;
 char timed_getc(void){&lt;br /&gt;
    long timeout;&lt;br /&gt;
    int timeout_error = FALSE;&lt;br /&gt;
    timeout = 0;&lt;br /&gt;
    while(!kbhit() &amp;amp;&amp;amp; (++timeout&amp;lt;50000))&lt;br /&gt;
       delay_us(10);&lt;br /&gt;
    if (kbhit())&lt;br /&gt;
       return(getc());&lt;br /&gt;
    else {&lt;br /&gt;
       timeout_error = TRUE;&lt;br /&gt;
       return(0);&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 // Main program&lt;br /&gt;
 void main(void){&lt;br /&gt;
    int i;&lt;br /&gt;
    char rx;&lt;br /&gt;
 &lt;br /&gt;
    setup_timer_2(T2_DIV_BY_1, 32, 16); // Provides a 151.3 kHz clock for the Encoder/Decoder, in   &lt;br /&gt;
    setup_ccp1(CCP_PWM);                // order for it to know the baud rate of the UART. Should be &lt;br /&gt;
    set_pwm1_duty(16);                  // closer to 16 * 9600 = 153.6 kHz but the error is tolerable&lt;br /&gt;
 &lt;br /&gt;
    while(TRUE){&lt;br /&gt;
       for(i=0;i&amp;lt;16;i++){      // Counts up from 0 to 15 and transmits to the first Encoder/Decoder.&lt;br /&gt;
          putc(i);             // Listens to the second Encoder/Decoder, which is simply the original&lt;br /&gt;
          rx = timed_getc();   // message from the PIC, and displays the value on the LEDs/Port D.&lt;br /&gt;
          output_d((int8) rx);&lt;br /&gt;
          delay_ms(1000);&lt;br /&gt;
       }&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
= External Links and Further Reading =&lt;br /&gt;
*[http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf IR Transceiver Data Sheet]&lt;br /&gt;
*[http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf IR Encoder/Decoder Data Sheet]&lt;br /&gt;
*[http://www.schmartboard.com/ Schmartboard (Prototyping boards for SMT)]&lt;br /&gt;
&lt;br /&gt;
== Relevant Technical Articles ==&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Infrared_communication#Communications| Infrared communication]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Serial_communications| Serial communication]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Surface_mount| Surface mount technology]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/UART| UART]&lt;/div&gt;</summary>
		<author><name>BrianLesperance</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=IR_communication_between_PICs&amp;diff=6905</id>
		<title>IR communication between PICs</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=IR_communication_between_PICs&amp;diff=6905"/>
		<updated>2008-02-11T21:39:11Z</updated>

		<summary type="html">&lt;p&gt;BrianLesperance: /* IrDA Interface */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
Two PICs can easily communicate with one another using serial communication.  IR communication is a basic extension of this method which can be easily implemented with a microcontroller (PIC) through an IR Encoder/Decoder (endec) and an IR Transceiver.  The endec and transceiver used in this example support Serial IR (SIR) data rate, ranging from 9.6 kbps to 115.2 kbps.  The typical range of the transceiver is nominally from 2 inches to 2 feet and extends upwards of 12 feet.  The PIC, endec, and transceiver employed all support bidirectional use.  However, when a transceiver is transmitting it essentially blinds its receiver and therefore cannot attain true full-duplex communication; only half-duplex was used with the transceiver taking turns transmitting and receiving.&lt;br /&gt;
&lt;br /&gt;
When transmitting, the PIC sends the serial format data to the endec, which encodes (or modulates) it bit by bit.  This encoded data is then outputted as electrical pulses to the transceiver.  The transceiver converts these electrical pulses to IR light pulses.  When receiving, the transceiver receives IR light pulses (data), which are outputted as electrical pulses. The endec decodes (or demodulates) these electrical pulses, with the data then being transmitted by the endec UART back to the receiving PIC. This modulation/demodulation method is performed in accordance with the IrDA standard.&lt;br /&gt;
&lt;br /&gt;
Both the PIC and the endec used in this example were DIP packages, making them easy to prototype and inspect.  The transceiver, however, was a surface mount chip with an uncommon pin configuration (0.95 mm pitch), requiring a different mounting approach.  We initially attempted to etch a [http://www.radioshack.com/sm-2-sided-copper-clad-pc-board--pi-2102495.html copper-clad board] for our circuit (see image).  Another possible solution for our transceiver is provided by [http://www.schmartboard.com/index.asp?page=products_so&amp;amp;id=54 SchmartBoard].  These boards are more general and pre-fabricated for use with surface mount ICs (with a particular pitch or pin seperation).  Both solutions will allow for connections to a solderless breadboard.&lt;br /&gt;
&lt;br /&gt;
== Circuit ==&lt;br /&gt;
The circuit diagram below shows a complete half-duplex IR communication circuit.  This circuit can either be used together with an identical circuit to communicate, with only one PIC transmitting at a time, or with a remote control.  The software on the PIC can be configured to respond to a variety of commands sent by the remote.  The electrical characteristics of the power supply and discrete components are given below.  Some of the ranges for the IR circuitry are also given below in parentheses.&lt;br /&gt;
&lt;br /&gt;
===Serial Interface===&lt;br /&gt;
In the circuit, there are two interfaces: the serial interface and the IR interface.  The serial interface is located between the PIC and the endec.  The transmit (TX) and receive (RX) pins on the endec need to be connected between both ICs with a common ground.  The data passing between the two components on these lines have the standard 8-N-1 serial data format.  There is also a 16XCLK signal going to the endec from the PIC used to control the baud rate of the endec; that signal is a square wave pulse train at a frequency of 16*(the baud rate) and is generated in software.  The RESET signal on the endec could be controlled with software but is simply held high since the endec need not be reset.&lt;br /&gt;
&lt;br /&gt;
===IrDA Interface===&lt;br /&gt;
The second interface — the IR interface — is located between the endec and the transceiver.  This interface is similarly straightforward with the TXIR and RXIR pins of the endec connecting to the TXD and RXD pins of the transceiver, respectively, and also has a common ground.  The signals between these two components conform to the IrDA physical layer standard.  When a logic high or &amp;#039;1&amp;#039; is to be transmitted, a logic low will be sent to the transceiver.  When a logic low or &amp;#039;0&amp;#039; is to be transmitted, a logic high will be pulsed after 7-8 cycles of the 16XCLK signal for 3 cycles of the 16XCLK signal but no longer than 4 µs.&lt;br /&gt;
&lt;br /&gt;
[[Image:IR_circuit.jpg|thumb|600px|Circuit Diagram]]&lt;br /&gt;
&lt;br /&gt;
===Electrical Characteristics===&lt;br /&gt;
&amp;#039;&amp;#039;Microcontroller ([http://ww1.microchip.com/downloads/en/DeviceDoc/39631a.pdf Microchip PIC18F4520])&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; = 5.0V&lt;br /&gt;
*C&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; = 1µF&lt;br /&gt;
**V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; - Pin 11 &amp;amp; 32&lt;br /&gt;
**GND - Pin 12 &amp;amp; 31&lt;br /&gt;
**TX - Pin 25 (C6)&lt;br /&gt;
**RX - Pin 26 (C7)&lt;br /&gt;
**16XCLK - Pin 17 (C2/CCP1)&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;IR Encoder/Decoder ([http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf Microchip MCP2122-E/P])&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; = 5.0V (1.8V-5.5V)&lt;br /&gt;
*C&amp;lt;sub&amp;gt;BYP&amp;lt;/sub&amp;gt; = 0.01µF&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;IR Transceiver ([http://www.vishay.com/docs/82614/tfdu4300.pdf Vishay TFDU4300])&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;cc1&amp;lt;/sub&amp;gt; = 5.0V (2.4V-5.5V)&lt;br /&gt;
*V&amp;lt;sub&amp;gt;cc2&amp;lt;/sub&amp;gt; = 5.0V (-0.3V-6.0V)&lt;br /&gt;
*V&amp;lt;sub&amp;gt;logic&amp;lt;/sub&amp;gt; = 5.0V (1.5V-5.5V)&lt;br /&gt;
*R&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; = 47Ω&lt;br /&gt;
*C&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; = 0.1µF&lt;br /&gt;
&lt;br /&gt;
[[Image:copper_clad_board.jpg|right|thumb|400px|Copper-Clad Board with IR Transceiver]]		 &lt;br /&gt;
=== Surface Mount Prototyping ===	  &lt;br /&gt;
*Transceiver lead pitch = 0.95mm	 &lt;br /&gt;
*Multiple options for installation	 &lt;br /&gt;
**Schmart board	 &lt;br /&gt;
**Digikey board (need to find)	 &lt;br /&gt;
**Copper-clad board etching	 &lt;br /&gt;
**Funky pin adapter thing Prof. Peshkin gave us	 &lt;br /&gt;
**Funky adapter thing #2 Prof. Peshkin gave us	 &lt;br /&gt;
&lt;br /&gt;
=== Limitations ===	 &lt;br /&gt;
*IR Communication is only Half-Duplex (only one transceiver transmitting at a time)&lt;br /&gt;
*Transmission Distance maximum is about 12 feet (about 3ft in low power mode)&lt;br /&gt;
*Communication Speed can only go up to 115.2 kpbs&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
&lt;br /&gt;
Example code for a simple IR communication circuit w/o the use of a transceiver:&lt;br /&gt;
&lt;br /&gt;
 /*&lt;br /&gt;
   ircomm.c Jennifer Breger, Brian Lesperance, Dan Pinkawa 2008-02-05&lt;br /&gt;
   Using the PIC&amp;#039;s built-in UART, a counter continually is sent to one IR encoder/decoder.  Then&lt;br /&gt;
   the first IR encoder/decoder feeds its TXIR to the RXIR of a second IR encoder/decoder.  The &lt;br /&gt;
   second IR encoder/decoder then transmits back to the PIC what it is receiving.  When the&lt;br /&gt;
   transceiver circuit is properly mounted and inserted into the circuit, this code can be adapted&lt;br /&gt;
   for half-duplex communication w/ another IR communications circuit.&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
 #include &amp;lt;18f4520.h&amp;gt;&lt;br /&gt;
 #fuses HS,NOLVP,NOWDT,NOPROTECT&lt;br /&gt;
 #use delay (clock=20000000)&lt;br /&gt;
 #use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, stream=com_a) // Initializes the UART to 9600 bps &lt;br /&gt;
                                                              // (up to 115,200 bps)&lt;br /&gt;
 &lt;br /&gt;
 // timed_getc() checks whether data is ready to be read.  If it&amp;#039;s not the function returns a null&lt;br /&gt;
 // character.  If you simply use getc(), the PIC might get slowed up if the data isn&amp;#039;t ready right&lt;br /&gt;
 // away.&lt;br /&gt;
 char timed_getc(void){&lt;br /&gt;
    long timeout;&lt;br /&gt;
    int timeout_error = FALSE;&lt;br /&gt;
    timeout = 0;&lt;br /&gt;
    while(!kbhit() &amp;amp;&amp;amp; (++timeout&amp;lt;50000))&lt;br /&gt;
       delay_us(10);&lt;br /&gt;
    if (kbhit())&lt;br /&gt;
       return(getc());&lt;br /&gt;
    else {&lt;br /&gt;
       timeout_error = TRUE;&lt;br /&gt;
       return(0);&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 // Main program&lt;br /&gt;
 void main(void){&lt;br /&gt;
    int i;&lt;br /&gt;
    char rx;&lt;br /&gt;
 &lt;br /&gt;
    setup_timer_2(T2_DIV_BY_1, 32, 16); // Provides a 151.3 kHz clock for the Encoder/Decoder, in   &lt;br /&gt;
    setup_ccp1(CCP_PWM);                // order for it to know the baud rate of the UART. Should be &lt;br /&gt;
    set_pwm1_duty(16);                  // closer to 16 * 9600 = 153.6 kHz but the error is tolerable&lt;br /&gt;
 &lt;br /&gt;
    while(TRUE){&lt;br /&gt;
       for(i=0;i&amp;lt;16;i++){      // Counts up from 0 to 15 and transmits to the first Encoder/Decoder.&lt;br /&gt;
          putc(i);             // Listens to the second Encoder/Decoder, which is simply the original&lt;br /&gt;
          rx = timed_getc();   // message from the PIC, and displays the value on the LEDs/Port D.&lt;br /&gt;
          output_d((int8) rx);&lt;br /&gt;
          delay_ms(1000);&lt;br /&gt;
       }&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
= External Links and Further Reading =&lt;br /&gt;
*[http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf IR Transceiver Data Sheet]&lt;br /&gt;
*[http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf IR Encoder/Decoder Data Sheet]&lt;br /&gt;
*[http://www.schmartboard.com/ Schmartboard (Prototyping boards for SMT)]&lt;br /&gt;
&lt;br /&gt;
== Relevant Technical Articles ==&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Infrared_communication#Communications| Infrared communication]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Serial_communications| Serial communication]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Surface_mount| Surface mount technology]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/UART| UART]&lt;/div&gt;</summary>
		<author><name>BrianLesperance</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=IR_communication_between_PICs&amp;diff=6904</id>
		<title>IR communication between PICs</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=IR_communication_between_PICs&amp;diff=6904"/>
		<updated>2008-02-11T21:39:02Z</updated>

		<summary type="html">&lt;p&gt;BrianLesperance: /* Serial Interface */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
Two PICs can easily communicate with one another using serial communication.  IR communication is a basic extension of this method which can be easily implemented with a microcontroller (PIC) through an IR Encoder/Decoder (endec) and an IR Transceiver.  The endec and transceiver used in this example support Serial IR (SIR) data rate, ranging from 9.6 kbps to 115.2 kbps.  The typical range of the transceiver is nominally from 2 inches to 2 feet and extends upwards of 12 feet.  The PIC, endec, and transceiver employed all support bidirectional use.  However, when a transceiver is transmitting it essentially blinds its receiver and therefore cannot attain true full-duplex communication; only half-duplex was used with the transceiver taking turns transmitting and receiving.&lt;br /&gt;
&lt;br /&gt;
When transmitting, the PIC sends the serial format data to the endec, which encodes (or modulates) it bit by bit.  This encoded data is then outputted as electrical pulses to the transceiver.  The transceiver converts these electrical pulses to IR light pulses.  When receiving, the transceiver receives IR light pulses (data), which are outputted as electrical pulses. The endec decodes (or demodulates) these electrical pulses, with the data then being transmitted by the endec UART back to the receiving PIC. This modulation/demodulation method is performed in accordance with the IrDA standard.&lt;br /&gt;
&lt;br /&gt;
Both the PIC and the endec used in this example were DIP packages, making them easy to prototype and inspect.  The transceiver, however, was a surface mount chip with an uncommon pin configuration (0.95 mm pitch), requiring a different mounting approach.  We initially attempted to etch a [http://www.radioshack.com/sm-2-sided-copper-clad-pc-board--pi-2102495.html copper-clad board] for our circuit (see image).  Another possible solution for our transceiver is provided by [http://www.schmartboard.com/index.asp?page=products_so&amp;amp;id=54 SchmartBoard].  These boards are more general and pre-fabricated for use with surface mount ICs (with a particular pitch or pin seperation).  Both solutions will allow for connections to a solderless breadboard.&lt;br /&gt;
&lt;br /&gt;
== Circuit ==&lt;br /&gt;
The circuit diagram below shows a complete half-duplex IR communication circuit.  This circuit can either be used together with an identical circuit to communicate, with only one PIC transmitting at a time, or with a remote control.  The software on the PIC can be configured to respond to a variety of commands sent by the remote.  The electrical characteristics of the power supply and discrete components are given below.  Some of the ranges for the IR circuitry are also given below in parentheses.&lt;br /&gt;
&lt;br /&gt;
===Serial Interface===&lt;br /&gt;
In the circuit, there are two interfaces: the serial interface and the IR interface.  The serial interface is located between the PIC and the endec.  The transmit (TX) and receive (RX) pins on the endec need to be connected between both ICs with a common ground.  The data passing between the two components on these lines have the standard 8-N-1 serial data format.  There is also a 16XCLK signal going to the endec from the PIC used to control the baud rate of the endec; that signal is a square wave pulse train at a frequency of 16*(the baud rate) and is generated in software.  The RESET signal on the endec could be controlled with software but is simply held high since the endec need not be reset.&lt;br /&gt;
&lt;br /&gt;
==IrDA Interface==&lt;br /&gt;
The second interface — the IR interface — is located between the endec and the transceiver.  This interface is similarly straightforward with the TXIR and RXIR pins of the endec connecting to the TXD and RXD pins of the transceiver, respectively, and also has a common ground.  The signals between these two components conform to the IrDA physical layer standard.  When a logic high or &amp;#039;1&amp;#039; is to be transmitted, a logic low will be sent to the transceiver.  When a logic low or &amp;#039;0&amp;#039; is to be transmitted, a logic high will be pulsed after 7-8 cycles of the 16XCLK signal for 3 cycles of the 16XCLK signal but no longer than 4 µs.&lt;br /&gt;
&lt;br /&gt;
[[Image:IR_circuit.jpg|thumb|600px|Circuit Diagram]]&lt;br /&gt;
&lt;br /&gt;
===Electrical Characteristics===&lt;br /&gt;
&amp;#039;&amp;#039;Microcontroller ([http://ww1.microchip.com/downloads/en/DeviceDoc/39631a.pdf Microchip PIC18F4520])&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; = 5.0V&lt;br /&gt;
*C&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; = 1µF&lt;br /&gt;
**V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; - Pin 11 &amp;amp; 32&lt;br /&gt;
**GND - Pin 12 &amp;amp; 31&lt;br /&gt;
**TX - Pin 25 (C6)&lt;br /&gt;
**RX - Pin 26 (C7)&lt;br /&gt;
**16XCLK - Pin 17 (C2/CCP1)&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;IR Encoder/Decoder ([http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf Microchip MCP2122-E/P])&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; = 5.0V (1.8V-5.5V)&lt;br /&gt;
*C&amp;lt;sub&amp;gt;BYP&amp;lt;/sub&amp;gt; = 0.01µF&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;IR Transceiver ([http://www.vishay.com/docs/82614/tfdu4300.pdf Vishay TFDU4300])&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;cc1&amp;lt;/sub&amp;gt; = 5.0V (2.4V-5.5V)&lt;br /&gt;
*V&amp;lt;sub&amp;gt;cc2&amp;lt;/sub&amp;gt; = 5.0V (-0.3V-6.0V)&lt;br /&gt;
*V&amp;lt;sub&amp;gt;logic&amp;lt;/sub&amp;gt; = 5.0V (1.5V-5.5V)&lt;br /&gt;
*R&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; = 47Ω&lt;br /&gt;
*C&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; = 0.1µF&lt;br /&gt;
&lt;br /&gt;
[[Image:copper_clad_board.jpg|right|thumb|400px|Copper-Clad Board with IR Transceiver]]		 &lt;br /&gt;
=== Surface Mount Prototyping ===	  &lt;br /&gt;
*Transceiver lead pitch = 0.95mm	 &lt;br /&gt;
*Multiple options for installation	 &lt;br /&gt;
**Schmart board	 &lt;br /&gt;
**Digikey board (need to find)	 &lt;br /&gt;
**Copper-clad board etching	 &lt;br /&gt;
**Funky pin adapter thing Prof. Peshkin gave us	 &lt;br /&gt;
**Funky adapter thing #2 Prof. Peshkin gave us	 &lt;br /&gt;
&lt;br /&gt;
=== Limitations ===	 &lt;br /&gt;
*IR Communication is only Half-Duplex (only one transceiver transmitting at a time)&lt;br /&gt;
*Transmission Distance maximum is about 12 feet (about 3ft in low power mode)&lt;br /&gt;
*Communication Speed can only go up to 115.2 kpbs&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
&lt;br /&gt;
Example code for a simple IR communication circuit w/o the use of a transceiver:&lt;br /&gt;
&lt;br /&gt;
 /*&lt;br /&gt;
   ircomm.c Jennifer Breger, Brian Lesperance, Dan Pinkawa 2008-02-05&lt;br /&gt;
   Using the PIC&amp;#039;s built-in UART, a counter continually is sent to one IR encoder/decoder.  Then&lt;br /&gt;
   the first IR encoder/decoder feeds its TXIR to the RXIR of a second IR encoder/decoder.  The &lt;br /&gt;
   second IR encoder/decoder then transmits back to the PIC what it is receiving.  When the&lt;br /&gt;
   transceiver circuit is properly mounted and inserted into the circuit, this code can be adapted&lt;br /&gt;
   for half-duplex communication w/ another IR communications circuit.&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
 #include &amp;lt;18f4520.h&amp;gt;&lt;br /&gt;
 #fuses HS,NOLVP,NOWDT,NOPROTECT&lt;br /&gt;
 #use delay (clock=20000000)&lt;br /&gt;
 #use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, stream=com_a) // Initializes the UART to 9600 bps &lt;br /&gt;
                                                              // (up to 115,200 bps)&lt;br /&gt;
 &lt;br /&gt;
 // timed_getc() checks whether data is ready to be read.  If it&amp;#039;s not the function returns a null&lt;br /&gt;
 // character.  If you simply use getc(), the PIC might get slowed up if the data isn&amp;#039;t ready right&lt;br /&gt;
 // away.&lt;br /&gt;
 char timed_getc(void){&lt;br /&gt;
    long timeout;&lt;br /&gt;
    int timeout_error = FALSE;&lt;br /&gt;
    timeout = 0;&lt;br /&gt;
    while(!kbhit() &amp;amp;&amp;amp; (++timeout&amp;lt;50000))&lt;br /&gt;
       delay_us(10);&lt;br /&gt;
    if (kbhit())&lt;br /&gt;
       return(getc());&lt;br /&gt;
    else {&lt;br /&gt;
       timeout_error = TRUE;&lt;br /&gt;
       return(0);&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 // Main program&lt;br /&gt;
 void main(void){&lt;br /&gt;
    int i;&lt;br /&gt;
    char rx;&lt;br /&gt;
 &lt;br /&gt;
    setup_timer_2(T2_DIV_BY_1, 32, 16); // Provides a 151.3 kHz clock for the Encoder/Decoder, in   &lt;br /&gt;
    setup_ccp1(CCP_PWM);                // order for it to know the baud rate of the UART. Should be &lt;br /&gt;
    set_pwm1_duty(16);                  // closer to 16 * 9600 = 153.6 kHz but the error is tolerable&lt;br /&gt;
 &lt;br /&gt;
    while(TRUE){&lt;br /&gt;
       for(i=0;i&amp;lt;16;i++){      // Counts up from 0 to 15 and transmits to the first Encoder/Decoder.&lt;br /&gt;
          putc(i);             // Listens to the second Encoder/Decoder, which is simply the original&lt;br /&gt;
          rx = timed_getc();   // message from the PIC, and displays the value on the LEDs/Port D.&lt;br /&gt;
          output_d((int8) rx);&lt;br /&gt;
          delay_ms(1000);&lt;br /&gt;
       }&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
= External Links and Further Reading =&lt;br /&gt;
*[http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf IR Transceiver Data Sheet]&lt;br /&gt;
*[http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf IR Encoder/Decoder Data Sheet]&lt;br /&gt;
*[http://www.schmartboard.com/ Schmartboard (Prototyping boards for SMT)]&lt;br /&gt;
&lt;br /&gt;
== Relevant Technical Articles ==&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Infrared_communication#Communications| Infrared communication]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Serial_communications| Serial communication]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Surface_mount| Surface mount technology]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/UART| UART]&lt;/div&gt;</summary>
		<author><name>BrianLesperance</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=IR_communication_between_PICs&amp;diff=6903</id>
		<title>IR communication between PICs</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=IR_communication_between_PICs&amp;diff=6903"/>
		<updated>2008-02-11T21:38:47Z</updated>

		<summary type="html">&lt;p&gt;BrianLesperance: /* Circuit */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
Two PICs can easily communicate with one another using serial communication.  IR communication is a basic extension of this method which can be easily implemented with a microcontroller (PIC) through an IR Encoder/Decoder (endec) and an IR Transceiver.  The endec and transceiver used in this example support Serial IR (SIR) data rate, ranging from 9.6 kbps to 115.2 kbps.  The typical range of the transceiver is nominally from 2 inches to 2 feet and extends upwards of 12 feet.  The PIC, endec, and transceiver employed all support bidirectional use.  However, when a transceiver is transmitting it essentially blinds its receiver and therefore cannot attain true full-duplex communication; only half-duplex was used with the transceiver taking turns transmitting and receiving.&lt;br /&gt;
&lt;br /&gt;
When transmitting, the PIC sends the serial format data to the endec, which encodes (or modulates) it bit by bit.  This encoded data is then outputted as electrical pulses to the transceiver.  The transceiver converts these electrical pulses to IR light pulses.  When receiving, the transceiver receives IR light pulses (data), which are outputted as electrical pulses. The endec decodes (or demodulates) these electrical pulses, with the data then being transmitted by the endec UART back to the receiving PIC. This modulation/demodulation method is performed in accordance with the IrDA standard.&lt;br /&gt;
&lt;br /&gt;
Both the PIC and the endec used in this example were DIP packages, making them easy to prototype and inspect.  The transceiver, however, was a surface mount chip with an uncommon pin configuration (0.95 mm pitch), requiring a different mounting approach.  We initially attempted to etch a [http://www.radioshack.com/sm-2-sided-copper-clad-pc-board--pi-2102495.html copper-clad board] for our circuit (see image).  Another possible solution for our transceiver is provided by [http://www.schmartboard.com/index.asp?page=products_so&amp;amp;id=54 SchmartBoard].  These boards are more general and pre-fabricated for use with surface mount ICs (with a particular pitch or pin seperation).  Both solutions will allow for connections to a solderless breadboard.&lt;br /&gt;
&lt;br /&gt;
== Circuit ==&lt;br /&gt;
The circuit diagram below shows a complete half-duplex IR communication circuit.  This circuit can either be used together with an identical circuit to communicate, with only one PIC transmitting at a time, or with a remote control.  The software on the PIC can be configured to respond to a variety of commands sent by the remote.  The electrical characteristics of the power supply and discrete components are given below.  Some of the ranges for the IR circuitry are also given below in parentheses.&lt;br /&gt;
&lt;br /&gt;
==Serial Interface==&lt;br /&gt;
In the circuit, there are two interfaces: the serial interface and the IR interface.  The serial interface is located between the PIC and the endec.  The transmit (TX) and receive (RX) pins on the endec need to be connected between both ICs with a common ground.  The data passing between the two components on these lines have the standard 8-N-1 serial data format.  There is also a 16XCLK signal going to the endec from the PIC used to control the baud rate of the endec; that signal is a square wave pulse train at a frequency of 16*(the baud rate) and is generated in software.  The RESET signal on the endec could be controlled with software but is simply held high since the endec need not be reset.  &lt;br /&gt;
&lt;br /&gt;
==IrDA Interface==&lt;br /&gt;
The second interface — the IR interface — is located between the endec and the transceiver.  This interface is similarly straightforward with the TXIR and RXIR pins of the endec connecting to the TXD and RXD pins of the transceiver, respectively, and also has a common ground.  The signals between these two components conform to the IrDA physical layer standard.  When a logic high or &amp;#039;1&amp;#039; is to be transmitted, a logic low will be sent to the transceiver.  When a logic low or &amp;#039;0&amp;#039; is to be transmitted, a logic high will be pulsed after 7-8 cycles of the 16XCLK signal for 3 cycles of the 16XCLK signal but no longer than 4 µs.&lt;br /&gt;
&lt;br /&gt;
[[Image:IR_circuit.jpg|thumb|600px|Circuit Diagram]]&lt;br /&gt;
&lt;br /&gt;
===Electrical Characteristics===&lt;br /&gt;
&amp;#039;&amp;#039;Microcontroller ([http://ww1.microchip.com/downloads/en/DeviceDoc/39631a.pdf Microchip PIC18F4520])&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; = 5.0V&lt;br /&gt;
*C&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; = 1µF&lt;br /&gt;
**V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; - Pin 11 &amp;amp; 32&lt;br /&gt;
**GND - Pin 12 &amp;amp; 31&lt;br /&gt;
**TX - Pin 25 (C6)&lt;br /&gt;
**RX - Pin 26 (C7)&lt;br /&gt;
**16XCLK - Pin 17 (C2/CCP1)&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;IR Encoder/Decoder ([http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf Microchip MCP2122-E/P])&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; = 5.0V (1.8V-5.5V)&lt;br /&gt;
*C&amp;lt;sub&amp;gt;BYP&amp;lt;/sub&amp;gt; = 0.01µF&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;IR Transceiver ([http://www.vishay.com/docs/82614/tfdu4300.pdf Vishay TFDU4300])&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;cc1&amp;lt;/sub&amp;gt; = 5.0V (2.4V-5.5V)&lt;br /&gt;
*V&amp;lt;sub&amp;gt;cc2&amp;lt;/sub&amp;gt; = 5.0V (-0.3V-6.0V)&lt;br /&gt;
*V&amp;lt;sub&amp;gt;logic&amp;lt;/sub&amp;gt; = 5.0V (1.5V-5.5V)&lt;br /&gt;
*R&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; = 47Ω&lt;br /&gt;
*C&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; = 0.1µF&lt;br /&gt;
&lt;br /&gt;
[[Image:copper_clad_board.jpg|right|thumb|400px|Copper-Clad Board with IR Transceiver]]		 &lt;br /&gt;
=== Surface Mount Prototyping ===	  &lt;br /&gt;
*Transceiver lead pitch = 0.95mm	 &lt;br /&gt;
*Multiple options for installation	 &lt;br /&gt;
**Schmart board	 &lt;br /&gt;
**Digikey board (need to find)	 &lt;br /&gt;
**Copper-clad board etching	 &lt;br /&gt;
**Funky pin adapter thing Prof. Peshkin gave us	 &lt;br /&gt;
**Funky adapter thing #2 Prof. Peshkin gave us	 &lt;br /&gt;
&lt;br /&gt;
=== Limitations ===	 &lt;br /&gt;
*IR Communication is only Half-Duplex (only one transceiver transmitting at a time)&lt;br /&gt;
*Transmission Distance maximum is about 12 feet (about 3ft in low power mode)&lt;br /&gt;
*Communication Speed can only go up to 115.2 kpbs&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
&lt;br /&gt;
Example code for a simple IR communication circuit w/o the use of a transceiver:&lt;br /&gt;
&lt;br /&gt;
 /*&lt;br /&gt;
   ircomm.c Jennifer Breger, Brian Lesperance, Dan Pinkawa 2008-02-05&lt;br /&gt;
   Using the PIC&amp;#039;s built-in UART, a counter continually is sent to one IR encoder/decoder.  Then&lt;br /&gt;
   the first IR encoder/decoder feeds its TXIR to the RXIR of a second IR encoder/decoder.  The &lt;br /&gt;
   second IR encoder/decoder then transmits back to the PIC what it is receiving.  When the&lt;br /&gt;
   transceiver circuit is properly mounted and inserted into the circuit, this code can be adapted&lt;br /&gt;
   for half-duplex communication w/ another IR communications circuit.&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
 #include &amp;lt;18f4520.h&amp;gt;&lt;br /&gt;
 #fuses HS,NOLVP,NOWDT,NOPROTECT&lt;br /&gt;
 #use delay (clock=20000000)&lt;br /&gt;
 #use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, stream=com_a) // Initializes the UART to 9600 bps &lt;br /&gt;
                                                              // (up to 115,200 bps)&lt;br /&gt;
 &lt;br /&gt;
 // timed_getc() checks whether data is ready to be read.  If it&amp;#039;s not the function returns a null&lt;br /&gt;
 // character.  If you simply use getc(), the PIC might get slowed up if the data isn&amp;#039;t ready right&lt;br /&gt;
 // away.&lt;br /&gt;
 char timed_getc(void){&lt;br /&gt;
    long timeout;&lt;br /&gt;
    int timeout_error = FALSE;&lt;br /&gt;
    timeout = 0;&lt;br /&gt;
    while(!kbhit() &amp;amp;&amp;amp; (++timeout&amp;lt;50000))&lt;br /&gt;
       delay_us(10);&lt;br /&gt;
    if (kbhit())&lt;br /&gt;
       return(getc());&lt;br /&gt;
    else {&lt;br /&gt;
       timeout_error = TRUE;&lt;br /&gt;
       return(0);&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 // Main program&lt;br /&gt;
 void main(void){&lt;br /&gt;
    int i;&lt;br /&gt;
    char rx;&lt;br /&gt;
 &lt;br /&gt;
    setup_timer_2(T2_DIV_BY_1, 32, 16); // Provides a 151.3 kHz clock for the Encoder/Decoder, in   &lt;br /&gt;
    setup_ccp1(CCP_PWM);                // order for it to know the baud rate of the UART. Should be &lt;br /&gt;
    set_pwm1_duty(16);                  // closer to 16 * 9600 = 153.6 kHz but the error is tolerable&lt;br /&gt;
 &lt;br /&gt;
    while(TRUE){&lt;br /&gt;
       for(i=0;i&amp;lt;16;i++){      // Counts up from 0 to 15 and transmits to the first Encoder/Decoder.&lt;br /&gt;
          putc(i);             // Listens to the second Encoder/Decoder, which is simply the original&lt;br /&gt;
          rx = timed_getc();   // message from the PIC, and displays the value on the LEDs/Port D.&lt;br /&gt;
          output_d((int8) rx);&lt;br /&gt;
          delay_ms(1000);&lt;br /&gt;
       }&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
= External Links and Further Reading =&lt;br /&gt;
*[http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf IR Transceiver Data Sheet]&lt;br /&gt;
*[http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf IR Encoder/Decoder Data Sheet]&lt;br /&gt;
*[http://www.schmartboard.com/ Schmartboard (Prototyping boards for SMT)]&lt;br /&gt;
&lt;br /&gt;
== Relevant Technical Articles ==&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Infrared_communication#Communications| Infrared communication]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Serial_communications| Serial communication]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Surface_mount| Surface mount technology]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/UART| UART]&lt;/div&gt;</summary>
		<author><name>BrianLesperance</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=IR_communication_between_PICs&amp;diff=6852</id>
		<title>IR communication between PICs</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=IR_communication_between_PICs&amp;diff=6852"/>
		<updated>2008-02-07T13:15:35Z</updated>

		<summary type="html">&lt;p&gt;BrianLesperance: /* Circuit */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
Two PICs can easily communicate with one another using serial communication.  IR communication is a basic extension of this method which can be easily implemented with a microcontroller (PIC) through an IR Encoder/Decoder (endec) and an IR Transceiver.  The endec and transceiver used in this example support Serial IR (SIR) data rate, ranging from 9.6 kbps to 115.2 kbps.  The typical range of the transceiver is nominally from 2 inches to 2 feet and extends upwards of 12 feet.  The PIC, endec, and transceiver employed all support bidirectional use.  However, when a transceiver is transmitting it essentially blinds its receiver and therefore cannot attain true full-duplex communication; only half-duplex was used with the transceiver taking turns transmitting and receiving.&lt;br /&gt;
&lt;br /&gt;
When transmitting, the PIC sends the serial format data to the endec, which encodes (or modulates) it bit by bit.  This encoded data is then outputted as electrical pulses to the transceiver.  The transceiver converts these electrical pulses to IR light pulses.  When receiving, the transceiver receives IR light pulses (data), which are outputted as electrical pulses. The endec decodes (or demodulates) these electrical pulses, with the data then being transmitted by the endec UART back to the receiving PIC. This modulation/demodulation method is performed in accordance with the IrDA standard.&lt;br /&gt;
&lt;br /&gt;
Both the PIC and the endec used in this example were DIP packages, making them easy to prototype and inspect.  The transceiver, however, was a surface mount chip with an uncommon pin configuration (0.95 mm pitch), requiring a different mounting approach.  We initially attempted to etch a [http://www.radioshack.com/sm-2-sided-copper-clad-pc-board--pi-2102495.html copper-clad board] for our circuit (see image).  Another possible solution for our transceiver is provided by [http://www.schmartboard.com/index.asp?page=products_so&amp;amp;id=54 SchmartBoard].  These boards are more general and pre-fabricated for use with surface mount ICs (with a particular pitch or pin seperation).  Both solutions will allow for connections to a solderless breadboard.&lt;br /&gt;
&lt;br /&gt;
== Circuit ==&lt;br /&gt;
The circuit diagram below shows a complete half-duplex IR communication circuit.  This circuit can either be used together with an identical circuit to communicate, with only one PIC transmitting at a time, or with a remote control.  The software on the PIC can be configured to respond to a variety of commands sent by the remote.  The electrical characteristics of the power supply and discrete components are given below.  Some of the ranges for the IR circuitry are also given below in parentheses.&lt;br /&gt;
&lt;br /&gt;
In the circuit, there are two interfaces: the serial interface and the IR interface.  The serial interface is located between the PIC and the endec.  The transmit (TX) and receive (RX) pins on the endec need to be connected between both ICs with a common ground.  The data passing between the two components on these lines have the standard 8-N-1 serial data format.  There is also a 16XCLK signal going to the endec from the PIC used to control the baud rate of the endec; that signal is a square wave pulse train at a frequency of 16*(the baud rate) and is generated in software.  The RESET signal on the endec could be controlled with software but is simply held high since the endec need not be reset.  The second interface — the IR interface — is located between the endec and the transceiver.  This interface is similarly straightforward with the TXIR and RXIR pins of the endec connecting to the TXD and RXD pins of the transceiver, respectively, and also has a common ground.  The signals between these two components conform to the IrDA physical layer standard.  When a logic high or &amp;#039;1&amp;#039; is to be transmitted, a logic low will be sent to the transceiver.  When a logic low or &amp;#039;0&amp;#039; is to be transmitted, a logic high will be pulsed after 7-8 cycles of the 16XCLK signal for 3 cycles of the 16XCLK signal but no longer than 4 µs.&lt;br /&gt;
&lt;br /&gt;
[[Image:IR_circuit.jpg|thumb|600px|Circuit Diagram]]&lt;br /&gt;
&lt;br /&gt;
===Electrical Characteristics===&lt;br /&gt;
&amp;#039;&amp;#039;Microcontroller ([http://ww1.microchip.com/downloads/en/DeviceDoc/39631a.pdf Microchip PIC18F4520])&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; = 5.0V&lt;br /&gt;
*C&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; = 1µF&lt;br /&gt;
**V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; - Pin 11 &amp;amp; 32&lt;br /&gt;
**GND - Pin 12 &amp;amp; 31&lt;br /&gt;
**TX - Pin 25 (C6)&lt;br /&gt;
**RX - Pin 26 (C7)&lt;br /&gt;
**16XCLK - Pin 17 (C2/CCP1)&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;IR Encoder/Decoder ([http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf Microchip MCP2122-E/P])&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; = 5.0V (1.8V-5.5V)&lt;br /&gt;
*C&amp;lt;sub&amp;gt;BYP&amp;lt;/sub&amp;gt; = 0.01µF&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;IR Transceiver ([http://www.vishay.com/docs/82614/tfdu4300.pdf Vishay TFDU4300])&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;cc1&amp;lt;/sub&amp;gt; = 5.0V (2.4V-5.5V)&lt;br /&gt;
*V&amp;lt;sub&amp;gt;cc2&amp;lt;/sub&amp;gt; = 5.0V (-0.3V-6.0V)&lt;br /&gt;
*V&amp;lt;sub&amp;gt;logic&amp;lt;/sub&amp;gt; = 5.0V (1.5V-5.5V)&lt;br /&gt;
*R&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; = 47Ω&lt;br /&gt;
*C&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; = 0.1µF&lt;br /&gt;
&lt;br /&gt;
[[Image:copper_clad_board.jpg|right|thumb|400px|Copper-Clad Board with IR Transceiver]]		 &lt;br /&gt;
=== Surface Mount Prototyping ===	  &lt;br /&gt;
*Transceiver lead pitch = 0.95mm	 &lt;br /&gt;
*Multiple options for installation	 &lt;br /&gt;
**Schmart board	 &lt;br /&gt;
**Digikey board (need to find)	 &lt;br /&gt;
**Copper-clad board etching	 &lt;br /&gt;
**Funky pin adapter thing Prof. Peshkin gave us	 &lt;br /&gt;
**Funky adapter thing #2 Prof. Peshkin gave us	 &lt;br /&gt;
&lt;br /&gt;
=== Limitations ===	 &lt;br /&gt;
*IR Communication is only Half-Duplex (only one transceiver transmitting at a time)&lt;br /&gt;
*Transmission Distance maximum is about 12 feet (about 3ft in low power mode)&lt;br /&gt;
*Communication Speed can only go up to 115.2 kpbs&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
&lt;br /&gt;
Example code for a simple IR communication circuit w/o the use of a transceiver:&lt;br /&gt;
&lt;br /&gt;
 /*&lt;br /&gt;
   ircomm.c Jennifer Breger, Brian Lesperance, Dan Pinkawa 2008-02-05&lt;br /&gt;
   Using the PIC&amp;#039;s built-in UART, a counter continually is sent to one IR encoder/decoder.  Then&lt;br /&gt;
   the first IR encoder/decoder feeds its TXIR to the RXIR of a second IR encoder/decoder.  The &lt;br /&gt;
   second IR encoder/decoder then transmits back to the PIC what it is receiving.  When the&lt;br /&gt;
   transceiver circuit is properly mounted and inserted into the circuit, this code can be adapted&lt;br /&gt;
   for half-duplex communication w/ another IR communications circuit.&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
 #include &amp;lt;18f4520.h&amp;gt;&lt;br /&gt;
 #fuses HS,NOLVP,NOWDT,NOPROTECT&lt;br /&gt;
 #use delay (clock=20000000)&lt;br /&gt;
 #use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, stream=com_a) // Initializes the UART to 9600 bps &lt;br /&gt;
                                                              // (up to 115,200 bps)&lt;br /&gt;
 &lt;br /&gt;
 // timed_getc() checks whether data is ready to be read.  If it&amp;#039;s not the function returns a null&lt;br /&gt;
 // character.  If you simply use getc(), the PIC might get slowed up if the data isn&amp;#039;t ready right&lt;br /&gt;
 // away.&lt;br /&gt;
 char timed_getc(void){&lt;br /&gt;
    long timeout;&lt;br /&gt;
    int timeout_error = FALSE;&lt;br /&gt;
    timeout = 0;&lt;br /&gt;
    while(!kbhit() &amp;amp;&amp;amp; (++timeout&amp;lt;50000))&lt;br /&gt;
       delay_us(10);&lt;br /&gt;
    if (kbhit())&lt;br /&gt;
       return(getc());&lt;br /&gt;
    else {&lt;br /&gt;
       timeout_error = TRUE;&lt;br /&gt;
       return(0);&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 // Main program&lt;br /&gt;
 void main(void){&lt;br /&gt;
    int i;&lt;br /&gt;
    char rx;&lt;br /&gt;
 &lt;br /&gt;
    setup_timer_2(T2_DIV_BY_1, 32, 16); // Provides a 151.3 kHz clock for the Encoder/Decoder, in   &lt;br /&gt;
    setup_ccp1(CCP_PWM);                // order for it to know the baud rate of the UART. Should be &lt;br /&gt;
    set_pwm1_duty(16);                  // closer to 16 * 9600 = 153.6 kHz but the error is tolerable&lt;br /&gt;
 &lt;br /&gt;
    while(TRUE){&lt;br /&gt;
       for(i=0;i&amp;lt;16;i++){      // Counts up from 0 to 15 and transmits to the first Encoder/Decoder.&lt;br /&gt;
          putc(i);             // Listens to the second Encoder/Decoder, which is simply the original&lt;br /&gt;
          rx = timed_getc();   // message from the PIC, and displays the value on the LEDs/Port D.&lt;br /&gt;
          output_d((int8) rx);&lt;br /&gt;
          delay_ms(1000);&lt;br /&gt;
       }&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
= External Links and Further Reading =&lt;br /&gt;
*[http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf IR Transceiver Data Sheet]&lt;br /&gt;
*[http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf IR Encoder/Decoder Data Sheet]&lt;br /&gt;
*[http://www.schmartboard.com/ Schmartboard (Prototyping boards for SMT)]&lt;br /&gt;
&lt;br /&gt;
== Relevant Technical Articles ==&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Infrared_communication#Communications| Infrared communication]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Serial_communications| Serial communication]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Surface_mount| Surface mount technology]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/UART| UART]&lt;/div&gt;</summary>
		<author><name>BrianLesperance</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=IR_communication_between_PICs&amp;diff=6851</id>
		<title>IR communication between PICs</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=IR_communication_between_PICs&amp;diff=6851"/>
		<updated>2008-02-07T12:37:57Z</updated>

		<summary type="html">&lt;p&gt;BrianLesperance: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
Two PICs can easily communicate with one another using serial communication.  IR communication is a basic extension of this method which can be easily implemented with a microcontroller (PIC) through an IR Encoder/Decoder (endec) and an IR Transceiver.  The endec and transceiver used in this example support Serial IR (SIR) data rate, ranging from 9.6 kbps to 115.2 kbps.  The typical range of the transceiver is nominally from 2 inches to 2 feet and extends upwards of 12 feet.  The PIC, endec, and transceiver employed all support bidirectional use.  However, when a transceiver is transmitting it essentially blinds its receiver and therefore cannot attain true full-duplex communication; only half-duplex was used with the transceiver taking turns transmitting and receiving.&lt;br /&gt;
&lt;br /&gt;
When transmitting, the PIC sends the serial format data to the endec, which encodes (or modulates) it bit by bit.  This encoded data is then outputted as electrical pulses to the transceiver.  The transceiver converts these electrical pulses to IR light pulses.  When receiving, the transceiver receives IR light pulses (data), which are outputted as electrical pulses. The endec decodes (or demodulates) these electrical pulses, with the data then being transmitted by the endec UART back to the receiving PIC. This modulation/demodulation method is performed in accordance with the IrDA standard.&lt;br /&gt;
&lt;br /&gt;
Both the PIC and the endec used in this example were DIP packages, making them easy to prototype and inspect.  The transceiver, however, was a surface mount chip with an uncommon pin configuration (0.95 mm pitch), requiring a different mounting approach.  We initially attempted to etch a [http://www.radioshack.com/sm-2-sided-copper-clad-pc-board--pi-2102495.html copper-clad board] for our circuit (see image).  Another possible solution for our transceiver is provided by [http://www.schmartboard.com/index.asp?page=products_so&amp;amp;id=54 SchmartBoard].  These boards are more general and pre-fabricated for use with surface mount ICs (with a particular pitch or pin seperation).  Both solutions will allow for connections to a solderless breadboard.&lt;br /&gt;
&lt;br /&gt;
== Circuit ==&lt;br /&gt;
The circuit diagram below shows a complete half-duplex IR communication circuit.  This circuit can either be used together with an identical circuit to communicate, with only one PIC transmitting at a time, or with a remote control.  The software on the PIC can be configured to respond to a variety of commands sent by the remote.  The electrical characteristics of the power supply and discrete components are given below.  Some of the ranges for the IR circuitry are also given below in parentheses.&lt;br /&gt;
&lt;br /&gt;
In the circuit, there are two interfaces: the serial interface and the IR interface.  The serial interface is located between the PIC and the endec.  The transmit (TX) and receive (RX) pins on the endec need to be connected between both ICs with a common ground.  The data passing between the two components on these lines have the standard 8-N-1 serial data format.  There is also a 16XCLK signal going to the endec from the PIC used to control the baud rate of the endec; that signal is a square wave pulse train at a frequency of 16*(the baud rate) and is generated in software.  The RESET signal on the endec could be controlled with software but is simply held high since the endec need not be reset.  The second interface — the IR interface — is located between the endec and the transceiver.  This interface is similarly straightforward with the TXIR and RXIR pins of the endec connecting to the TXD and RXD pins of the transceiver, respectively, and also has a common ground.  The signals between these two components conform to the IrDA physical layer standard.  When a logic high or &amp;#039;1&amp;#039; is to be transmitted, a logic low will be sent to the transceiver.  When a logic low or &amp;#039;0&amp;#039; is to be transmitted, a logic high will be pulsed after 7-8 cycles of the 16XCLK signal for 3 cycles of the 16XCLK signal but no longer than 4 µs.&lt;br /&gt;
&lt;br /&gt;
[[Image:IR_circuit.jpg|thumb|600px|Circuit Diagram]]&lt;br /&gt;
&lt;br /&gt;
===Electrical Characteristics===&lt;br /&gt;
&amp;#039;&amp;#039;Microcontroller ([http://ww1.microchip.com/downloads/en/DeviceDoc/39631a.pdf Microchip PIC18F4520])&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; = 5.0V&lt;br /&gt;
*C&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; = 1µF&lt;br /&gt;
**V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; - Pin 11 &amp;amp; 32&lt;br /&gt;
**GND - Pin 12 &amp;amp; 31&lt;br /&gt;
**TX - Pin 25 (C6)&lt;br /&gt;
**RX - Pin 26 (C7)&lt;br /&gt;
**16XCLK - Pin 17 (C2/CCP1)&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;IR Encoder/Decoder ([http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf Microchip MCP2122-E/P])&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; = 5.0V (1.8V-5.5V)&lt;br /&gt;
*C&amp;lt;sub&amp;gt;BYP&amp;lt;/sub&amp;gt; = 0.01µF&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;IR Transceiver ([http://www.vishay.com/docs/82614/tfdu4300.pdf Vishay TFDU4300])&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;cc1&amp;lt;/sub&amp;gt; = 5.0V (2.4V-5.5V)&lt;br /&gt;
*V&amp;lt;sub&amp;gt;cc2&amp;lt;/sub&amp;gt; = 5.0V (-0.3V-6.0V)&lt;br /&gt;
*V&amp;lt;sub&amp;gt;logic&amp;lt;/sub&amp;gt; = 5.0V (1.5V-5.5V)&lt;br /&gt;
*R&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; = 47Ω&lt;br /&gt;
*C&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; = 0.1µF&lt;br /&gt;
	 &lt;br /&gt;
=== Surface Mount Prototyping ===	 &lt;br /&gt;
[[Image:copper_clad_board.jpg|right|thumb|400px|Copper-Clad Board with IR Transceiver]]	 &lt;br /&gt;
*Transceiver lead pitch = 1.2mm/0.95mm/0.50mm/0.45mm?	 &lt;br /&gt;
*Multiple options for installation	 &lt;br /&gt;
**Schmart board	 &lt;br /&gt;
**Digikey board (need to find)	 &lt;br /&gt;
**Copper-clad board etching	 &lt;br /&gt;
**Funky pin adapter thing Prof. Peshkin gave us	 &lt;br /&gt;
**Funky adapter thing #2 Prof. Peshkin gave us	 &lt;br /&gt;
&lt;br /&gt;
=== Limitations ===	 &lt;br /&gt;
*Transceiver cannot simultaneously transmit and receive&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
&lt;br /&gt;
Example code for a simple IR communication circuit w/o the use of a transceiver:&lt;br /&gt;
&lt;br /&gt;
 /*&lt;br /&gt;
   ircomm.c Jennifer Breger, Brian Lesperance, Dan Pinkawa 2008-02-05&lt;br /&gt;
   Using the PIC&amp;#039;s built-in UART, a counter continually is sent to one IR encoder/decoder.  Then&lt;br /&gt;
   the first IR encoder/decoder feeds its TXIR to the RXIR of a second IR encoder/decoder.  The &lt;br /&gt;
   second IR encoder/decoder then transmits back to the PIC what it is receiving.  When the&lt;br /&gt;
   transceiver circuit is properly mounted and inserted into the circuit, this code can be adapted&lt;br /&gt;
   for half-duplex communication w/ another IR communications circuit.&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
 #include &amp;lt;18f4520.h&amp;gt;&lt;br /&gt;
 #fuses HS,NOLVP,NOWDT,NOPROTECT&lt;br /&gt;
 #use delay (clock=20000000)&lt;br /&gt;
 #use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, stream=com_a) // Initializes the UART to 9600 bps &lt;br /&gt;
                                                              // (up to 115,200 bps)&lt;br /&gt;
 &lt;br /&gt;
 // timed_getc() checks whether data is ready to be read.  If it&amp;#039;s not the function returns a null&lt;br /&gt;
 // character.  If you simply use getc(), the PIC might get slowed up if the data isn&amp;#039;t ready right&lt;br /&gt;
 // away.&lt;br /&gt;
 char timed_getc(void){&lt;br /&gt;
    long timeout;&lt;br /&gt;
    int timeout_error = FALSE;&lt;br /&gt;
    timeout = 0;&lt;br /&gt;
    while(!kbhit() &amp;amp;&amp;amp; (++timeout&amp;lt;50000))&lt;br /&gt;
       delay_us(10);&lt;br /&gt;
    if (kbhit())&lt;br /&gt;
       return(getc());&lt;br /&gt;
    else {&lt;br /&gt;
       timeout_error = TRUE;&lt;br /&gt;
       return(0);&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 // Main program&lt;br /&gt;
 void main(void){&lt;br /&gt;
    int i;&lt;br /&gt;
    char rx;&lt;br /&gt;
 &lt;br /&gt;
    setup_timer_2(T2_DIV_BY_1, 32, 16); // Provides a 151.3 kHz clock for the Encoder/Decoder, in   &lt;br /&gt;
    setup_ccp1(CCP_PWM);                // order for it to know the baud rate of the UART. Should be &lt;br /&gt;
    set_pwm1_duty(16);                  // closer to 16 * 9600 = 153.6 kHz but the error is tolerable&lt;br /&gt;
 &lt;br /&gt;
    while(TRUE){&lt;br /&gt;
       for(i=0;i&amp;lt;16;i++){      // Counts up from 0 to 15 and transmits to the first Encoder/Decoder.&lt;br /&gt;
          putc(i);             // Listens to the second Encoder/Decoder, which is simply the original&lt;br /&gt;
          rx = timed_getc();   // message from the PIC, and displays the value on the LEDs/Port D.&lt;br /&gt;
          output_d((int8) rx);&lt;br /&gt;
          delay_ms(1000);&lt;br /&gt;
       }&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
= External Links and Further Reading =&lt;br /&gt;
*[http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf IR Transceiver Data Sheet]&lt;br /&gt;
*[http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf IR Encoder/Decoder Data Sheet]&lt;br /&gt;
*[http://www.schmartboard.com/ Schmartboard (Prototyping boards for SMT)]&lt;br /&gt;
&lt;br /&gt;
== Relevant Technical Articles ==&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Infrared_communication#Communications| Infrared communication]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Serial_communications| Serial communication]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Surface_mount| Surface mount technology]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/UART| UART]&lt;/div&gt;</summary>
		<author><name>BrianLesperance</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=IR_communication_between_PICs&amp;diff=6693</id>
		<title>IR communication between PICs</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=IR_communication_between_PICs&amp;diff=6693"/>
		<updated>2008-02-06T10:39:34Z</updated>

		<summary type="html">&lt;p&gt;BrianLesperance: /* Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
Using serial communication, two PICs can easily communicate with one another.  A basic extension, IR communication can easily be set up for a microcontroller (PIC) by using an IR Encoder/Decoder (Endec) and an IR Transceiver.  The endec and transceiver used in this example support Serial IR (SIR) data rate, ranging from 9.6 kpbs - 115.2 kpbs.  The typical range of the transceiver is nominally between 2in to 2ft, extending upwards of 12ft.  The PIC, endec, and transceiver used all support bidirectional use.  However, due to the fact that when a transceiver is transmitting, it essentially blinds its receiver and therefore cannot attain true full-duplex communication, only half-duplex, taking turns transmitting and receiving.&lt;br /&gt;
&lt;br /&gt;
When transmitting, the PIC sends the serial format data to the endec, who receives this serial data and encodes (or modulates) it bit by bit.  This encoded data is then output as electrical pulses to the transceiver.  The transceiver will then convert these electrical pulses to IR light pulses.  On the receiving side, the transceiver receives IR light pulses (data), which are outputted as electrical pulses. The endec decodes (or demodulates) these electrical pulses, with the data then being transmitted by the endec UART back to the receiving PIC. This modulation/demodulation method is performed in accordance with the IrDA standard.&lt;br /&gt;
&lt;br /&gt;
Both the PIC and the endec used in this example were DIP packages, making them easy to prototype and inspect.  The transceiver, however, was a surface mount chip with an uncommon pin configuration (.95 mm pitch), requiring a different approach.  We initially attempted to etch a [http://www.radioshack.com/sm-2-sided-copper-clad-pc-board--pi-2102495.html copper-clad board] for our circuit (see image).  Another possible solution for our transceiver is to use a [http://www.schmartboard.com/index.asp?page=products_so&amp;amp;id=54 SchmartBoard].  These boards are more general and prefabricated for use with surface mount ICs (with a particular pitch or pin seperation).  Both solutions will allow for connections to a solderless breadboard.&lt;br /&gt;
&lt;br /&gt;
== Circuit ==&lt;br /&gt;
The circuit diagram is shown below of a complete half-duplex IR communication circuit.  This circuit can either be used together with an identical circuit to communicate, with only one PIC transmitting at a time.  This circuit can also be used with an remote control.  The software on the PIC can be used to respond depending on the button or command sent by the remote.  The electrical characteristics of the power supply and discrete components are given immediately below.  Some of the ranges for the IR circuitry are also given below in the parentheses.&lt;br /&gt;
&lt;br /&gt;
In the circuit, there are two interfaces: the serial interface and the IR interface.  The serial interface is that between the PIC and the endec.  The transmit (TX) and receive (RX) pins need to be connected between both ICs with a common ground.  The data passing between the two components on these lines have the standard 8-N-1 serial data format.  There is also a 16XCLK signal going to the endec from the PIC used to control the baud rate of the endec; that signal is a square wave pulse train at a frequency of 16*(the baud rate) and is generated in software.  The &amp;#039;RESET signal on the endec could also be control with software but is simply held high since the endec need not be reset.  The second interface, the IR interface, is between the endec and the transceiver.  That interface is straightforward with the TXIR and RXIR pins of the endec connecting to the TXD and RXD pins of the transceiver respectively, also with a common ground.  The signals between these two components conforms to the IrDA physical layer standard.  When a logic high or &amp;#039;1&amp;#039; is to be transmitted, a logic low will be sent to the transceiver.  When a logic low or &amp;#039;0&amp;#039; is to be transmitted, a logic high will be pulsed after 7-8 cycles of the 16XCLK signal for 3 cycles of the 16XCLK signal but no longer than 4 µs.&lt;br /&gt;
&lt;br /&gt;
[[Image:IR_circuit.jpg|thumb|600px|Circuit Diagram]]&lt;br /&gt;
&lt;br /&gt;
===Electrical Characteristics===&lt;br /&gt;
&amp;#039;&amp;#039;Microcontroller ([http://ww1.microchip.com/downloads/en/DeviceDoc/39631a.pdf Microchip PIC18F4520])&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; = 5.0V&lt;br /&gt;
*C&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; = 1µF&lt;br /&gt;
**V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; - Pin 11 &amp;amp; 32&lt;br /&gt;
**GND - Pin 12 &amp;amp; 31&lt;br /&gt;
**TX - Pin 25 (C6)&lt;br /&gt;
**RX - Pin 26 (C7)&lt;br /&gt;
**16XCLK - Pin 17 (C2/CCP1)&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;IR Encoder/Decoder ([http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf Microchip MCP2122-E/P])&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; = 5.0V (1.8V-5.5V)&lt;br /&gt;
*C&amp;lt;sub&amp;gt;BYP&amp;lt;/sub&amp;gt; = 0.01µF&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;IR Transceiver ([http://www.vishay.com/docs/82614/tfdu4300.pdf Vishay TFDU4300])&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;cc1&amp;lt;/sub&amp;gt; = 5.0V (2.4V-5.5V)&lt;br /&gt;
*V&amp;lt;sub&amp;gt;cc2&amp;lt;/sub&amp;gt; = 5.0V (-0.3V-6.0V)&lt;br /&gt;
*V&amp;lt;sub&amp;gt;logic&amp;lt;/sub&amp;gt; = 5.0V (1.5V-5.5V)&lt;br /&gt;
*R&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; = 47Ω&lt;br /&gt;
*C&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; = 0.1µF&lt;br /&gt;
&lt;br /&gt;
=== Surface Mount Prototyping ===&lt;br /&gt;
[[Image:copper_clad_board.jpg|right|thumb|400px|Copper-Clad Board with IR Transceiver]]&lt;br /&gt;
*Transceiver lead pitch = 1.2mm/0.95mm/0.50mm/0.45mm?&lt;br /&gt;
*Multiple options for installation&lt;br /&gt;
**Schmart board&lt;br /&gt;
**Digikey board (need to find)&lt;br /&gt;
**Copper-clad board etching&lt;br /&gt;
**Funky pin adapter thing Prof. Peshkin gave us&lt;br /&gt;
**Funky adapter thing #2 Prof. Peshkin gave us&lt;br /&gt;
&lt;br /&gt;
=== Limitations ===&lt;br /&gt;
*Transceiver cannot simultaneously transmit and receive&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
&lt;br /&gt;
Example code for a simple IR communication circuit w/o the use of a transceiver:&lt;br /&gt;
&lt;br /&gt;
 /*&lt;br /&gt;
   ircomm.c Jennifer Breger, Brian Lesperance, Dan Pinkawa 2008-02-05&lt;br /&gt;
   Using the PIC&amp;#039;s built-in UART, a counter continually is sent to one IR encoder/decoder.  Then&lt;br /&gt;
   the first IR encoder/decoder feeds its TXIR to the RXIR of a second IR encoder/decoder.  The &lt;br /&gt;
   second IR encoder/decoder then transmits back to the PIC what it is receiving.  When the&lt;br /&gt;
   transceiver circuit is properly mount and inserted into the circuit, this code can be adapted&lt;br /&gt;
   for half-duplex communication w/ another IR communications circuit.&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
 #include &amp;lt;18f4520.h&amp;gt;&lt;br /&gt;
 #fuses HS,NOLVP,NOWDT,NOPROTECT&lt;br /&gt;
 #use delay (clock=20000000)&lt;br /&gt;
 #use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, stream=com_a) // Initializes the UART to 9600 bps &lt;br /&gt;
                                                              // (up to 115,200 bps)&lt;br /&gt;
 &lt;br /&gt;
 // timed_getc() checks whether data is ready to be read.  If it&amp;#039;s not the function returns a null&lt;br /&gt;
 // character.  If you simply use getc(), the PIC might get slowed up if the data isn&amp;#039;t ready right&lt;br /&gt;
 // away.&lt;br /&gt;
 char timed_getc(void){&lt;br /&gt;
    long timeout;&lt;br /&gt;
    int timeout_error = FALSE;&lt;br /&gt;
    timeout = 0;&lt;br /&gt;
    while(!kbhit() &amp;amp;&amp;amp; (++timeout&amp;lt;50000))&lt;br /&gt;
       delay_us(10);&lt;br /&gt;
    if (kbhit())&lt;br /&gt;
       return(getc());&lt;br /&gt;
    else {&lt;br /&gt;
       timeout_error = TRUE;&lt;br /&gt;
       return(0);&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 // Main program&lt;br /&gt;
 void main(void){&lt;br /&gt;
    int i;&lt;br /&gt;
    char rx;&lt;br /&gt;
 &lt;br /&gt;
    setup_timer_2(T2_DIV_BY_1, 32, 16); // Provides a 151.3 kHz clock for the Encoder/Decoder, in   &lt;br /&gt;
    setup_ccp1(CCP_PWM);                // order for it to know the baud rate of the UART. Should be &lt;br /&gt;
    set_pwm1_duty(16);                  // closer to 16 * 9600 = 153.6 kHz but the error is tolerable&lt;br /&gt;
 &lt;br /&gt;
    while(TRUE){&lt;br /&gt;
       for(i=0;i&amp;lt;16;i++){      // Counts up from 0 to 15 and transmits to the first Encoder/Decoder.&lt;br /&gt;
          putc(i);             // Listens to the second Encoder/Decoder, which is simply the original&lt;br /&gt;
          rx = timed_getc();   // message from the PIC, and displays the value on the LEDs/Port D.&lt;br /&gt;
          output_d((int8) rx);&lt;br /&gt;
          delay_ms(1000);&lt;br /&gt;
       }&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
= External Links and Further Reading =&lt;br /&gt;
*[http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf IR Transceiver Data Sheet]&lt;br /&gt;
*[http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf IR Encoder/Decoder Data Sheet]&lt;br /&gt;
*[http://www.schmartboard.com/ Schmartboard (Prototyping boards for SMT)]&lt;br /&gt;
&lt;br /&gt;
== Relevant Technical Articles ==&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Infrared_communication#Communications| Infrared communication]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Serial_communications| Serial communication]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Surface_mount| Surface mount technology]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/UART| UART]&lt;/div&gt;</summary>
		<author><name>BrianLesperance</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=IR_communication_between_PICs&amp;diff=6692</id>
		<title>IR communication between PICs</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=IR_communication_between_PICs&amp;diff=6692"/>
		<updated>2008-02-06T10:38:54Z</updated>

		<summary type="html">&lt;p&gt;BrianLesperance: /* Circuit */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
Using serial communication, two PICs can easily communicate with one another.  A basic extension, IR communication can easily be set up for a microcontroller (PIC) by using an IR Encoder/Decoder (Endec) and an IR Transceiver.  The endec and transceiver used in this example support Serial IR (SIR) data rate, ranging from 9.6 kpbs - 115.2 kpbs.  The typical range of the transceiver is nominally between 2in to 2ft, extending upwards of 12ft.  The UART, endec, and transceiver used all support bidirectional use.  However, due to the fact that when a transceiver is transmitting, it essentially blinds its receiver and therefore cannot attain true full-duplex communication, only half-duplex, taking turns transmitting and receiving.&lt;br /&gt;
&lt;br /&gt;
When transmitting, the PIC sends the serial format data to the endec, who receives this serial data and encodes (or modulates) it bit by bit.  This encoded data is then output as electrical pulses to the transceiver.  The transceiver will then convert these electrical pulses to IR light pulses.  On the receiving side, the transceiver receives IR light pulses (data), which are outputted as electrical pulses. The endec decodes (or demodulates) these electrical pulses, with the data then being transmitted by the endec UART back to the receiving PIC. This modulation/demodulation method is performed in accordance with the IrDA standard.&lt;br /&gt;
&lt;br /&gt;
Both the PIC and the endec used in this example were DIP packages, making them easy to prototype and inspect.  The transceiver, however, was a surface mount chip with an uncommon pin configuration (.95 mm pitch), requiring a different approach.  We initially attempted to etch a [http://www.radioshack.com/sm-2-sided-copper-clad-pc-board--pi-2102495.html copper-clad board] for our circuit (see image).  Another possible solution for our transceiver is to use a [http://www.schmartboard.com/index.asp?page=products_so&amp;amp;id=54 SchmartBoard].  These boards are more general and prefabricated for use with surface mount ICs (with a particular pitch or pin seperation).  Both solutions will allow for connections to a solderless breadboard.&lt;br /&gt;
&lt;br /&gt;
== Circuit ==&lt;br /&gt;
The circuit diagram is shown below of a complete half-duplex IR communication circuit.  This circuit can either be used together with an identical circuit to communicate, with only one PIC transmitting at a time.  This circuit can also be used with an remote control.  The software on the PIC can be used to respond depending on the button or command sent by the remote.  The electrical characteristics of the power supply and discrete components are given immediately below.  Some of the ranges for the IR circuitry are also given below in the parentheses.&lt;br /&gt;
&lt;br /&gt;
In the circuit, there are two interfaces: the serial interface and the IR interface.  The serial interface is that between the PIC and the endec.  The transmit (TX) and receive (RX) pins need to be connected between both ICs with a common ground.  The data passing between the two components on these lines have the standard 8-N-1 serial data format.  There is also a 16XCLK signal going to the endec from the PIC used to control the baud rate of the endec; that signal is a square wave pulse train at a frequency of 16*(the baud rate) and is generated in software.  The &amp;#039;RESET signal on the endec could also be control with software but is simply held high since the endec need not be reset.  The second interface, the IR interface, is between the endec and the transceiver.  That interface is straightforward with the TXIR and RXIR pins of the endec connecting to the TXD and RXD pins of the transceiver respectively, also with a common ground.  The signals between these two components conforms to the IrDA physical layer standard.  When a logic high or &amp;#039;1&amp;#039; is to be transmitted, a logic low will be sent to the transceiver.  When a logic low or &amp;#039;0&amp;#039; is to be transmitted, a logic high will be pulsed after 7-8 cycles of the 16XCLK signal for 3 cycles of the 16XCLK signal but no longer than 4 µs.&lt;br /&gt;
&lt;br /&gt;
[[Image:IR_circuit.jpg|thumb|600px|Circuit Diagram]]&lt;br /&gt;
&lt;br /&gt;
===Electrical Characteristics===&lt;br /&gt;
&amp;#039;&amp;#039;Microcontroller ([http://ww1.microchip.com/downloads/en/DeviceDoc/39631a.pdf Microchip PIC18F4520])&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; = 5.0V&lt;br /&gt;
*C&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; = 1µF&lt;br /&gt;
**V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; - Pin 11 &amp;amp; 32&lt;br /&gt;
**GND - Pin 12 &amp;amp; 31&lt;br /&gt;
**TX - Pin 25 (C6)&lt;br /&gt;
**RX - Pin 26 (C7)&lt;br /&gt;
**16XCLK - Pin 17 (C2/CCP1)&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;IR Encoder/Decoder ([http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf Microchip MCP2122-E/P])&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; = 5.0V (1.8V-5.5V)&lt;br /&gt;
*C&amp;lt;sub&amp;gt;BYP&amp;lt;/sub&amp;gt; = 0.01µF&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;IR Transceiver ([http://www.vishay.com/docs/82614/tfdu4300.pdf Vishay TFDU4300])&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;cc1&amp;lt;/sub&amp;gt; = 5.0V (2.4V-5.5V)&lt;br /&gt;
*V&amp;lt;sub&amp;gt;cc2&amp;lt;/sub&amp;gt; = 5.0V (-0.3V-6.0V)&lt;br /&gt;
*V&amp;lt;sub&amp;gt;logic&amp;lt;/sub&amp;gt; = 5.0V (1.5V-5.5V)&lt;br /&gt;
*R&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; = 47Ω&lt;br /&gt;
*C&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; = 0.1µF&lt;br /&gt;
&lt;br /&gt;
=== Surface Mount Prototyping ===&lt;br /&gt;
[[Image:copper_clad_board.jpg|right|thumb|400px|Copper-Clad Board with IR Transceiver]]&lt;br /&gt;
*Transceiver lead pitch = 1.2mm/0.95mm/0.50mm/0.45mm?&lt;br /&gt;
*Multiple options for installation&lt;br /&gt;
**Schmart board&lt;br /&gt;
**Digikey board (need to find)&lt;br /&gt;
**Copper-clad board etching&lt;br /&gt;
**Funky pin adapter thing Prof. Peshkin gave us&lt;br /&gt;
**Funky adapter thing #2 Prof. Peshkin gave us&lt;br /&gt;
&lt;br /&gt;
=== Limitations ===&lt;br /&gt;
*Transceiver cannot simultaneously transmit and receive&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
&lt;br /&gt;
Example code for a simple IR communication circuit w/o the use of a transceiver:&lt;br /&gt;
&lt;br /&gt;
 /*&lt;br /&gt;
   ircomm.c Jennifer Breger, Brian Lesperance, Dan Pinkawa 2008-02-05&lt;br /&gt;
   Using the PIC&amp;#039;s built-in UART, a counter continually is sent to one IR encoder/decoder.  Then&lt;br /&gt;
   the first IR encoder/decoder feeds its TXIR to the RXIR of a second IR encoder/decoder.  The &lt;br /&gt;
   second IR encoder/decoder then transmits back to the PIC what it is receiving.  When the&lt;br /&gt;
   transceiver circuit is properly mount and inserted into the circuit, this code can be adapted&lt;br /&gt;
   for half-duplex communication w/ another IR communications circuit.&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
 #include &amp;lt;18f4520.h&amp;gt;&lt;br /&gt;
 #fuses HS,NOLVP,NOWDT,NOPROTECT&lt;br /&gt;
 #use delay (clock=20000000)&lt;br /&gt;
 #use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, stream=com_a) // Initializes the UART to 9600 bps &lt;br /&gt;
                                                              // (up to 115,200 bps)&lt;br /&gt;
 &lt;br /&gt;
 // timed_getc() checks whether data is ready to be read.  If it&amp;#039;s not the function returns a null&lt;br /&gt;
 // character.  If you simply use getc(), the PIC might get slowed up if the data isn&amp;#039;t ready right&lt;br /&gt;
 // away.&lt;br /&gt;
 char timed_getc(void){&lt;br /&gt;
    long timeout;&lt;br /&gt;
    int timeout_error = FALSE;&lt;br /&gt;
    timeout = 0;&lt;br /&gt;
    while(!kbhit() &amp;amp;&amp;amp; (++timeout&amp;lt;50000))&lt;br /&gt;
       delay_us(10);&lt;br /&gt;
    if (kbhit())&lt;br /&gt;
       return(getc());&lt;br /&gt;
    else {&lt;br /&gt;
       timeout_error = TRUE;&lt;br /&gt;
       return(0);&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 // Main program&lt;br /&gt;
 void main(void){&lt;br /&gt;
    int i;&lt;br /&gt;
    char rx;&lt;br /&gt;
 &lt;br /&gt;
    setup_timer_2(T2_DIV_BY_1, 32, 16); // Provides a 151.3 kHz clock for the Encoder/Decoder, in   &lt;br /&gt;
    setup_ccp1(CCP_PWM);                // order for it to know the baud rate of the UART. Should be &lt;br /&gt;
    set_pwm1_duty(16);                  // closer to 16 * 9600 = 153.6 kHz but the error is tolerable&lt;br /&gt;
 &lt;br /&gt;
    while(TRUE){&lt;br /&gt;
       for(i=0;i&amp;lt;16;i++){      // Counts up from 0 to 15 and transmits to the first Encoder/Decoder.&lt;br /&gt;
          putc(i);             // Listens to the second Encoder/Decoder, which is simply the original&lt;br /&gt;
          rx = timed_getc();   // message from the PIC, and displays the value on the LEDs/Port D.&lt;br /&gt;
          output_d((int8) rx);&lt;br /&gt;
          delay_ms(1000);&lt;br /&gt;
       }&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
= External Links and Further Reading =&lt;br /&gt;
*[http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf IR Transceiver Data Sheet]&lt;br /&gt;
*[http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf IR Encoder/Decoder Data Sheet]&lt;br /&gt;
*[http://www.schmartboard.com/ Schmartboard (Prototyping boards for SMT)]&lt;br /&gt;
&lt;br /&gt;
== Relevant Technical Articles ==&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Infrared_communication#Communications| Infrared communication]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Serial_communications| Serial communication]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Surface_mount| Surface mount technology]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/UART| UART]&lt;/div&gt;</summary>
		<author><name>BrianLesperance</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=IR_communication_between_PICs&amp;diff=6691</id>
		<title>IR communication between PICs</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=IR_communication_between_PICs&amp;diff=6691"/>
		<updated>2008-02-06T10:35:58Z</updated>

		<summary type="html">&lt;p&gt;BrianLesperance: /* Circuit */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
Using serial communication, two PICs can easily communicate with one another.  A basic extension, IR communication can easily be set up for a microcontroller (PIC) by using an IR Encoder/Decoder (Endec) and an IR Transceiver.  The endec and transceiver used in this example support Serial IR (SIR) data rate, ranging from 9.6 kpbs - 115.2 kpbs.  The typical range of the transceiver is nominally between 2in to 2ft, extending upwards of 12ft.  The UART, endec, and transceiver used all support bidirectional use.  However, due to the fact that when a transceiver is transmitting, it essentially blinds its receiver and therefore cannot attain true full-duplex communication, only half-duplex, taking turns transmitting and receiving.&lt;br /&gt;
&lt;br /&gt;
When transmitting, the PIC sends the serial format data to the endec, who receives this serial data and encodes (or modulates) it bit by bit.  This encoded data is then output as electrical pulses to the transceiver.  The transceiver will then convert these electrical pulses to IR light pulses.  On the receiving side, the transceiver receives IR light pulses (data), which are outputted as electrical pulses. The endec decodes (or demodulates) these electrical pulses, with the data then being transmitted by the endec UART back to the receiving PIC. This modulation/demodulation method is performed in accordance with the IrDA standard.&lt;br /&gt;
&lt;br /&gt;
Both the PIC and the endec used in this example were DIP packages, making them easy to prototype and inspect.  The transceiver, however, was a surface mount chip with an uncommon pin configuration (.95 mm pitch), requiring a different approach.  We initially attempted to etch a [http://www.radioshack.com/sm-2-sided-copper-clad-pc-board--pi-2102495.html copper-clad board] for our circuit (see image).  Another possible solution for our transceiver is to use a [http://www.schmartboard.com/index.asp?page=products_so&amp;amp;id=54 SchmartBoard].  These boards are more general and prefabricated for use with surface mount ICs (with a particular pitch or pin seperation).  Both solutions will allow for connections to a solderless breadboard.&lt;br /&gt;
&lt;br /&gt;
== Circuit ==&lt;br /&gt;
The circuit diagram is shown below of a complete half-duplex IR communication circuit.  This circuit can either be used together with an identical circuit to communicate, with only one PIC transmitting at a time.  This circuit can also be used with an remote control.  The software on the PIC can be used to respond depending on the button or command sent by the remote.  The electrical characteristics of the power supply and discrete components are given immediately below.  Some of the ranges for the IR circuitry are also given below in the parentheses.&lt;br /&gt;
&lt;br /&gt;
In the circuit, there are two interfaces: the serial interface and the IR interface.  The serial interface is that between the PIC and the endec.  The transmit (TX) and receive (RX) pins need to be connected between both ICs with a common ground.  The data passing between the two components on these lines have the standard 8-N-1 serial data format.  There is also a 16XCLK signal going to the endec from the PIC used to control the baud rate of the endec; that signal is a square wave pulse train at a frequency of 16*(the baud rate) and is generated in software.  The &amp;#039;RESET signal on the endec could also be control with software but is simply held high since the endec need not be reset.  The second interface, the IR interface, is between the endec and the transceiver.  That interface is straightforward with the TXIR and RXIR pins of the endec connecting to the TXD and RXD pins of the transceiver respectively, also with a common ground.  The signals between these two components conforms to the IrDA physical layer standard.  When a logic high or &amp;#039;1&amp;#039; is to be transmitted, a logic low will be sent to the transceiver.  When a logic low or &amp;#039;0&amp;#039; is to be transmitted, a logic high will be pulsed after 7-8 cycles of the 16XCLK signal for 3 cycles of the 16XCLK signal but no longer than 4 µs.&lt;br /&gt;
&lt;br /&gt;
[[Image:IR_circuit.jpg|thumb|600px|Circuit Diagram]]&lt;br /&gt;
&lt;br /&gt;
===Electrical Characteristics===&lt;br /&gt;
&amp;#039;&amp;#039;Microcontroller (Microchip PIC18F4520)&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; = 5.0V&lt;br /&gt;
*C&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; = 1µF&lt;br /&gt;
**V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; - Pin 11 &amp;amp; 32&lt;br /&gt;
**GND - Pin 12 &amp;amp; 31&lt;br /&gt;
**TX - Pin 25 (C6)&lt;br /&gt;
**RX - Pin 26 (C7)&lt;br /&gt;
**16XCLK - Pin 17 (C2/CCP1)&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;IR Encoder/Decoder (Microchip MCP2122-E/P)&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; = 5.0V (1.8V-5.5V)&lt;br /&gt;
*C&amp;lt;sub&amp;gt;BYP&amp;lt;/sub&amp;gt; = 0.01µF&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;IR Transceiver (Vishay TFDU4300-TR1)&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;cc1&amp;lt;/sub&amp;gt; = 5.0V (2.4V-5.5V)&lt;br /&gt;
*V&amp;lt;sub&amp;gt;cc2&amp;lt;/sub&amp;gt; = 5.0V (-0.3V-6.0V)&lt;br /&gt;
*V&amp;lt;sub&amp;gt;logic&amp;lt;/sub&amp;gt; = 5.0V (1.5V-5.5V)&lt;br /&gt;
*R&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; = 47Ω&lt;br /&gt;
*C&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; = 0.1µF&lt;br /&gt;
&lt;br /&gt;
Links to data sheets are provided in the External Links Section.&lt;br /&gt;
&lt;br /&gt;
=== Surface Mount Prototyping ===&lt;br /&gt;
[[Image:copper_clad_board.jpg|right|thumb|400px|Copper-Clad Board with IR Transceiver]]&lt;br /&gt;
*Transceiver lead pitch = 1.2mm/0.95mm/0.50mm/0.45mm?&lt;br /&gt;
*Multiple options for installation&lt;br /&gt;
**Schmart board&lt;br /&gt;
**Digikey board (need to find)&lt;br /&gt;
**Copper-clad board etching&lt;br /&gt;
**Funky pin adapter thing Prof. Peshkin gave us&lt;br /&gt;
**Funky adapter thing #2 Prof. Peshkin gave us&lt;br /&gt;
&lt;br /&gt;
=== Limitations ===&lt;br /&gt;
*Transceiver cannot simultaneously transmit and receive&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
&lt;br /&gt;
Example code for a simple IR communication circuit w/o the use of a transceiver:&lt;br /&gt;
&lt;br /&gt;
 /*&lt;br /&gt;
   ircomm.c Jennifer Breger, Brian Lesperance, Dan Pinkawa 2008-02-05&lt;br /&gt;
   Using the PIC&amp;#039;s built-in UART, a counter continually is sent to one IR encoder/decoder.  Then&lt;br /&gt;
   the first IR encoder/decoder feeds its TXIR to the RXIR of a second IR encoder/decoder.  The &lt;br /&gt;
   second IR encoder/decoder then transmits back to the PIC what it is receiving.  When the&lt;br /&gt;
   transceiver circuit is properly mount and inserted into the circuit, this code can be adapted&lt;br /&gt;
   for half-duplex communication w/ another IR communications circuit.&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
 #include &amp;lt;18f4520.h&amp;gt;&lt;br /&gt;
 #fuses HS,NOLVP,NOWDT,NOPROTECT&lt;br /&gt;
 #use delay (clock=20000000)&lt;br /&gt;
 #use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, stream=com_a) // Initializes the UART to 9600 bps &lt;br /&gt;
                                                              // (up to 115,200 bps)&lt;br /&gt;
 &lt;br /&gt;
 // timed_getc() checks whether data is ready to be read.  If it&amp;#039;s not the function returns a null&lt;br /&gt;
 // character.  If you simply use getc(), the PIC might get slowed up if the data isn&amp;#039;t ready right&lt;br /&gt;
 // away.&lt;br /&gt;
 char timed_getc(void){&lt;br /&gt;
    long timeout;&lt;br /&gt;
    int timeout_error = FALSE;&lt;br /&gt;
    timeout = 0;&lt;br /&gt;
    while(!kbhit() &amp;amp;&amp;amp; (++timeout&amp;lt;50000))&lt;br /&gt;
       delay_us(10);&lt;br /&gt;
    if (kbhit())&lt;br /&gt;
       return(getc());&lt;br /&gt;
    else {&lt;br /&gt;
       timeout_error = TRUE;&lt;br /&gt;
       return(0);&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 // Main program&lt;br /&gt;
 void main(void){&lt;br /&gt;
    int i;&lt;br /&gt;
    char rx;&lt;br /&gt;
 &lt;br /&gt;
    setup_timer_2(T2_DIV_BY_1, 32, 16); // Provides a 151.3 kHz clock for the Encoder/Decoder, in   &lt;br /&gt;
    setup_ccp1(CCP_PWM);                // order for it to know the baud rate of the UART. Should be &lt;br /&gt;
    set_pwm1_duty(16);                  // closer to 16 * 9600 = 153.6 kHz but the error is tolerable&lt;br /&gt;
 &lt;br /&gt;
    while(TRUE){&lt;br /&gt;
       for(i=0;i&amp;lt;16;i++){      // Counts up from 0 to 15 and transmits to the first Encoder/Decoder.&lt;br /&gt;
          putc(i);             // Listens to the second Encoder/Decoder, which is simply the original&lt;br /&gt;
          rx = timed_getc();   // message from the PIC, and displays the value on the LEDs/Port D.&lt;br /&gt;
          output_d((int8) rx);&lt;br /&gt;
          delay_ms(1000);&lt;br /&gt;
       }&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
= External Links and Further Reading =&lt;br /&gt;
*[http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf IR Transceiver Data Sheet]&lt;br /&gt;
*[http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf IR Encoder/Decoder Data Sheet]&lt;br /&gt;
*[http://www.schmartboard.com/ Schmartboard (Prototyping boards for SMT)]&lt;br /&gt;
&lt;br /&gt;
== Relevant Technical Articles ==&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Infrared_communication#Communications| Infrared communication]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Serial_communications| Serial communication]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Surface_mount| Surface mount technology]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/UART| UART]&lt;/div&gt;</summary>
		<author><name>BrianLesperance</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=IR_communication_between_PICs&amp;diff=6690</id>
		<title>IR communication between PICs</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=IR_communication_between_PICs&amp;diff=6690"/>
		<updated>2008-02-06T10:02:03Z</updated>

		<summary type="html">&lt;p&gt;BrianLesperance: /* Surface Mount Prototyping */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
Using serial communication, two PICs can easily communicate with one another.  A basic extension, IR communication can easily be set up for a microcontroller (PIC) by using an IR Encoder/Decoder (Endec) and an IR Transceiver.  The endec and transceiver used in this example support Serial IR (SIR) data rate, ranging from 9.6 kpbs - 115.2 kpbs.  The typical range of the transceiver is nominally between 2in to 2ft, extending upwards of 12ft.  The UART, endec, and transceiver used all support bidirectional use.  However, due to the fact that when a transceiver is transmitting, it essentially blinds its receiver and therefore cannot attain true full-duplex communication, only half-duplex, taking turns transmitting and receiving.&lt;br /&gt;
&lt;br /&gt;
When transmitting, the PIC sends the serial format data to the endec, who receives this serial data and encodes (or modulates) it bit by bit.  This encoded data is then output as electrical pulses to the transceiver.  The transceiver will then convert these electrical pulses to IR light pulses.  On the receiving side, the transceiver receives IR light pulses (data), which are outputted as electrical pulses. The endec decodes (or demodulates) these electrical pulses, with the data then being transmitted by the endec UART back to the receiving PIC. This modulation/demodulation method is performed in accordance with the IrDA standard.&lt;br /&gt;
&lt;br /&gt;
Both the PIC and the endec used in this example were DIP packages, making them easy to prototype and inspect.  The transceiver, however, was a surface mount chip with an uncommon pin configuration (.95 mm pitch), requiring a different approach.  We initially attempted to etch a [http://www.radioshack.com/sm-2-sided-copper-clad-pc-board--pi-2102495.html copper-clad board] for our circuit (see image).  Another possible solution for our transceiver is to use a [http://www.schmartboard.com/index.asp?page=products_so&amp;amp;id=54 SchmartBoard].  These boards are more general and prefabricated for use with surface mount ICs (with a particular pitch or pin seperation).  Both solutions will allow for connections to a solderless breadboard.&lt;br /&gt;
&lt;br /&gt;
== Circuit ==&lt;br /&gt;
The Circuit Diagram shows the layout of the PIC, Encoder/Decoder, and IR Transceiver combination.  Two of these set-ups are needed in order to have two independent circuits: one to transmit and one to receive data.  The specifications of the circuit are as follows:&lt;br /&gt;
&lt;br /&gt;
[[Image:IR_circuit.jpg|thumb|600px|Circuit Diagram]]&lt;br /&gt;
&lt;br /&gt;
===Electrical Characteristics===&lt;br /&gt;
&amp;#039;&amp;#039;µController (PIC18F4520)&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; = 5.0V&lt;br /&gt;
*C&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; = 1µF&lt;br /&gt;
**Pin 11 or 32 can be used for V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt;&lt;br /&gt;
**Pin 12 or 31 can be used for GND&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;IR Encoder/Decoder (MCP2122-E/P)&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; = 5.0V (1.8V-5.5V)&lt;br /&gt;
*C&amp;lt;sub&amp;gt;BYP&amp;lt;/sub&amp;gt; = 0.01µF&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;IR Transceiver (TFDU4300-TR1)&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;cc1&amp;lt;/sub&amp;gt; = 5.0V (2.4V-5.5V)&lt;br /&gt;
*V&amp;lt;sub&amp;gt;cc2&amp;lt;/sub&amp;gt; = 5.0V (-0.3V-6.0V)&lt;br /&gt;
*V&amp;lt;sub&amp;gt;logic&amp;lt;/sub&amp;gt; = 5.0V (1.5V-5.5V)&lt;br /&gt;
*R&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; = 47Ω&lt;br /&gt;
*C&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; = 0.1µF&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The links to the data sheets for the Encoder/Decoder and the IR Transceiver can be found in the External Links sections.&lt;br /&gt;
&lt;br /&gt;
*PIC interfaces serially with EnDec&lt;br /&gt;
*EnDec connected to transceiver through a transmit pin, a receive pin, and a V&amp;lt;sub&amp;gt;logic&amp;lt;/sub&amp;gt; pin?&lt;br /&gt;
*Transceiver manufactured by Vishay Semiconductors&lt;br /&gt;
**Part # TFDU4300&lt;br /&gt;
*EnDec manufactured by Microchip&lt;br /&gt;
**Part # MCP2122&lt;br /&gt;
&lt;br /&gt;
=== Surface Mount Prototyping ===&lt;br /&gt;
[[Image:copper_clad_board.jpg|right|thumb|400px|Copper-Clad Board with IR Transceiver]]&lt;br /&gt;
*Transceiver lead pitch = 1.2mm/0.95mm/0.50mm/0.45mm?&lt;br /&gt;
*Multiple options for installation&lt;br /&gt;
**Schmart board&lt;br /&gt;
**Digikey board (need to find)&lt;br /&gt;
**Copper-clad board etching&lt;br /&gt;
**Funky pin adapter thing Prof. Peshkin gave us&lt;br /&gt;
**Funky adapter thing #2 Prof. Peshkin gave us&lt;br /&gt;
&lt;br /&gt;
=== Limitations ===&lt;br /&gt;
*Transceiver cannot simultaneously transmit and receive&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
&lt;br /&gt;
Example code for a simple IR communication circuit w/o the use of a transceiver:&lt;br /&gt;
&lt;br /&gt;
 /*&lt;br /&gt;
   ircomm.c Jennifer Breger, Brian Lesperance, Dan Pinkawa 2008-02-05&lt;br /&gt;
   Using the PIC&amp;#039;s built-in UART, a counter continually is sent to one IR encoder/decoder.  Then&lt;br /&gt;
   the first IR encoder/decoder feeds its TXIR to the RXIR of a second IR encoder/decoder.  The &lt;br /&gt;
   second IR encoder/decoder then transmits back to the PIC what it is receiving.  When the&lt;br /&gt;
   transceiver circuit is properly mount and inserted into the circuit, this code can be adapted&lt;br /&gt;
   for half-duplex communication w/ another IR communications circuit.&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
 #include &amp;lt;18f4520.h&amp;gt;&lt;br /&gt;
 #fuses HS,NOLVP,NOWDT,NOPROTECT&lt;br /&gt;
 #use delay (clock=20000000)&lt;br /&gt;
 #use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, stream=com_a) // Initializes the UART to 9600 bps &lt;br /&gt;
                                                              // (up to 115,200 bps)&lt;br /&gt;
 &lt;br /&gt;
 // timed_getc() checks whether data is ready to be read.  If it&amp;#039;s not the function returns a null&lt;br /&gt;
 // character.  If you simply use getc(), the PIC might get slowed up if the data isn&amp;#039;t ready right&lt;br /&gt;
 // away.&lt;br /&gt;
 char timed_getc(void){&lt;br /&gt;
    long timeout;&lt;br /&gt;
    int timeout_error = FALSE;&lt;br /&gt;
    timeout = 0;&lt;br /&gt;
    while(!kbhit() &amp;amp;&amp;amp; (++timeout&amp;lt;50000))&lt;br /&gt;
       delay_us(10);&lt;br /&gt;
    if (kbhit())&lt;br /&gt;
       return(getc());&lt;br /&gt;
    else {&lt;br /&gt;
       timeout_error = TRUE;&lt;br /&gt;
       return(0);&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 // Main program&lt;br /&gt;
 void main(void){&lt;br /&gt;
    int i;&lt;br /&gt;
    char rx;&lt;br /&gt;
 &lt;br /&gt;
    setup_timer_2(T2_DIV_BY_1, 32, 16); // Provides a 151.3 kHz clock for the Encoder/Decoder, in   &lt;br /&gt;
    setup_ccp1(CCP_PWM);                // order for it to know the baud rate of the UART. Should be &lt;br /&gt;
    set_pwm1_duty(16);                  // closer to 16 * 9600 = 153.6 kHz but the error is tolerable&lt;br /&gt;
 &lt;br /&gt;
    while(TRUE){&lt;br /&gt;
       for(i=0;i&amp;lt;16;i++){      // Counts up from 0 to 15 and transmits to the first Encoder/Decoder.&lt;br /&gt;
          putc(i);             // Listens to the second Encoder/Decoder, which is simply the original&lt;br /&gt;
          rx = timed_getc();   // message from the PIC, and displays the value on the LEDs/Port D.&lt;br /&gt;
          output_d((int8) rx);&lt;br /&gt;
          delay_ms(1000);&lt;br /&gt;
       }&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
= External Links and Further Reading =&lt;br /&gt;
*[http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf IR Transceiver Data Sheet]&lt;br /&gt;
*[http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf IR Encoder/Decoder Data Sheet]&lt;br /&gt;
*[http://www.schmartboard.com/ Schmartboard (Prototyping boards for SMT)]&lt;br /&gt;
&lt;br /&gt;
== Relevant Technical Articles ==&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Infrared_communication#Communications| Infrared communication]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Serial_communications| Serial communication]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Surface_mount| Surface mount technology]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/UART| UART]&lt;/div&gt;</summary>
		<author><name>BrianLesperance</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=IR_communication_between_PICs&amp;diff=6689</id>
		<title>IR communication between PICs</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=IR_communication_between_PICs&amp;diff=6689"/>
		<updated>2008-02-06T10:00:42Z</updated>

		<summary type="html">&lt;p&gt;BrianLesperance: /* Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
Using serial communication, two PICs can easily communicate with one another.  A basic extension, IR communication can easily be set up for a microcontroller (PIC) by using an IR Encoder/Decoder (Endec) and an IR Transceiver.  The endec and transceiver used in this example support Serial IR (SIR) data rate, ranging from 9.6 kpbs - 115.2 kpbs.  The typical range of the transceiver is nominally between 2in to 2ft, extending upwards of 12ft.  The UART, endec, and transceiver used all support bidirectional use.  However, due to the fact that when a transceiver is transmitting, it essentially blinds its receiver and therefore cannot attain true full-duplex communication, only half-duplex, taking turns transmitting and receiving.&lt;br /&gt;
&lt;br /&gt;
When transmitting, the PIC sends the serial format data to the endec, who receives this serial data and encodes (or modulates) it bit by bit.  This encoded data is then output as electrical pulses to the transceiver.  The transceiver will then convert these electrical pulses to IR light pulses.  On the receiving side, the transceiver receives IR light pulses (data), which are outputted as electrical pulses. The endec decodes (or demodulates) these electrical pulses, with the data then being transmitted by the endec UART back to the receiving PIC. This modulation/demodulation method is performed in accordance with the IrDA standard.&lt;br /&gt;
&lt;br /&gt;
Both the PIC and the endec used in this example were DIP packages, making them easy to prototype and inspect.  The transceiver, however, was a surface mount chip with an uncommon pin configuration (.95 mm pitch), requiring a different approach.  We initially attempted to etch a [http://www.radioshack.com/sm-2-sided-copper-clad-pc-board--pi-2102495.html copper-clad board] for our circuit (see image).  Another possible solution for our transceiver is to use a [http://www.schmartboard.com/index.asp?page=products_so&amp;amp;id=54 SchmartBoard].  These boards are more general and prefabricated for use with surface mount ICs (with a particular pitch or pin seperation).  Both solutions will allow for connections to a solderless breadboard.&lt;br /&gt;
&lt;br /&gt;
== Circuit ==&lt;br /&gt;
The Circuit Diagram shows the layout of the PIC, Encoder/Decoder, and IR Transceiver combination.  Two of these set-ups are needed in order to have two independent circuits: one to transmit and one to receive data.  The specifications of the circuit are as follows:&lt;br /&gt;
&lt;br /&gt;
[[Image:IR_circuit.jpg|thumb|600px|Circuit Diagram]]&lt;br /&gt;
&lt;br /&gt;
===Electrical Characteristics===&lt;br /&gt;
&amp;#039;&amp;#039;µController (PIC18F4520)&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; = 5.0V&lt;br /&gt;
*C&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; = 1µF&lt;br /&gt;
**Pin 11 or 32 can be used for V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt;&lt;br /&gt;
**Pin 12 or 31 can be used for GND&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;IR Encoder/Decoder (MCP2122-E/P)&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; = 5.0V (1.8V-5.5V)&lt;br /&gt;
*C&amp;lt;sub&amp;gt;BYP&amp;lt;/sub&amp;gt; = 0.01µF&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;IR Transceiver (TFDU4300-TR1)&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;cc1&amp;lt;/sub&amp;gt; = 5.0V (2.4V-5.5V)&lt;br /&gt;
*V&amp;lt;sub&amp;gt;cc2&amp;lt;/sub&amp;gt; = 5.0V (-0.3V-6.0V)&lt;br /&gt;
*V&amp;lt;sub&amp;gt;logic&amp;lt;/sub&amp;gt; = 5.0V (1.5V-5.5V)&lt;br /&gt;
*R&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; = 47Ω&lt;br /&gt;
*C&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; = 0.1µF&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The links to the data sheets for the Encoder/Decoder and the IR Transceiver can be found in the External Links sections.&lt;br /&gt;
&lt;br /&gt;
*PIC interfaces serially with EnDec&lt;br /&gt;
*EnDec connected to transceiver through a transmit pin, a receive pin, and a V&amp;lt;sub&amp;gt;logic&amp;lt;/sub&amp;gt; pin?&lt;br /&gt;
*Transceiver manufactured by Vishay Semiconductors&lt;br /&gt;
**Part # TFDU4300&lt;br /&gt;
*EnDec manufactured by Microchip&lt;br /&gt;
**Part # MCP2122&lt;br /&gt;
&lt;br /&gt;
=== Surface Mount Prototyping ===&lt;br /&gt;
*Transceiver lead pitch = 1.2mm/0.95mm/0.50mm/0.45mm?&lt;br /&gt;
*Multiple options for installation&lt;br /&gt;
**Schmart board&lt;br /&gt;
**Digikey board (need to find)&lt;br /&gt;
**Copper-clad board etching&lt;br /&gt;
**Funky pin adapter thing Prof. Peshkin gave us&lt;br /&gt;
**Funky adapter thing #2 Prof. Peshkin gave us&lt;br /&gt;
&lt;br /&gt;
=== Limitations ===&lt;br /&gt;
*Transceiver cannot simultaneously transmit and receive&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
&lt;br /&gt;
Example code for a simple IR communication circuit w/o the use of a transceiver:&lt;br /&gt;
&lt;br /&gt;
 /*&lt;br /&gt;
   ircomm.c Jennifer Breger, Brian Lesperance, Dan Pinkawa 2008-02-05&lt;br /&gt;
   Using the PIC&amp;#039;s built-in UART, a counter continually is sent to one IR encoder/decoder.  Then&lt;br /&gt;
   the first IR encoder/decoder feeds its TXIR to the RXIR of a second IR encoder/decoder.  The &lt;br /&gt;
   second IR encoder/decoder then transmits back to the PIC what it is receiving.  When the&lt;br /&gt;
   transceiver circuit is properly mount and inserted into the circuit, this code can be adapted&lt;br /&gt;
   for half-duplex communication w/ another IR communications circuit.&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
 #include &amp;lt;18f4520.h&amp;gt;&lt;br /&gt;
 #fuses HS,NOLVP,NOWDT,NOPROTECT&lt;br /&gt;
 #use delay (clock=20000000)&lt;br /&gt;
 #use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, stream=com_a) // Initializes the UART to 9600 bps &lt;br /&gt;
                                                              // (up to 115,200 bps)&lt;br /&gt;
 &lt;br /&gt;
 // timed_getc() checks whether data is ready to be read.  If it&amp;#039;s not the function returns a null&lt;br /&gt;
 // character.  If you simply use getc(), the PIC might get slowed up if the data isn&amp;#039;t ready right&lt;br /&gt;
 // away.&lt;br /&gt;
 char timed_getc(void){&lt;br /&gt;
    long timeout;&lt;br /&gt;
    int timeout_error = FALSE;&lt;br /&gt;
    timeout = 0;&lt;br /&gt;
    while(!kbhit() &amp;amp;&amp;amp; (++timeout&amp;lt;50000))&lt;br /&gt;
       delay_us(10);&lt;br /&gt;
    if (kbhit())&lt;br /&gt;
       return(getc());&lt;br /&gt;
    else {&lt;br /&gt;
       timeout_error = TRUE;&lt;br /&gt;
       return(0);&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 // Main program&lt;br /&gt;
 void main(void){&lt;br /&gt;
    int i;&lt;br /&gt;
    char rx;&lt;br /&gt;
 &lt;br /&gt;
    setup_timer_2(T2_DIV_BY_1, 32, 16); // Provides a 151.3 kHz clock for the Encoder/Decoder, in   &lt;br /&gt;
    setup_ccp1(CCP_PWM);                // order for it to know the baud rate of the UART. Should be &lt;br /&gt;
    set_pwm1_duty(16);                  // closer to 16 * 9600 = 153.6 kHz but the error is tolerable&lt;br /&gt;
 &lt;br /&gt;
    while(TRUE){&lt;br /&gt;
       for(i=0;i&amp;lt;16;i++){      // Counts up from 0 to 15 and transmits to the first Encoder/Decoder.&lt;br /&gt;
          putc(i);             // Listens to the second Encoder/Decoder, which is simply the original&lt;br /&gt;
          rx = timed_getc();   // message from the PIC, and displays the value on the LEDs/Port D.&lt;br /&gt;
          output_d((int8) rx);&lt;br /&gt;
          delay_ms(1000);&lt;br /&gt;
       }&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
= External Links and Further Reading =&lt;br /&gt;
*[http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf IR Transceiver Data Sheet]&lt;br /&gt;
*[http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf IR Encoder/Decoder Data Sheet]&lt;br /&gt;
*[http://www.schmartboard.com/ Schmartboard (Prototyping boards for SMT)]&lt;br /&gt;
&lt;br /&gt;
== Relevant Technical Articles ==&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Infrared_communication#Communications| Infrared communication]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Serial_communications| Serial communication]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Surface_mount| Surface mount technology]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/UART| UART]&lt;/div&gt;</summary>
		<author><name>BrianLesperance</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=IR_communication_between_PICs&amp;diff=6687</id>
		<title>IR communication between PICs</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=IR_communication_between_PICs&amp;diff=6687"/>
		<updated>2008-02-06T09:59:45Z</updated>

		<summary type="html">&lt;p&gt;BrianLesperance: /* Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
Using serial communication, two PICs can easily communicate with one another.  A basic extension, IR communication can easily be set up for a microcontroller (PIC) by using an IR Encoder/Decoder (Endec) and an IR Transceiver.  The endec and transceiver used in this example support Serial IR (SIR) data rate, ranging from 9.6 kpbs - 115.2 kpbs.  The typical range of the transceiver is nominally between 2in to 2ft, extending upwards of 12ft.  The UART, endec, and transceiver used all support bidirectional use.  However, due to the fact that when a transceiver is transmitting, it essentially blinds its receiver and therefore cannot attain true full-duplex communication, only half-duplex, taking turns transmitting and receiving.&lt;br /&gt;
&lt;br /&gt;
When transmitting, the PIC sends the serial format data to the endec, who receives this serial data and encodes (or modulates) it bit by bit.  This encoded data is then output as electrical pulses to the transceiver.  The transceiver will then convert these electrical pulses to IR light pulses.  On the receiving side, the transceiver receives IR light pulses (data), which are outputted as electrical pulses. The endec decodes (or demodulates) these electrical pulses, with the data then being transmitted by the endec UART back to the receiving PIC. This modulation/demodulation method is performed in accordance with the IrDA standard.&lt;br /&gt;
&lt;br /&gt;
[[Image:copper_clad_board.jpg|right|thumb|400px|Copper-Clad Board]]&lt;br /&gt;
&lt;br /&gt;
Both the PIC and the endec used in this example were DIP packages, making them easy to prototype and inspect.  The transceiver, however, was a surface mount chip with an uncommon pin configuration (.95 mm pitch), requiring a different approach.  We initially attempted to etch a [http://www.radioshack.com/sm-2-sided-copper-clad-pc-board--pi-2102495.html copper-clad board] for our circuit (see image).  Another possible solution for our transceiver is to use a [http://www.schmartboard.com/index.asp?page=products_so&amp;amp;id=54 SchmartBoard].  These boards are more general and prefabricated for use with surface mount ICs (with a particular pitch or pin seperation).  Both solutions will allow for connections to a solderless breadboard.&lt;br /&gt;
&lt;br /&gt;
== Circuit ==&lt;br /&gt;
The Circuit Diagram shows the layout of the PIC, Encoder/Decoder, and IR Transceiver combination.  Two of these set-ups are needed in order to have two independent circuits: one to transmit and one to receive data.  The specifications of the circuit are as follows:&lt;br /&gt;
&lt;br /&gt;
[[Image:IR_circuit.jpg|thumb|600px|Circuit Diagram]]&lt;br /&gt;
&lt;br /&gt;
===Electrical Characteristics===&lt;br /&gt;
&amp;#039;&amp;#039;µController (PIC18F4520)&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; = 5.0V&lt;br /&gt;
*C&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; = 1µF&lt;br /&gt;
**Pin 11 or 32 can be used for V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt;&lt;br /&gt;
**Pin 12 or 31 can be used for GND&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;IR Encoder/Decoder (MCP2122-E/P)&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; = 5.0V (1.8V-5.5V)&lt;br /&gt;
*C&amp;lt;sub&amp;gt;BYP&amp;lt;/sub&amp;gt; = 0.01µF&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;IR Transceiver (TFDU4300-TR1)&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;cc1&amp;lt;/sub&amp;gt; = 5.0V (2.4V-5.5V)&lt;br /&gt;
*V&amp;lt;sub&amp;gt;cc2&amp;lt;/sub&amp;gt; = 5.0V (-0.3V-6.0V)&lt;br /&gt;
*V&amp;lt;sub&amp;gt;logic&amp;lt;/sub&amp;gt; = 5.0V (1.5V-5.5V)&lt;br /&gt;
*R&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; = 47Ω&lt;br /&gt;
*C&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; = 0.1µF&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The links to the data sheets for the Encoder/Decoder and the IR Transceiver can be found in the External Links sections.&lt;br /&gt;
&lt;br /&gt;
*PIC interfaces serially with EnDec&lt;br /&gt;
*EnDec connected to transceiver through a transmit pin, a receive pin, and a V&amp;lt;sub&amp;gt;logic&amp;lt;/sub&amp;gt; pin?&lt;br /&gt;
*Transceiver manufactured by Vishay Semiconductors&lt;br /&gt;
**Part # TFDU4300&lt;br /&gt;
*EnDec manufactured by Microchip&lt;br /&gt;
**Part # MCP2122&lt;br /&gt;
&lt;br /&gt;
=== Surface Mount Prototyping ===&lt;br /&gt;
*Transceiver lead pitch = 1.2mm/0.95mm/0.50mm/0.45mm?&lt;br /&gt;
*Multiple options for installation&lt;br /&gt;
**Schmart board&lt;br /&gt;
**Digikey board (need to find)&lt;br /&gt;
**Copper-clad board etching&lt;br /&gt;
**Funky pin adapter thing Prof. Peshkin gave us&lt;br /&gt;
**Funky adapter thing #2 Prof. Peshkin gave us&lt;br /&gt;
&lt;br /&gt;
=== Limitations ===&lt;br /&gt;
*Transceiver cannot simultaneously transmit and receive&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
&lt;br /&gt;
Example code for a simple IR communication circuit w/o the use of a transceiver:&lt;br /&gt;
&lt;br /&gt;
 /*&lt;br /&gt;
   ircomm.c Jennifer Breger, Brian Lesperance, Dan Pinkawa 2008-02-05&lt;br /&gt;
   Using the PIC&amp;#039;s built-in UART, a counter continually is sent to one IR encoder/decoder.  Then&lt;br /&gt;
   the first IR encoder/decoder feeds its TXIR to the RXIR of a second IR encoder/decoder.  The &lt;br /&gt;
   second IR encoder/decoder then transmits back to the PIC what it is receiving.  When the&lt;br /&gt;
   transceiver circuit is properly mount and inserted into the circuit, this code can be adapted&lt;br /&gt;
   for half-duplex communication w/ another IR communications circuit.&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
 #include &amp;lt;18f4520.h&amp;gt;&lt;br /&gt;
 #fuses HS,NOLVP,NOWDT,NOPROTECT&lt;br /&gt;
 #use delay (clock=20000000)&lt;br /&gt;
 #use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, stream=com_a) // Initializes the UART to 9600 bps &lt;br /&gt;
                                                              // (up to 115,200 bps)&lt;br /&gt;
 &lt;br /&gt;
 // timed_getc() checks whether data is ready to be read.  If it&amp;#039;s not the function returns a null&lt;br /&gt;
 // character.  If you simply use getc(), the PIC might get slowed up if the data isn&amp;#039;t ready right&lt;br /&gt;
 // away.&lt;br /&gt;
 char timed_getc(void){&lt;br /&gt;
    long timeout;&lt;br /&gt;
    int timeout_error = FALSE;&lt;br /&gt;
    timeout = 0;&lt;br /&gt;
    while(!kbhit() &amp;amp;&amp;amp; (++timeout&amp;lt;50000))&lt;br /&gt;
       delay_us(10);&lt;br /&gt;
    if (kbhit())&lt;br /&gt;
       return(getc());&lt;br /&gt;
    else {&lt;br /&gt;
       timeout_error = TRUE;&lt;br /&gt;
       return(0);&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 // Main program&lt;br /&gt;
 void main(void){&lt;br /&gt;
    int i;&lt;br /&gt;
    char rx;&lt;br /&gt;
 &lt;br /&gt;
    setup_timer_2(T2_DIV_BY_1, 32, 16); // Provides a 151.3 kHz clock for the Encoder/Decoder, in   &lt;br /&gt;
    setup_ccp1(CCP_PWM);                // order for it to know the baud rate of the UART. Should be &lt;br /&gt;
    set_pwm1_duty(16);                  // closer to 16 * 9600 = 153.6 kHz but the error is tolerable&lt;br /&gt;
 &lt;br /&gt;
    while(TRUE){&lt;br /&gt;
       for(i=0;i&amp;lt;16;i++){      // Counts up from 0 to 15 and transmits to the first Encoder/Decoder.&lt;br /&gt;
          putc(i);             // Listens to the second Encoder/Decoder, which is simply the original&lt;br /&gt;
          rx = timed_getc();   // message from the PIC, and displays the value on the LEDs/Port D.&lt;br /&gt;
          output_d((int8) rx);&lt;br /&gt;
          delay_ms(1000);&lt;br /&gt;
       }&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
= External Links and Further Reading =&lt;br /&gt;
*[http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf IR Transceiver Data Sheet]&lt;br /&gt;
*[http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf IR Encoder/Decoder Data Sheet]&lt;br /&gt;
*[http://www.schmartboard.com/ Schmartboard (Prototyping boards for SMT)]&lt;br /&gt;
&lt;br /&gt;
== Relevant Technical Articles ==&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Infrared_communication#Communications| Infrared communication]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Serial_communications| Serial communication]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Surface_mount| Surface mount technology]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/UART| UART]&lt;/div&gt;</summary>
		<author><name>BrianLesperance</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=IR_communication_between_PICs&amp;diff=6686</id>
		<title>IR communication between PICs</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=IR_communication_between_PICs&amp;diff=6686"/>
		<updated>2008-02-06T09:58:14Z</updated>

		<summary type="html">&lt;p&gt;BrianLesperance: /* Circuit */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
Using serial communication, two PICs can easily communicate with one another.  A basic extension, IR communication can easily be set up for a microcontroller (PIC) by using an IR Encoder/Decoder (Endec) and an IR Transceiver.  The endec and transceiver used in this example support Serial IR (SIR) data rate, ranging from 9.6 kpbs - 115.2 kpbs.  The typical range of the transceiver is nominally between 2in to 2ft, extending upwards of 12ft.  The UART, endec, and transceiver used all support bidirectional use.  However, due to the fact that when a transceiver is transmitting, it essentially blinds its receiver and therefore cannot attain true full-duplex communication, only half-duplex, taking turns transmitting and receiving.&lt;br /&gt;
&lt;br /&gt;
When transmitting, the PIC sends the serial format data to the endec, who receives this serial data and encodes (or modulates) it bit by bit.  This encoded data is then output as electrical pulses to the transceiver.  The transceiver will then convert these electrical pulses to IR light pulses.  On the receiving side, the transceiver receives IR light pulses (data), which are outputted as electrical pulses. The endec decodes (or demodulates) these electrical pulses, with the data then being transmitted by the endec UART back to the receiving PIC. This modulation/demodulation method is performed in accordance with the IrDA standard.&lt;br /&gt;
&lt;br /&gt;
[[Image:copper_clad_board.jpg|thumb|400px|Copper-Clad Board]]&lt;br /&gt;
&lt;br /&gt;
Both the PIC and the endec used in this example were DIP packages, making them easy to prototype and inspect.  The transceiver, however, was a surface mount chip with an uncommon pin configuration (.95 mm pitch), requiring a different approach.  We initially attempted to etch a [http://www.radioshack.com/sm-2-sided-copper-clad-pc-board--pi-2102495.html copper-clad board] for our circuit (see image).  Another possible solution for our transceiver is to use a [http://www.schmartboard.com/index.asp?page=products_so&amp;amp;id=54 SchmartBoard].  These boards are more general and prefabricated for use with surface mount ICs (with a particular pitch or pin seperation).  Both solutions will allow for connections to a solderless breadboard.&lt;br /&gt;
&lt;br /&gt;
== Circuit ==&lt;br /&gt;
The Circuit Diagram shows the layout of the PIC, Encoder/Decoder, and IR Transceiver combination.  Two of these set-ups are needed in order to have two independent circuits: one to transmit and one to receive data.  The specifications of the circuit are as follows:&lt;br /&gt;
&lt;br /&gt;
[[Image:IR_circuit.jpg|thumb|600px|Circuit Diagram]]&lt;br /&gt;
&lt;br /&gt;
===Electrical Characteristics===&lt;br /&gt;
&amp;#039;&amp;#039;µController (PIC18F4520)&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; = 5.0V&lt;br /&gt;
*C&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; = 1µF&lt;br /&gt;
**Pin 11 or 32 can be used for V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt;&lt;br /&gt;
**Pin 12 or 31 can be used for GND&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;IR Encoder/Decoder (MCP2122-E/P)&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;DD&amp;lt;/sub&amp;gt; = 5.0V (1.8V-5.5V)&lt;br /&gt;
*C&amp;lt;sub&amp;gt;BYP&amp;lt;/sub&amp;gt; = 0.01µF&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;IR Transceiver (TFDU4300-TR1)&amp;#039;&amp;#039;&lt;br /&gt;
*V&amp;lt;sub&amp;gt;cc1&amp;lt;/sub&amp;gt; = 5.0V (2.4V-5.5V)&lt;br /&gt;
*V&amp;lt;sub&amp;gt;cc2&amp;lt;/sub&amp;gt; = 5.0V (-0.3V-6.0V)&lt;br /&gt;
*V&amp;lt;sub&amp;gt;logic&amp;lt;/sub&amp;gt; = 5.0V (1.5V-5.5V)&lt;br /&gt;
*R&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; = 47Ω&lt;br /&gt;
*C&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; = 0.1µF&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The links to the data sheets for the Encoder/Decoder and the IR Transceiver can be found in the External Links sections.&lt;br /&gt;
&lt;br /&gt;
*PIC interfaces serially with EnDec&lt;br /&gt;
*EnDec connected to transceiver through a transmit pin, a receive pin, and a V&amp;lt;sub&amp;gt;logic&amp;lt;/sub&amp;gt; pin?&lt;br /&gt;
*Transceiver manufactured by Vishay Semiconductors&lt;br /&gt;
**Part # TFDU4300&lt;br /&gt;
*EnDec manufactured by Microchip&lt;br /&gt;
**Part # MCP2122&lt;br /&gt;
&lt;br /&gt;
=== Surface Mount Prototyping ===&lt;br /&gt;
*Transceiver lead pitch = 1.2mm/0.95mm/0.50mm/0.45mm?&lt;br /&gt;
*Multiple options for installation&lt;br /&gt;
**Schmart board&lt;br /&gt;
**Digikey board (need to find)&lt;br /&gt;
**Copper-clad board etching&lt;br /&gt;
**Funky pin adapter thing Prof. Peshkin gave us&lt;br /&gt;
**Funky adapter thing #2 Prof. Peshkin gave us&lt;br /&gt;
&lt;br /&gt;
=== Limitations ===&lt;br /&gt;
*Transceiver cannot simultaneously transmit and receive&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
&lt;br /&gt;
Example code for a simple IR communication circuit w/o the use of a transceiver:&lt;br /&gt;
&lt;br /&gt;
 /*&lt;br /&gt;
   ircomm.c Jennifer Breger, Brian Lesperance, Dan Pinkawa 2008-02-05&lt;br /&gt;
   Using the PIC&amp;#039;s built-in UART, a counter continually is sent to one IR encoder/decoder.  Then&lt;br /&gt;
   the first IR encoder/decoder feeds its TXIR to the RXIR of a second IR encoder/decoder.  The &lt;br /&gt;
   second IR encoder/decoder then transmits back to the PIC what it is receiving.  When the&lt;br /&gt;
   transceiver circuit is properly mount and inserted into the circuit, this code can be adapted&lt;br /&gt;
   for half-duplex communication w/ another IR communications circuit.&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
 #include &amp;lt;18f4520.h&amp;gt;&lt;br /&gt;
 #fuses HS,NOLVP,NOWDT,NOPROTECT&lt;br /&gt;
 #use delay (clock=20000000)&lt;br /&gt;
 #use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, stream=com_a) // Initializes the UART to 9600 bps &lt;br /&gt;
                                                              // (up to 115,200 bps)&lt;br /&gt;
 &lt;br /&gt;
 // timed_getc() checks whether data is ready to be read.  If it&amp;#039;s not the function returns a null&lt;br /&gt;
 // character.  If you simply use getc(), the PIC might get slowed up if the data isn&amp;#039;t ready right&lt;br /&gt;
 // away.&lt;br /&gt;
 char timed_getc(void){&lt;br /&gt;
    long timeout;&lt;br /&gt;
    int timeout_error = FALSE;&lt;br /&gt;
    timeout = 0;&lt;br /&gt;
    while(!kbhit() &amp;amp;&amp;amp; (++timeout&amp;lt;50000))&lt;br /&gt;
       delay_us(10);&lt;br /&gt;
    if (kbhit())&lt;br /&gt;
       return(getc());&lt;br /&gt;
    else {&lt;br /&gt;
       timeout_error = TRUE;&lt;br /&gt;
       return(0);&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 // Main program&lt;br /&gt;
 void main(void){&lt;br /&gt;
    int i;&lt;br /&gt;
    char rx;&lt;br /&gt;
 &lt;br /&gt;
    setup_timer_2(T2_DIV_BY_1, 32, 16); // Provides a 151.3 kHz clock for the Encoder/Decoder, in   &lt;br /&gt;
    setup_ccp1(CCP_PWM);                // order for it to know the baud rate of the UART. Should be &lt;br /&gt;
    set_pwm1_duty(16);                  // closer to 16 * 9600 = 153.6 kHz but the error is tolerable&lt;br /&gt;
 &lt;br /&gt;
    while(TRUE){&lt;br /&gt;
       for(i=0;i&amp;lt;16;i++){      // Counts up from 0 to 15 and transmits to the first Encoder/Decoder.&lt;br /&gt;
          putc(i);             // Listens to the second Encoder/Decoder, which is simply the original&lt;br /&gt;
          rx = timed_getc();   // message from the PIC, and displays the value on the LEDs/Port D.&lt;br /&gt;
          output_d((int8) rx);&lt;br /&gt;
          delay_ms(1000);&lt;br /&gt;
       }&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
= External Links and Further Reading =&lt;br /&gt;
*[http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf IR Transceiver Data Sheet]&lt;br /&gt;
*[http://ww1.microchip.com/downloads/en/DeviceDoc/21894c.pdf IR Encoder/Decoder Data Sheet]&lt;br /&gt;
*[http://www.schmartboard.com/ Schmartboard (Prototyping boards for SMT)]&lt;br /&gt;
&lt;br /&gt;
== Relevant Technical Articles ==&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Infrared_communication#Communications| Infrared communication]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Serial_communications| Serial communication]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Surface_mount| Surface mount technology]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/UART| UART]&lt;/div&gt;</summary>
		<author><name>BrianLesperance</name></author>
	</entry>
</feed>