Objective. Students configure an ultrasonic distance sensor for analog output and demonstrate basic vision sensor setup for part-presence and label-verification tasks on a simulated production line.
This lesson, its worked examples and its practice questions has not yet been verified by a licensed engineer or certified journey-level tradesperson or by a certification or approval body. It is a study draft and may contain errors. Do not use it as instructions for work on a job site or on live equipment. Always follow your instructor, your supervising professional, and current official references and regulations.
VoTechWorks program approval and accreditation are still in progress. Credentials are issued only by the certifying bodies named in each program, after their own exams.
Modern automated production lines rely on non-contact sensors to detect, measure, and inspect parts without slowing throughput. Two of the most common types are ultrasonic distance sensors and vision sensors. Each has distinct operating principles, configuration steps, and failure modes. Understanding both prepares you to specify, commission, and troubleshoot sensing systems on industrial robots and packaging lines.
---
An ultrasonic sensor emits a burst of high-frequency sound (typically 40–400 kHz) from a piezoelectric transducer. The burst travels through air, reflects off a target, and returns to the sensor. The sensor measures the time of flight (TOF) — the round-trip travel time — and converts it to distance using the speed of sound (approximately 343 m/s at 20 °C).
Distance = (Time of Flight × Speed of Sound) / 2
The division by 2 accounts for the signal traveling out and back.
Many ultrasonic sensors offer a 4–20 mA analog output, which maps a configured distance window to a proportional current. 4 mA corresponds to the near (minimum) end of the window and 20 mA to the far (maximum) end. This live signal travels over a two-wire loop to a PLC analog input card, a meter, or a data recorder.
To configure the output window you use teach buttons on the sensor housing or a configuration interface. The procedure is:
1. Place a target at the near-limit distance. Press the near-teach button. The sensor records that position as the 4 mA point.
2. Place the target at the far-limit distance. Press the far-teach button. The sensor records that position as the 20 mA point.
3. Verify by moving the target to known intermediate distances and reading the meter.
Always apply the 4–20 mA scaling formula to convert a measured current back to distance:
Distance = [(I − 4 mA) / 16 mA] × (D_max − D_min) + D_min
where I is the measured current, D_min is the near-limit distance, and D_max is the far-limit distance.
---
A vision sensor captures a digital image using a CMOS or CCD camera, then runs inspection algorithms on that image in real time. Unlike a full machine vision system (which uses a separate PC with complex software), a vision sensor integrates the camera, processor, and I/O into one compact housing. Examples include the Keyence IV Series and the Cognex In-Sight Micro.
Common inspection types include:
Using the sensor's PC-based configuration software:
1. Mount and focus the sensor so the part fills an appropriate portion of the field of view.
2. Set lighting — use the sensor's built-in illuminator and adjust angle and intensity to create consistent contrast between the part and background.
3. Teach a reference image with a known-good part in the correct position.
4. Define the inspection region of interest (ROI) — a window drawn around the area to inspect.
5. Set the inspection tool (e.g., brightness, area, or pattern matching) and define pass/fail thresholds.
6. Run a calibration sample of known good and bad parts, adjust thresholds, and confirm that the system produces correct outputs before going live.
Outputs from the vision sensor (PASS / FAIL digital signals) connect to PLC discrete inputs. Many sensors also support Ethernet (EtherNet/IP or PROFINET) for result logging.
---
When you run a test batch you record results in a confusion matrix:
| | Sensor says PASS | Sensor says FAIL |
|---|---|---|
| Actually good | True Positive (TP) | False Negative (FN) |
| Actually bad | False Positive (FP) | True Negative (TN) |
A false positive (passing a bad part) is usually the more costly error in manufacturing. A false negative (rejecting a good part) wastes yield. Your goal is to minimize both.
---
| Failure Mode | Sensor Type | Mitigation |
|---|---|---|
| Glare / specular reflection | Vision | Diffuse lighting; polarizing filter |
| Ambient light variation | Vision | Enclose inspection station; use triggered strobe |
| Target angle (echo miss) | Ultrasonic | Keep target perpendicular (±3°) to sensor face |
| Vibration blurring image | Vision | Shorter exposure; mechanically isolate camera mount |
| Temperature drift (speed of sound) | Ultrasonic | Use sensors with built-in temperature compensation |
| Foam or soft surfaces absorbing sound | Ultrasonic | Use higher-frequency transducer; reduce range |
---
Before accessing sensor wiring or making connections:
These standards are not optional. Sensor configuration is routine work — but routine work inside a machine cell carries real hazards.
Answer each question, then check it. Nothing is recorded; this is your own practice.
A free tech program — complimentary, as our commitment to get America working. Help us build VoTechWorks. Tell us what works, what doesn’t, and what you want to learn.