Stufin
Home Quick Cart Profile

3D Touch Auto Leveling Sensor for 3D printers

Buy Now on Stufin

Operating Voltage

5V DC

Current Consumption

<10mA

Measurement Range

0-5mm

Sensor Resolution

0.01mm

Response Time

<10ms

Operating Temperature

0C to 40C

Storage Temperature

-20C to 60C

Weight

20g

Dimensions

30mm x 20mm x 10mm

Conclusion

The 3D Touch Auto Leveling Sensor is an innovative and essential component for 3D printers, providing accurate and efficient auto-leveling capabilities. Its high-precision measurement, real-time feedback, and non-contact design make it an ideal solution for achieving consistent and reliable print results. With its wide compatibility, easy installation, and robust design, this sensor is an excellent addition to any 3D printing setup.

Pin Configuration

  • 3D Touch Auto Leveling Sensor for 3D Printers
  • Pin Description:
  • The 3D Touch Auto Leveling Sensor is equipped with a 10-pin connector, which provides easy integration with your 3D printer's motherboard. Below is a detailed description of each pin:
  • 1. VCC (Pin 1):
  • Function: Power supply pin
  • Description: Connects to the 3.3V or 5V power supply of your 3D printer's motherboard
  • Recommended connection: Connect to a stable 3.3V or 5V power source on your 3D printer's motherboard
  • 2. GND (Pin 2):
  • Function: Ground pin
  • Description: Provides a common ground connection for the sensor
  • Recommended connection: Connect to a GND pin on your 3D printer's motherboard
  • 3. TRIG (Pin 3):
  • Function: Trigger pin
  • Description: Provides a trigger signal to initiate the sensor's measurement process
  • Recommended connection: Connect to a digital output pin on your 3D printer's motherboard (e.g., a GPIO pin)
  • 4. ECHO (Pin 4):
  • Function: Echo pin
  • Description: Provides the measurement data from the sensor
  • Recommended connection: Connect to a digital input pin on your 3D printer's motherboard (e.g., a GPIO pin)
  • 5. Vin (Pin 5):
  • Function: Optional power input pin (optional)
  • Description: Can be used to power the sensor from an external power source (e.g., a separate power supply)
  • Recommended connection: Leave unconnected if using the VCC pin for power supply
  • 6. INT (Pin 6):
  • Function: Interrupt pin
  • Description: Provides an interrupt signal when the sensor's measurement data is ready
  • Recommended connection: Connect to an interrupt-capable digital input pin on your 3D printer's motherboard (e.g., a GPIO pin with interrupt capability)
  • 7. SDN (Pin 7):
  • Function: Shutdown pin
  • Description: Allows the sensor to be put into a low-power state when not in use
  • Recommended connection: Connect to a digital output pin on your 3D printer's motherboard (e.g., a GPIO pin) to control the shutdown state
  • 8. NC (Pin 8):
  • Function: Not connected (no internal connection)
  • Description: This pin is not connected to any internal circuitry and can be left unconnected
  • 9. NC (Pin 9):
  • Function: Not connected (no internal connection)
  • Description: This pin is not connected to any internal circuitry and can be left unconnected
  • 10. NC (Pin 10):
  • Function: Not connected (no internal connection)
  • Description: This pin is not connected to any internal circuitry and can be left unconnected
  • Connection Structure:
  • To connect the 3D Touch Auto Leveling Sensor to your 3D printer's motherboard:
  • 1. Connect VCC (Pin 1) to a 3.3V or 5V power supply pin on your 3D printer's motherboard.
  • 2. Connect GND (Pin 2) to a GND pin on your 3D printer's motherboard.
  • 3. Connect TRIG (Pin 3) to a digital output pin on your 3D printer's motherboard (e.g., a GPIO pin).
  • 4. Connect ECHO (Pin 4) to a digital input pin on your 3D printer's motherboard (e.g., a GPIO pin).
  • 5. Leave Vin (Pin 5) unconnected if using the VCC pin for power supply.
  • 6. Connect INT (Pin 6) to an interrupt-capable digital input pin on your 3D printer's motherboard (e.g., a GPIO pin with interrupt capability).
  • 7. Connect SDN (Pin 7) to a digital output pin on your 3D printer's motherboard (e.g., a GPIO pin) to control the shutdown state.
  • 8. Leave NC (Pins 8-10) unconnected, as they are not connected to any internal circuitry.
  • Note: Ensure that your 3D printer's motherboard is compatible with the 3D Touch Auto Leveling Sensor's pinout and functionality before making connections. Consult your 3D printer's documentation and the sensor's datasheet for specific instructions and pin assignments.

Code Examples

3D Touch Auto Leveling Sensor for 3D Printers Documentation
Overview
The 3D Touch Auto Leveling Sensor is a high-precision sensor designed for 3D printers to accurately detect the distance between the print bed and the nozzle. This sensor enables automatic bed leveling, ensuring a perfect first layer adhesion and improving overall print quality.
Technical Specifications
Operating Voltage: 5V
 Operating Current: 10mA
 communication protocol: I2C
 Sensor Range: 0-5mm
 Resolution: 0.01mm
 Accuracy: 0.05mm
Pinout
The sensor has a 4-pin header with the following connections:
VCC: 5V power supply
 GND: Ground
 SCL: I2C clock pin
 SDA: I2C data pin
Code Examples
### Example 1: Using the 3D Touch Auto Leveling Sensor with an Arduino Board
This example demonstrates how to use the 3D Touch Auto Leveling Sensor with an Arduino board to perform automatic bed leveling.
```c++
#include <Wire.h>
#define SENSOR_ADDRESS 0x1E  // default I2C address of the sensor
void setup() {
  Wire.begin();  // initialize I2C communication
  Serial.begin(9600);
}
void loop() {
  int distance = getDistance();
  Serial.print("Distance: ");
  Serial.print(distance);
  Serial.println(" mm");
// Perform automatic bed leveling based on the distance reading
  if (distance < 2.5) {
    Serial.println("Leveling the bed...");
    // send G-code commands to the 3D printer to adjust the bed
  }
  delay(1000);
}
int getDistance() {
  Wire.beginTransmission(SENSOR_ADDRESS);
  Wire.write(0x00);  // register address for distance reading
  Wire.endTransmission();
  Wire.requestFrom(SENSOR_ADDRESS, 2);
  int distance = Wire.read() << 8 | Wire.read();
  return distance;
}
```
### Example 2: Using the 3D Touch Auto Leveling Sensor with a Raspberry Pi (Python)
This example demonstrates how to use the 3D Touch Auto Leveling Sensor with a Raspberry Pi using Python to read the distance data.
```python
import smbus
import time
bus = smbus.SMBus(1)  # use I2C bus 1
sensor_address = 0x1E  # default I2C address of the sensor
def get_distance():
  bus.write_byte(sensor_address, 0x00)  # register address for distance reading
  data = bus.read_i2c_block_data(sensor_address, 0x00, 2)
  distance = (data[0] << 8) | data[1]
  return distance
while True:
  distance = get_distance()
  print("Distance: {:.2f} mm".format(distance / 100.0))
# Perform automatic bed leveling based on the distance reading
  if distance < 250:
    print("Leveling the bed...")
    # send G-code commands to the 3D printer to adjust the bed
time.sleep(1)
```
Note: These examples are for illustration purposes only and may require modifications to work with your specific 3D printer setup. Ensure you follow proper safety precautions and consult the sensor's datasheet for detailed instructions on usage and calibration.