This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/DLPDLCR2000EVM: Control brightness

Part Number: DLPDLCR2000EVM

Tool/software: Linux

I have connected a DLPDLCR2000EVM - DLP® LightCrafter ™ Display 2000 Evaluation Board to a Raspberry Pi. I use the project www.mickmake.com/.../build-a-pi-zero-w-pocket-projector-project
That works well. I would like to set the projector darker to build a night clock in the bedroom. The DLP I can control over I2C. For example, i2cset -y 3 0x1b 0x0f 0x00 0x00 0x00 0x00 i Flip the picture Z.B. i2cset -y 3 0x1b 0x0f 0x00 0x00 0x00 0x01 i normal again.
But I do not understand how I can control the brightness of the 3 LEDs. Can someone write an example?
   
Many Thanks

  • Olaf,

    Welcome to the E2E forums, and thanks for your interest in our DLP technology.

    Brightness adjustment requires a series of compound I2C commands to execute. To facilitate use of these commands, we have provided some sample scripts on a Github repository that implements basic system functions in Python:
    github.com/.../DLPDLCR2000

    I recommend you refer to these libraries for assistance. In particular, look at the LEDSet.py and LEDTest.py scripts.

    I hope this helps.

    Best Regards,
    Philippe Dollo
  • Thank you for your prompt reply.
    I looked at the Python programs. Unfortunately, these do not work because my Raspberry uses other I2C addresses than the Beagleboard. I do not know yet well with Python, so that with the many lines program does not help at first. Is not that easier to explain?

    Best Regards
    Olaf Hoyer
    Germany
  • Hi, seems like great minds think alike .. I too am using my DLP with a raspberry pi (using MickMakes tindie board) to project onto the ceiling

    To get the DLP python code to work I had to make a change to the file i2c.py, this is because the i2c bus on the rPi is bus 3 and not 2 as it is on the Beaglebone.

    the relevant declaration is 
       DEFAULT_I2C_BUS = 3

    I'm not python literate, so I changed it in both of my copies of i2c.py and then ran the setup again.

    Hope this helps

    TIP: if you want to see what it's actually doing edit the files (e.g. LEDSet.py) to change

        logging.getLogger().setLevel(logging.DEBUG)
        DPP2607_SetIODebug(False, './log') ## I'm not sure about this line, its in one of my scripts but not the others

    TIP2: To stop the creation of the xls files in the "0524" directory you might also want to comment out

       datalog = DataLog(LogDir, Test_name)

    and the matching  close at the end

  • Andrew,

    Thanks for your input. You are correct that you may need to adapt the code example for use in your application.

    Olaf,

    If you have further questions given the information above don't hesitate to ask.

    Best Regards,
    Philippe Dollo
  • Thanks for your help
    I changed the address to 3. It does not work anyway. Can it be that the chip is controlled incorrectly? The testboad has no LED sensors and no PWM control of the LED ???
    I use the DLP LightCrafter Display 2000 EVM.

    Best regards,

    Olaf

  • I'm fairly sure we have the same setup

    by running the code, seeing the outputs etc and reproducing using i2cset/get you should be able to run the following commands to adjust the brightness

    # this one is red @100, green=0,blue=0

    #!/bin/bash
    
    # write LED Current
    #red
    i2cset -y 3 0x1b 0x12 0x0 0x0 0x0 0x64 i
    #green
    i2cset -y 3 0x1b 0x13 0x0 0x0 0x0 0x0 i
    #blue
    i2cset -y 3 0x1b 0x14 0x0 0x0 0x0 0x0 i
    
    # propogate LED Current
    i2cset -y 3 0x1b 0x39 0x0 0x0 0x0 0x1 i
    i2cset -y 3 0x1b 0x3a 0x0 0x0 0x0 0x1 i
    i2cset -y 3 0x1b 0x38 0x0 0x0 0x0 0xd3 i
    
    i2cset -y 3 0x1b 0x15 0x3a b
    i2cget -y 3 0x1b
    

    EDIT: seems to work without the bottom 2 commands

    EDIT#2: the bottom 2 lines were run by _poll_complete() .. which is a loop that waits for byte[3] to be zero (I dont think i2cget reads the 3rd byte, though I'm happy to be corrected)

    If you can't really get the python code to work you can at least see a lower level of implementation by looking at the code inside dpp2607.py , works best coupled with the pdf.

  • Hello Andrew
    Now I understand it. First write the parameters for the colors in the registers and then trigger the driver. Now it worked for me too. That's enough for my project. The brightness should be changed only 2 times a day. 30% at night and 100% during the day. Now I am happy. Many Thanks

    Best regards,
    Olaf