TinyProjector
Stefan Marti, MIT Media Lab
October 2000 – May 2002
The biggest challenge for designers of mobile communication devices is presenting large amounts of information on very small displays. As the form factor of these devices continues to get smaller and our demand for mobile information continues to grow, the task only gets more difficult.
The solution to this dilemma cannot simply consist of adapting design principles, like the desktop metaphor, to fit the limited real estate. Adding projection capabilities to the mobile device itself might pose a possible solution to this problem.
The basic idea of TinyProjector is to create the smallest possible character projector that can be either integrated into mobile device, or linked dynamically with wireless RF connections like serial low range transceivers.
After extensive research, and having explored many non-viable alternatives, a completely new prototype (number 9) was designed and built, making intensive use of 3D modeling CAD software and the 3D printer.
The overall design is radically simplified and miniaturized. Compared to all the earlier versions, which used laser diodes salvaged from cheap key chain laser pointers, the current prototype has smaller low-cost low-output laser diodes that allow for just one row of eight lasers instead of two interlinked rows of four lasers, making cumbersome primary deflection mirrors obsolete.
A micro motor with a single swiveling servo arm, making a continuous full 360-degree rotation, drives the deflection mirror, resulting in a 38-degree left-right sweep. This leads to an unusually high overall laser projection angle of 104 degrees.
All body parts of the prototype, including the critical lens assembly and mirror holder, were designed completely in CAD software, and then 3D printed in ABS plastic.
The system is now closed loop: an IR LED/photodiode combination signals the PIC chip when the mirror is at its origin, which enables a precise overlapping of the laser pulse sequences.
Compared to the earlier prototypes, a PIC chip with more memory (and EEPROM) is used in the current prototype, which allows storing character templates for the complete alphabet as well as some special characters.
A two-way serial port connection with both Palm PDAs and Java enabled cellphones is demonstrated. From either device, arbitrary text can be sent to the projector and is displayed; in addition to that, preset text lines stored on the projector itself can be triggered from these devices.
The current prototype is capable of displaying 8 characters, each consisting of an 8x5 pixel matrix. (However, tests have shown that the horizontal resolution can be easily increased by at least factor 10, and the vertical distance between the laser beams could be reduced by factor 2. In such a configuration, the prototype could project two to three times more characters than the current prototype.)
Very important, the projection refresh rate of the third prototype is increased to about 25Hz, which is significantly higher than the earlier prototypes that had a refresh rate of only about 3Hz, and therefore had to rely on the effect of persistence of vision. The projection of the current prototype appears stable, easy to read, and—after intensive debugging and mechanical tuning—almost jitter free. However, the overall brightness of projection is lower than of the projectors based on persistence of vision, due to the increased refresh rate. Furthermore, the amount of vibration has increased, which is due to the higher RPM of the micro motor, together with the inherent inertia of the stainless steel mirror. Nevertheless, the primary goal of TinyProjector prototype 9 was to make the projection "usable" and readable. This goal has been met.
In order to document this work, an extensive lab notebook has been written, including several hundreds of pictures, scans, screenshots, and movies.
|
|
Features |
Problems |
|
· 8 big key chain laser pointer laser diodes · Single row · Hold by single acrylic plate (laser cut) · Skyliner™ electronics · 8-faced mirror, continuously rotating |
· System not closed loop: synchronizing motor speed with laser pulses not possible · Mirror way too bulky for mobile use · Alignment of laser diodes virtually impossible, since the laser diode capsules are imprecise |
|
|
· 8 big laser diodes · Two parallel rows, interlaced · Hold by two parallel acrylic plates (laser cut) · 8 secondary mirrors for laser beam alignment, mounted on U wires · Left-right sweeping mirror, driven by commercial RC servo, controlled by PWM signal created by PIC · Custom electronics (including small PIC controller 16F84) · Very high brightness and visibility of projection, even on black backgrounds |
· Relies on persistence of vision principle, so only very low refresh rate (3Hz) · Relatively noisy · Still too big for mobile use |
|
|
Features |
Problems |
|
· 8 big laser diodes · Two parallel rows, interlaced · Hold by two parallel acrylic plates · 8 secondary mirrors for laser beam alignment · Custom electronics (16F84 PIC) · Add-on mirror assembly (3D printed) · Continuously rotating, two-faced mirror (single stainless steel strip, no continuous axle), held with 3D printed parts on each end · Driven by 6mm motor · Closed-loop system with IR LED and photodiode |
· Mirror not turning lightly enough: the stainless steel strip by itself was not rigid enough, because there was no continuous axle · Laser diodes not bright enough for the low duty cycle of 360-degrees continuously rotating mirror: with a projection angle of 60 degrees, only about 8% of the time the lasers are actually on |
|
|
|
· 8 smaller laser diodes (Lumex or Honeywell) · Mirror made of two strips of stainless steel and centered axle (all the way through) · Continuously rotating mirror · Belt driven via pulleys and by 6mm motor · Compact size (no secondary mirrors, motor is parallel to laser array) · Diodes mounted via their contact wires, for easy alignment |
· Gear box difficult to align: if belt tension too high, then friction too high; if tension too low, the belt jumps out of the pulleys easily · My laser diodes not bright enough for such low duty cycle of rotating mirror |
|
|
Features |
Problems |
|
· 8 Lumex laser diodes · Single row, very compact, very rugged · Diodes and lenses mounted directly on 3D printed holder |
· Holder not precise enough, due to limitations of 3D printing head · Alignment calibration not possible, and very much necessary! |
|
|
· Continuously rotating, very light going mirror assembly; virtually NO vibration! · Mirror made of single axle (centered) and 2 strips of stainless steel, very rigid · Direct driven by 6mm pager motor |
· My laser diodes not bright enough for such low duty cycle of rotating mirror |
|
|
Features |
Problems |
|
|
· Left-right sweeping mirror · Mounted on simple scotch tape hinge · Driven via one-arm crank (ABS) on a 6mm motor · Closed-loop system with IR LED and photodiode |
· Modest vibrations · With ABS crank arm very jittery projection trajectory of the laser beams |
||
|
· Left-right sweeping mirror · Mounted on simple scotch tape hinge · Driven via one-arm crank (ABS) on a 11mm diameter motor · Very high refresh rate possible! |
· Noisy · Strong vibrations · Relatively big |
||
|
|
Features |
Problems |
|
· 8 Lumex laser diodes · Single, compact row · Separately 3D printed holder for lenses and diodes · Diodes mounted with U shaped double wires · Sweeping mirror (single strip stainless steel), mounted on single axle at one edge of strip · Driven via one-arm crank (aluminum) and 6mm pager motor · Closed-loop system with IR LED and photodiode · Refresh rate 25Hz · Bigger PIC (16F877) with enough memory to display all characters · Serial connection · Can be connected to Palm Pilot™ or Java enabled cellphone |
· Fragile, since all laser mountings (double wires), as well as the motor crank, are mechanically exposed
|
|
|
· Like prototype 9, but with complete housing, protecting the laser mountings and the motor crank
|
|
The basic idea is to build a small portable character projector, based on inexpensive laser diodes, that is able to project a single line of text onto nearby walls, tables, and other surfaces. This would be useful for projecting text from portable and wearable devices, e.g., cellphones, PocketPCs, etc., that are connected via serial port (wireless) or Bluetooth.
|
|
|
|
|
|
|
Figure 1: First design sketches for TinyProjector, developed in October 2000 for a MIT Media Lab class. It was conceived as the output module of an interface to an intelligent single-point remote control for all home appliances. The underlying metaphor is a "magic lamp" that is home of a genie. The projection would appear out of the top of an old oil lamp when the user rubs the lamp, symbolizing the friendly ghost that can control all home appliances. |
|
One of the major user interface design challenges for mobile communication devices is that the devices should be as small as possible, but still have a display as big as possible. There has been a lot of work done in the field of small displays, and whether or not big-screen user interface metaphors like the desktop can be adapted to the limited display real estate.
One solution for the dilemma would be look-through devices like Invisio’s eCase (http://www.inviso.com/ecase.html). However, they are only one-person displays: only a single person can see the content.
It looks like another, radically simple solution to this problem, might have been mostly overlooked: One does not have to accept small displays on even smaller devices if projection capabilities are added to the mobile communication device itself. The basic idea of the TinyProjector is to create a as small as possible character projector which can be either integrated in a mobile device, or linked dynamically with wireless RF connections like Bluetooth or serial low range transceivers.
I suggest two steps for the realization:
Step 1: Testing the idea by replacing the 8 LEDs of a Skyliner™ toy with 8 laser diodes of small key chain laser pointers.
The Skyliner™ (http://www.theskyliner.com) is a little gadget, approximately the same shape as, and a bit larger than a New Year's noisemaker. It runs on two AAA batteries. There is a row of 8 red LEDs on the end. Three buttons located near the handle allows the user to change to any of 10 pre-set messages, or create up to three new ones. One holds the thing over the head and whirls it about by its handle, and messages, spelled out in red LEDs, appear “magically” in mid-air.
|
|
|
|
Figure 2: Skyliner™ toy |
|
By replacing the LEDs with laser diodes, and adding a turning mirror in front of the laser beams, the device should project the messages (pre-set or programmed), onto nearby walls or tabletops.
|
|
|
|
Figure 3: Key chain laser pointer (left), laser diodes (right) |
|
The laser pointers would be powered via a transistor and a separate 3V power source. A rotating mirror would project the laser beams (theoretically) 360 degrees onto the walls (Figure 4).
|
|
|
|
Figure 4: Array of eight laser pointer diodes, arranged in one row, and a rotating mirror with two surfaces. |
|
To make the projector more compact, an additional set of secondary mirrors would allow bringing the laser beams closer to each other (Figure 5).
|
|
|
|
Figure 5: Array of eight diodes, arranged in two rows, with secondary mirror. |
|
Step 2: Replace the Skyliner™ electronics with a PIC chip that drives the laser pointers directly.
The PIC chip would receive the text to project as serial data, perhaps wirelessly from serial low range transceivers (Abacom, Linx) or Bluetooth chipset. The PIC needs at least one leg (input) per laser diode (8), and possibly other inputs for adjusting the scan frequency as well as synchronization of refresh rate with mirror rotation. Hopefully PICs like the 16F84 that can power the laser diodes directly (can provide enough current and voltage), making transistors obsolete.
|
|
|
|
|
Figure 6: Abacom/Linx low range RF transmitter/receivers (left, middle), PIC chip 16F84 |
||
After looking for laser pointers and laser modules for some time, I found a few cheap key chain laser pointers to play around (Figure 7).
|
|
Figure 7: Cheap key chain laser pointers, sold in many retail and department stores as toys. The price was about $20 originally, but came down to about $5. |
I disassembled them by cutting off the outside aluminum tube, and extracted the laser diodes, including lens (Figure 8).
|
|
|
|
Figure 8: From these key chain laser pointers, the laser diodes are extracted.
|
|
I opened a Skyliner™ toy, and extracted the circuit board. Vadim (vadim@ml.media.mit.edu) helped me to connect the electronics of the Skyliner™ to a laser diode. First we tried to connect it directly, but the voltage was not high enough: the Skyliner™ works with 2 AA cells, so 3V. The laser pointer diodes I have need 4.5V.
Then Vadim helped me design a circuit (Figure 9, Figure 10) which uses the output of the LED wires to switch an external voltage on and off, with the help of transistors.
|
|
|
Figure 9: Circuit sketch for laser pointer diode, switched by the output of the LED via a PNP transistor |
|
|
|
Figure 10: Breadboard with Skyliner™ electronics (green circuit board), transistors, and battery packs |
Meeting with Chris: showed him the current prototype that I made yesterday, with some laser diodes mounted on a cardboard casing. The interfacing between the Skyliner™ board and the laser pointer works properly, but the alignment of the laser beams is very bad, and the projection of the Skyliner™ is not visible.
Designed two holders for the 8 laser pointers (Figure 11) on Corel 9: one with eight holes in a row, one with two rows each 4 holes. Laser cut them with 1/8-inch acrylic (100% power, 6% speed). The single row acrylic piece is going to become TinyProjector prototype 1; the two-row acrylic piece will be used later for TinyProjector prototype 2.
|
|
|
|
Figure 11: Acrylic holders for eight laser diodes; one row (left), two rows (right) |
|
With the laser diodes inserted in the holes of these acrylic pieces, the alignment of the laser beams is better, but still not good enough for a readable projection. Eric Varady (evarady@media.mit.edu, Jacky Mallet's UROP in the Garden) told me that he could help me cut threads, so that the diodes could be screwed in (the diodes come with external threads). He also told me that he could help me cut the thin mirror I have. I tried to cut one piece of the mirror myself manually, but it broke off. I made an axle for the mirror with two paper clips, and tested it quickly. It doesn't look very good: the alignment of the laser beams has to be much better.
The laser diodes from the key chain laser pointers are rather fragile: the 8th laser diode never worked, the 7th (the one we started using with Vadim) has gotten very faint.
I continued the Web search for smaller laser diode modules. The smallest ones (6.4mm diameter x17.25mm long) are very expensive, though ($75), compared to the price of a cheap key chain laser pointer (between $5 and $15)
|
|
Figure 12: Small laser diode |
Laser diode modules:
Did some Web search about prisms that could replace the little mirrors. There are penta prisms for precise 90-degree angle deviation. They would do the job, but they seem to be expensive, and probably over-sophisticated, since we don't need the non-reversing and non-inverting feature.
|
|
|
|
Figure 13: Penta prism |
|
Penta prisms:
However, after experimenting with flexible mirrors (foil based), it became clear that the mirrors have to be of very high quality so that they do not diffract and diffuse the laser beams too much. Therefore, it has to be either good quality mirrors, or prisms.
Tried to get another Skyliner™ at Toys'R'Us: they don't have it anymore. It seems to be available only online, e.g.:
Meeting with Chris: showed him the laser cut pieces made of acrylic that hold the 8 pointers: one where the 8 pointers are in a row, one where they are in two rows of 4.
Eric helped me looking for a tool that cuts threads into the acrylic so that the pointers are more aligned. Neither the Media Lab nor the MIT shop had metric ones with the right pitch. We decided that gluing is the only solution, but not to a single acrylic piece: I will glue each laser pointers separately to small acrylic pieces, and then screwing these pieces to a larger frame. So if one diode breaks, it can be removed from the whole and replaced with a working one.
Eric emailed his friend Josh who has more key chain laser pointers like I have. Josh said that he has only weak ones left. But that would be fine with me, just for testing.
I tried to get more laser pointers from Josh Korn (jkorn@MIT.EDU): he had 4 with him, and I told him that I would take 10.
I won an auction on eBay for more laser pointers. They were more expensive than I expected, but still dirt cheap compared to commercial 6mm diodes that cost between $70 and $140 a piece.
Replaced three defective diodes with new ones.
After long brainstorming with Kimiko, I decided to use a hot glue gun to attach the diodes. The advantage of hot glue over epoxy resin is that hot glue can be melted afterwards to adjust the diodes. So I glued all diodes to the acrylic holder (8 diodes in a row) (Figure 14) and calibrated them with a template on the wall, about 1.5 meters away. The calibration is not perfect, just as good as possible: it is very tricky.
|
|
Figure 14: TinyProjector prototype 1 |
Problem: Projection is not readable. Possible reasons:
(1) Getting the rotation speed of the mirror right is very tricky: if it is too slow, the human eye doesn't integrate the dots into a 2D matrix. If it is too fast, the dots become lines.
(2) Even if the right speed could be achieved, the "dead time" (inverse of duty cycle) of a full turning mirror with one or even two surface is large. E.g., if the desired projection angle is 60 degrees, then the lasers are unusable for 83% of the time! Therefore, it is not clear if a rotating mirror with one or two reflecting surfaces would work at all, without synchronizing the repetition rate with the mirror’s rotation speed.
(3) Writing is mirrored on the wall, if the Skyliner™ board is used without modification.
Possible solutions
(1) Use a dedicated PIC chip, and increase the blinking speed remarkably (reduce the time per dot). Or even better, make it adjustable: potentiometer on one A/D input of the PIC.
(2) Synchronize the rotating mirror with the character repetition rate of the lasers, possibly with a photo diode and an LED behind a hole in a wheel mounted on the mirror.
(3) Instead of one (or two) reflecting surfaces, provide three or four or even more, perhaps mounted on the outside of a tube. Like that, the dead time of the lasers would be reduced by the factor equal to the amount of surfaces per 360 degrees. Downside: the rotating element gets big.
(4) Instead of a 360-degree rotating mirror, use a mirror that does a left-right sweeping movement of, e.g., 45 degrees. Obviously, it has to be synchronized with the lasers (forward and backward writing). This is mechanically difficult, and would probably create vibration problems.
Determined the formula for calculating the projection angle given the amount of mirrors on a 360-degree tube.
Variables:
n = number of mirror surfaces per 360 degrees
p = projection angle
r = rotation speed of the mirror assembly, in Hz, for an estimated refresh rate of 4Hz
Equations:
![]()
![]()
Table 1: Number of mirrors vs. projection angles and rotation speed (Hz and rpm)
|
Mirror surfaces |
Projection angle |
Rotation Speed (Hz) |
Rotation Speed (rpm) |
|
2 |
360 |
4 Hz |
240 rpm |
|
3 |
240 |
2.7 Hz |
162 rpm |
|
4 |
180 |
2 Hz |
120 rpm |
|
5 |
144 |
1.6 Hz |
96 rpm |
|
8 |
90 |
1 Hz |
60 rpm |
|
10 |
72 |
0.8 Hz |
48 rpm |
|
12 |
60 |
0.4 Hz |
24 rpm |
|
|
|
|
|
|
|
|
|
Figure 15: Four mirror surfaces per 360 degrees (left), five mirrors (middle), eight mirrors (right) |
||
However, several issues have to be mentioned:
Issue 1:
Given an estimated optimal refresh rate of 4 Hz (four sweeps per second) of the original Skyliner™ toy, the rotation speed of a cylinder will be low, which would require a high-reduction gearbox for the motor. Of course a higher refresh/sweep rate would be better, but then the laser pulse time per dot has to be reduced remarkably. The question is how short the laser pulses can be, given the PIC and the transistors.
Issue 2:
If the beams point to the center of the rotating mirrors (more precisely: to the axis of the tube inside the mirrors), the laser diodes themselves will obstruct part of the projection. Therefore, the projection axis of the laser beams has to be displaced by a few millimeters to one side, away from the center of the rotating mirrors, so that the mirrors deflect the beams to the side, e.g., for about 90 degrees (see Figure 16).
Issue 3:
The biggest disadvantage of having eight or more reflecting surfaces is that the rotating mirror assembly gets bulky. (This issue will turn out to be the main reason to abandon the multiple surfaces mirror design.)
|
|
|
|
Figure 16: Eight-faced mirror with a linear laser array of 8 lasers, slightly displaced |
|
In order to test the design hypotheses, I am making two 8-sided mirrors, with stainless steel strips (1/2 inch wide), and a Styrofoam core (see Figure 17).
I tested many glue types (rubber cement, white glue, plastic two component, epoxy two component) to see how to glue the mirrors to the Styrofoam: epoxy resin works best.
I completed the 8-faced rotating mirror pillar, and added a motor (with 9V battery and on/off switch) by Lego. Works much better than by hand, but the projection is still not readable.
Possible reasons for the bad projection:
|
|
|
Figure 17: First prototype with 8-faced mirror with Lego motor. |
The above limitations are severe. After having seen the prototype in action, I decide to change the design completely.
The next prototype I will design with a mirror that moves from left to right and back, driven by a servo. The advantage is having a smaller mirror, while still having a full 100% duty cycle of the laser beams.
|
|
|
|
Figure 18: Linear array of 8 laser diodes, with single surface mirror mounted on a central axle |
|
However, such a construction has the following issues:
A simple implementation of such a back-and-forth movement could use a micro servo, like the WES2.4 or the Hitec HS-50 (Figure 19). The servo could be controlled directly by a PWM generated by the PIC chip (which is relatively trivial). The advantage would be that the positioning of the mirror could be controlled very accurately, and as a consequence also the rotation speed.
|
|
|
|
Figure 19: WES-2.4 servo (left), Hitec HS-50 (right) |
|
Furthermore, synchronizing the mirror with the laser pulses is doable, because the PIC chip that generates the pulses also defines the position of the mirror.
The downside of using a servo is that it is relatively noisy and power hungry (100mA). In addition, the maximum sweep time (left to right, 60 degrees) of these servos is 0.2 sec (WES) and 0.09 sec (Hitec). The sweep time of the mirror however could be increased easily by gearing up the connection between the servo and the mirror, e.g., by using only 30 degrees (or less) of the servo deflection to rotate the mirror 90 degrees. This will work if the forces involved in turning the mirror are very small, which requires a very light going hinge of some kind.
In addition to having a left-right sweeping mirror, the next prototype will have another improvement: it will be much smaller. In the current prototype, the overall length of the assembly is given by the linear array of 8 lasers, which in turn is given by the diameter of the laser diodes.
Since I do not have access to a miniature commercial laser array (e.g., Honeywell), the outer diameter of my laser diodes dictates the minimum length of the array. With a casing that has a diameter of 11 mm, the minimum length will be 88mm. However, the laser beams could have been closer to each other, since the diameter of the beams is only about 3mm.
Therefore, in order to reduce the overall width, I intend to build a holder for two rows of four lasers, where the two rows are slightly offset. To align them, small secondary mirrors are necessary. Like that, the two rows of laser beams get directed to the main mirror (left-right sweeping) as a single row (Figure 20, Figure 21).
|
|
|
Figure 20: Design with two rows of 4 laser diodes |
|
|
|
Figure 21: The two rows are set off by about 6mm, and therefore need a set of secondary mirrors (on the left side) to align the laser beams to a single row, which will then hit the main mirror (right side). |
I need the small secondary mirrors to align the planes of the two rows of lasers. Therefore, I bought many different kinds of tiny mirrors, beads and stainless steel strips, at the Pearl Arts and Crafts store in Cambridge.
I conducted several tests of how to assemble small mirrors, made of stainless steel strips and paperclip wire, for the 90-degree deflection of the two-row laser pointer assembly.
I worked on the TinyProjector prototype 2: I cut some Acrylic parts on the lasercutter (lower part, containing servo), manufactured eight miniature mirrors, made of stainless steel and paper clips, and glued everything together with epoxy resin (Figure 22).
|
|
|
|
|
|
Figure 22: Assembly with two rows of 4 mirrors
|
|
I borrowed a PIC programmer (Figure 23) from Bakhtiar Mikhak (mikhak@media.mit.edu), and a serial cable that works with it from the Borglab.
|
|
Figure 23: PIC programmer
|
I have programmed PICs many times before already: for my Free Flying Micro Platform project, I used several PICs, some for creating the PWM signal to the RC handset, some for reading the two analog signals of the micro compass and creating a heading angle, and then transmitting this angle over the serial wired port, both wired and with a transceiver. But that is already some years ago, so I had to refresh my memory.
PIC programming tutorials:
In order to control a servo, I need to create the right pulse width modulation (PWM) with the PIC.
· http://www.inchlab.com/2servo_interface.htm
First try for pseudo code for the PIC controller (no serial input):
Message = (T, H, I, S, _, I, S, _, A, _, T, E, S, T)
For all characters of message:
set servo PWM to minimum (servo goes to full left position)
look up character pattern, blink lasers for 5 time slots each
For all characters of message:
set servo PWM to max (servo goes to full right position)
look up character pattern, blink lasers in reverse for 5 time slots
Code for PIC: with serial input
- Read char
if char is sync char (0xFF)
for 30 characters:
read char
More useful information about writing PIC code:
· http://www.ccsinfo.com/v3.txt
· http://www.ccsinfo.com/overview.html
Then I soldered the diodes to the multi-line cord (Figure 24), calibrated the mirrors, and set up the second breadboard.
|
|
|
|
Figure 24: TinyProjector prototype 2: Lower part of laser diode holder. The diodes had to be inserted before soldering them to the multi-line cord. Visible is also the gray foam layer for reducing vibration sensitivity, as well as white tape to isolate the casings of the diodes from each other (see isolation problem, October 7, 2001). |
|
I solved code bugs: calibration, length of signals (pulse, spaces between pulses, space between characters, number of characters, servo elevation)
Hardware problem: The servo PWM getting jammed if PIC turns on more than 4 laser pointers. Solution: it needs 1K resistors between the B pins and the transistors. (Many thanks to Matt Reynolds, matt@media.mit.edu!)
Isolation problem: Laser 5 and 7 always were lighting up simultaneously—they couldn’t be controlled independently. After a long time, I found out that this is because the metal shells are connected to the positive tab of the diode, and the two diodes were touching each other. So current to one laser turned on the other, too. I took the whole assembly apart and isolated the shells of the diodes. (Again, many thanks to Matt Reynolds who mentioned this fact to me actually much earlier—I just forgot about it.)
|
|
|
Figure 25: Final circuit design of TinyProjector prototype 2, with additional 1KOhm resistor between the transistors and the PIC |
Character set
To create the character fonts, I first thought I would be able to find them on the Web. Here are some related sites about character set fonts (5x8, 5x7):
Eventually, however, I ended up designing my own fonts. I was using a grid printed on a paper, then drew a big character on top of that, and then extracted the dots that are necessary to display the character (Figure 26).
|
|
Figure 26: Font template for a 10x8 (high resolution) character "N". For the actual projection, see Figure 28) |
[Note: I didn't sleep that night, went home Monday morning at 9:30am and slept Monday 10am - 2pm.]
I tried to set up a serial connection to the Palm Pilot. It didn't work, even after inserting resistors into RS232 pins on PIC.
C code for TinyProjector prototype2
Since the serial connection did not work at this time, I made the projector go through a sequence of a few different projections (Figure 27).
|
#include <16F84.h> #fuses HS,NOWDT,NOPROTECT,PUT #use Delay(Clock=10000000) #use fast_io(A) #use fast_io(B) #use RS232(Baud=38400,Xmit=PIN_A1,Rcv=PIN_A0,parity=n,bits=8) #byte PORTA = 5 #byte PORTB = 6 #define SERVO PIN_A2
int v; char char1 = 's';
void delay_10us(int i) { do {delay_us(10); } while(--i); }
// character projection routines void project_A(int forward) { for (v=0; v<5; v++) { if ((v==0)||(v==4)) { PORTB = 0b00000001; } if ((v==1)||(v==2)||(v==3)) { PORTB = 0b11101110; } delay_us(1100); PORTB = 0xFF; delay_us(1000); } }
void project_C(int forward) { if (forward==1) { for (v=0; v<5; v++) { if (v==0) { PORTB = 0b10000001; } if ((v==1)||(v==2)||(v==3)) { PORTB = 0b01111110; } if (v==4) { PORTB = 0b10111101; } delay_us(1300); PORTB = 0xFF; delay_us(1000); } }else{ for (v=0; v<5; v++) { if (v==0) { PORTB = 0b10111101; } if ((v==1)||(v==2)||(v==3)) { PORTB = 0b01111110; } if (v==4) { PORTB = 0b10000001; } delay_us(1300); PORTB = 0xFF; delay_us(1000); } } }
void project_O(int forward) { for (v=0; v<5; v++) { if ((v==0)||(v==4)) { PORTB = 0b10000001; } if ((v==1)||(v==2)||(v==3)) { PORTB = 0b01111110; } delay_us(1100); PORTB = 0xFF; delay_us(1000); } |