Build a Pi Zero W pocket projector! // Project

Ever wanted a really small and cheap projector that can fit in your pocket? Here’s a quick project to make a Raspberry Pi Zero W based pocket projector.

Or check out the video on YouTube.


DMD technology

If you saw one of my previous mailbag videos, you would have seen me un-box a DLP2000 evaluation module from Texas Instruments.This uses the DLP2000 Digital Micro-mirror Device, which does pretty much what the acronym says.Thousands of tiny mirrors are placed on the surface of a silicon wafer and can be adjusted from plus 10 to minus 12 degrees, allowing light to be fully reflected out through the lens or directed into a heat-sink.Brightness levels are controlled by Pulse Width Modulating the state of the mirror between on and off. These mirrors can be moved extremely fast, which is important because of the way colour is produced.

The DMD will continuously alternate a red, green and blue colour filter in front of the light source and the mirrors will be moved to adjust the intensity of each colour. Either on, off or somewhere in-between using PWM.So, there are, of course, pros and cons with this method.

One of the pros is that it’s a relatively cheap way of making a projector. Cheaper than traditional LCD methods.And since there’s no light loss due to polarization filters as you find in LCD projectors, you can get away with a much smaller light source.

EDIT: The following bit is actually incorrect!

The downside is that the resolution isn’t scalable.

That is: the higher the resolution, the faster the colour filters have to change to be able to maintain an adequate video refresh rate. The faster the colour filters change, the less time that is available for each mirror to adjust brightness levels, therefore reducing colour depth. However, for the price it does a pretty decent job.

For another explanation of how DMDs work, then check out the excellent video from Applied Science.


Wiring up a Pi

The evaluation board will set you back US$99, but unfortunately is only designed for the BeagleBone. You can use other SBCs, such as a Raspberry Pi, but you’ll have to resort to a big ol’ mess of wires.First I’ll show you how to connect up a Raspberry Pi to the DLP2000, then I’ll give you a much better option.

Wiring it all up is straightforward… Ahem…

Once you have it in this state apply power to the Pi, which will also power the DLP2000. I’m assuming you have a running Pi already. If you don’t, then check out my Pi setup videos.

Once booted, login to your Pi and you’ll need to edit two files.

The first is the /boot/config.txt file. Add the following to the end.

# Added to support DLP2000
dtoverlay=i2c-gpio,i2c_gpio_sda=23,i2c_gpio_scl=24,i2c_gpio_delay_us=2

dtoverlay=dpi18
overscan_left=0
overscan_right=0
overscan_top=0
overscan_bottom=0
framebuffer_width=854
framebuffer_height=480
enable_dpi_lcd=1
display_default_lcd=1
dpi_group=2
dpi_mode=87

dpi_output_format=458773
hdmi_timings=854 0 14 4 12 480 0 2 3 9 0 0 0 60 0 32000000 3

What this does, is to change the I2C interface to other pins so that they don’t clash with the LCD GPIOs, which are configured using the DPI18 Device Tree overlay. The rest of the lines are options specific to this particular display.

Next you need to edit /etc/rc.local and add these lines.

 i2cset -y 3 0x1b 0x0c 0x00 0x00 0x00 0x13 i
 i2cset -y 3 0x1b 0x0b 0x00 0x00 0x00 0x00 i

This will configure the DLP2000 to use the Raspberry Pi GPIO lines for the display instead of the default splash screen.

If you haven’t already enabled I2C on your Pi, you can run raspi-config to do this.Then reboot the Pi and you’re done! Easy!

Except for the big ol’ mess of wires…