Using the NI 17xx Smart Camera Direct Drive Lighting Controller

Publish Date: Aug 29, 2016 | 1 Ratings | 5.00 out of 5 | Print | Submit your review

Overview

The use of proper lighting is often overlooked when designing a machine vision application. More robust and accurate inspections can be achieved when appropriate lighting techniques are utilized. With the NI 17xx Smart Camera Direct Drive integrated lighting controller, LED lights can be powered directly from the camera without requiring an external controller, providing a quicker and lower cost development cycle.

This application note discusses considerations when selecting lighting equipment and demonstrates how to utilize the Direct Drive lighting controller feature on the NI 17xx Smart Camera with LabVIEW or Vision Builder for Automated Inspection.

Table of Contents

  1. Introduction to machine vision lighting
  2. Lighting Options for the 17xx Smart Camera
  3. Requirements for Direct Drive Lighting
  4. Wiring a light source for Direct Drive
  5. Configuring your light
  6. Controlling your light
  7. Conclusion

1. Introduction to machine vision lighting

One of the most commonly overlooked aspects of machine vision solutions is lighting control. If proper care is not taken in selecting the correct light source and accounting for variables such as ambient light and the type of material or geometry of the object of interest, it can lead to poor contrast and an inefficient inspection. When designing a robust machine vision application, it is important to use proper lighting techniques to achieve the best possible contrast. This allows for the most accurate image processing possible, since details of the object under inspection can often only be revealed using proper lighting.

Improper lighting and proper lighting example
Figure 1.1 - The top of an integrated circuit. Left: Illuminated with a bright field ring light, creating poor contrast, and an unreadable etching. Right: Illuminated with a dark field ring light, revealing a readable etching.

Selecting your light source

Typical machine vision lighting sources include the following:

  • Fluorescent
  • High Pressure Sodium
  • Light Emitting Diode (LED)
  • Metal Halide
  • Quartz Halogen
  • Xenon

In many situations, LED lighting fits well into an inspection system. LEDs offer many advantages over traditional lights such as smaller size, lower power consumption, higher efficiency, less heating, and a longer lifetime due to their solid-state design. LEDs also offer the advantage of being fast, typically capable of switching fully on and off as often as a million times per second. This makes LED lighting ideal for high-speed strobing and stop-motion types of image acquisition.

A typical machine vision LED consists of a string of light emitting diodes, either in series or a combination of series and parallel strings, as demonstrated by Figure 1.2. As current flows through the diode, it becomes forward biased, releasing energy as light.

Figure 1.1: LED light circuit
Figure 1.2 - Typical LED light construction. Left: A single LED string. Right: Two LED strings in parallel.

When selecting the proper lighting equipment for a machine vision system, there are many important factors to consider. The shape, material, and geometry of the object of interest play a large role in what type of lighting equipment to consider. Many aspects of the inspection system must also be considered, such as the camera sensor characteristics, ambient light conditions, and types of lenses used. All of these factors must be matched so that the details in the object under inspection can be best brought out. For more information on how to select the appropriate lighting equipment for your application, please see the following:

Back to Top

2. Lighting Options for the 17xx Smart Camera

The NI 1742 offers an innovative internal lighting controller, called the Direct Drive, that can power third party current-controlled lights. The NI 17xx also supports 5 V and 24 V pulse output terminals for applications that may require the use of an external lighting controller.

Benefits of the Direct Drive lighting controller

With other smart cameras, a lighting controller to drive a light must be purchased separately from the camera. However, the NI 1742 Direct Drive lighting controller is capable of powering a variety of off-the-shelf lights from the same user supplied 24 V power supply that powers the camera. The Direct Drive lighting controller provides many benefits when designing a machine vision system:

  • Lower system cost An external lighting controller no longer needs to be purchased separately, reducing the overall cost of the system.
  • Smaller factory line footprint Without the need for an external lighting controller, the size of an inspection system can be minimized.
  • Single programming interface The NI 1742 Direct Drive can be programmed natively in LabVIEW with a simple API or configured with Vision Builder for Automated Inspection; therefore, there is no need for 3rd party drivers.
  • Less wiring An embedded lighting controller not only reduces the size of the overall system, but also reduces the amount of wiring that is required, speeding up development time.
  • Not tied to a particular vendor’s light Typical external lighting controllers are designed for manufacturer specific lights. With the NI 1742 Direct Drive, many varieties of 3rd party lights can be powered.
  • Tighter synchronization Tighter synchronization between the image acquisition and lighting can be achieved with an embedded controller by removing the latency associated with configuring and triggering external lighting controllers.

