Raspberry Pi Hat for TI LightCrafter Display DLP2000

Raspberry pi hat for the texas instrument DLP LightCrafter Display 2000 Evaluation Module ( DLPDLCR2000EVM )
2022-10

Source files : https://github.com/intellar/dlpdlcr2000evm

This project objective was to create a prototype of a compact autonomous projector using the raspberry pi computer. It was done using a raspberry pi 4b and the DLPDLCR2000EVM. The total cost of the setup was below 150$, including the pi, the projector and a custom pcb. 

Hardware:
Raspberry pi 4b ( https://www.raspberrypi.com/products/raspberry-pi-4-model-b/ )  retro-compatible with previous version
DLPDLCR2000EVM  ( https://www.ti.com/tool/DLPDLCR2000EVM )
Power supply (5V, 3.5A  , in this case I used the argon one 5.25v 3.5A)

Software

Raspberry os 11 image 2023-05-03 bulleye  32bit


Quick note, when the project was developped, custom pcb were made in small quantity. I ordered more pcbs in case the first one was faulty. Apparently, this was not neccessary! There are still some left that can be sold.  

2023-10-01:
5+pcb units ready to ship.
25$usd/unit+shipping.   shipping from canada, starting at 10usd. International shipping usually is 15$usd, and can go up to 45$usd with tracking. You are in charge of any custom fee.
For a quote, contact intellar@intellar.ca

**If you want to see more blogs and want to support this initiative, Intellar accepts paypal contributions, intellar@intellar.ca
Every contribution will be used to maintain and improve Intellar, supporting with purchase of hardware and equipment for new educational projects, new prototype developments and experiments.

The custom pcb was required to link the raspberry pi to the evm2000. Actually, I first made a proof of concept using jumper wire and a 3d printed support. It did not work reliably and was very sensitive to manipulation.  The images were corrupted most of the time. Jumper wires are not adapted for high speed communication. 

The proof of concept shown here was made of a raspberry pi (bottom) with the evm2000 placed over (top), and connected with jumper wires. The boards are mounted on a printed PLA support. The projected images were corrupted most of the time. Clearly, a robust and reliable connection was needed.

This support was designed with freecad. If of interest, the 3D model for 3d printing can be downloaded here

RaspberryPi4b-EVM2000support

The pcb act as a serial bus interface, allowing the raspberry pi to send images in RGB666 format reliably to the evm2000 on the parallel port. It is also possible to control and configure the evm2000 with the remaining bit over I2C port. It can support high framerate, similar to HDMI. The raspberry pi bus allows 32 bits to be streamed, so it could have been possible to stream full depth images in RBG888 format, but compromising the possibility to configure the evm. With the remaining bits left, it is possible to modify parameters of the evm, including the three color channel power, and to freeze the current image buffer by sending direct command to the evm2000 display controller. A schematic drawing of the board is shown next. I also beefed up the power wire so the board could be use to power the dlp from the raspi. 

The schematics of the pcb used as rpi hat was designed with easyeda.

For the pcb fabrication, there was  a no femal pin headers available with the right length at the moment of ordering, so a longer header was used, leaving two rows unused. On the pcb itself, there are intructions in the form of a white rectangle, text and drawing to indicate where to connect the evm2000. It must be inserted on the left, with the ellongated corner top left. The board and final prototype is shown on the next image set. The red wire one top of the evm2000 is used to provide power from the rpi. 

Enabling the evm2000 is relatively straightforward when it is linked to the rpi with the pcb. It is important to use a sufficient power supply to power both devices. Here we used a 3.5A usb-c  power supply connected to the rpi. This single connection was able to supply both, the rpi and the evm2000 when adding a jumper wire between the boards. The rpi need to know the timing and image resolution of the dlp. From the documentation of TI,  the DLP is a nHD with native resolution of 640x360. This is accomplished by adding a new dtoverlay vc4-kms-dpi-generic in the /boot/config.txt file of the pi. The overlay vc4-kms-v3d must be initialized before adding the generic, so I added the configuration line at the end of the file.  Use the command from cmd line:  

sudo nano /boot/config.txt

Be sure to activate i2c in the interface section of raspi-config. Note that we are doing most of the editing by logging over ssh on the pi, using putty. Be sure to also activate ssh in the interface section of raspi-config.  There are too many parameters to fit on a single line 60char limit, it is important to add the paramters on the line after. 

An even more important point, make sure there are no spaces between the parameters

We added the lines to the file as follow: 

/boot/config.txt

     

dtoverlay=vc4-kms-dpi-generic,clock-frequency=25000000

dtparam=hactive=640,hfp=14,hsync=4,hbp=12

dtparam=vactive=360,vfp=2,vsync=3,vbp=9

 

#using custom board dlp v0.1  for details, intellar.ca

dtoverlay=i2c-gpio,i2c_gpio_sda=23,i2c_gpio_scl=24,i2c_gpio_delay_us=2, bus=1

 

The timings for the horizontal front porch, back proch, hsync, are given in the documentation of the TI beagle board project. They used the dpi_output_format=458773, witch is a bit configuration that can be decomposed using the python script output_format.py. given on our github repo. The output is shown on the figure blow, on the left.

The last two lines will add the dtoverlay i2c-gpio. It is needed to tell the pi which pins to used for i2c communication the the dlp. The pins are hardware related to the custom pcb board.  

The bus=x tels which i2c bus to use.  To know which bus to use on your device,  use the command i2cdetect -l. Finding the right bus can be a real pain, and in our case it was the i2c-1.   Dont forget to enable i2c communication in raspi-config tool,  calling "sudo raspi-config" from the console. Here is an example of listing we get, below on the right:

To support older raspberry pi os, I include the deprecated initialisation of the display using the dtoverlay dpi18. Using this overlay, the configuration is done with dpi_output_format by again the file /boot/config.txt  . The following lines are added to /boot/config.txt

# Additional overlays and parameters are documented
  # /boot/firmware/overlays/README

dtoverlay=dpi18

overscan_left=0

overscan_right=0

overscan_top=0

overscan_bottom=0

framebuffer_width=640

framebuffer_height=360

enable_dpi_lcd=1

display_default_lcd=0

dpi_group=2

dpi_mode=87

dpi_output_format=458773

hdmi_timings=640 0 14 4 12 360 0 2 3 9 0 0 0 60 0 13824000 3  

#config i2c to use pins 23,24 for communication with dlp hat

dtoverlay=i2c-gpio,i2c_gpio_sda=23,i2c_gpio_scl=24,i2c_gpio_delay_us=2,bus=1

see https://www.raspberrypi.com/documentation/computers/config_txt.html for all details.

But I recommand using the bullseye raspberry pi os with the dtoverlay vc4-kms-vdpi-generic. With the dtoverlay added, the configuration is done, but the dlp is not enabled. You need to send two commands to the dlp, using i2cset.  The first one set the input/output resolution to nHD 640x360 landscape. The next one tells the dlp to be in parallel mode. Replace the i2cset -y 1 with your i2c bus. After rebooting, the projector should switch from it default splash screen to show the command line, or the desktop. 

[...]
# By default this script does nothing.
  sudo i2cset -y 1 0x1b 0x0c 0x00 0x00 0x00 0x1B i
  sudo i2cset -y 1 0x1b 0x0b 0x00 0x00 0x00 0x00 i
  # Print the IP address
[...]

To avoid configuring the raspi to use the projector manually after each boot, you need to edit the file /etc/rc.local  (easier using the command from cmd line:  sudo nano /etc/rc.local ), and add the lines  before the exit 0

The other configurations are given on the TI web page, https://www.ti.com/lit/ds/symlink/dlp2000.pdf?ts=1697504327147 . Here is the interesting part of the pdf in case you wanted to change the resolution. It must also be changed in the /boot/config.txt file 

With the custom pcb board, we can send i2c command to configure of the evm2000 on the fly, such as the intensity of each channel, freeze image, disabled, hidden debug images stored on the memory, etc.  Every command of the DLPC2607 is supported, see the following link for more details:
https://www.ti.com/product/DLPC2607
This will is also be covered in a other intellar blog.

Be sure you use a power supply with enough umpff to power both devices, if you use the jumper cable to connect the power to the projector instead of its own supply. In the case of insufficient power, the raspi will be stuck in a reboot loop, as shown in the following video.  In this project, I used a budget 18w power supply, argon one, from amazon, it does the job.

Connect the projector power pin to the power from the pi show in red. The pcb links the raspi 5v directly to that pin. fi you do this, the projector is powered by the raspi. ensure you have a power supply with enough power.