Support the component independently, then connect its leads to the PCB with an insulated, strain-relieved wiring harness. For a small photoresistor, insulated soldered extensions usually suit a permanent connection. A small carrier board with a connector makes replacement easier. Crimps work only when the terminal explicitly accepts the component lead and wire involved.
The enclosure mount, electrical termination and environmental seal are separate jobs. A solder joint should not hold the sensor against the wall, and heat-shrink tubing should not substitute for a sealed optical opening.
What you need
Start with the component datasheet, PCB input requirements and the enclosure drawing. Confirm the sensor's operating temperature, permitted soldering conditions and intended mounting method before choosing hardware.
Have these items available:
- A component holder, bracket or carrier board that supports the device without loading its leads.
- Flexible insulated wire suitable for the current, voltage, temperature and available termination sizes.
- Soldering equipment and compatible flux, or documented crimp terminals with the specified tooling.
- Individual insulating sleeves or heat-shrink tubing sized for each completed joint.
- Cable anchors or clamps that transfer harness loads into a mechanical support.
- A PCB connector or terminal block suitable for the wire and the required service cycle.
- An optical window or sealed sensor assembly when the device must detect light through the enclosure wall.
Work on de-energized equipment. Isolate all supplies, including auxiliary supplies, and verify absence of voltage using the applicable safe-work procedure. Do not place a low-voltage sensor harness beside exposed hazardous-voltage terminals without the required separation and insulation.
For this job, the key drawing dimensions are lead exit position, connector access, support locations and the complete optical opening.
Connect the component without loading its leads
-
Fix the sensing position before choosing the termination.
Position the photoresistor so its active face receives the intended light. Check the viewing angle, shadows from the mounting recess and interference from nearby indicators. A sensor placed deep inside a narrow opening may respond differently from one mounted flush behind a window.
Support the component body using a suitable holder or a carrier board with mechanical mounting points. Do not trap a fragile sensing face beneath a clamp. Do not bend the leads repeatedly to adjust the position. Follow the datasheet's restrictions on bending near the body.
-
Choose solder, crimps or a carrier board.
Soldered wire extensions are compact and practical when the sensor rarely needs replacement. They require insulation and mechanical support because the joint creates a rigid transition in otherwise flexible wiring.
Crimps avoid applying soldering heat, but a general-purpose butt splice is not automatically suitable. A terminal intended for stranded wire may not accept a thin, solid component lead. Confirm the permitted conductor construction, diameter, material and crimp combination in the terminal documentation. If the lead is outside those limits, use another method.
A carrier board is often the cleanest serviceable arrangement. Solder the component into supported through-holes and connect the harness through a suitable board connector. Mount the carrier independently; do not let the harness suspend it. For attachment methods, use the guidance on mounting a PCB in a watertight enclosure without posts.
-
Make and insulate each termination.
For soldered extensions, slide the insulating sleeves onto the wires before joining them. Strip only enough insulation for the connection. Use a suitable soldering temperature and dwell time within the component manufacturer's limits. Avoid transmitting excessive heat into the sensor body.
Make a wetted electrical joint without leaving sharp wire ends. Remove flux residue when required by the flux system and circuit sensitivity. Some residues can affect a high-impedance sensor input, especially in humid conditions. Do not assume every cleaning solvent is compatible with the sensor or its coating.
Cover each joint separately, including all exposed conductor between the component and insulated wire. An outer sleeve around two bare joints does not prevent them touching each other. Heat-shrink tubing provides electrical insulation, but ordinary tubing is not an enclosure penetration seal.
For crimps, use the specified die and preparation dimensions. Do not pre-tin conductors unless the terminal manufacturer explicitly permits it. Support the component body while checking the termination so the check does not load the lead-to-body connection.
-
Install strain relief on both ends of the harness.
Anchor the insulated wires close enough to each termination that normal handling cannot pull on the joint. Avoid crushing insulation or forcing a sharp bend at the end of a soldered section. The stiffened portion of a soldered wire should not become the harness's repeated flex point.
Provide enough slack for assembly and connector removal, but keep the loop clear of the door seal, latch and hinge. For a door-mounted sensor, route a controlled flexible loop across the hinge area. Exercise the full door travel before finalizing the anchor positions.
The same load-path principles used for cable strain relief at sealed enclosure entries apply here. Mechanical loads should reach clamps or supports, not electrical contacts.
-
Connect to the PCB with service access in mind.
Choose a connector that matches the wire size, electrical requirements and expected vibration. Use a keyed or clearly identified connection where reversing or misplacing the harness could damage the circuit. A bare two-lead photoresistor normally has no polarity, but its connector still needs identification within the assembly.
Leave room to release the latch and remove the plug without pulling its wires. Label the harness and record the pin assignment on the wiring drawing. If direct soldering to the main PCB is necessary, add strain relief beside the board connection and allow a practical removal procedure.
A connector wholly inside the enclosure does not need a panel seal. If the connection must cross the wall, treat it as a separate waterproof panel mount connector installation, including its mating condition and rear clearance.
-
Route the sensor pair away from electrical noise.
Keep the two sensor conductors together. A twisted pair can reduce magnetic pickup, but it does not solve every interference problem. Separate the harness from motor leads, drive outputs, contactor wiring and other noisy circuits.
Check the PCB input circuit before extending the cable substantially. Added resistance, capacitance and leakage can affect measurement accuracy or response time. High-impedance circuits are particularly sensitive to contamination and unsuitable cable routing.
If artificial lighting causes unstable readings, evaluate filtering in the measurement circuit or software. Select the filter from the required response time and input design. Do not add an arbitrary capacitor across the sensor without checking its effect on the circuit.
-
Provide optical access without leaving an open hole.
For a sensor inside a sealed enclosure, use a window or a documented sealed optical assembly. Check that the window transmits the wavelengths the sensor measures. Tint, thickness, surface contamination and condensation can all change the reading.
Do not assume a bare leaded component can form a reliable wall seal. Sealing against its leads or irregular body needs a validated design, not just a bead of adhesive. Keep the sensing surface clear of sealant and incompatible cleaners.
Our enclosures are rated NEMA 4X / IP66 by the manufacturer; not UL listed. Added openings and sensor hardware do not automatically retain those ratings. Review the enclosure rating after mounting devices before approving the assembly.
If the sensor must reject surrounding light, define that requirement separately from water sealing. The article on light-tight enclosure cable entries explains why blocking stray light and stopping water need different checks.
Checks when the wiring is complete
Inspect the assembly before energizing it. Confirm that no bare joint can touch the enclosure, its neighbor or a mounting screw. Check that anchors restrain the harness without deforming the sensor body.
With the circuit disconnected as necessary, check continuity and unintended shorts using methods compatible with the electronics. Do not apply insulation-test voltages to connected sensor electronics unless their documentation permits it.
Then power the circuit safely and check operation under representative light conditions:
- Cover and illuminate the sensor to verify the expected response direction and range.
- Move the door through its full travel and confirm that readings remain stable.
- Check readings with nearby electrical loads operating under normal, safely controlled conditions.
- Disconnect and reconnect the service connector, then confirm correct identification and access.
- Inspect the optical seal and complete the specified assembly verification for the installation.
A stable reading proves function, not water resistance. Electrical testing and environmental verification are separate acceptance checks.
Mistakes that damage connections or seals
Using the component leads as mounting brackets. Vibration and service movement then concentrate at the body or joint. Add independent support instead.
Crimping a small lead in an oversized splice. A sleeve that appears closed may still have inadequate contact pressure. Use a documented terminal combination or change the termination method.
Leaving the harness unsupported after soldering. Solder can wick into stranded wire and create a stiff section. Secure the harness so repeated bending does not occur at that transition.
Potting the entire assembly before checking optical response. Encapsulants can alter light transmission, stress the device or prevent replacement. Verify material compatibility and the completed sensing behavior before committing to encapsulation.
Treating sealant as a universal repair. An unsupported sensor, incorrect opening or uneven sealing surface needs a design correction. More sealant does not establish an enclosure rating.
What the enclosure drawing needs
Show the sensor location from fixed enclosure datums, not from a movable cable or removable component. Include the optical opening dimensions, corner radii, window footprint and sealing arrangement. Identify the actual sensor assembly and its installation requirements.
Show internal projections as well as the outside view. Reserve space for the component support, insulated joints, connector release and harness bend. Mark keep-out areas around the door gasket, hinge, latch and mounting hardware.
For custom stainless enclosures and factory cutouts, distinguish changes to an existing body from a fully custom enclosure. Specify the material and enclosure dimensions separately from the sensor installation details.
Use the cutout designer to locate openings and export the layout with the quote request. Include the component drawing and wiring sketch so spacing can be reviewed together. Approve the mechanical support, optical seal and rear service clearance before any opening is cut.
Enclosures for this job
Catalog sizes that suit the job this article answers, picked from its subject; open one for its full specifications.
| Enclosure | Material | Outside H x W x D / display | Rating |
|---|---|---|---|
| 12 × 10 × 6 in | 304 stainless | 12 x 10 x 6 in | Rated NEMA 4X / IP66 by the manufacturer; not UL listed |
| 16 × 14 × 8 in | 304 stainless | 16 x 14 x 8 in | Rated NEMA 4X / IP66 by the manufacturer; not UL listed |
| 20 × 16 × 8 in | 304 stainless | 20 x 16 x 8 in | Rated NEMA 4X / IP66 by the manufacturer; not UL listed |
Questions
Can you solder wires directly to a photoresistor?
Yes, provided the component permits soldering and the completed joints are individually insulated. Support the sensor body independently and anchor the insulated wires so handling cannot pull on its leads. Follow the component's soldering limits and check the extended wiring with the actual PCB input circuit.
Can a butt splice connect a component lead to stranded wire?
Only when the splice documentation explicitly accepts the component lead and wire combination. Thin solid leads may fall outside a splice's permitted conductor sizes or construction. Use the specified tooling and inspection method. If the combination is undocumented, choose soldered extensions or a carrier board instead.
When is a small carrier board better than direct wire extensions?
Use a carrier board when the component needs firm support, convenient replacement or a connector close to the sensor. Mount the board mechanically and restrain the harness separately. Check that the board, connector and mounting hardware leave enough room for optical alignment and service access.
Does heat-shrink tubing make the sensor installation waterproof?
No. Heat-shrink tubing insulates electrical joints, but it does not establish a seal between a component and the enclosure wall. Optical access needs a suitable window or documented sealed assembly. Evaluate the opening, sealing surfaces, component installation and completed enclosure separately from the wire insulation.