External lighting controller

While the Direct Drive lighting controller is designed to handle most machine vision lighting requirements, some applications may require the use of external lighting controllers. For example, if a light must be used that does not meet the Direct Drive controller’s current or voltage requirements, an external lighting controller is needed. Other applications may require more than one light, or an existing installation may also require the use of an external lighting controller.

To solve these applications, the NI 17xx provides two types of outputs for synchronizing third party lighting controllers to the operation of the smart camera: a 5 V TTL output and a 24 V output. The 5 V TTL output is available for interfacing to devices that require a 5 V interface signal. The 24 V output is powered by the voltage of the smart camera power supply and is available for controllers that require higher voltage inputs.

Caution The 24 V external lighting strobe is an unregulated output that is dependent on the range of the power supply provided to the smart camera. If the power provided to the smart camera is +20%/-15% with 5% AC ripple, this output could be as high as 30 V. If this would exceed the input voltage specifications of the third party lighting controller, do not connect the 24 V lighting strobe output to the controller to prevent damage to the controller. Use a power supply with tolerances that meet the requirements of the controller or use the 5 V external lighting strobe.

Back to Top

3. Requirements for Direct Drive Lighting

To determine if your light is compatible with the NI 1742, verify the following:

  • Current controlled
    The light must be current controlled and not voltage controlled. The Direct Drive controller acts as a current source, therefore the light must be current controlled.
  • Maximum power supply current draw
    The power supply must be capable of providing enough power required to achieve the amount of illumination desired from the light. In continuous mode, a maximum of 500 mA can be provided, and in strobed mode, 1 A can be provided.
  • Voltage drop
    The minimum and maximum voltage drop specified for the light cannot exceed the specified range of the NI 1742 (max 24V, min 7V). As discussed earlier, a typical LED light consists of a string of light emitting diodes in series and parallel. As current flows through the diodes, they become forward biased, causing some drop in the voltage. If the total voltage drop across the string of diodes is not within the specified range, the hardware may become damaged.

    Under some circumstances, some LEDs, particularly white and blue LEDs, may require a higher voltage drop than usual to reach full brightness. If desired, light vendors can often reconfigure strings to get the voltage and current requirements of the NI 1742.

Maximum current ratings

The Direct Drive feature of the NI 1742 is capable of driving lights in two modes: continuous and strobed.

When powering a light in continuous mode, current is applied at a steady state value, allowing the light to be on at all times. The light’s manufacturer will specify the maximum allowable current flow for the light in continuous mode. You must configure the smart camera so that it does not exceed the current limit of the light. When in continuous mode, the NI 1742 camera is capable of providing a maximum of 500 mA.

In applications where the exposure time is short, such as imaging fast-moving objects, strobing LED lights is a popular way to take advantage of the LED’s ability for short cycles with high light output. The increase in light output when strobing comes from the LED’s ability to be driven for short periods with currents exceeding normal steady state values, followed by a relatively long cool-off time.

You can set the strobe time to any setting within the hardware supported range. A typical light can be driven at its maximum current limits for only 10% of the pulse duration. However, the NI 1742 imposes a maximum limit of 45%, which is far more than most lights can handle. You must configure the NI 1742 so that it does not exceed the maximum strobe duration of the light. When using the Direct Drive lighting controller, software will verify that the strobe protection limits specified in the lighting file are not violated. If the strobe protection limits are violated, the NI 1742 will automatically use the continuous current limit as the maximum current instead of the strobe limit.

Power supply considerations

