

The LYPR540AH is a high-performance linear position sensor designed to deliver accurate position feedback in a wide range of applications. Its robust design and high resolution make it ideal for use in robotics, automation, and industrial machinery, where precise motion control is critical. This sensor is engineered to withstand demanding environments, ensuring reliable operation in both commercial and industrial settings.








| Parameter | Value |
|---|---|
| Supply Voltage | 3.3V to 5.5V |
| Operating Current | 10 mA (typical) |
| Output Signal Type | Analog or PWM |
| Measurement Range | 0 to 100 mm |
| Resolution | 0.01 mm |
| Linearity Error | ±0.1% of full scale |
| Operating Temperature | -40°C to +85°C |
| Housing Material | Aluminum alloy |
| Connector Type | 4-pin Molex |
| Pin Number | Pin Name | Description |
|---|---|---|
| 1 | VCC | Power supply input (3.3V to 5.5V) |
| 2 | GND | Ground connection |
| 3 | OUT | Output signal (Analog or PWM, depending on mode) |
| 4 | MODE | Mode selection (Analog: LOW, PWM: HIGH) |
Below is an example of how to interface the LYPR540AH with an Arduino UNO in analog mode:
// Define the pin connected to the sensor's OUT pin
const int sensorPin = A0; // Analog pin A0 for reading sensor output
void setup() {
Serial.begin(9600); // Initialize serial communication at 9600 baud
pinMode(sensorPin, INPUT); // Set the sensor pin as input
}
void loop() {
int sensorValue = analogRead(sensorPin); // Read the analog value from the sensor
float position = map(sensorValue, 0, 1023, 0, 100);
// Map the sensor value to the measurement range (0 to 100 mm)
Serial.print("Position: ");
Serial.print(position); // Print the position value
Serial.println(" mm"); // Add units for clarity
delay(100); // Delay for 100 ms before the next reading
}
analogRead() with a function to decode PWM signals.map() function parameters based on your specific calibration.No Output Signal:
Inaccurate Readings:
Noisy Output:
PWM Signal Not Detected:
Q: Can the LYPR540AH be used in outdoor environments?
A: Yes, the sensor is designed to operate in a wide temperature range (-40°C to +85°C). However, ensure it is protected from direct exposure to water or extreme environmental conditions.
Q: How do I switch between analog and PWM modes?
A: Use the MODE pin to select the desired mode. Set it to LOW for analog output or HIGH for PWM output.
Q: What is the maximum cable length for connecting the sensor?
A: For optimal performance, keep the cable length under 1 meter. Use shielded cables for longer distances to reduce noise.
Q: Can I use the LYPR540AH with a 3.3V microcontroller?
A: Yes, the sensor operates within a supply voltage range of 3.3V to 5.5V, making it compatible with 3.3V systems.
By following this documentation, users can effectively integrate the LYPR540AH into their projects and achieve precise linear position sensing.