]> git.ozlabs.org Git - ponghero.git/blob - web/irpen/index.html
Add web pages.
[ponghero.git] / web / irpen / index.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml">
3  <head>
4   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
5   <title>Pong Hero</title>
6   <link href="style.css" rel="stylesheet" type="text/css" />
7  </head>
8  <body>
9 <center>
10   <object type="image/svg+xml" data="../logo.svg" NAME="pong-hero-logo.svg" width="646" height="162"><img src="../logo.png" title="Nintendo Wiimote PLUS Linux bluetooth PLUS Infra-red Torches EQUALS Pong Hero!">
11   </object>
12 </center>
13 <hr>
14   <h1>Pong Hero: Making IR Pens</h1>
15
16   <table>
17     <tr>
18       <td>  <p>
19     After some experimentation, I settled on a nice form factor for
20     Pong Hero, using lip balm (Chap Stick) containers.  These have
21     three 5mm IR LEDs and a rechargable AAA battery contained neatly
22     inside them.
23         </p>
24         </td>
25       <td>
26   <img src="complete.jpg" align=right>
27   </td>
28       </tr>
29   </table>
30
31   <h2>Background</h2>
32   <p>
33     The Wiimote contains an Infra Red camera, so it can track IR
34     lights.  IR LEDs are around 75c each but they're very directional,
35     so in practice the Wiimote is seeing the <em>IR light shining on
36     the wall</em> rather than the LEDs themselves.
37   </p>
38
39   <p>
40     This discovery allows us to get away without a switch on the IR
41     pen: just take it more than about 5 cm from the wall and it's too
42     dim to be seen.  For a more general whiteboard, a momentary push
43     switch near the end would be great though (fitting it on the
44     container is hard, tips welcome!).
45   </p>
46
47   <p>
48     The other simplification is to use <em>rechargable</em> AAA
49     batteries.  These are 1.2 volts, rather than 1.5 volts, so we
50     don't need a resistor.  Unfortunately, they drop voltage faster
51     than decent batteries, so this could also explain why I found the
52     need to have three LEDs: sneaking a resistor into the circuit and
53     using 1.5V AAAs might let you get away with a single LED.
54   </p>
55
56   <h2>Ingredients</h2>
57   <ol>
58     <li> 3 Infrared LEDs (get spares, I killed some),
59     <li> Lip balm container (my study smells of strawberries now)
60     <li> A rechargable AAA battery (and a charger, of course!)
61     <li> A pen with a spring in it (free promotional click pens are good)
62     <li> 20cm of hookup wire
63     <li> A digital camera (for easier debugging, as it can see IR)
64     <li> Long-nose pliers (to twist the LED legs together)
65     <li> Snips (to cut the LED legs, shaft of container, wire, spring)
66     <li> Soldering iron and solder
67     <li> Glue (to secure spring to bottom of container, maybe LEDs into top)
68   </ol>
69
70   <p> You should be able to make two devices for under $20, assuming
71   you have tools. </p>
72
73   <h2>Steps</h2>
74
75   <h3> Preparing the tube </h3>
76   <p>
77     Wind the lip balm all the way out, applying to your lips if
78     they're dry (this is really your last chance to do this, and it
79     helps you feel you got your $3 worth!).  Remove it, and then pop
80     off the base cap of the lip balm.
81   </p>
82
83   <hr>
84   <table>
85     <tr>
86       <td>
87   <h3> The bottom part: the spring </h3>
88   <p>
89     Use the snips to clip off all but the bottom few millimeters of
90     the central shaft which went through the balm.  Remove the spring
91     from the pen and cut it in half.  Strip one end of the hookup wire
92     and wrap it around the bottom of the spring: solder it in place.
93   </p>
94
95   <p>
96     Glue the spring into the truncated chap, and you should get
97     something like this:
98   </p>
99     </td>
100     <td>
101     <img src="bottom.jpg">
102     </td>
103   </tr>
104     </table>
105
106   <table>
107     <tr>
108       <td>
109   <h3>The top part: the holes</h3>
110   <p>
111     Bore three holes through the top of the lip balm container; use
112     one of the LEDs to check the sizing.
113   </p>
114     </td>
115     <td>
116     <img src="top-holes.jpg">
117     </td>
118   </tr>
119     </table>
120
121   <hr>
122   
123   <h3>The LEDs</h3>
124   <table>
125     <tr>
126       <td>
127   <p>
128     This is probably the trickiest part.  I put the three LEDs into
129     the top with the flat side of each one facing out: this puts the
130     long legs near each other on the inside.
131   </p>
132     </td>
133     <td>
134       <img src="top-with-leds.jpg">
135     </td>
136   </tr>
137     </table>
138
139   <table>
140     <tr>
141       <td>
142   <p>
143     Twist the inner legs into one big leg.  Be careful that as you're
144     twisting them they don't pull out of the holes.  Trim the
145     twisted-together legs and solder them together.  This will touch
146     the positive contact of the battery: you can place the other half
147     of the pen-spring around this if it makes it easier to get decent
148     contact (and doesn't short it out!).
149   </p>
150     </td>
151     <td>
152  <img src="LED-diag.png" title="LED diagram: long leg is positive, flat side is negative">
153      </td>
154   </tr>
155     </table>
156
157   <table>
158     <tr>
159       <td>
160   <p>
161     For the outer legs, I connected them together with two pieces of
162     hookup wire, then snipped the legs right down to stay out of the
163     way.
164   </p>
165     </td>
166     <td>
167     <img src="leds.jpg">
168      </td>
169   </tr>
170     </table>
171
172   <table>
173     <tr>
174       <td>
175   <p>
176     Finally, feed the wire from the bottom spring <em>through the
177     tube</em> and solder it onto the outer LEDs.
178   </p>
179     </td>
180       </tr>
181       <tr>
182     <td>
183   <img src="full-pen.jpg">
184      </td>
185   </tr>
186     </table>
187
188   <hr>
189
190   <h3>Finishing and Debugging</h3>
191
192   <table>
193     <tr>
194       <td>
195   <p>
196     Push (or glue) the bottom back onto the main tube, then push a
197     battery into the tube.  The flat (negative) end goes in first, and
198     the knobby (positive) end goes at the top.  You should then be
199     able to ease the cap on, making sure that the top of the battery
200     presses against the central twisted-together legs of the LEDs.
201   </p>
202     </td>
203     <td>
204   <img src="with-battery.jpg">
205      </td>
206   </tr>
207     </table>
208
209   <table>
210     <tr>
211       <td>
212   <p>
213     The easiest way to test is to look through a CCD camera: cell
214     phones tend to work well since they have cheap cameras which don't
215     filter out IR very well.  Note that you'll only see a light from
216     straight ahead, as the LEDs are very directional.  Also, the
217     battery should be fully charged: it gets quite dim quickly.
218   </p>
219     </td>
220     <td>
221   <img src="top-lit.jpg">
222      </td>
223   </tr>
224     </table>
225
226   <p>
227     That's it: you have a pen!  I found that taking the lid off
228     between games to try to save battery power had the opposite
229     effect: I suspect that momentary short-circuits as the top was
230     pulled off drained the battery quite quickly.  Some glue and
231     insulation might help here, but I was just happy that it worked at
232     all!
233   </p>
234   <hr>
235   Rusty Russell: rusty@rustcorp.com.au.
236 </body>
237 </html>