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.

DLPC350: Multiple Patterns With a Single Trigger

Part Number: DLPC350

I'm trying to send multiple patterns with a single trigger output and variable exposures. The idea is that I can trigger, project for a some time, project the same image again for some time, then start the next trigger on the next image. I've tried two methods in the attached pictures, but I'm getting multiple triggers each time I press play. Is there a way to send out triggers this way?

 

  • Hi Salvatore,
    We haven't experiment first option that is sharing exposure concept. For the 2nd option, have you looked at the [Trigger Controls] GUI option? You can set Trigger 2 Patterns Per Pulse as more than 1, in this case 3.
    Regards,
    Sanjeev
  • I've tried that and it doesn't seem to make a difference in the LightCrafter control software. From looking at the source code, the number of patterns per trigger 2 out is always set to the number of pattern LUT entries. The documentation for DLPC350_SetPatternConfig says that value is the number of patterns to display. To me that indicates projection will stop after 3 patterns, not that an external trigger will be sent every 3 patterns. That matches what I'm seeing when I set that in my own application.

  • Okay, just to make sure, after you making the changes, you have revalidate only then the changes are applied. Trigger out2 is if flexible, it can be programmed to generate after any given number of patterns in the pattern sequence. The default logic is programmed once per entire sequence.

    It would help if you can be more detail on your comment - I'm trying to send multiple patterns with a single trigger output and variable exposures

    You can show timing diagram. 

    Regards,

    Sanjeev

  • I'm trying to send trigger multiple cameras at different exposures using trigger out 1. The first thought I had was to project for the longer of the 2 and the camera with the lower exposure would just get part of the projection. That doesn't work because the lower exposure camera doesn't see some of the bitplanes because the duration of each bitplane is spread out to use the entire exposure time.

    What I'm trying now is have 3 stages to each projected image. I have cameras set at 10ms and 20ms exposure times, and a frame rate limit on the cameras so I can only project every 100ms. I want to project an image for 10ms, then the same image for another 10ms, then the remaining 80ms of wait time. I can do this by combining the exposures like in the first image, but now my trigger output is low (I'm inverting the output) for the full 100ms. I can't do this because the cameras need more time between the end of the previous trigger and the start of the next one.

    Another thing I tried was to use an exposure/frame time of 10ms, then use an exposure/frame time of 10/90ms. I can't do that because of conflicts between sharing exposures and inserting black vectors. If the frame time is greater than the exposure time, I need to clear the DMD. I can't clear the DMD when exposures are shared.

    Does this give you enough information into what I'm trying to do?

  • Hi Salvatore,

    Looks like you are attempting something different; we haven't come across such use cases. 

    I would do the following -

    1. Define three patterns, with exposure time as 10ms, 10ms, 80ms. 

    2. For 1st pattern, don't add the clear DMD command.

    3. For 2nd pattern and 3rd add clear DMD command

    4. For 2nd and 3rd pattern, through 0x5D, variable exposure pattern LUT data, command, BYTE2 BIT3 = '0', trigger out continue from first pattern.

    5. Now when you start, you will see just one trigger, camera completes exposure for 10ms and second camera continues upto 20ms which repeat of first pattern content. Also there is dark time of 80ms after 2nd pattern. 

    Hope this helps.

    Regards,

    Sanjeev

  • Can you please explain step 4 more? Are these parameters I can pass to DLPC350_AddToExpLut() because byte 2 bit 3 of the LUT word looks like it's used for bit depth. I am currently using the code shown below. The trigger shape is good, but it won't switch to the next image in the image LUT when I expect it to depending on the exposure. For example, when exposure1 = 20000, exposure2 = 10000, and waitTime = 40000, images swap every third trigger as expected. If I turn down exposure1 to 19000, and increase exposure2 to 11000, the same splash image is repeated 3 times.

    std::vector<unsigned char> splashLUT = {0, 1, 2};
    int numPatterns = 9; for(int i = 0; i < numPatterns; i++) { const int colorIdx = i % 3; const bool buffSwap = colorIdx == 0; DLPC350_AddToExpLut(0, colorIdx, 8, 4, false, false, buffSwap, false, exposure1, expsosure1); DLPC350_AddToExpLut(3, colorIdx, 8, 4, false, false, false, true, exposure2, exposure2); DLPC350_AddToExpLut(3, 0, 1, 4, false, true, false, true, 250, waitTime); }
    DLPC350_SetPatternDisplayMode(false); DLPC350_SetVarExpPatternConfig(numPatterns * 3, numPatterns, static_cast<unsigned>(splashLUT.size()), false);
    DLPC350_SetPatternTriggerMode(3); DLPC350_SendVarExpPatLut(); DLPC350_SendVarExpImageLut(splashLUT.data(), static_cast<unsigned>(splashLUT.size())); unsigned status; DLPC350_ValidatePatLutData(&status);


  • Hi Salvatore,

    I was referring to the highlighted in yellow - basically idea is to continue display second pattern which is needed for other camera whose exposure is going to be larger than the second one.

    Regarding your observation -

    when exposure1 = 20000, exposure2 = 10000, and waitTime = 40000, images swap every third trigger as expected. If I turn down exposure1 to 19000, and increase exposure2 to 11000, the same splash image is repeated 3 times

    I am suspecting that the image download time from the flash is coming into picture;basically any number higher than > 20ms is working, could you try few other combinations; keep both exposure times as minimum, 8333us for exposure1 and exposure2, then change exposure1 to 20000us and keep exposure2 as 8333us.

    Regards,

    Sanjeev

  • I am setting the that bit the way you suggest as shown in the 8th parameter to DLPC350_AddToExpLut in the code above. I don't think the image download time is the issue. The wait time I mentioned is either a camera frame rate or a projector image load time limit, whichever is longer. Usually I get a screen tearing like effect when I project too fast for the image buffer. What I am seeing now is the next image is never loaded. You can probably reproduce it using the default TI 3.1.0 firmware, the code I posted, exposure1 = 8363, exposure2 = 46000, and waitTime = 2000.

  • Thank you for additional clarification.

    std::vector<unsigned char> splashLUT = {0, 1, 2};int numPatterns = 9;
    
    for(int i = 0; i < numPatterns; i++)
    
    {
        const int colorIdx = i % 3;
    
        const bool buffSwap = colorIdx == 0;
    
        DLPC350_AddToExpLut(0, colorIdx, 8, 4, false, false, buffSwap, false, exposure1, expsosure1);
    
        DLPC350_AddToExpLut(3, colorIdx, 8, 4, false, false, false, true, exposure2, exposure2);
    
        DLPC350_AddToExpLut(3, 0, 1, 4, false, true, false, true, 250, waitTime);
    
    }DLPC350_SetPatternDisplayMode(false);

    In the code above, as i can see you are trying to display total 9 patterns from three splash locations 0,1,2; in this configuration the image load time will come into picture, you will have restriction on minimum time of the pattern which should match to the load time. 

    Refer to this discussion thread https://e2e.ti.com/support/dlp__mems_micro-electro-mechanical_systems/advanced_light_control/f/924/t/337942?Maximum-amount-of-24-bit-images- 

    I would recommend doing the following changes in the code -

    1. DLPC350_AddToExpLut(3, 0, 1, 4, false, true, false, true, waitTme, waitTime); // For this 1-bit pattern also keep both exposure and period same

    2. As per the discussion in the E2E thread link, increase the exposure time of the pattern to meet the worst  case image load-time.

    Regards,
    Sanjeev

  • I have made sure that there is enough time to load the image by varying the wait time based on the maximum image load time. 80ms was used as an example, but that is slow enough for most patterns because the 3 color channels of each splash image are being projected. That gives 300ms to load the next splash image (exposure1 + exposure2 + wait time) * 3 for RGB channels.

    The code changes that you recommended did not fix the issue because the pattern still does not advance to the next splash image. When I set the exposure time on the third LUT entry to waitTime, trigger 1 is low for exposure1 + exposure2 + waitTime and goes high for about 230us before the next pattern. I'd like the trigger 1 output to be high during the wait time because the cameras that are being triggered need about 2ms between the rising edge at the end of a trigger and the falling edge at the start of the next.

  • Hi Salvatore,

    On your comment -

    When I set the exposure time on the third LUT entry to waitTime, trigger 1 is low for exposure1 + exposure2 + waitTime and goes high for about 230us before the next pattern. I'd like the trigger 1 output to be high during the wait time because the cameras that are being triggered need about 2ms between the rising edge at the end of a trigger and the falling edge at the start of the next.


    It will be helpful if you show us the timing picture, it is difficult for us visualize on how Trigger Out 1 is appearing wrt pattern exposure. From the above information, the trigger out 1 signal is LOW for entire duration of exposure1 + exposure2 + waitTime, at the end of waitTime, there is one 230us pulse which HIGH???

    Have you programmed trigger out 1 as active LOW signal, in this case i can see it is low for entire duration of exposure1+exposure2+waitTime.

    If you can show us via diagram like explained in http://www.ti.com/lit/ug/dlpu010g/dlpu010g.pdf Figure 2-10. Trigger Mode 1 Timing Diagrame Example it will be helpful.

    Regards,

    Sanjeev

  • I inverted the trigger 1 out signal, but only mentioned that briefly in an earlier post so that may be part of the confusion.

    I attached some code that reproduces the issue. I'm using the 3.1.0 firmware that can be downloaded from you. My setup uses an externally controlled LED, setting that up is not part of the code.

    Trigger 1 out has the shape I expect (shown below with each green box being 50ms).

    Using the reproducer code and an input of 20,10,40, the trigger shape is the same as above and the pattern is visually correct and advances through the 3 images of the splash table.

    When the input is changed to 10,20,40, the trigger shape is still the same, but the pattern does not advance through the splash table. It just repeats the first splash image 3 times.

    You can play around with the input parameters and see that generally the pattern displays only the first splash image when the first exposure is less than the second.

    Can you tell me if you can reproduce this and if this intended behavior?

    VariableExposureReproducer.zip

  • Hi Salvatore,
    We are investigating your problem. Until we have the conclusion i presume you are okay to use 20,10,40 exposure combination.
    Regards,
    Sanjeev
  • Thank you for looking into this Sanjeev. Unfortunately, the current behavior doesn't work for me. Because all cameras are triggered at the beginning of the first exposure, 20,10,40 means something different than 10,20,40. 20,10 means a camera can be exposed for either 20ms or 30ms. 10,20 means a camera can be exposed for either 10ms or 30ms.

  • Hi Salvatore,
    Okay thank you for confirming.
    At this point of time, i want to let you know that we are investigating the issue.
    I have one more suggestion, let me know if it makes any difference for you - as I can see you are displaying same 8-bit pattern from the 24-bit image slot in the flash, in your first post it was splash #19, and blue B7:0, how about you duplicate the same 8-bit pattern in another location and use the order,
    For example -
    S19::B0-B7 , S19::R0-R7, S9::G2 , where R0-R7 content is same as B0-B7.

    Regards,
    Sanjeev
  • I'm not sure I understand your suggestion. Can you show code changes in the sample application I attached? It does sound like I would need to double the amount of splash images and I don't think that is acceptable for the number of images I'm currently using.

  • Hi Salvatore,

    I wanted to look at the behavior of the controller when we configure it display 8-bit data from different locations not the same.  It is okay, no problem, we are will check here.

    Regards,
    Sanjeev

  • I think I tried what you suggested. I changed the code I attached previously with:

    const int patternOffset = 0;
    	const int numPatterns = 3;
    	const unsigned numLutEntries = numPatterns * 3;
    	const vector<unsigned char> splashLUT = { 0, 1, 2};
    
    	DLPC350_PatternDisplay(0);
    	DLPC350_ClearExpLut();
    
    	const unsigned int exposureTime = static_cast<unsigned int>((exposureTimeMsInitial * 1000 + 30));
    	const unsigned int exposureTime2 = static_cast<unsigned int>((exposureTimeMsAdditional * 1000 + 30));
    	const unsigned int frameTime = static_cast<unsigned int>(max(frameLimitMs * 1000 + 60, 2000.0f + exposureTime + exposureTime2));
    	const int remainingFrameTime = frameTime - exposureTime2 - exposureTime;
    
    	for (int i = 0; i < numPatterns; ++i)
    	{
    		DLPC350_AddToExpLut(0, 0, 8, 4, false, false, true, false, exposureTime, exposureTime);
    		DLPC350_AddToExpLut(3, 1, 8, 4, false, false, false, true, exposureTime2, exposureTime2);
    		DLPC350_AddToExpLut(3, 2, 8, 4, false, true, false, true, 8400, remainingFrameTime);
    	}

    I made a test firmware that is also attached. It has 3 splash images that are all black with a white 1, 2, or 3. When I use input 20,10,100, I see 1, 2, and 3 projected in order. When I use input 10,20,100, I see 1 projected 3 times.

    123_v3.1.0.zip

  • Hi Salvatore,
    For now following options works in v3.1 build -

    In the above discussion -
    1. Change the pattern exposure order to 20,10,40 or 20,40,60...
    2. If you are very particular - the other option is to change the 1st pattern to 7-bit depth and then you can use 10,20,40.
    3. Or restrict the number of pattern displayed is <= 48 bitplanes in total AND you refer to maximum two images in the flash

    For displaying
    10,20,40 - with 1st pattern at 8-bit, 8-bit,and 1-bit as in the source code. We will mark it for future investigation and until then you can treat it as known issue.

    Regards,
    Sanjeev