DLPLCR65EVM: [DLP6500] Python code for grayscale/PWM control (Gaussian beam compensation)

Part Number: DLPLCR65EVM
Other Parts Discussed in Thread: DLPC900

Hello TI Support Team,

I am currently working with a TI DMD and controlling it via a Python-based script.

[Current Status] I have successfully implemented the code to display binary image patterns on the DMD without any issues.

[The Problem] However, I am using a Gaussian laser beam as my light source. Because of the beam's natural profile, the intensity of the reflected light is spatially uneven (stronger in the center and weaker at the edges).

[Proposed Solution & Inquiry] To compensate for this Gaussian profile and achieve uniform light intensity across the target area, I am trying to implement a grayscale control method. My goal is to vary the exposure time (duty cycle) for individual micromirrors using a dithering or PWM (Pulse Width Modulation) approach.

I have searched for relevant documentation, application notes, or reference codes on how to control the exposure time for individual pixels to create a grayscale effect, but I have not been able to find the exact resources I need.

Could you please provide any guidance, recommended documentation, or reference materials (preferably with Python examples, if available) on how to implement grayscale/PWM control for beam intensity compensation?

Thank you for your time and support.

Best regards,

SeungWoo Kim.

  • Hello SeungWoo,

    Thank you for coming to E2E with your question!

    Where exactly are you trying to vary the exposure time, at the mirrors or at the light source? What kind of data are you trying to show?

    Best,

    Aaron

  • Hello,

    Thank you for your reply.

    I am trying to control the DMD mirrors themselves through a Python script, not the light source.

    Currently, I can successfully display binary image patterns on the DMD using Python. My goal is to generate grayscale illumination by controlling the duty cycle (exposure time) of individual mirrors, similar to PWM or bit-plane sequencing. Ultimately, I would like to compensate for the Gaussian intensity profile of the laser beam so that the projected illumination becomes more uniform.

    The data I want to display is essentially a grayscale intensity compensation map, where each pixel has a different desired intensity. I am looking for a method to translate these grayscale values into appropriate mirror on/off timing or bit-plane sequences using the DLPC900/DMD.

    If there are any application notes, reference documents, or examples explaining how grayscale images are implemented on the DLPC900 (especially through Pattern Mode or bit-plane control), I would greatly appreciate your guidance.

    Thank you for your support.

    Best regards,

    SeungWoo Kim

  • Hello SeungWoo,

    I understand now, thank you!

    So, within display applications, we display 8-bit images using binarily-weighted bitplanes. This isn't helpful because we control these times and you won't be able to control the time at all.

    You will need to be using a Pattern Mode, either Pre-stored, Video Pattern, or Pattern on-the-fly.

    The Exposure Times you define are limited within those functions but how quickly are you expecting these patterns to be exposed for? Illumination PWM is usually MUCH quicker than the rate at which the mirrors can move - i.e. minimum exposure time.

    Best,

    Aaron

  • Hi Aaron,

    Thanks for the explanation. To answer your question directly: we want to use binary-weighted bit-planes (Pattern-on-the-fly mode) to flatten a Gaussian illumination beam profile — attenuating exposure near the beam center relative to the edges via per-pixel dose control, rather than spatial dithering.

    Our per-layer total exposure time is 50–500 ms.

    Right now, our code displays a single black-and-white pattern per layer, and controls how long it stays on purely with a software timer (start display, wait, stop display). I've attached our current script so you can see the full flow.

    Could you advise on how we should write the pattern/timing code so that, after the light reflects off the DMD, the overall illumination reaching the sample is uniform despite our Gaussian beam profile — i.e., compensating for the brighter center of the beam through per-pixel exposure control?

    Thanks,

    SeungWoo

    dlp_print_control_full.zip

  • Hello SeungWoo,

    As I've made mention previously, we control the timings for how multi-bit patterns are being displayed (when to turn off and on).

    Although this is the case, I was thinking about what you are trying to accomplish, would the use of a Phased Light Modulator be of interest to you? If you're using a laser with a tighter wavelength, I would imagine you could steer this light using our device.

    dev.ti.com/.../node

    What kind of application are you trying to use your device in?

    Best,

    Aaron