JS40F Digital Distance Sensor


Specially designed digital distance sensor for mini sumo robots and small robot projects. It can detect objects from 40 cm (based on detecting area it can be up to 80cm!) Dimensions are very similar to popular Sharp GP340 distance sensor, moreover JS40F doesn’t need any extra resistor, capacitor or board…


    Sensor Features

    • Reflective type infrared (IR) sensor that rely on beam reflection of front object.
    • Works between 3.3V to 5V. At 5V sensor draws 15mA.
    • Has a reverse polarity protection between voltage inputs (Power & GND)
    • No manual setting for distance decrease.
    • At backside, it has red led for detection status.
    • Comes with 15cm stranded wire.

    Dimensions & Weight

    • 17.7mm Length x 11.5mm Width x 12.6mm Height
    • Only 4 grams weight. (Including cables)

    Cable Definitons

    They are same as industrial connection standards.

    • Brown: 5V
    • Blue: GND
    • Black: Signal Out

    Which Projects are suitable for?

    • Mini Sumo Robots (We suggest strongly!)
    • Maze Robots
    • Obstacle Avoiding Robots

    Please watch video below:


    Example Arduino Sketch:

    int Sensor1=5; // Digital sensor connected to D5
    int value; // We define variable for storing sensor output.
    void setup() {
    pinMode(Sensor1, INPUT); // Sensor1 is declared as input
    Serial.begin(9600); // Serial communication started with 9600 bits per second.
    void loop() {
    value=digitalRead(Sensor1); // Sensor is read digitally and reflected to value.
    Serial.print("Sensor Output: "); //IT will write Sensor Output to Serial Monitor Screen.
    Serial.println(value); // It will write value variable raw value (0 or 1)
    delay(100); // We added 100ms Delay for more balanced readings.


There are no reviews yet.

Be the first to review “JS40F Digital Distance Sensor”

Your email address will not be published. Required fields are marked *