Use the NI 17xx smart camera only with a 24 VDC UL listed LPS (limited power source) supply. The supply will bear the UL listed mark, LPS. The supply will also meet any safety and compliance requirements for the country of use. The NI 17xx uses a nominal 24 VDC power source. The NI 17xx accepts power within the range of the industry standard IEC 1311 input power specification (24 V –15%/+20% with an additional allowance for an AC peak of +5%).

If you are using the Direct Drive capability of the NI 1742, the power supply wattage must be sufficient to power both the camera and the light. The power required by the light can be significantly more than the power required by the smart camera.           

Example: You are using the Direct Drive lighting controller to strobe a light at a current level of 1 A. The output voltage of the Direct Drive lighting controller is 24 V, therefore your power supply must be capable of driving 24 V * 1A = 24 W in addition to the power required for the NI 1742 smart camera.

Purchasing your light source

National Instruments offers a variety of lighting options for machine vision applications that are compatible with the NI 1742 Direct Drive lighting controller. For more information about these lights, please see the following sites:

Back to Top

4. Wiring a light source for Direct Drive

Figure 4.1 shows the lighting connector on the NI 17xx. The NI 1722 does not have the LED+ and LED– terminals wired since it does not have the Direct Drive feature.

NI 17xx Lighting Connector
Figure 4.1 - NI 17xx Lighting Connector

Caution All signals on the lighting connector are outputs from the smart camera. Do not connect any external voltage or current source to any pin of the lighting connector.

When using the Direct Drive feature to power an external light, connect the positive and negative terminals of the light to LED+ and LED- terminals respectively. When connecting the NI 17xx to an external lighting controller, use the 5 V and 24 V pulse output terminals.

Caution When making connections from the NI 17xx Smart Camera to external lighting equipment, keep wires as short as possible. Care must be taken in wiring when large currents are involved.

Back to Top

5. Configuring your light

In order to ensure that powered lights are not damaged during operation, the threshold for current limits as well as strobe duration and duty cycle must be configured. There are two ways to configure your light. If you are programming your NI 1742 in LabVIEW, then you must configure your light in Measurement and Automation Explorer (MAX). If you are using Vision Builder for Automated Inspection, then you can target the NI 1742 and configure your light in Vision Builder AI itself.

Opening the Configure Light window in Measurement and Automation Explorer (MAX)

To configure the Direct Drive lighting feature, first open MAX. In the Configuration window, expand the Remote Systems tree, and select your smart camera. Click on img0 : NI 1742, and go to the Lighting tab. Ensure that the “Enable Direct Drive” checkbox is selected, and click on the “Configure Light…” button.

MAX lighting parameters
Figure 5.1 - Configuring lighting parameters in MAX

Opening the Configure Light window in Vision Builder for Automated Inspection

To configure the Direct Drive lighting feature in Vision Builder AI, open an inspection that has been targeted to the smart camera. In the Acquire Images palette, left click on the “Acquire Image (Smart Camera)” step. This will now open the Properties Page for the Acquire Image (Smart Camera) step where you can configure the parameters for your acquisition.

Go to the Lighting tab located in Acquire Image (Smart Camera) Setup window. Ensure that the “Enable Direct Drive Lighting” checkbox is selected, and click on the “Configure Light…” button.

VBAI Acquire Images palette
Figure 5.2 - Acquire Images palette in Vision Builder AI when targeting an NI 17xx Smart Camera

Go to the Lighting tab located in Acquire Image (Smart Camera) Setup window. Ensure that the “Enable Direct Drive Lighting” checkbox is selected, and click on the “Configure Light…” button.

VBAI lighting parameters
Figure 5.3 - Configuring lighting parameters in Vision Builder AI

Configuring a light source with predefined lighting configurations

When configuring the parameters for a light using the Direct Drive lighting controller, National Instruments provides pre-determined settings for select lights. If there are lighting configurations for your light available, there is no need to manually enter lighting parameters.

Predefined lighting configurations
Figure 5.4 - Configuring a light source with available lighting configurations

Ensure that the “Select Light” radio button is selected, and choose the appropriate light if available. Click the “OK” button, and you will be asked to verify the details of your light. If the details are correct, select “Yes”. Your light is now configured.

Caution: Selecting the wrong lighting configuration file may result in damage to the light.

Configuring a light source without predefined lighting configurations

In the event that a lighting configuration is not provided for your light, you must manually set the threshold limits of the light. The appropriate settings can be found on the datasheet for your light. Ensure that the “Enter Light Protection Data” radio button is selected and configure the following settings:

    • Maximum Continuous Current (mA)
      The peak amount of current the light can withstand at steady-state values.
    • Maximum Strobe Current (mA)
      The peak amount of current the light can withstand when strobed for short periods.
    • Maximum Strobe Duration (ms)
      The maximum amount of time that the light can be powered at the maximum strobe current.
    • Maximum Strobe Duty Cycle (%)
      The maximum ratio of time that the light can be powered at the maximum strobe current to the time required for cool-down.

Manual lighting configurations
Figure 5.5 - Configuring a light source without predefined lighting configurations

Caution: Setting incorrect limits may cause damage to the light and can create a fire hazard.

Configuring external strobe generation in Measurement and Automation Explorer

The External Strobe Generation can be enabled by going to the Lighting tab located in MAX for your NI 17xx. Click on the checkbox next to either the 5 V TTL Strobe or 24 V Strobe option to enable them, and select the appropriate polarity for the edge that your external controller requires.

External strobe generation
Figure 5.6 - Configuring external strobe generation in MAX

Configuring external strobe generation in Vision Builder for Automated Inspection

The External Strobe Generation can be enabled by going to the Lighting tab located on the Acquire Image (Smart Camera) Setup window in Vision Builder AI. Click on the checkbox next to either the 5 V TTL Strobe or 24 V Strobe option to enable them, and select the appropriate polarity for the edge that your external controller requires.

External strobe generation
Figure 5.7 - Configuring external strobe generation in Vision Builder AI

Back to Top

6. Controlling your light

Controlling your light can be accomplished in either LabVIEW/MAX or with Vision Builder for Automated Inspection.

Controlling your light in LabVIEW and MAX

There are two options for configuring how the lighting behaves during an acquisition. It can be done prior to run-time in MAX, or programmatically in LabVIEW.

To control the light source from MAX prior to an acquisition, go to the Lighting tab located in MAX for your NI 1742, and select either Continuous or Strobed mode. Finally, set the amount of desired current by moving the slider, or entering an appropriate number in the numeric control.

Lighting properties in MAX
Figure 6.1 - Configuring lighting properties in MAX

In LabVIEW, you can configure your light using Property Nodes. Place an IMAQ property node on the block diagram, and wire an IMAQ Session to the reference input of the property node. Click on “Property” and then select “Lighting” from the drop-down menu. The properties configurable by this method are:

  • 24 V Strobe Enable
  • 5V Strobe (TTL) Enable
  • Current Level
  • Max Current Level
  • Mode

Lighting properties via property nodes
Figure 6.2 - Configurable lighting properties via property nodes

LabVIEW example program
Figure 6.3 - Example program demonstrating use of property nodes to configure lighting properties. In this program, four property nodes are used to configure the light to operate in strobed mode at a current level of 1000 mA with both external pulse output terminals turned off. A grab is then initiated to begin image acquisition.

Controlling your light in Vision Builder for Automated Inspection

To control the light source from Vision Builder AI, go to the Lighting tab under your Acquire Image (Smart Camera) step. For the Direct Drive Lighting Mode, select either Continuous or Strobed mode. Finally, set the amount of desired current by moving the slider, or entering in an appropriate number in the numeric control.

Lighting Properties in Vision Builder AI
Figure 6.4 - Configuring lighting properties in Vision Builder AI

Back to Top

7. Conclusion

The NI-1742 provides a flexible and convenient way to setup and control the lighting of your inspection. You can power and control your LED light source directly with the NI-1742 or trigger an external light controller with your NI-1742 or NI-1722. In either case, you can use the information in this article to configure and control your lighting system easily.

Back to Top

Bookmark & Share


Ratings

Rate this document

Answered Your Question?
Yes No

Submit